Enum Class Super.Instantiation
java.lang.Object
java.lang.Enum<Super.Instantiation>
net.bytebuddy.implementation.bind.annotation.Super.Instantiation
- All Implemented Interfaces:
Serializable
,Comparable<Super.Instantiation>
,Constable
- Enclosing class:
Super
Determines the instantiation of the proxy type.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionA proxy instance is instantiated by its constructor.A proxy is instantiated by calling JVM internal methods and without calling a constructor. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final MethodDescription.InDefinedShape
A reference to the constructor parameters method.private static final MethodDescription.InDefinedShape
A reference to the ignore finalizer method.private static final MethodDescription.InDefinedShape
A reference to the serializable proxy method. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract StackManipulation
proxyFor
(TypeDescription parameterType, Implementation.Target implementationTarget, AnnotationDescription.Loadable<Super> annotation) Creates a stack manipulation which loads asuper
-call proxy onto the stack.static Super.Instantiation
Returns the enum constant of this class with the specified name.static Super.Instantiation[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
CONSTRUCTOR
A proxy instance is instantiated by its constructor. For the constructor's arguments, the parameters default values are used. The constructor can be identified by settingSuper.constructorParameters()
. -
UNSAFE
A proxy is instantiated by calling JVM internal methods and without calling a constructor. This strategy might fail on exotic JVM implementations.
-
-
Field Details
-
IGNORE_FINALIZER
A reference to the ignore finalizer method. -
SERIALIZABLE_PROXY
A reference to the serializable proxy method. -
CONSTRUCTOR_PARAMETERS
A reference to the constructor parameters method.
-
-
Constructor Details
-
Instantiation
private Instantiation()
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
proxyFor
protected abstract StackManipulation proxyFor(TypeDescription parameterType, Implementation.Target implementationTarget, AnnotationDescription.Loadable<Super> annotation) Creates a stack manipulation which loads asuper
-call proxy onto the stack.- Parameters:
parameterType
- The type of the parameter that was annotated withSuper
implementationTarget
- The implementation target for the currently created type.annotation
- The annotation that caused this method call.- Returns:
- A stack manipulation representing this instance's instantiation strategy.
-