Package net.bytebuddy.implementation
Enum Class InvokeDynamic.TerminationHandler
java.lang.Object
java.lang.Enum<InvokeDynamic.TerminationHandler>
net.bytebuddy.implementation.InvokeDynamic.TerminationHandler
- All Implemented Interfaces:
Serializable
,Comparable<InvokeDynamic.TerminationHandler>
,Constable
- Enclosing class:
- InvokeDynamic
protected static enum InvokeDynamic.TerminationHandler
extends Enum<InvokeDynamic.TerminationHandler>
A termination handler is responsible to handle the return value of a method that is invoked via a
InvokeDynamic
.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum Constants -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract StackManipulation
resolve
(MethodDescription interceptedMethod, TypeDescription returnType, Assigner assigner, Assigner.Typing typing) Returns a stack manipulation that handles the method return.Returns the enum constant of this class with the specified name.static InvokeDynamic.TerminationHandler[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
RETURNING
A termination handler that returns the bound method's return value. -
DROPPING
A termination handler that drops the bound method's return value.
-
-
Constructor Details
-
TerminationHandler
private TerminationHandler()
-
-
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
-
resolve
protected abstract StackManipulation resolve(MethodDescription interceptedMethod, TypeDescription returnType, Assigner assigner, Assigner.Typing typing) Returns a stack manipulation that handles the method return.- Parameters:
interceptedMethod
- The method being intercepted.returnType
- The return type of the instrumented method.assigner
- The assigner to use.typing
- Indicates if dynamic type castings should be attempted for incompatible assignments.- Returns:
- A stack manipulation that handles the method return.
-