@HashCodeAndEqualsPlugin.Enhance public class AnnotationRemoval extends AsmVisitorWrapper.AbstractBase
AsmVisitorWrapper.AbstractBase, AsmVisitorWrapper.Compound, AsmVisitorWrapper.ForDeclaredFields, AsmVisitorWrapper.ForDeclaredMethods, AsmVisitorWrapper.NoOpNO_FLAGS| Modifier | Constructor and Description |
|---|---|
protected |
AnnotationRemoval(boolean type,
ElementMatcher<? super FieldDescription.InDefinedShape> fieldMatcher,
ElementMatcher<? super MethodDescription> methodMatcher,
ElementMatcher<? super AnnotationDescription> annotationMatcher,
int parameters)
Creates a visitor for annotation removal.
|
| Modifier and Type | Method and Description |
|---|---|
AsmVisitorWrapper |
onConstructorParameter(ElementMatcher<? super MethodDescription> matcher,
int parameter)
Creates a visitor that removes annotations from the constructor parameters with the given index
where the constructor matches the specified matcher.
|
AsmVisitorWrapper |
onConstructorParameters(ElementMatcher<? super MethodDescription> matcher)
Creates a visitor that removes annotations from constructor parameters where the constructor matches the specified matcher.
|
AsmVisitorWrapper |
onConstructors(ElementMatcher<? super MethodDescription> matcher)
Creates a visitor that removes annotations from constructors that match the specified matcher.
|
AsmVisitorWrapper |
onConstructorsAndParameters(ElementMatcher<? super MethodDescription> matcher)
Creates a visitor that removes annotations from constructors and their parameters that match the specified matcher.
|
AsmVisitorWrapper |
onFields(ElementMatcher<? super FieldDescription> matcher)
Creates a visitor that only removes annotations from fields that match the specified matcher.
|
AsmVisitorWrapper |
onInvokableParameter(ElementMatcher<? super MethodDescription> matcher,
int parameter)
Creates a visitor that removes annotations from the constructor or method parameters with the given index
where the constructor or method matches the specified matcher.
|
AsmVisitorWrapper |
onInvokableParameters(ElementMatcher<? super MethodDescription> matcher)
Creates a visitor that removes annotations from constructor or method parameters where the
constructor or method matches the specified matcher.
|
AsmVisitorWrapper |
onInvokables(ElementMatcher<? super MethodDescription> matcher)
Creates a visitor that removes annotations from constructors or methods that match the specified matcher.
|
AsmVisitorWrapper |
onInvokablesAndParameters(ElementMatcher<? super MethodDescription> matcher)
Creates a visitor that removes annotations from constructors or methods and their parameters
that match the specified matcher.
|
AsmVisitorWrapper |
onMethodParameter(ElementMatcher<? super MethodDescription> matcher,
int parameter)
Creates a visitor that removes annotations from the method parameters with the given index
where the method matches the specified matcher.
|
AsmVisitorWrapper |
onMethodParameters(ElementMatcher<? super MethodDescription> matcher)
Creates a visitor that removes annotations from method parameters where the method matches the specified matcher.
|
AsmVisitorWrapper |
onMethods(ElementMatcher<? super MethodDescription> matcher)
Creates a visitor that removes annotations from methods that match the specified matcher.
|
AsmVisitorWrapper |
onMethodsAndParameters(ElementMatcher<? super MethodDescription> matcher)
Creates a visitor that removes annotations from methods and their parameters that match the specified matcher.
|
AsmVisitorWrapper |
onType()
Creates a visitor that only removes annotations from the type.
|
static AnnotationRemoval |
strip(ElementMatcher<? super AnnotationDescription> matcher)
Creates a visitor that removes all annotations that match the specified matcher from the instrumented type.
|
ClassVisitor |
wrap(TypeDescription instrumentedType,
ClassVisitor classVisitor,
Implementation.Context implementationContext,
TypePool typePool,
FieldList<FieldDescription.InDefinedShape> fields,
MethodList<?> methods,
int writerFlags,
int readerFlags)
Applies a
ClassVisitorWrapper to the creation of a DynamicType. |
mergeReader, mergeWriterprotected AnnotationRemoval(boolean type,
ElementMatcher<? super FieldDescription.InDefinedShape> fieldMatcher,
ElementMatcher<? super MethodDescription> methodMatcher,
ElementMatcher<? super AnnotationDescription> annotationMatcher,
int parameters)
type - true if annotations on the type should be removed.fieldMatcher - Matches fields from which annotations should be removed.methodMatcher - Matches methods from which annotations should be removed.annotationMatcher - Matches annotations that should be removed.parameters - Indices the method parameter index from which annotations should be removed,
or a negative value to indicate different treatment.public static AnnotationRemoval strip(ElementMatcher<? super AnnotationDescription> matcher)
matcher - The matcher to indicate what annotations to remove.public AsmVisitorWrapper onType()
public AsmVisitorWrapper onFields(ElementMatcher<? super FieldDescription> matcher)
matcher - A matcher that indicates from what fields annotations should be removed.public AsmVisitorWrapper onMethods(ElementMatcher<? super MethodDescription> matcher)
matcher - A matcher that indicates from what methods annotations should be removed.public AsmVisitorWrapper onMethodsAndParameters(ElementMatcher<? super MethodDescription> matcher)
matcher - A matcher that indicates from what methods annotations should be removed.public AsmVisitorWrapper onMethodParameters(ElementMatcher<? super MethodDescription> matcher)
matcher - A matcher that indicates from what methods annotations should be removed.public AsmVisitorWrapper onMethodParameter(ElementMatcher<? super MethodDescription> matcher, int parameter)
matcher - A matcher that indicates from what methods annotations should be removed.parameter - The index of the parameter of which to remove annotations.public AsmVisitorWrapper onConstructors(ElementMatcher<? super MethodDescription> matcher)
matcher - A matcher that indicates from what constructors annotations should be removed.public AsmVisitorWrapper onConstructorsAndParameters(ElementMatcher<? super MethodDescription> matcher)
matcher - A matcher that indicates from what constructors annotations should be removed.public AsmVisitorWrapper onConstructorParameters(ElementMatcher<? super MethodDescription> matcher)
matcher - A matcher that indicates from what constructors annotations should be removed.public AsmVisitorWrapper onConstructorParameter(ElementMatcher<? super MethodDescription> matcher, int parameter)
matcher - A matcher that indicates from what constructors annotations should be removed.parameter - The index of the parameter of which to remove annotations.public AsmVisitorWrapper onInvokables(ElementMatcher<? super MethodDescription> matcher)
matcher - A matcher that indicates from what constructors or methods annotations should be removed.public AsmVisitorWrapper onInvokablesAndParameters(ElementMatcher<? super MethodDescription> matcher)
matcher - A matcher that indicates from what constructors or methods annotations should be removed.public AsmVisitorWrapper onInvokableParameters(ElementMatcher<? super MethodDescription> matcher)
matcher - A matcher that indicates from what constructors or methods annotations should be removed.public AsmVisitorWrapper onInvokableParameter(ElementMatcher<? super MethodDescription> matcher, int parameter)
matcher - A matcher that indicates from what constructors or methods annotations should be removed.parameter - The index of the parameter of which to remove annotations.public ClassVisitor wrap(TypeDescription instrumentedType, ClassVisitor classVisitor, Implementation.Context implementationContext, TypePool typePool, FieldList<FieldDescription.InDefinedShape> fields, MethodList<?> methods, int writerFlags, int readerFlags)
ClassVisitorWrapper to the creation of a DynamicType.instrumentedType - The instrumented type.classVisitor - A ClassVisitor to become the new primary class visitor to which the created
DynamicType is written to.implementationContext - The implementation context of the current instrumentation.typePool - The type pool that was provided for the class creation.fields - The instrumented type's fields.methods - The instrumented type's methods non-ignored declared and virtually inherited methods.writerFlags - The ASM ClassWriter flags to consider.readerFlags - The ASM ClassReader flags to consider.ClassVisitor that usually delegates to the ClassVisitor delivered in the argument.Copyright © 2014–2025. All rights reserved.