Given an annotation, return true if it should be documented and false
otherwise.

@param annotationDoc the annotation to check.

@return true return true if it should be documented and false otherwise.
178752
public static boolean isDocumentedAnnotation(AnnotationTypeDoc annotationDoc) {
        AnnotationDesc[] annotationDescList = annotationDoc.annotations();
        for (int i = 0; i < annotationDescList.length; i++) {
            if (annotationDescList[i].annotationType().qualifiedName().equals(
                   java.lang.annotation.Documented.class.getName())){
                return true;
            }
        }
        return false;
    }
352755
public boolean hasMembersToDocument() {
        if (classDoc instanceof AnnotationTypeDoc) {
            return ((AnnotationTypeDoc) classDoc).elements().length > 0;
        }
        for (int i = 0; i < VisibleMemberMap.NUM_MEMBER_TYPES; i++) {
            VisibleMemberMap members = visibleMemberMaps[i];
            if (!members.noVisibleMembers()) {
                return true;
            }
        }
        return false;
    }
169154
public boolean hasDeclaredMethodParameterAnnotation(final String methodParameterAnnotationName) {
        for (final MethodInfo mi : getDeclaredMethodInfo()) {
            if (mi.hasParameterAnnotation(methodParameterAnnotationName)) {
                return true;
            }
        }
        return false;
    }
297548
public boolean hasDeclaredFieldAnnotation(final String fieldAnnotationName) {
        for (final FieldInfo fi : getDeclaredFieldInfo()) {
            if (fi.hasAnnotation(fieldAnnotationName)) {
                return true;
            }
        }
        return false;
    }
1108229
public static boolean keepDoc(JCas jCas) {
        String lang = jCas.getDocumentLanguage();
        if (lang.equals("x-unspecified")) {
            LOG.warn("document language needed to decide whether to keepDoc(), but document language is not set, pmId"
                    + getHeaderDocId(jCas));
        }
        if (!(lang.equals("en") || lang.equals("x-unspecified")) || //
                exists(jCas, TooFewTokensPerPage.class) || //
                exists(jCas, TooManyOOV.class)) {
            return false;
        }
        return true;
    }
825963
public static <T extends Annotation> boolean isAnnotationPresent( Class<T> annotation, List<? extends HasAnnotations>
            hasAnnotationsList ) {
        for ( HasAnnotations accessor : hasAnnotationsList ) {
            if ( accessor.isAnnotationPresent( annotation ) ) {
                return true;
            }
        }
        return false;
    }
270900
private static boolean exemptedByAnnotation(
      List<? extends AnnotationTree> annotations,
      VisitorState state) {
    for (AnnotationTree annotation : annotations) {
      if (((JCAnnotation) annotation).type != null) {
        TypeSymbol tsym = ((JCAnnotation) annotation).type.tsym;
        if (EXEMPTING_METHOD_ANNOTATIONS.contains(tsym.getQualifiedName().toString())) {
          return true;
        }
      }
    }
    return false;
  }
1052434
public static boolean hasNamedAnnotation(AnnotatedConstruct ac, Pattern pattern) {
    for (AnnotationMirror annotation : ac.getAnnotationMirrors()) {
      if (pattern.matcher(getName(annotation.getAnnotationType().asElement())).matches()) {
        return true;
      }
    }
    return false;
  }
247799
public static boolean hasAnnotation(ExecutableElement method, Class<? extends Annotation> ann) {
        List<? extends AnnotationMirror> annotationMirrors = method.getAnnotationMirrors();
        for (AnnotationMirror annotationMirror : annotationMirrors) {
            if (annotationMirror.getAnnotationType().toString().equals(ann.getName())) {
                return true;
            }
        }
        return false;
    }
1283583
private boolean isSupportedAnnotation(final Annotation anno) {

        final String name = anno.annotationType().getName();
        if(name.startsWith("java.lang.annotation.")) {
            return false;
        }

        return true;
    }
167284
@SuppressWarnings("static-method")
	protected boolean isForbiddenActiveAnnotation(XAnnotation annotation) {
		final String name = annotation.getAnnotationType().getQualifiedName();
		return Strings.equal(EqualsHashCode.class.getName(), name)
				|| Strings.equal(FinalFieldsConstructor.class.getName(), name);
	}
150646
boolean documentParam(String parameter, String description) {
    if (!lazyInitDocumentation()) {
      return true;
    }

    if (documentation.parameters == null) {
      documentation.parameters = new LinkedHashMap<>();
    }

    if (!documentation.parameters.containsKey(parameter)) {
      documentation.parameters.put(parameter, description);
      return true;
    } else {
      return false;
    }
  }
1110832
private boolean goToNextDoc() throws IOException {
    reset();
    if (docId == NO_MORE_DOCS) {
      minPosition = NO_MORE_POSITIONS;
      maxPosition = NO_MORE_POSITIONS;
      return true;
    } else {
      docId = subSpans.nextDoc();
      if (docId == NO_MORE_DOCS) {
        minPosition = NO_MORE_POSITIONS;
        maxPosition = NO_MORE_POSITIONS;
        return true;
      } else {
        IndexDoc doc = mtasCodecInfo.getDoc(field, docId);
        if (doc != null) {
          minPosition = doc.minPosition;
          maxPosition = doc.maxPosition;
        } else {
          minPosition = NO_MORE_POSITIONS;
          maxPosition = NO_MORE_POSITIONS;
        }
        if (goToNextStartPosition()) {
          return true;
        } else {
          return false;
        }
      }
    }
  }
1102662
protected boolean isOpenAPIMethod(MethodDoc methodDoc) {
		AnnotationDesc[] annotations = methodDoc.annotations();
		boolean isActionMethod = false;
		for (int i = 0; i < annotations.length; i++) {
			if (annotations[i].annotationType().name().equals("RequestMapping")
					|| annotations[i].annotationType().name().equals("PostMapping")
					|| annotations[i].annotationType().name().equals("GetMapping")
					|| annotations[i].annotationType().name().equals("DeleteMapping")
					|| annotations[i].annotationType().name().equals("PutMapping")
					|| annotations[i].annotationType().name().equals("PatchMapping") ) {
				isActionMethod = true;
				break;
			}
		}
		Tag[] t = methodDoc.tags(WRAPITaglet.NAME);
		return isActionMethod
				|| t.length > 0
				|| this.isProgramElementDocAnnotatedWith(methodDoc, "javax.ws.rs.Path");
	}
736088
public boolean isAnnotated(ExecutableElement method) {
        List<? extends AnnotationMirror> annotationMirrors = method.getAnnotationMirrors();
        for (AnnotationMirror annotationMirror : annotationMirrors) {
            String typeName = annotationMirror.getAnnotationType().toString();
            if (!AnnotationUtil.INTERNAL_ANNOTATION_NAMES.contains(typeName)) {
                return true;
            }
        }
        return false;
    }
1172111
private boolean hasAnnotation(Class c, Class targetClass, AnnotationRepository annotationRepository)
   {
      Collection<Annotation> values = annotationRepository.getAnnotation(targetClass);
      if (values == null)
         return false;
      for (Annotation annotation : values)
      {
         if (annotation.getClassName() != null && annotation.getClassName().equals(c.getName()))
            return true;
      }
      return false;

   }
1111999
public static boolean hasAnnotation(final MethodNode methodNode, final Class<? extends Annotation> annotationClass) {
        return !methodNode.getAnnotations(new ClassNode(annotationClass)).isEmpty();
    }