@ Nullable private FieldAnnotation getFieldAnnotation ( final String fieldName ) { JavaClass cls = getClassContext ( ) . getJavaClass ( ) ; Field [ ] fields = cls . getFields ( ) ; for ( Field f : fields ) { if ( f . getName ( ) . equals ( fieldName ) ) { return new FieldAnnotation ( cls . getClassName ( ) , fieldName , f . getSignature ( ) , f . isStatic ( ) ) ; } } return null ; // shouldn't happen }
builds a field annotation by finding the field in the classes field list