static class CtField.MethodInitializer extends CtField.NewInitializer
Modifier and Type | Field and Description |
---|---|
(package private) java.lang.String |
methodName |
objectType, stringParams, withConstructorParams
Constructor and Description |
---|
MethodInitializer() |
Modifier and Type | Method and 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() |
compileStringParameter
byCall, byCall, byCallWithParams, byCallWithParams, byExpr, byExpr, byNew, byNew, byNewArray, byNewArray, byNewWithParams, byNewWithParams, byParameter, check, constant, constant, constant, constant, constant, constant, getConstantValue
int compile(CtClass type, java.lang.String name, Bytecode code, CtClass[] parameters, Javac drv) throws CannotCompileException
compile
in class CtField.NewInitializer
CannotCompileException
private java.lang.String getDescriptor()
int compileIfStatic(CtClass type, java.lang.String name, Bytecode code, Javac drv) throws CannotCompileException
compileIfStatic
in class CtField.NewInitializer
CannotCompileException