Package javassist
Class CtField.NewInitializer
java.lang.Object
javassist.CtField.Initializer
javassist.CtField.NewInitializer
- Direct Known Subclasses:
CtField.MethodInitializer
- Enclosing class:
CtField
A field initialized with an object created by the new operator.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) int
Produces codes in which a new object is created and assigned to the field as the initial value.(package private) int
compileIfStatic
(CtClass type, String name, Bytecode code, Javac drv) Produces codes for a static field.protected final int
private String
Methods inherited from class javassist.CtField.Initializer
byCall, byCall, byCallWithParams, byCallWithParams, byExpr, byExpr, byNew, byNew, byNewArray, byNewArray, byNewWithParams, byNewWithParams, byParameter, check, constant, constant, constant, constant, constant, constant, getConstantValue
-
Field Details
-
Constructor Details
-
NewInitializer
NewInitializer()
-
-
Method Details
-
compile
int compile(CtClass type, String name, Bytecode code, CtClass[] parameters, Javac drv) throws CannotCompileException Produces codes in which a new object is created and assigned to the field as the initial value.- Specified by:
compile
in classCtField.Initializer
- Throws:
CannotCompileException
-
getDescriptor
-
compileIfStatic
int compileIfStatic(CtClass type, String name, Bytecode code, Javac drv) throws CannotCompileException Produces codes for a static field.- Specified by:
compileIfStatic
in classCtField.Initializer
- Throws:
CannotCompileException
-
compileStringParameter
- Throws:
CannotCompileException
-