Enum Class LocalCapture
- All Implemented Interfaces:
Serializable
,Comparable<LocalCapture>
,Constable
Specifies the behaviour for capturing local variables at an injection point.
Since local capture relies on calculating the local variable table for the
target method it is disabled by default for performance reasons. When
capturing is enabled, local variables are passed to the handler method after
the CallbackInfo
argument. Since it is entirely possible for another
transformer to make an incompatible change to the the local variable table at
run time, the purpose of this enum is to specify the behaviour for local
capture and the type of recovery to be performed when an incompatible change
is detected.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionCapture locals.Capture locals.Capture locals.Do not capture locals, this is the default behaviourDo not capture locals. -
Method Summary
Modifier and TypeMethodDescriptionstatic LocalCapture
Returns the enum constant of this class with the specified name.static LocalCapture[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
NO_CAPTURE
Do not capture locals, this is the default behaviour -
PRINT
Do not capture locals. Print the expected method signature to stderr instead. -
CAPTURE_FAILSOFT
Capture locals. If the calculated locals are different from the expected values, log a warning and skip this injection. -
CAPTURE_FAILHARD
Capture locals. If the calculated locals are different from the expected values, throw anError
. -
CAPTURE_FAILEXCEPTION
Capture locals. If the calculated locals are different from the expected values, generate a method stub containing an exception. This will allow normal execution to continue unless the callback is encountered.
-
-
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
-