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 java.lang.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 Modifier and Type Field Description private MethodDescription
methodDescription
The method to be invoked.
-
Constructor Summary
Constructors Modifier Constructor Description protected
ForExplicitMethod(MethodDescription methodDescription)
Creates a new method locator for a given method.
-
Method Summary
All 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.
-
-
-
Field Detail
-
methodDescription
private final MethodDescription methodDescription
The method to be invoked.
-
-
Constructor Detail
-
ForExplicitMethod
protected ForExplicitMethod(MethodDescription methodDescription)
Creates a new method locator for a given method.- Parameters:
methodDescription
- The method to be invoked.
-
-
Method Detail
-
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.
-
-