@HashCodeAndEqualsPlugin.Enhance public class DispatcherAnnotationPlugin extends Plugin.ForElementMatcher implements MethodAttributeAppender.Factory, MethodAttributeAppender
JavaDispatcher.Proxied annotation to any method of an
enhanced type where the annotation is not set. This aids in supporting obfuscators that rename methods which
makes reflection-based lookup by the proxy interface's name impossible.MethodAttributeAppender.Factory.CompoundMethodAttributeAppender.Compound, MethodAttributeAppender.Explicit, MethodAttributeAppender.Factory, MethodAttributeAppender.ForInstrumentedMethod, MethodAttributeAppender.ForReceiverType, MethodAttributeAppender.NoOpPlugin.Engine, Plugin.Factory, Plugin.ForElementMatcher, Plugin.NoOp, Plugin.WithInitialization, Plugin.WithPreprocessorElementMatcher.Junction<S>| Constructor and Description |
|---|
DispatcherAnnotationPlugin()
Creates a new dispatcher annotation plugin.
|
| Modifier and Type | Method and Description |
|---|---|
DynamicType.Builder<?> |
apply(DynamicType.Builder<?> builder,
TypeDescription typeDescription,
ClassFileLocator classFileLocator)
Applies this plugin.
|
void |
apply(MethodVisitor methodVisitor,
MethodDescription methodDescription,
AnnotationValueFilter annotationValueFilter)
Applies this attribute appender to a given method visitor.
|
void |
close() |
MethodAttributeAppender |
make(TypeDescription typeDescription)
Returns a method attribute appender that is applicable for a given type description.
|
matchespublic DispatcherAnnotationPlugin()
public DynamicType.Builder<?> apply(DynamicType.Builder<?> builder, TypeDescription typeDescription, ClassFileLocator classFileLocator)
apply in interface Pluginbuilder - The builder to use as a basis for the applied transformation.typeDescription - The type being transformed.classFileLocator - A class file locator that can locate other types in the scope of the project.public void close()
close in interface Closeableclose in interface AutoCloseablepublic MethodAttributeAppender make(TypeDescription typeDescription)
make in interface MethodAttributeAppender.FactorytypeDescription - The type for which a method attribute appender is to be applied for.public void apply(MethodVisitor methodVisitor, MethodDescription methodDescription, AnnotationValueFilter annotationValueFilter)
apply in interface MethodAttributeAppendermethodVisitor - The method visitor to which the attributes that are represented by this attribute
appender are written to.methodDescription - The description of the method for which the given method visitor creates an
instrumentation for.annotationValueFilter - The annotation value filter to apply when the annotations are written.Copyright © 2014–2023. All rights reserved.