Package net.bytebuddy.implementation
Class MethodCall.MethodLocator.ForElementMatcher.Factory
- java.lang.Object
-
- net.bytebuddy.implementation.MethodCall.MethodLocator.ForElementMatcher.Factory
-
- All Implemented Interfaces:
MethodCall.MethodLocator.Factory
- Enclosing class:
- MethodCall.MethodLocator.ForElementMatcher
@Enhance public static class MethodCall.MethodLocator.ForElementMatcher.Factory extends java.lang.Object implements MethodCall.MethodLocator.Factory
A factory for a method locator that uses a matcher on the instrumented type's available methods for identifing a target method.
-
-
Field Summary
Fields Modifier and Type Field Description private ElementMatcher<? super MethodDescription>
matcher
The matcher to use.private MethodGraph.Compiler
methodGraphCompiler
The method graph compiler to use.
-
Constructor Summary
Constructors Constructor Description Factory(ElementMatcher<? super MethodDescription> matcher, MethodGraph.Compiler methodGraphCompiler)
Creates a factory for a method locator that identifies a method using a matcher.
-
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.
-
-
-
Field Detail
-
matcher
private final ElementMatcher<? super MethodDescription> matcher
The matcher to use.
-
methodGraphCompiler
private final MethodGraph.Compiler methodGraphCompiler
The method graph compiler to use.
-
-
Constructor Detail
-
Factory
public Factory(ElementMatcher<? super MethodDescription> matcher, MethodGraph.Compiler methodGraphCompiler)
Creates a factory for a method locator that identifies a method using a matcher.- Parameters:
matcher
- The matcher to use.methodGraphCompiler
- The method graph compiler to use.
-
-
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.
-
-