Package javassist
Class CtMethod.ConstParameter
- java.lang.Object
-
- javassist.CtMethod.ConstParameter
-
- Direct Known Subclasses:
CtMethod.IntConstParameter
,CtMethod.LongConstParameter
,CtMethod.StringConstParameter
- Enclosing class:
- CtMethod
public static class CtMethod.ConstParameter extends java.lang.Object
Instances of this class represent a constant parameter. They are used to specify the parameter given to the methods created byCtNewMethod.wrapped()
.
-
-
Constructor Summary
Constructors Constructor Description ConstParameter()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) int
compile(Bytecode code)
(package private) java.lang.String
constDescriptor()
Returns the descriptor for constructors.(package private) static java.lang.String
defaultConstDescriptor()
Returns the default descriptor for constructors.(package private) static java.lang.String
defaultDescriptor()
(package private) java.lang.String
descriptor()
static CtMethod.ConstParameter
integer(int i)
Makes an integer constant.static CtMethod.ConstParameter
integer(long i)
Makes a long integer constant.static CtMethod.ConstParameter
string(java.lang.String s)
Makes anString
constant.
-
-
-
Method Detail
-
integer
public static CtMethod.ConstParameter integer(int i)
Makes an integer constant.- Parameters:
i
- the constant value.
-
integer
public static CtMethod.ConstParameter integer(long i)
Makes a long integer constant.- Parameters:
i
- the constant value.
-
string
public static CtMethod.ConstParameter string(java.lang.String s)
Makes anString
constant.- Parameters:
s
- the constant value.
-
compile
int compile(Bytecode code) throws CannotCompileException
- Returns:
- the size of the stack consumption.
- Throws:
CannotCompileException
-
descriptor
java.lang.String descriptor()
-
defaultDescriptor
static java.lang.String defaultDescriptor()
- See Also:
CtNewWrappedMethod
-
constDescriptor
java.lang.String constDescriptor()
Returns the descriptor for constructors.- See Also:
CtNewWrappedConstructor
-
defaultConstDescriptor
static java.lang.String defaultConstDescriptor()
Returns the default descriptor for constructors.
-
-