Class MethodConstant.ForMethod
java.lang.Object
net.bytebuddy.implementation.bytecode.StackManipulation.AbstractBase
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 a
MethodConstant for loading
a Method 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.PrivilegedLookupNested classes/interfaces inherited from interface net.bytebuddy.implementation.bytecode.StackManipulation
StackManipulation.AbstractBase, StackManipulation.Compound, StackManipulation.Illegal, StackManipulation.Simple, StackManipulation.Size, StackManipulation.Trivial -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final MethodDescription.InDefinedShapeTheClass.getDeclaredMethod(String, Class[])method.private static final MethodDescription.InDefinedShapeTheClass.getMethod(String, Class[])method.Fields inherited from class net.bytebuddy.implementation.bytecode.constant.MethodConstant
DO_PRIVILEGED, methodDescription -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedForMethod(MethodDescription.InDefinedShape methodDescription) Creates a newMethodConstantfor creating aMethodinstance. -
Method Summary
Modifier and TypeMethodDescriptionprotected MethodDescription.InDefinedShapeReturns the method for loading a declared method or constructor onto the operand stack.cached()Returns this method constant as a cached version.protected StackManipulationReturns 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, of, ofPrivileged, typeConstantsFor, withPrivilegedLookupMethods inherited from class net.bytebuddy.implementation.bytecode.StackManipulation.AbstractBase
isValidMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.bytebuddy.implementation.bytecode.StackManipulation
apply, isValid
-
Field Details
-
GET_METHOD
TheClass.getMethod(String, Class[])method. -
GET_DECLARED_METHOD
TheClass.getDeclaredMethod(String, Class[])method.
-
-
Constructor Details
-
ForMethod
Creates a newMethodConstantfor creating aMethodinstance.- Parameters:
methodDescription- The method to be loaded onto the stack.
-
-
Method Details
-
methodName
Description copied from class:MethodConstantReturns a stack manipulation that loads the method name onto the operand stack if this is required.- Specified by:
methodNamein classMethodConstant- Returns:
- A stack manipulation that loads the method name onto the operand stack if this is required.
-
accessorMethod
Description copied from class:MethodConstantReturns the method for loading a declared method or constructor onto the operand stack.- Specified by:
accessorMethodin classMethodConstant- Returns:
- The method for loading a declared method or constructor onto the operand stack.
-
cached
Returns this method constant as a cached version.- Specified by:
cachedin interfaceMethodConstant.CanCache- Returns:
- A cached version of the method constant that is represented by this instance.
-