Package net.bytebuddy.implementation
Enum MethodCall.TargetHandler.ForConstructingInvocation
- java.lang.Object
-
- java.lang.Enum<MethodCall.TargetHandler.ForConstructingInvocation>
-
- net.bytebuddy.implementation.MethodCall.TargetHandler.ForConstructingInvocation
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<MethodCall.TargetHandler.ForConstructingInvocation>
,InstrumentedType.Prepareable
,MethodCall.TargetHandler
- Enclosing interface:
- MethodCall.TargetHandler
public static enum MethodCall.TargetHandler.ForConstructingInvocation extends java.lang.Enum<MethodCall.TargetHandler.ForConstructingInvocation> implements MethodCall.TargetHandler
Invokes a method in order to construct a new instance.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.bytebuddy.implementation.MethodCall.TargetHandler
MethodCall.TargetHandler.ForConstructingInvocation, MethodCall.TargetHandler.ForField, MethodCall.TargetHandler.ForMethodCall, MethodCall.TargetHandler.ForMethodParameter, MethodCall.TargetHandler.ForSelfOrStaticInvocation, MethodCall.TargetHandler.ForValue
-
-
Enum Constant Summary
Enum Constants Enum Constant Description INSTANCE
The singleton instance.
-
Constructor Summary
Constructors Modifier Constructor Description private
ForConstructingInvocation()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description InstrumentedType
prepare(InstrumentedType instrumentedType)
Prepares a given instrumented type.TypeDescription
resolve(TypeDescription instrumentedType, MethodDescription instrumentedMethod)
Resolves the method call's target.StackManipulation
resolve(Implementation.Target implementationTarget, MethodDescription invokedMethod, MethodDescription instrumentedMethod, TypeDescription instrumentedType, Assigner assigner, Assigner.Typing typing)
Creates a stack manipulation that represents the method's invocation.static MethodCall.TargetHandler.ForConstructingInvocation
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static MethodCall.TargetHandler.ForConstructingInvocation[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
INSTANCE
public static final MethodCall.TargetHandler.ForConstructingInvocation INSTANCE
The singleton instance.
-
-
Method Detail
-
values
public static MethodCall.TargetHandler.ForConstructingInvocation[] 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 (MethodCall.TargetHandler.ForConstructingInvocation c : MethodCall.TargetHandler.ForConstructingInvocation.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static MethodCall.TargetHandler.ForConstructingInvocation 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
-
resolve
public StackManipulation resolve(Implementation.Target implementationTarget, MethodDescription invokedMethod, MethodDescription instrumentedMethod, TypeDescription instrumentedType, Assigner assigner, Assigner.Typing typing)
Creates a stack manipulation that represents the method's invocation.- Specified by:
resolve
in interfaceMethodCall.TargetHandler
- Parameters:
implementationTarget
- The implementation target.invokedMethod
- The method to be invoked.instrumentedMethod
- The instrumented method.instrumentedType
- The instrumented type. @return A stack manipulation that invokes the method.assigner
- The assigner to use.typing
- The typing to apply.- Returns:
- A stack manipulation that loads the method target onto the operand stack.
-
resolve
public TypeDescription resolve(TypeDescription instrumentedType, MethodDescription instrumentedMethod)
Resolves the method call's target.- Specified by:
resolve
in interfaceMethodCall.TargetHandler
- Parameters:
instrumentedType
- The instrumented type.instrumentedMethod
- The instrumented method.- Returns:
- method call's target
-
prepare
public InstrumentedType prepare(InstrumentedType instrumentedType)
Prepares a given instrumented type.- Specified by:
prepare
in interfaceInstrumentedType.Prepareable
- Parameters:
instrumentedType
- The instrumented type in its current form.- Returns:
- The prepared instrumented type.
-
-