Package javassist
Class CtField.MethodInitializer
java.lang.Object
javassist.CtField.Initializer
javassist.CtField.NewInitializer
javassist.CtField.MethodInitializer
- Enclosing class:
CtField
A field initialized with the result of a static method call.
-
Field Summary
FieldsFields inherited from class javassist.CtField.NewInitializer
objectType, stringParams, withConstructorParams
-
Constructor Summary
Constructors -
Method Summary
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
-
Field Details
-
methodName
String methodName
-
-
Constructor Details
-
MethodInitializer
MethodInitializer()
-
-
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.- Overrides:
compile
in classCtField.NewInitializer
- Throws:
CannotCompileException
-
getDescriptor
-
compileIfStatic
int compileIfStatic(CtClass type, String name, Bytecode code, Javac drv) throws CannotCompileException Produces codes for a static field.- Overrides:
compileIfStatic
in classCtField.NewInitializer
- Throws:
CannotCompileException
-