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
Version 0.4 added support for generic types, but not wildcards. Adding the wildcard type '?' is likely straightforward, but supporting the full bounds of 'x super y' or 'x extends y' is more difficult. These require changes to JCodeModel, because wildcard support there is a bit spotty. This is definitely worth looking into for the next release though.
Here's a little gem from the CodeModel code: :-)
/** * Represents a wildcard type like "? extends Foo". * * Our modeling of types are starting to look really ugly. * ideally it should have been done somewhat like APT, * but it's too late now. * * @author Kohsuke Kawaguchi */finalclassJTypeWildcardextendsJClass {
...
}
#214 will add support for wildcards, and this issue can remain open for a future enhancement to implement bounded generics, which is much more difficult.
Trying to add a method that uses generics:
Causes this exception:
The text was updated successfully, but these errors were encountered: