Skip to content
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

@Artyomcool

Description

@Artyomcool

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions