- addMethod
Adds a method.
- getName
Obtains the fully-qualified name of the class.
- toClass
Converts this class to a java.lang.Class object. Once this method is called,
further modifications a
- addField
Adds a field with an initial value.The CtField belonging to anotherCtClass cannot be directly added
- addConstructor
Adds a constructor. To add a class initializer (static constructor), call
makeClassInitializer().
- getDeclaredMethod
Retrieves the method with the specified name and parameter types among the
methods declared in the c
- getDeclaredMethods
Retrieves methods with the specified name among the methods declared in the
class. Multiple methods
- getClassFile
Returns a class file for this class.This method is not available if isFrozen() is true.
- addInterface
Adds an interface.
- setSuperclass
Changes a super class unless this object represents an interface. The new super
class must be compat
- toBytecode
Converts this class to a class file. Once this method is called, further
modifications are not possi
- detach
Removes this CtClass object from theClassPool. After this method is called, any
method cannot be cal