Package javassist
Class CtField.ParamInitializer
- java.lang.Object
-
- javassist.CtField.Initializer
-
- javassist.CtField.ParamInitializer
-
- Enclosing class:
- CtField
static class CtField.ParamInitializer extends CtField.Initializer
A field initialized with a parameter passed to the constructor of the class containing that field.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) intnthParam
-
Constructor Summary
Constructors Constructor Description ParamInitializer()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) intcompile(CtClass type, java.lang.String name, Bytecode code, CtClass[] parameters, Javac drv)(package private) intcompileIfStatic(CtClass type, java.lang.String name, Bytecode code, Javac drv)(package private) static intnthParamToLocal(int nth, CtClass[] params, boolean isStatic)Computes the index of the local variable that the n-th parameter is assigned to.-
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
- Specified by:
compilein classCtField.Initializer- Throws:
CannotCompileException
-
nthParamToLocal
static int nthParamToLocal(int nth, CtClass[] params, boolean isStatic)Computes the index of the local variable that the n-th parameter is assigned to.- Parameters:
nth- n-th parameterparams- list of parameter typesisStatic- true if the method is static.
-
compileIfStatic
int compileIfStatic(CtClass type, java.lang.String name, Bytecode code, Javac drv) throws CannotCompileException
- Specified by:
compileIfStaticin classCtField.Initializer- Throws:
CannotCompileException
-
-