Package net.bytebuddy.implementation
Enum MethodCall.TerminationHandler.Simple
- java.lang.Object
-
- java.lang.Enum<MethodCall.TerminationHandler.Simple>
-
- net.bytebuddy.implementation.MethodCall.TerminationHandler.Simple
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<MethodCall.TerminationHandler.Simple>
,MethodCall.TerminationHandler
,MethodCall.TerminationHandler.Factory
- Enclosing interface:
- MethodCall.TerminationHandler
public static enum MethodCall.TerminationHandler.Simple extends java.lang.Enum<MethodCall.TerminationHandler.Simple> implements MethodCall.TerminationHandler, MethodCall.TerminationHandler.Factory
Simple termination handler implementations.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.bytebuddy.implementation.MethodCall.TerminationHandler
MethodCall.TerminationHandler.Factory, MethodCall.TerminationHandler.FieldSetting, MethodCall.TerminationHandler.Simple
-
-
Constructor Summary
Constructors Modifier Constructor Description private
Simple()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description MethodCall.TerminationHandler
make(TypeDescription instrumentedType)
Creates a termination handler for a given instrumented type.StackManipulation
prepare()
Returns a preparing stack manipulation to apply prior to the method call.static MethodCall.TerminationHandler.Simple
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static MethodCall.TerminationHandler.Simple[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.-
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Methods inherited from interface net.bytebuddy.implementation.MethodCall.TerminationHandler
toStackManipulation
-
-
-
-
Enum Constant Detail
-
RETURNING
public static final MethodCall.TerminationHandler.Simple RETURNING
A termination handler that returns the invoked method's return value.
-
DROPPING
public static final MethodCall.TerminationHandler.Simple DROPPING
A termination handler that drops the invoked method's return value.
-
IGNORING
public static final MethodCall.TerminationHandler.Simple IGNORING
A termination handler that does not apply any change.
-
-
Method Detail
-
values
public static MethodCall.TerminationHandler.Simple[] 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.TerminationHandler.Simple c : MethodCall.TerminationHandler.Simple.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.TerminationHandler.Simple 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
-
make
public MethodCall.TerminationHandler make(TypeDescription instrumentedType)
Creates a termination handler for a given instrumented type.- Specified by:
make
in interfaceMethodCall.TerminationHandler.Factory
- Parameters:
instrumentedType
- The instrumented type.- Returns:
- A termination handler to apply for the instrumented type.
-
prepare
public StackManipulation prepare()
Returns a preparing stack manipulation to apply prior to the method call.- Specified by:
prepare
in interfaceMethodCall.TerminationHandler
- Returns:
- The stack manipulation to apply prior to the method call.
-
-