Package | Description |
---|---|
javassist |
The Javassist Core API.
|
javassist.expr |
This package contains the classes for modifying a method body.
|
Modifier and Type | Method and Description |
---|---|
static CtConstructor |
CtNewConstructor.copy(CtConstructor c,
CtClass declaring,
ClassMap map)
Creates a copy of a constructor.
|
static CtConstructor |
CtNewConstructor.defaultConstructor(CtClass declaring)
Creates a default (public) constructor.
|
CtConstructor |
CtClassType.getClassInitializer() |
CtConstructor |
CtClass.getClassInitializer()
Gets the class initializer (static constructor)
declared in the class.
|
CtConstructor |
CtClassType.getConstructor(java.lang.String desc) |
CtConstructor |
CtClass.getConstructor(java.lang.String desc)
Returns the constructor with the given signature,
which is represented by a character string
called method descriptor.
|
CtConstructor[] |
CtArray.getConstructors() |
CtConstructor[] |
CtClassType.getConstructors() |
CtConstructor[] |
CtClass.getConstructors()
Returns an array containing
CtConstructor objects
representing all the non-private constructors of the class. |
CtConstructor |
CtClass.getDeclaredConstructor(CtClass[] params)
Returns a constructor receiving the specified parameters.
|
CtConstructor[] |
CtClassType.getDeclaredConstructors() |
CtConstructor[] |
CtClass.getDeclaredConstructors()
Gets all the constructors declared in the class.
|
static CtConstructor |
CtNewConstructor.make(CtClass[] parameters,
CtClass[] exceptions,
CtClass declaring)
Creates a public constructor that only calls a constructor
in the super class.
|
static CtConstructor |
CtNewConstructor.make(CtClass[] parameters,
CtClass[] exceptions,
int howto,
CtMethod body,
CtMethod.ConstParameter cparam,
CtClass declaring)
Creates a public constructor.
|
static CtConstructor |
CtNewConstructor.make(CtClass[] parameters,
CtClass[] exceptions,
java.lang.String body,
CtClass declaring)
Creates a public constructor.
|
static CtConstructor |
CtNewConstructor.make(java.lang.String src,
CtClass declaring)
Compiles the given source code and creates a constructor.
|
CtConstructor |
CtClassType.makeClassInitializer() |
CtConstructor |
CtClass.makeClassInitializer()
Makes an empty class initializer (static constructor).
|
static CtConstructor |
CtNewConstructor.skeleton(CtClass[] parameters,
CtClass[] exceptions,
CtClass declaring)
Creates a public constructor that only calls a constructor
in the super class.
|
static CtConstructor |
CtNewWrappedConstructor.wrapped(CtClass[] parameterTypes,
CtClass[] exceptionTypes,
int howToCallSuper,
CtMethod body,
CtMethod.ConstParameter constParam,
CtClass declaring) |
Modifier and Type | Method and Description |
---|---|
void |
CtNewClass.addConstructor(CtConstructor c) |
void |
CtClassType.addConstructor(CtConstructor c) |
void |
CtClass.addConstructor(CtConstructor c)
Adds a constructor.
|
static CtConstructor |
CtNewConstructor.copy(CtConstructor c,
CtClass declaring,
ClassMap map)
Creates a copy of a constructor.
|
private static boolean |
CtClassType.isPubCons(CtConstructor cons) |
void |
CtClassType.removeConstructor(CtConstructor m) |
void |
CtClass.removeConstructor(CtConstructor c)
Removes a constructor declared in this class.
|
void |
CtConstructor.setBody(CtConstructor src,
ClassMap map)
Copies a constructor body from another constructor.
|
Constructor and Description |
---|
CtConstructor(CtConstructor src,
CtClass declaring,
ClassMap map)
Creates a copy of a
CtConstructor object. |
Modifier and Type | Method and Description |
---|---|
CtConstructor |
ConstructorCall.getConstructor()
Returns the called constructor.
|
CtConstructor |
NewExpr.getConstructor()
Returns the constructor called for creating the object.
|