static class CtField.ParamInitializer extends CtField.Initializer
Modifier and Type | Field and Description |
---|---|
(package private) int |
nthParam |
Constructor and Description |
---|
ParamInitializer() |
Modifier and Type | Method and Description |
---|---|
(package private) int |
compile(CtClass type,
java.lang.String name,
Bytecode code,
CtClass[] parameters,
Javac drv) |
(package private) int |
compileIfStatic(CtClass type,
java.lang.String name,
Bytecode code,
Javac drv) |
(package private) static int |
nthParamToLocal(int nth,
CtClass[] params,
boolean isStatic)
Computes the index of the local variable that the n-th parameter
is assigned to.
|
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.Initializer
CannotCompileException
static int nthParamToLocal(int nth, CtClass[] params, boolean isStatic)
nth
- n-th parameterparams
- list of parameter typesisStatic
- true if the method is static.int compileIfStatic(CtClass type, java.lang.String name, Bytecode code, Javac drv) throws CannotCompileException
compileIfStatic
in class CtField.Initializer
CannotCompileException