void markAsProcessed(
            final CtClass ctClass,
            final ClassProcessor processor) {
        final ClassFile classFile = ctClass.getClassFile();
        AnnotationsAttribute annotationAttribute = null;
        Annotation annotation = null;
        for (final Object attributeObject : classFile.getAttributes()) {
            if (attributeObject instanceof AnnotationsAttribute) {
                annotationAttribute = (AnnotationsAttribute) attributeObject;
                annotation = annotationAttribute.getAnnotation(PROCESSED_ANNOTATION_CLASS);
                if (annotation != null) {
                    break;
                }
            }
        }
        if (annotation == null) {
            _log.debug("Creating annotation attribute on: " + ctClass.getName());
            annotationAttribute = new AnnotationsAttribute(classFile.getConstPool(), AnnotationsAttribute.invisibleTag);
            classFile.addAttribute(annotationAttribute);
            _log.debug("Creating processed annotation on: " + ctClass.getName());
            annotation = new Annotation(PROCESSED_ANNOTATION_CLASS, classFile.getConstPool());
        }
        MemberValue value = annotation.getMemberValue("value");
        if (value == null) {
            value = new ArrayMemberValue(classFile.getConstPool());
            annotation.addMemberValue("value", value);
        }
        final ArrayMemberValue valueArray = (ArrayMemberValue) value;
        final MemberValue[] existingProcessorValues = valueArray.getValue();
        final MemberValue[] newProcessorValues;
        if (existingProcessorValues != null) {
            newProcessorValues = Arrays.copyOf(valueArray.getValue(), valueArray.getValue().length + 1);
        } else {
            newProcessorValues = new MemberValue[1];
        }
        newProcessorValues[newProcessorValues.length - 1] = new StringMemberValue(
                processor.getClass().getName(),
                classFile.getConstPool());
        valueArray.setValue(newProcessorValues);
        _log.debug("New processed annotation value on: " + ctClass.getName() + " = " + valueArray);
        annotationAttribute.addAnnotation(annotation);
    }
void markAsProcessed ( final CtClass ctClass , final ClassProcessor processor ) { final ClassFile classFile = ctClass . getClassFile ( ) ; AnnotationsAttribute annotationAttribute = null ; Annotation annotation = null ; for ( final Object attributeObject : classFile . getAttributes ( ) ) { if ( attributeObject instanceof AnnotationsAttribute ) { annotationAttribute = ( AnnotationsAttribute ) attributeObject ; annotation = annotationAttribute . getAnnotation ( PROCESSED_ANNOTATION_CLASS ) ; if ( annotation != null ) { break ; } } } if ( annotation == null ) { _log . debug ( "Creating annotation attribute on: " + ctClass . getName ( ) ) ; annotationAttribute = new AnnotationsAttribute ( classFile . getConstPool ( ) , AnnotationsAttribute . invisibleTag ) ; classFile . addAttribute ( annotationAttribute ) ; _log . debug ( "Creating processed annotation on: " + ctClass . getName ( ) ) ; annotation = new Annotation ( PROCESSED_ANNOTATION_CLASS , classFile . getConstPool ( ) ) ; } MemberValue value = annotation . getMemberValue ( "value" ) ; if ( value == null ) { value = new ArrayMemberValue ( classFile . getConstPool ( ) ) ; annotation . addMemberValue ( "value" , value ) ; } final ArrayMemberValue valueArray = ( ArrayMemberValue ) value ; final MemberValue [ ] existingProcessorValues = valueArray . getValue ( ) ; final MemberValue [ ] newProcessorValues ; if ( existingProcessorValues != null ) { newProcessorValues = Arrays . copyOf ( valueArray . getValue ( ) , valueArray . getValue ( ) . length + 1 ) ; } else { newProcessorValues = new MemberValue [ 1 ] ; } newProcessorValues [ newProcessorValues . length - 1 ] = new StringMemberValue ( processor . getClass ( ) . getName ( ) , classFile . getConstPool ( ) ) ; valueArray . setValue ( newProcessorValues ) ; _log . debug ( "New processed annotation value on: " + ctClass . getName ( ) + " = " + valueArray ) ; annotationAttribute . addAnnotation ( annotation ) ; }
/* package private