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

Better TypeInfo #5

Open
JonathanxD opened this issue Nov 3, 2017 · 0 comments
Open

Better TypeInfo #5

JonathanxD opened this issue Nov 3, 2017 · 0 comments

Comments

@JonathanxD
Copy link
Owner

Currently, TypeInfo is very useful to workaround the erasure, allowing types to be specified through a constructed type, or using abstract classes. But there are various limitations, the mainly is that it is invariant, so ? extends Iterable<String> is represented as TypeInfo<Iterable<String>> and ? super Iterable<String> is represented as TypeInfo<Object> (yes, it is).

To solve that, the class should be fully rewritten, but one of the goals is to keep same functionalities. A good example of generic representation is GenericType of CodeAPI: Generic.type(List.class).of(Generic.wildcard().extends$(CharSequence.class))

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