private static < T extends Annotation > FieldWriter annotationArrayFieldWriter ( final String name , final AnnotationRef < T > ref ) { return new FieldWriter ( ) { @ Override public void write ( AnnotationVisitor visitor , Object value ) { int len = Array . getLength ( value ) ; AnnotationVisitor arrayVisitor = visitor . visitArray ( name ) ; for ( int i = 0 ; i < len ; i ++ ) { ref . doWrite ( ref . annType . cast ( Array . get ( value , i ) ) , arrayVisitor . visitAnnotation ( null , ref . typeDescriptor ) ) ; } arrayVisitor . visitEnd ( ) ; } } ; }
Writes an annotation array valued field to the annotation visitor .