private static void parseXmlAnnotations ( Outline outline , FieldOutline field , Set < String > directClasses ) throws IllegalAccessException { if ( field instanceof UntypedListField ) { JFieldVar jfv = ( JFieldVar ) FieldHack . listField . get ( field ) ; for ( JAnnotationUse jau : jfv . annotations ( ) ) { JClass jc = jau . getAnnotationClass ( ) ; if ( jc . fullName ( ) . equals ( XmlElements . class . getName ( ) ) ) { JAnnotationArrayMember value = ( JAnnotationArrayMember ) jau . getAnnotationMembers ( ) . get ( "value" ) ; for ( JAnnotationUse anno : value . annotations ( ) ) { handleXmlElement ( outline , directClasses , anno . getAnnotationMembers ( ) . get ( "type" ) ) ; } } } } }
Parse the annotations on the field to see if there is an XmlElements annotation on it . If so we ll check this annotation to see if it refers to any classes that are external from our code schema compile . If we find any then we ll add them to our visitor .