Package javassist
Class CtField.MethodInitializer
- java.lang.Object
-
- javassist.CtField.Initializer
-
- javassist.CtField.NewInitializer
-
- javassist.CtField.MethodInitializer
-
- Enclosing class:
- CtField
static class CtField.MethodInitializer extends CtField.NewInitializer
A field initialized with the result of a static method call.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) java.lang.String
methodName
-
Fields inherited from class javassist.CtField.NewInitializer
objectType, stringParams, withConstructorParams
-
-
Constructor Summary
Constructors Constructor Description MethodInitializer()
-
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.private java.lang.String
getDescriptor()
-
Methods inherited from class javassist.CtField.NewInitializer
compileStringParameter
-
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
-
-
-
-
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.- Overrides:
compile
in classCtField.NewInitializer
- 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.- Overrides:
compileIfStatic
in classCtField.NewInitializer
- Throws:
CannotCompileException
-
-