JBoss Community

Generating a method with Generics

created by Prabhath Suminda in Javassist - View the full discussion

Hi,

For the project I am workking on I need to generate a class like this.

class Foo{

     pubic void doSomething(List<String> l){

     }

}

 

But this falis when I called CtNewMethod.make() for the doSOmething method because of generics. In te documentation it is ssaid that this can be done using low level APIs of Java Assisst but I could not find any documentations on how to do this. So can anyone give a example on how to create the above class.

Reply to this message by going to Community

Start a new discussion in Javassist at Community