Enum Super.Instantiation
- java.lang.Object
-
- java.lang.Enum<Super.Instantiation>
-
- net.bytebuddy.implementation.bind.annotation.Super.Instantiation
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<Super.Instantiation>
- Enclosing class:
- Super
public static enum Super.Instantiation extends java.lang.Enum<Super.Instantiation>
Determines the instantiation of the proxy type.- See Also:
Super
-
-
Enum Constant Summary
Enum Constants Enum Constant Description CONSTRUCTOR
A proxy instance is instantiated by its constructor.UNSAFE
A proxy is instantiated by calling JVM internal methods and without calling a constructor.
-
Field Summary
Fields Modifier and Type Field Description private static MethodDescription.InDefinedShape
CONSTRUCTOR_PARAMETERS
A reference to the constructor parameters method.private static MethodDescription.InDefinedShape
IGNORE_FINALIZER
A reference to the ignore finalizer method.private static MethodDescription.InDefinedShape
SERIALIZABLE_PROXY
A reference to the serializable proxy method.
-
Constructor Summary
Constructors Modifier Constructor Description private
Instantiation()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description 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.static Super.Instantiation
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static Super.Instantiation[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
CONSTRUCTOR
public static final Super.Instantiation 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
public static final Super.Instantiation UNSAFE
A proxy is instantiated by calling JVM internal methods and without calling a constructor. This strategy might fail on exotic JVM implementations.
-
-
Field Detail
-
IGNORE_FINALIZER
private static final MethodDescription.InDefinedShape IGNORE_FINALIZER
A reference to the ignore finalizer method.
-
SERIALIZABLE_PROXY
private static final MethodDescription.InDefinedShape SERIALIZABLE_PROXY
A reference to the serializable proxy method.
-
CONSTRUCTOR_PARAMETERS
private static final MethodDescription.InDefinedShape CONSTRUCTOR_PARAMETERS
A reference to the constructor parameters method.
-
-
Method Detail
-
values
public static Super.Instantiation[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (Super.Instantiation c : Super.Instantiation.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Super.Instantiation valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- 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.
-
-