Class MethodConstant.ForMethod
- java.lang.Object
-
- net.bytebuddy.implementation.bytecode.constant.MethodConstant
-
- net.bytebuddy.implementation.bytecode.constant.MethodConstant.ForMethod
-
- All Implemented Interfaces:
MethodConstant.CanCache
,StackManipulation
- Enclosing class:
- MethodConstant
protected static class MethodConstant.ForMethod extends MethodConstant implements MethodConstant.CanCache
Creates aMethodConstant
for loading aMethod
instance onto the operand stack.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class net.bytebuddy.implementation.bytecode.constant.MethodConstant
MethodConstant.CachedConstructor, MethodConstant.CachedMethod, MethodConstant.CanCache, MethodConstant.CanCacheIllegal, MethodConstant.ForConstructor, MethodConstant.ForMethod, MethodConstant.PrivilegedLookup
-
Nested classes/interfaces inherited from interface net.bytebuddy.implementation.bytecode.StackManipulation
StackManipulation.Compound, StackManipulation.Illegal, StackManipulation.Size, StackManipulation.Trivial
-
-
Field Summary
Fields Modifier and Type Field Description private static MethodDescription.InDefinedShape
GET_DECLARED_METHOD
TheClass.getDeclaredMethod(String, Class[])
method.private static MethodDescription.InDefinedShape
GET_METHOD
TheClass.getMethod(String, Class[])
method.-
Fields inherited from class net.bytebuddy.implementation.bytecode.constant.MethodConstant
methodDescription
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
ForMethod(MethodDescription.InDefinedShape methodDescription)
Creates a newMethodConstant
for creating aMethod
instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected MethodDescription.InDefinedShape
accessorMethod()
Returns the method for loading a declared method or constructor onto the operand stack.StackManipulation
cached()
Returns this method constant as a cached version.protected StackManipulation
methodName()
Returns a stack manipulation that loads the method name onto the operand stack if this is required.-
Methods inherited from class net.bytebuddy.implementation.bytecode.constant.MethodConstant
apply, equals, hashCode, isValid, of, ofPrivileged, privileged, typeConstantsFor
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.bytebuddy.implementation.bytecode.StackManipulation
apply, isValid
-
-
-
-
Field Detail
-
GET_METHOD
private static final MethodDescription.InDefinedShape GET_METHOD
TheClass.getMethod(String, Class[])
method.
-
GET_DECLARED_METHOD
private static final MethodDescription.InDefinedShape GET_DECLARED_METHOD
TheClass.getDeclaredMethod(String, Class[])
method.
-
-
Constructor Detail
-
ForMethod
protected ForMethod(MethodDescription.InDefinedShape methodDescription)
Creates a newMethodConstant
for creating aMethod
instance.- Parameters:
methodDescription
- The method to be loaded onto the stack.
-
-
Method Detail
-
methodName
protected StackManipulation methodName()
Description copied from class:MethodConstant
Returns a stack manipulation that loads the method name onto the operand stack if this is required.- Specified by:
methodName
in classMethodConstant
- Returns:
- A stack manipulation that loads the method name onto the operand stack if this is required.
-
accessorMethod
protected MethodDescription.InDefinedShape accessorMethod()
Description copied from class:MethodConstant
Returns the method for loading a declared method or constructor onto the operand stack.- Specified by:
accessorMethod
in classMethodConstant
- Returns:
- The method for loading a declared method or constructor onto the operand stack.
-
cached
public StackManipulation cached()
Returns this method constant as a cached version.- Specified by:
cached
in interfaceMethodConstant.CanCache
- Returns:
- A cached version of the method constant that is represented by this instance.
-
-