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 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
FieldsModifier and TypeFieldDescriptionprivate final ElementMatcher<? super MethodDescription>
The matcher to use.private final MethodGraph.Compiler
The method graph compiler to use. -
Constructor Summary
ConstructorsConstructorDescriptionFactory
(ElementMatcher<? super MethodDescription> matcher, MethodGraph.Compiler methodGraphCompiler) Creates a factory for a method locator that identifies a method using a matcher. -
Method Summary
Modifier and TypeMethodDescriptionmake
(TypeDescription instrumentedType) Creates a method locator for a given instrumented type.
-
Field Details
-
matcher
The matcher to use. -
methodGraphCompiler
The method graph compiler to use.
-
-
Constructor Details
-
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 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.
-