code: static boolean includeFieldAnnotations( AnnotationToXML atx, TypeDeclaration typeDecl, String additionalAnnotation )
      {
          boolean hasFieldAnnotations = false;
  
          if (! (typeDecl instanceof ClassDeclaration)) {
              return hasFieldAnnotations;
          }
  
          ClassDeclaration jclass = (ClassDeclaration) typeDecl;
          FieldDeclaration[] fields = jclass.getFields();
  
          for (int i = 0; i < fields.length; i++) {
              AnnotationInstance fieldAnnotation =
                      CompilerUtils.getAnnotation(fields[i], JpfLanguageConstants.SHARED_FLOW_FIELD_TAG_NAME);
  
              if (fieldAnnotation == null) {
                  fieldAnnotation = CompilerUtils.getAnnotationFullyQualified(fields[i], CONTROL_ANNOTATION);
              }
  
              if (fieldAnnotation == null && additionalAnnotation != null) {
                  fieldAnnotation = CompilerUtils.getAnnotation(fields[i], additionalAnnotation);
              }
  
              if (fieldAnnotation != null) {
                  atx.include(fields[i], fieldAnnotation);
                  hasFieldAnnotations = true;
              }
          }
  
          ClassType superclass = jclass.getSuperclass();
          boolean superclassHasFieldAnns = false;
          if (superclass != null) {
              superclassHasFieldAnns = includeFieldAnnotations(atx, CompilerUtils.getDeclaration(superclass), additionalAnnotation);
          }
  
          return hasFieldAnnotations || superclassHasFieldAnns;
      }
docs: /*
  Gets all the public, protected, default (package) access,
  and private fields, including inherited fields, that have
  desired annotations.