GMaven

Support Java 5 generics for stub-generation

Details

  • Type: Improvement Improvement
  • Status: Closed Closed
  • Priority: Critical Critical
  • Resolution: Fixed
  • Affects Version/s: None
  • Fix Version/s: 1.1
  • Component/s: stub generation
  • Labels:
    None
  • Number of attachments :
    0

Activity

Hide
Jason Dillon added a comment -

This should apply to runtimes 1.5 and above only.

Show
Jason Dillon added a comment - This should apply to runtimes 1.5 and above only.
Hide
Adam Jordens added a comment -

Is there any particular change in status of this?

I'm attempting to use gmaven to compile classes with generified collections.

ie)

public class Foo
{
Collection<Children> children;
}

and the generated stub only has a:

public Collection getChildren();

If I try something like:

public class Foo
{
private Collection<Children> children;

public Collection<Children> getChildren() { return children; }
}

it still generates a stub minus the generification.

Might there be a solution?

Show
Adam Jordens added a comment - Is there any particular change in status of this? I'm attempting to use gmaven to compile classes with generified collections. ie) public class Foo { Collection<Children> children; } and the generated stub only has a: public Collection getChildren(); If I try something like: public class Foo { private Collection<Children> children; public Collection<Children> getChildren() { return children; } } it still generates a stub minus the generification. Might there be a solution?
Hide
Jason Dillon added a comment -

Support comming as soon as I have time, please feel free to help out if you have some spare cycles na

Show
Jason Dillon added a comment - Support comming as soon as I have time, please feel free to help out if you have some spare cycles na
Hide
Danny Siu added a comment -

any update on this?

Show
Danny Siu added a comment - any update on this?
Hide
Jason Dillon added a comment -

Use 1.7 provider

Show
Jason Dillon added a comment - Use 1.7 provider
Hide
John Sherlock added a comment -

I've run into a similar problem using GMaven 1.3, Groovy 1.7.5 and Maven 3.0. Generics in a Groovy class work ok so long as the parametric type is formally declared by a class, and not dynamically declared on the signature of a class definition. By this I mean that this is ok...

public interface MyInterface { public List<Person> getPeople(); }

...but this causes an error in the GMaven plugin at compile time...

public interface MyGenericInterface<Entity> { public List<Entity> getEntities(); }

This is the error occurs...

Failed to execute goal org.codehaus.gmaven:gmaven-plugin:1.3:generateStubs (default) on project gmaven-test: Unexpected node: Node[17:37,71,TYPE_PARAMETERS]

Is this a known issue?

Show
John Sherlock added a comment - I've run into a similar problem using GMaven 1.3, Groovy 1.7.5 and Maven 3.0. Generics in a Groovy class work ok so long as the parametric type is formally declared by a class, and not dynamically declared on the signature of a class definition. By this I mean that this is ok... public interface MyInterface { public List<Person> getPeople(); } ...but this causes an error in the GMaven plugin at compile time... public interface MyGenericInterface<Entity> { public List<Entity> getEntities(); } This is the error occurs... Failed to execute goal org.codehaus.gmaven:gmaven-plugin:1.3:generateStubs (default) on project gmaven-test: Unexpected node: Node[17:37,71,TYPE_PARAMETERS] Is this a known issue?

People

Vote (7)
Watch (6)

Dates

  • Created:
    Updated:
    Resolved: