JBoss Community

Method returning Class

created by Ricardo Ferreira in Javassist - View the full discussion

Hello all,

 

I just started using Javassist, and so far I find it very flexible and easy to use.

 

However, I'm trying to add a method to a class, which return type should be "Class<?>". I'm getting an error when compiling the method though, a simple CannotCompileException with syntax error near "Class<?>". If just returning "Class", everything works fine. But for the sake of correctness I'd like to return "Class<?>".

 

Is there any way to go around this?

Reply to this message by going to Community

Start a new discussion in Javassist at Community