private void addMemberProperties ( AnnotationTypeDeclaration node , List < AnnotationTypeMemberDeclaration > members , Map < ExecutableElement , VariableElement > fieldElements ) { if ( members . isEmpty ( ) ) { return ; } StringBuilder propertyDecls = new StringBuilder ( ) ; StringBuilder propertyImpls = new StringBuilder ( ) ; for ( AnnotationTypeMemberDeclaration member : members ) { ExecutableElement memberElement = member . getExecutableElement ( ) ; String propName = NameTable . getAnnotationPropertyName ( memberElement ) ; String memberTypeStr = nameTable . getObjCType ( memberElement . getReturnType ( ) ) ; String fieldName = nameTable . getVariableShortName ( fieldElements . get ( memberElement ) ) ; propertyDecls . append ( UnicodeUtils . format ( "@property (readonly) %s%s%s;\n" , memberTypeStr , memberTypeStr . endsWith ( "*" ) ? "" : " " , propName ) ) ; if ( NameTable . needsObjcMethodFamilyNoneAttribute ( propName ) ) { propertyDecls . append ( UnicodeUtils . format ( "- (%s)%s OBJC_METHOD_FAMILY_NONE;\n" , memberTypeStr , propName ) ) ; } propertyImpls . append ( UnicodeUtils . format ( "@synthesize %s = %s;\n" , propName , fieldName ) ) ; } node . addBodyDeclaration ( NativeDeclaration . newInnerDeclaration ( propertyDecls . toString ( ) , propertyImpls . toString ( ) ) ) ; }
Generate the property declarations and synthesize statements .