Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
This repository was archived by the owner on Feb 26, 2023. It is now read-only.
This repository was archived by the owner on Feb 26, 2023. It is now read-only.

Generics support for beans hierarchy #865

Copy link
Copy link
@Artyomcool

Description

@Artyomcool
Issue body actions

I've submitted PR #793 early, but it looks like my intentions wasn't clear enough.
Let's assume:

@EBean
abstract class BeanA<N extends Number> {

    @Background
    void method(List<N> list) {
    }

}

@EBean
class BeanB extends BeanA<Double> {

}

Now it generates:

class BeanB_ extends BeanB {
    @Override
    public void method(final List<N> a) {...}
}

But should:

class BeanB_ extends BeanB {
    @Override
    public void method(final List<N> a) {...}
}

Another case is:

@EBean
public abstract class BeanA<T> {
}

and

@EBean
public class BeanB<T> extends BeanA<T> {
}

Right now it breaks generated class BeanB_.

I've also fixed <? super A> wildcard problem, discussed in #838 (but is not the rare case for me, actually).
I've used some durty hacks to make it work. The main reason for that is limitations of the code model.
That PR is not up-to-date, but, if you want, I could make it so.

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.