private boolean processAttributeAnnotation ( Field field ) { // Default to no syntax specified syntax = "" ; // Default to a String based attribute isBinary = false ; // Default name of attribute to the name of the field name = new CaseIgnoreString ( field . getName ( ) ) ; // We have not yet found the @Attribute annotation boolean foundAnnotation = false ; // Grab the @Attribute annotation Attribute attribute = field . getAnnotation ( Attribute . class ) ; List < String > attrList = new ArrayList < String > ( ) ; // Did we find the annotation? if ( attribute != null ) { // Pull attribute name, syntax and whether attribute is binary // from the annotation foundAnnotation = true ; String localAttributeName = attribute . name ( ) ; // Would be more efficient to use !isEmpty - but that then makes us Java 6 dependent if ( localAttributeName != null && localAttributeName . length ( ) > 0 ) { name = new CaseIgnoreString ( localAttributeName ) ; attrList . add ( localAttributeName ) ; } syntax = attribute . syntax ( ) ; isBinary = attribute . type ( ) == Attribute . Type . BINARY ; isReadOnly = attribute . readonly ( ) ; } attributes = attrList . toArray ( new String [ attrList . size ( ) ] ) ; isObjectClass = name . equals ( OBJECT_CLASS_ATTRIBUTE_CI ) ; return foundAnnotation ; }
syntax isBinary isObjectClass and name .