Interface MethodRegistry
- All Known Implementing Classes:
MethodRegistry.Default
public interface MethodRegistry
A method registry is responsible for storing information on how a method is intercepted.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceA compiled version of a method registry.static classA default implementation of a method registry.static interfaceA handler for implementing a method.static interfaceA method registry that fully prepared the instrumented type. -
Method Summary
Modifier and TypeMethodDescriptionappend(LatentMatcher<? super MethodDescription> methodMatcher, MethodRegistry.Handler handler, MethodAttributeAppender.Factory attributeAppenderFactory, Transformer<MethodDescription> transformer) Appends the given method definition to this method registry, i.e.prepare(InstrumentedType instrumentedType, MethodGraph.Compiler methodGraphCompiler, TypeValidation typeValidation, VisibilityBridgeStrategy visibilityBridgeStrategy, LatentMatcher<? super MethodDescription> ignoredMethods) Prepares this method registry.prepend(LatentMatcher<? super MethodDescription> methodMatcher, MethodRegistry.Handler handler, MethodAttributeAppender.Factory attributeAppenderFactory, Transformer<MethodDescription> transformer) Prepends the given method definition to this method registry, i.e.
-
Method Details
-
prepend
MethodRegistry prepend(LatentMatcher<? super MethodDescription> methodMatcher, MethodRegistry.Handler handler, MethodAttributeAppender.Factory attributeAppenderFactory, Transformer<MethodDescription> transformer) Prepends the given method definition to this method registry, i.e. this configuration is applied first.- Parameters:
methodMatcher- A matcher to identify any method that this definition concerns.handler- The handler to instrument any matched method.attributeAppenderFactory- A method attribute appender to apply to any matched method.transformer- The method transformer to be applied to implemented methods.- Returns:
- An adapted version of this method registry.
-
append
MethodRegistry append(LatentMatcher<? super MethodDescription> methodMatcher, MethodRegistry.Handler handler, MethodAttributeAppender.Factory attributeAppenderFactory, Transformer<MethodDescription> transformer) Appends the given method definition to this method registry, i.e. this configuration is applied last.- Parameters:
methodMatcher- A matcher to identify all entries that are to be matched.handler- The handler to instrument any matched method.attributeAppenderFactory- A method attribute appender to apply to any matched method.transformer- The method transformer to be applied to implemented methods.- Returns:
- An adapted version of this method registry.
-
prepare
MethodRegistry.Prepared prepare(InstrumentedType instrumentedType, MethodGraph.Compiler methodGraphCompiler, TypeValidation typeValidation, VisibilityBridgeStrategy visibilityBridgeStrategy, LatentMatcher<? super MethodDescription> ignoredMethods) Prepares this method registry.- Parameters:
instrumentedType- The instrumented type that should be created.methodGraphCompiler- The method graph compiler to be used for analyzing the fully assembled instrumented type.typeValidation- Determines if a type should be explicitly validated.visibilityBridgeStrategy- The visibility bridge strategy to apply.ignoredMethods- A filter that only matches methods that should be instrumented.- Returns:
- A prepared version of this method registry.
-