Class MethodConstant.ForConstructor
java.lang.Object
net.bytebuddy.implementation.bytecode.StackManipulation.AbstractBase
net.bytebuddy.implementation.bytecode.constant.MethodConstant
net.bytebuddy.implementation.bytecode.constant.MethodConstant.ForConstructor
- All Implemented Interfaces:
MethodConstant.CanCache
,StackManipulation
- Enclosing class:
- MethodConstant
protected static class MethodConstant.ForConstructor
extends MethodConstant
implements MethodConstant.CanCache
Creates a
MethodConstant
for loading
a Constructor
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.AbstractBase, StackManipulation.Compound, StackManipulation.Illegal, StackManipulation.Simple, StackManipulation.Size, StackManipulation.Trivial
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final MethodDescription.InDefinedShape
TheClass.getConstructor(Class[])
method.private static final MethodDescription.InDefinedShape
TheClass.getDeclaredConstructor(Class[])
method.Fields inherited from class net.bytebuddy.implementation.bytecode.constant.MethodConstant
DO_PRIVILEGED, methodDescription
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
ForConstructor
(MethodDescription.InDefinedShape methodDescription) Creates a newMethodConstant
for creating aConstructor
instance. -
Method Summary
Modifier and TypeMethodDescriptionprotected MethodDescription.InDefinedShape
Returns the method for loading a declared method or constructor onto the operand stack.cached()
Returns this method constant as a cached version.protected StackManipulation
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, of, ofPrivileged, typeConstantsFor, withPrivilegedLookup
Methods inherited from class net.bytebuddy.implementation.bytecode.StackManipulation.AbstractBase
isValid
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 Details
-
GET_CONSTRUCTOR
TheClass.getConstructor(Class[])
method. -
GET_DECLARED_CONSTRUCTOR
TheClass.getDeclaredConstructor(Class[])
method.
-
-
Constructor Details
-
ForConstructor
Creates a newMethodConstant
for creating aConstructor
instance.- Parameters:
methodDescription
- The constructor to be loaded onto the stack.
-
-
Method Details
-
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
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
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.
-