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