phax / jcodemodel

A heavily extended fork of the com.sun.codemodel (from 2013/09)
Other
92 stars 34 forks source link

Invocation with type-arguments. #2

Closed sviperll closed 10 years ago

sviperll commented 10 years ago

We need to explicitly state type-arguments sometimes when invoking methods, like in

List.<Integer>nil(); // Static-invocation

I've found no way to generate this with codemodel.

phax commented 10 years ago

Currently this is not possible. I'm trying to find a solution to this

phax commented 10 years ago

I think I found a solution. Example code can be found in class com.helger.jcodemodel.tests.JInvocationTest Please check if this fits your needs. If so I will release 2.6.5

sviperll commented 10 years ago

Your JInvocation#generify method should be called narrow instead. It corresponds to JClass#narrow method and specifies narrowing method-type to more specific.

phax commented 10 years ago

You are so right - changed! Can I close this issue?

sviperll commented 10 years ago

I consider this issue is fixed now. Thank you for your work!

phax commented 10 years ago

Excellent - new release will be out soon!

phax commented 10 years ago

Release 2.7.0 out now