Package proguard.classfile.editor
Class AnnotationAdder
java.lang.Object
proguard.classfile.editor.AnnotationAdder
- All Implemented Interfaces:
AnnotationVisitor
This
AnnotationVisitor adds all annotations that it visits to the given target annotation
element value, target annotation attribute, or target parameter annotation attribute.-
Constructor Summary
ConstructorsConstructorDescriptionAnnotationAdder(ProgramClass targetClass, AnnotationElementValue targetAnnotationElementValue) Creates a new AnnotationAdder that will copy annotations into the given target annotation element value.AnnotationAdder(ProgramClass targetClass, AnnotationsAttribute targetAnnotationsAttribute) Creates a new AnnotationAdder that will copy annotations into the given target annotations attribute.AnnotationAdder(ProgramClass targetClass, ParameterAnnotationsAttribute targetParameterAnnotationsAttribute) Creates a new AnnotationAdder that will copy annotations into the given target parameter annotations attribute. -
Method Summary
Modifier and TypeMethodDescriptionvoidvisitAnnotation(Clazz clazz, Annotation annotation) Visits any Annotation instance.voidvisitAnnotation(Clazz clazz, Method method, int parameterIndex, Annotation annotation) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface proguard.classfile.attribute.annotation.visitor.AnnotationVisitor
visitAnnotation, visitAnnotation, visitAnnotation, visitAnnotation
-
Constructor Details
-
AnnotationAdder
public AnnotationAdder(ProgramClass targetClass, AnnotationElementValue targetAnnotationElementValue) Creates a new AnnotationAdder that will copy annotations into the given target annotation element value. -
AnnotationAdder
Creates a new AnnotationAdder that will copy annotations into the given target annotations attribute. -
AnnotationAdder
public AnnotationAdder(ProgramClass targetClass, ParameterAnnotationsAttribute targetParameterAnnotationsAttribute) Creates a new AnnotationAdder that will copy annotations into the given target parameter annotations attribute.
-
-
Method Details
-
visitAnnotation
Description copied from interface:AnnotationVisitorVisits any Annotation instance. The more specific default implementations of this interface delegate to this method.- Specified by:
visitAnnotationin interfaceAnnotationVisitor
-
visitAnnotation
- Specified by:
visitAnnotationin interfaceAnnotationVisitor
-