/** * Creates a new AnnotationAdder that will copy annotations into the given * target parameter annotations attribute. */ public AnnotationAdder(ProgramClass targetClass, ParameterAnnotationsAttribute targetParameterAnnotationsAttribute) { this.targetClass = targetClass; this.targetAnnotationElementValue = null; this.annotationsAttributeEditor = null; this.parameterAnnotationsAttributeEditor = new ParameterAnnotationsAttributeEditor(targetParameterAnnotationsAttribute); constantAdder = new ConstantAdder(targetClass); }
public void visitAnnotation(Clazz clazz, Method method, int parameterIndex, Annotation annotation) { Annotation newAnnotation = new Annotation(constantAdder.addConstant(clazz, annotation.u2typeIndex), 0, annotation.u2elementValuesCount > 0 ? new ElementValue[annotation.u2elementValuesCount] : EMPTY_ELEMENT_VALUES); // TODO: Clone array. newAnnotation.referencedClasses = annotation.referencedClasses; // Add the element values. annotation.elementValuesAccept(clazz, new ElementValueAdder(targetClass, newAnnotation, false)); // Add the completed annotation. parameterAnnotationsAttributeEditor.addAnnotation(parameterIndex, newAnnotation); } }
public void visitAnnotation(Clazz clazz, Method method, int parameterIndex, Annotation annotation) { Annotation newAnnotation = new Annotation(constantAdder.addConstant(clazz, annotation.u2typeIndex), 0, annotation.u2elementValuesCount > 0 ? new ElementValue[annotation.u2elementValuesCount] : EMPTY_ELEMENT_VALUES); // TODO: Clone array. newAnnotation.referencedClasses = annotation.referencedClasses; // Add the element values. annotation.elementValuesAccept(clazz, new ElementValueAdder(targetClass, newAnnotation, false)); // Add the completed annotation. parameterAnnotationsAttributeEditor.addAnnotation(parameterIndex, newAnnotation); } }
/** * Creates a new AnnotationAdder that will copy annotations into the given * target parameter annotations attribute. */ public AnnotationAdder(ProgramClass targetClass, ParameterAnnotationsAttribute targetParameterAnnotationsAttribute) { this.targetClass = targetClass; this.targetAnnotationElementValue = null; this.annotationsAttributeEditor = null; this.parameterAnnotationsAttributeEditor = new ParameterAnnotationsAttributeEditor(targetParameterAnnotationsAttribute); constantAdder = new ConstantAdder(targetClass); }
public void visitAnnotation(Clazz clazz, Method method, int parameterIndex, Annotation annotation) { Annotation newAnnotation = new Annotation(constantAdder.addConstant(clazz, annotation.u2typeIndex), 0, annotation.u2elementValuesCount > 0 ? new ElementValue[annotation.u2elementValuesCount] : EMPTY_ELEMENT_VALUES); // TODO: Clone array. newAnnotation.referencedClasses = annotation.referencedClasses; // Add the element values. annotation.elementValuesAccept(clazz, new ElementValueAdder(targetClass, newAnnotation, false)); // Add the completed annotation. parameterAnnotationsAttributeEditor.addAnnotation(parameterIndex, newAnnotation); } }
/** * Creates a new AnnotationAdder that will copy annotations into the given * target parameter annotations attribute. */ public AnnotationAdder(ProgramClass targetClass, ParameterAnnotationsAttribute targetParameterAnnotationsAttribute) { this.targetClass = targetClass; this.targetAnnotationElementValue = null; this.annotationsAttributeEditor = null; this.parameterAnnotationsAttributeEditor = new ParameterAnnotationsAttributeEditor(targetParameterAnnotationsAttribute); constantAdder = new ConstantAdder(targetClass); }
public void visitAnnotation(Clazz clazz, Method method, int parameterIndex, Annotation annotation) { Annotation newAnnotation = new Annotation(constantAdder.addConstant(clazz, annotation.u2typeIndex), 0, annotation.u2elementValuesCount > 0 ? new ElementValue[annotation.u2elementValuesCount] : EMPTY_ELEMENT_VALUES); // TODO: Clone array. newAnnotation.referencedClasses = annotation.referencedClasses; // Add the element values. annotation.elementValuesAccept(clazz, new ElementValueAdder(targetClass, newAnnotation, false)); // Add the completed annotation. parameterAnnotationsAttributeEditor.addAnnotation(parameterIndex, newAnnotation); } }
/** * Creates a new AnnotationAdder that will copy annotations into the given * target parameter annotations attribute. */ public AnnotationAdder(ProgramClass targetClass, ParameterAnnotationsAttribute targetParameterAnnotationsAttribute) { this.targetClass = targetClass; this.targetAnnotationElementValue = null; this.annotationsAttributeEditor = null; this.parameterAnnotationsAttributeEditor = new ParameterAnnotationsAttributeEditor(targetParameterAnnotationsAttribute); constantAdder = new ConstantAdder(targetClass); }