I need to generate a class which must have a method that returns an object of the same class.
I want to generate something like this
public class A{
public A method1(){
...
}
}
The problem is that I have to pass the Class object of the class being returned by the method. If i do that, because my class is not built yet I will get a ClassNotFoundException. Is there a way of achieving this?
Thanks.