public AnnotationVisitor getAnnotationVisitor ( ) { return new AnnotationVisitor ( FindBugsASM . ASM_VERSION ) { @ Override public void visit ( String name , Object value ) { name = canonicalString ( name ) ; valueMap . put ( name , value ) ; } /* * (non-Javadoc) * * @see * org.objectweb.asm.AnnotationVisitor#visitAnnotation(java.lang * .String, java.lang.String) */ @ Override public AnnotationVisitor visitAnnotation ( String name , String desc ) { name = canonicalString ( name ) ; AnnotationValue newValue = new AnnotationValue ( desc ) ; valueMap . put ( name , newValue ) ; typeMap . put ( name , desc ) ; return newValue . getAnnotationVisitor ( ) ; } /* * (non-Javadoc) * * @see * org.objectweb.asm.AnnotationVisitor#visitArray(java.lang.String) */ @ Override public AnnotationVisitor visitArray ( String name ) { name = canonicalString ( name ) ; return new AnnotationArrayVisitor ( name ) ; } /* * (non-Javadoc) * * @see org.objectweb.asm.AnnotationVisitor#visitEnd() */ @ Override public void visitEnd ( ) { } /* * (non-Javadoc) * * @see * org.objectweb.asm.AnnotationVisitor#visitEnum(java.lang.String, * java.lang.String, java.lang.String) */ @ Override public void visitEnum ( String name , String desc , String value ) { name = canonicalString ( name ) ; valueMap . put ( name , new EnumValue ( desc , value ) ) ; typeMap . put ( name , desc ) ; } } ; }
Get an AnnotationVisitor which can populate this AnnotationValue object .