jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • QDox
  • QDOX-54

Support for retrieval of generic type information (JSR 14)

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: New Feature New Feature
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: None
  • Fix Version/s: 1.8
  • Component/s: None
  • Labels:
    None
  • Options
    • Sort By Name
    • Sort By Date
    • Ascending
    • Descending
    • Download All

Attachments

  1. Text File
    QDOX-54.patch
    30/Dec/08 6:35 PM
    62 kB
    Robert Scholte

Issue Links

depends upon

New Feature - A new feature of the product, which has yet to be developed. QDOX-53 Support for parsing of sources with generics (JSR 14)

  • Major - Major loss of function.
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.
is depended upon by

Improvement - An improvement or enhancement to an existing feature or task. MGWT-1 Support for generics return types in Async interface generation

  • Major - Major loss of function.
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Aslak Hellesøy added a comment - 21/May/04 7:09 PM

gotta get the parser up to snuff first

Show
Aslak Hellesøy added a comment - 21/May/04 7:09 PM gotta get the parser up to snuff first
Hide
Permalink
Aslak Hellesøy added a comment - 22/May/04 12:08 PM

More specificly, what we need to do is to improve the QDox API to allow retrieval of generic parameters - similar to the new reflective API methods in JDK1.5. We should try to keep it as simple as possible though.

Show
Aslak Hellesøy added a comment - 22/May/04 12:08 PM More specificly, what we need to do is to improve the QDox API to allow retrieval of generic parameters - similar to the new reflective API methods in JDK1.5. We should try to keep it as simple as possible though.
Hide
Permalink
Mike Williams added a comment - 07/Nov/04 4:59 AM

I'm tentatively bumping this to 1.7, as I think we need to concentrate on getting a "Tiger tolerant" release out the door, before worrying about how to expose generic-type data (or annotation data, for that matter). Aslak, any objection?

Show
Mike Williams added a comment - 07/Nov/04 4:59 AM I'm tentatively bumping this to 1.7, as I think we need to concentrate on getting a "Tiger tolerant" release out the door, before worrying about how to expose generic-type data (or annotation data, for that matter). Aslak, any objection?
Hide
Permalink
Paul Hammant added a comment - 21/Feb/08 1:48 AM

How does it work now? does it barf or honor an aggressive type-erasure design

Show
Paul Hammant added a comment - 21/Feb/08 1:48 AM How does it work now? does it barf or honor an aggressive type-erasure design
Hide
Permalink
Arie Ozarov added a comment - 15/Apr/08 5:48 PM

Thanks guys, the project is very useful for our needs, mainly for the last two reasons mentioned on http://joe.truemesh.com/blog//000642.html (chicken and egg & javadoc and param names).

When do you plan to expose Generic types?
If two complex exposing them correctly (using their own representation) a valuable interim solution (at least for us) would be to include it as part of the Type#getValue (or a new Type#getRawValue) method.

Show
Arie Ozarov added a comment - 15/Apr/08 5:48 PM Thanks guys, the project is very useful for our needs, mainly for the last two reasons mentioned on http://joe.truemesh.com/blog//000642.html (chicken and egg & javadoc and param names). When do you plan to expose Generic types? If two complex exposing them correctly (using their own representation) a valuable interim solution (at least for us) would be to include it as part of the Type#getValue (or a new Type#getRawValue) method.
Hide
Permalink
Robert Scholte added a comment - 30/Dec/08 1:48 PM

One of the projects I'm involved in is using gwt. They struggled a bit, and so I had the change to introduce maven. I managed to mavenize the project, but when using the gwt:generateAsync only half of the classes were properly generated. This issue was the very first issue for gwt, which depends on qdox.
Of course I had to convince the other members of the power of maven, so I saw I nice challenge in this issue.
I've started on it and I'm very far.
Now it's time for writing a lot of tests, some code cleanups must be done, but I had to share this little success

Show
Robert Scholte added a comment - 30/Dec/08 1:48 PM One of the projects I'm involved in is using gwt. They struggled a bit, and so I had the change to introduce maven. I managed to mavenize the project, but when using the gwt:generateAsync only half of the classes were properly generated. This issue was the very first issue for gwt, which depends on qdox. Of course I had to convince the other members of the power of maven, so I saw I nice challenge in this issue. I've started on it and I'm very far. Now it's time for writing a lot of tests, some code cleanups must be done, but I had to share this little success
Hide
Permalink
Robert Scholte added a comment - 30/Dec/08 6:35 PM

Even sooner than expected, but here's my patch.
In a view words:

The parser (pojo)-classes
TypeDef has a new attribute:
public List actualArgumentTypes; // List<TypeDef>

MethodDef has changed:
String returns has been removed
TypeDef returnType has been added

FieldDef:
String type is now TypeDef type;

and a WildCardTypeDef-class has been added to support these Types

The qdox.model:
Of course Type has been modified. It has now actualArgumentType and most important
String getGenericValue()

Both ModelBuilder and JavadocBuilder has been changed to process these change properly. Important to know: the JavaDocBuilder itself still doesn't create generics (requires java5 compilation).

Tests have been modified. Every type which was representated as a String is now a (Wildcard)Type or a(Wildcard)TypeDef.

And of course modifications to parser.y for generating a new Parser together with a small adjustment in lexer.flex to get a fully clean build.

Show
Robert Scholte added a comment - 30/Dec/08 6:35 PM Even sooner than expected, but here's my patch. In a view words: The parser (pojo)-classes TypeDef has a new attribute: public List actualArgumentTypes; // List<TypeDef> MethodDef has changed: String returns has been removed TypeDef returnType has been added FieldDef: String type is now TypeDef type; and a WildCardTypeDef-class has been added to support these Types The qdox.model: Of course Type has been modified. It has now actualArgumentType and most important String getGenericValue() Both ModelBuilder and JavadocBuilder has been changed to process these change properly. Important to know: the JavaDocBuilder itself still doesn't create generics (requires java5 compilation). Tests have been modified. Every type which was representated as a String is now a (Wildcard)Type or a(Wildcard)TypeDef. And of course modifications to parser.y for generating a new Parser together with a small adjustment in lexer.flex to get a fully clean build.
Hide
Permalink
Mauro Talevi added a comment - 31/Dec/08 2:41 AM

Robert, patch applied with thanks! Snapshot deployed.

Show
Mauro Talevi added a comment - 31/Dec/08 2:41 AM Robert, patch applied with thanks! Snapshot deployed.
Hide
Permalink
Markus Landwehr added a comment - 03/Jan/09 1:38 PM

Hi,

I'm new to QDOX (and Java) and try to use it for a project that takes source files and creates an UML diagram. Can please someone explain to me, how to get "ArrayList<Rectangle>" from the following source:

private ArrayList<Rectangle> getLines()
{
}

if i use JavaMethod.getValue() or JavaMethod.getGenericValue() i always get "ArrayList" as result. With getGenericValue i hopped to get "ArrayList<Rectangle>".

Sorry if this is not the right place to ask such questions.

Thank you,
Markus

Show
Markus Landwehr added a comment - 03/Jan/09 1:38 PM Hi, I'm new to QDOX (and Java) and try to use it for a project that takes source files and creates an UML diagram. Can please someone explain to me, how to get "ArrayList<Rectangle>" from the following source: private ArrayList<Rectangle> getLines() { } if i use JavaMethod.getValue() or JavaMethod.getGenericValue() i always get "ArrayList" as result. With getGenericValue i hopped to get "ArrayList<Rectangle>". Sorry if this is not the right place to ask such questions. Thank you, Markus
Hide
Permalink
Robert Scholte added a comment - 03/Jan/09 2:24 PM

getGenericValue() should indeed return java.util.ArrayList<java.awt.Rectangle>. I've used your method (for as far as I can predict the rest of the class) in a testcase and I get the right response. Can you write your own failing testcase?

Show
Robert Scholte added a comment - 03/Jan/09 2:24 PM getGenericValue() should indeed return java.util.ArrayList<java.awt.Rectangle>. I've used your method (for as far as I can predict the rest of the class) in a testcase and I get the right response. Can you write your own failing testcase?
Hide
Permalink
Markus Landwehr added a comment - 04/Jan/09 5:25 AM

Hello Robert, thank you very much. You are right. It was my mistake. I put the result of getGenericValue() into a JLabel and there "<" and ">" are not shown (html-tags?). Because of your answer i know it should work and did this: String methodType = javaMethod.getGenericValue().RepalaceAll("<","<").ReplaceAll(">",">");

Thank you for your help,
Markus

Show
Markus Landwehr added a comment - 04/Jan/09 5:25 AM Hello Robert, thank you very much. You are right. It was my mistake. I put the result of getGenericValue() into a JLabel and there "<" and ">" are not shown (html-tags?). Because of your answer i know it should work and did this: String methodType = javaMethod.getGenericValue().RepalaceAll("<","<").ReplaceAll(">",">"); Thank you for your help, Markus
Hide
Permalink
Olivier Lamy added a comment - 13/Jan/09 3:19 PM

Hi,
Any ideas when a released will be out with this fix ?
Because we are currently blocked with this to release the gwt-maven-plugin.
Thanks !

Show
Olivier Lamy added a comment - 13/Jan/09 3:19 PM Hi, Any ideas when a released will be out with this fix ? Because we are currently blocked with this to release the gwt-maven-plugin. Thanks !

People

  • Assignee:
    Unassigned
    Reporter:
    Aslak Hellesøy
Vote (3)
Watch (4)

Dates

  • Created:
    21/May/04 7:09 PM
    Updated:
    13/Jan/09 3:19 PM
    Resolved:
    31/Dec/08 2:41 AM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.