Package javassist
Class CtField.ParamInitializer
java.lang.Object
javassist.CtField.Initializer
javassist.CtField.ParamInitializer
- Enclosing class:
CtField
A field initialized with a parameter passed to the constructor
of the class containing that field.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) int
(package private) int
compileIfStatic
(CtClass type, 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.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
-
nthParam
int nthParam
-
-
Constructor Details
-
ParamInitializer
ParamInitializer()
-
-
Method Details
-
compile
int compile(CtClass type, String name, Bytecode code, CtClass[] parameters, Javac drv) throws CannotCompileException - Specified by:
compile
in classCtField.Initializer
- Throws:
CannotCompileException
-
nthParamToLocal
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, String name, Bytecode code, Javac drv) throws CannotCompileException - Specified by:
compileIfStatic
in classCtField.Initializer
- Throws:
CannotCompileException
-