Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for more generics in methods: #28

Open
slany opened this issue Oct 18, 2021 · 2 comments
Open

Support for more generics in methods: #28

slany opened this issue Oct 18, 2021 · 2 comments
Assignees

Comments

@slany
Copy link
Member

slany commented Oct 18, 2021

Follow mapper not working yet:

abstract public <T extends Data2> T conv2Data2(Data1 test, T ret)
@slany
Copy link
Member Author

slany commented Oct 23, 2021

Temporary solution for Kotlin (in jam source code):
// #28 - remove not supported constructions "? extends "
resolvedType = StringUtils.replaceAll(resolvedType, "? extends ", "");

@slany
Copy link
Member Author

slany commented Oct 28, 2022

Adept for final solution:

types in method api on overrided methods is with "? extends ", bud every implementation is without it

// source in java
abstract public List<? extends Obj2> conv(List<? extends Obj> values)

is transformed to generated code:

@Overrided
public List<? extends Obj2> conv(List<? extends Obj1> values) {
    List<Obj2> value = new ArrayList<Obj2>();
    // ...
    return value;
}

@slany slany self-assigned this Oct 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant