Package javassist
Class CtField.NewInitializer
- java.lang.Object
-
- javassist.CtField.Initializer
-
- javassist.CtField.NewInitializer
-
- Direct Known Subclasses:
CtField.MethodInitializer
- Enclosing class:
- CtField
static class CtField.NewInitializer extends CtField.Initializer
A field initialized with an object created by the new operator.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) CtClass
objectType
(package private) java.lang.String[]
stringParams
(package private) boolean
withConstructorParams
-
Constructor Summary
Constructors Constructor Description NewInitializer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) int
compile(CtClass type, java.lang.String name, Bytecode code, CtClass[] parameters, Javac drv)
Produces codes in which a new object is created and assigned to the field as the initial value.(package private) int
compileIfStatic(CtClass type, java.lang.String name, Bytecode code, Javac drv)
Produces codes for a static field.protected int
compileStringParameter(Bytecode code)
private java.lang.String
getDescriptor()
-
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 Detail
-
objectType
CtClass objectType
-
stringParams
java.lang.String[] stringParams
-
withConstructorParams
boolean withConstructorParams
-
-
Method Detail
-
compile
int compile(CtClass type, java.lang.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
private java.lang.String getDescriptor()
-
compileIfStatic
int compileIfStatic(CtClass type, java.lang.String name, Bytecode code, Javac drv) throws CannotCompileException
Produces codes for a static field.- Specified by:
compileIfStatic
in classCtField.Initializer
- Throws:
CannotCompileException
-
compileStringParameter
protected final int compileStringParameter(Bytecode code) throws CannotCompileException
- Throws:
CannotCompileException
-
-