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 nested generic type arguments in javaType #196

Closed
tcharman opened this issue May 27, 2014 · 3 comments
Closed

Support nested generic type arguments in javaType #196

tcharman opened this issue May 27, 2014 · 3 comments
Milestone

Comments

@tcharman
Copy link

Using 0.4.2, I am trying out generics. I have declared as follows:

"javaType": "java.util.Map<java.lang.String, java.util.Map<java.lang.String, java.lang.String>>",

When I try this, the generated class doesn't have the second > on the end of the type, so renders a compile error (in the attribute, the getter and the setter).

@joelittlejohn
Copy link
Owner

The parsing is pretty dump here right now, it's simply splitting the generic type arguments by commas and doesn't support nested generic types. Should be reasonably simple to make this solution recursive however I'm concerned about how many more edge cases there might be in trying to replicate the full compatible Java syntax.

@joelittlejohn
Copy link
Owner

It's probably worth documenting this as a known limitation of the generics support in javaType.

@joelittlejohn joelittlejohn changed the title Nested Generics Not Honoured Nested generics not honoured Nov 4, 2014
@stowns
Copy link

stowns commented Jan 23, 2015

+1

@joelittlejohn joelittlejohn added this to the 0.4.8 milestone Feb 9, 2015
@joelittlejohn joelittlejohn changed the title Nested generics not honoured Support nested generic type arguments in javaType Feb 9, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants