Package net.bytebuddy.implementation
Class MethodCall.MethodLocator.ForExplicitMethod
java.lang.Object
net.bytebuddy.implementation.MethodCall.MethodLocator.ForExplicitMethod
- All Implemented Interfaces:
MethodCall.MethodLocator
,MethodCall.MethodLocator.Factory
- Enclosing interface:
- MethodCall.MethodLocator
@Enhance
public static class MethodCall.MethodLocator.ForExplicitMethod
extends Object
implements MethodCall.MethodLocator, MethodCall.MethodLocator.Factory
Invokes a given 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
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
ForExplicitMethod
(MethodDescription methodDescription) Creates a new method locator for a given method. -
Method Summary
Modifier and TypeMethodDescriptionmake
(TypeDescription instrumentedType) Creates a method locator for a given instrumented type.resolve
(TypeDescription targetType, MethodDescription instrumentedMethod) Resolves the method to be invoked.
-
Field Details
-
methodDescription
The method to be invoked.
-
-
Constructor Details
-
ForExplicitMethod
Creates a new method locator for a given method.- Parameters:
methodDescription
- The method to be invoked.
-
-
Method Details
-
make
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
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.
-