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) intProduces codes in which a new object is created and assigned to the field as the initial value.(package private) intcompileIfStatic(CtClass type, String name, Bytecode code, Javac drv) Produces codes for a static field.protected final intprivate StringMethods 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:
compilein 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:
compileIfStaticin classCtField.Initializer- Throws:
CannotCompileException
-
compileStringParameter
- Throws:
CannotCompileException
-