Package net.bytebuddy.implementation
Enum FieldAccessor.ForSetter.TerminationHandler
- java.lang.Object
-
- java.lang.Enum<FieldAccessor.ForSetter.TerminationHandler>
-
- net.bytebuddy.implementation.FieldAccessor.ForSetter.TerminationHandler
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<FieldAccessor.ForSetter.TerminationHandler>
- Enclosing class:
- FieldAccessor.ForSetter<T>
protected static enum FieldAccessor.ForSetter.TerminationHandler extends java.lang.Enum<FieldAccessor.ForSetter.TerminationHandler>
A termination handler is responsible for handling a field accessor's return.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description NON_OPERATIONAL
Does not return from the method at all.RETURNING
Returnsvoid
or throws an exception if this is not the return type of the instrumented method.
-
Constructor Summary
Constructors Modifier Constructor Description private
TerminationHandler()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract StackManipulation
resolve(MethodDescription instrumentedMethod)
Resolves the return instruction.static FieldAccessor.ForSetter.TerminationHandler
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static FieldAccessor.ForSetter.TerminationHandler[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
RETURNING
public static final FieldAccessor.ForSetter.TerminationHandler RETURNING
Returnsvoid
or throws an exception if this is not the return type of the instrumented method.
-
NON_OPERATIONAL
public static final FieldAccessor.ForSetter.TerminationHandler NON_OPERATIONAL
Does not return from the method at all.
-
-
Method Detail
-
values
public static FieldAccessor.ForSetter.TerminationHandler[] 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 (FieldAccessor.ForSetter.TerminationHandler c : FieldAccessor.ForSetter.TerminationHandler.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static FieldAccessor.ForSetter.TerminationHandler 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
protected abstract StackManipulation resolve(MethodDescription instrumentedMethod)
Resolves the return instruction.- Parameters:
instrumentedMethod
- The instrumented method.- Returns:
- An appropriate stack manipulation.
-
-