I want to generate a class that extends other class using JavaPoet.
For example I have this class:
@MyAnnotation
public class ClassA {
public ClassA(String paramA, int paramB) {
// some code
}
}
and I want to generate new class like this one:
public class Generated_ClassA extends ClassA {
public Generated_ClassA (String paramA, int paramB) {
super(paramA, paramB);
}
}
However, I don't see any ready-to-use API in JavaPoet to create constructors which are calling superclass constructors. How it is possible to do this and what are the best practices?