Package net.bytebuddy.implementation
Enum MethodCall.MethodLocator.ForInstrumentedMethod
- java.lang.Object
-
- java.lang.Enum<MethodCall.MethodLocator.ForInstrumentedMethod>
-
- net.bytebuddy.implementation.MethodCall.MethodLocator.ForInstrumentedMethod
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<MethodCall.MethodLocator.ForInstrumentedMethod>
,MethodCall.MethodLocator
,MethodCall.MethodLocator.Factory
- Enclosing interface:
- MethodCall.MethodLocator
public static enum MethodCall.MethodLocator.ForInstrumentedMethod extends java.lang.Enum<MethodCall.MethodLocator.ForInstrumentedMethod> implements MethodCall.MethodLocator, MethodCall.MethodLocator.Factory
A method locator that simply returns the intercepted method.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.bytebuddy.implementation.MethodCall.MethodLocator
MethodCall.MethodLocator.Factory, MethodCall.MethodLocator.ForElementMatcher, MethodCall.MethodLocator.ForExplicitMethod, MethodCall.MethodLocator.ForInstrumentedMethod
-
-
Enum Constant Summary
Enum Constants Enum Constant Description INSTANCE
The singleton instance.
-
Constructor Summary
Constructors Modifier Constructor Description private
ForInstrumentedMethod()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description MethodCall.MethodLocator
make(TypeDescription instrumentedType)
Creates a method locator for a given instrumented type.MethodDescription
resolve(TypeDescription targetType, MethodDescription instrumentedMethod)
Resolves the method to be invoked.static MethodCall.MethodLocator.ForInstrumentedMethod
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static MethodCall.MethodLocator.ForInstrumentedMethod[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
INSTANCE
public static final MethodCall.MethodLocator.ForInstrumentedMethod INSTANCE
The singleton instance.
-
-
Method Detail
-
values
public static MethodCall.MethodLocator.ForInstrumentedMethod[] 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.MethodLocator.ForInstrumentedMethod c : MethodCall.MethodLocator.ForInstrumentedMethod.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.MethodLocator.ForInstrumentedMethod 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.MethodLocator make(TypeDescription instrumentedType)
Creates a method locator for a given instrumented type.- Specified by:
make
in interfaceMethodCall.MethodLocator.Factory
- Parameters:
instrumentedType
- The instrumented type.- Returns:
- A suitable method locator.
-
resolve
public MethodDescription resolve(TypeDescription targetType, MethodDescription instrumentedMethod)
Resolves the method to be invoked.- Specified by:
resolve
in interfaceMethodCall.MethodLocator
- Parameters:
targetType
- The type the method is called on.instrumentedMethod
- The method being instrumented.- Returns:
- The method to invoke.
-
-