Enum Class InvocationType
- All Implemented Interfaces:
Serializable
,Comparable<InvocationType>
,Constable
Specifies the point at which the probe method is invoked.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionThe probe method will be called before any code of the intercepted method is called.The probe method will be called when the intercepted method throws an exception.The probe method will be called when the intercepted method exits, either by returning normally or by throwing an exception.The probe method will be called when the intercepted method returns normally. -
Method Summary
Modifier and TypeMethodDescriptionstatic InvocationType
Returns the enum constant of this class with the specified name.static InvocationType[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
ENTER
The probe method will be called before any code of the intercepted method is called. You cannot useReturnValue
orExceptionValue
parameters for methods of this type. -
EXIT
The probe method will be called when the intercepted method exits, either by returning normally or by throwing an exception. You can use bothReturnValue
andExceptionValue
parameters for methods of this type. If the intercepted method returns normally, theExceptionValue
parameter will benull
. If the method throws an exception, theReturnValue
parameter will benull
.This type cannot be used for constructors.
-
RETURN
The probe method will be called when the intercepted method returns normally. You can use aReturnValue
parameter, but noExceptionValue
parameter for methods of this type. -
EXCEPTION
The probe method will be called when the intercepted method throws an exception. You can use anExceptionValue
parameter, but noReturnValue
parameter for methods of this type.This type cannot be used for constructors.
-
-
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
-