users@codemodel.java.net

How to create a method call with "generic binding"

From: ®om <Romain>
Date: Tue, 16 Apr 2013 16:54:10 +0200

Hi,

If I have a method:

public class MyClass {

     public static <T> T method() { … }

}

How can I create the model of this method call:

     MyType t = MyClass.<MyType>method();

?

JClass.staticInvoke(String method) does not seem to support it.
I tried to workaround passing "<mypackage.MyType>method()" as a String,
but it refuses a method name containing a dot (which seems fair).

Thank you for your help.
®om