You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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))
The text was updated successfully, but these errors were encountered:
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 isinvariant
, so? extends Iterable<String>
is represented asTypeInfo<Iterable<String>>
and? super Iterable<String>
is represented asTypeInfo<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))
The text was updated successfully, but these errors were encountered: