Replies if the given annotation is a forbidden active annotation.

@param annotation the annotation.
@return {@code true} if the annotation is forbidden.
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);
	}
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;
    }
967988
public static Predicate<RequestHandler> withMethodAnnotation(final Class<? extends Annotation> annotation) {
    return input -> input.isAnnotatedWith(annotation);
  }
759088
public static void deleteAnnotationIfNeccessary(JavacNode annotation, Class<? extends Annotation> annotationType) {
		deleteAnnotationIfNeccessary0(annotation, annotationType.getName());
	}
979061
protected void initValid(EnhancedAnnotation<T> annotatedAnnotation) {
        this.valid = false;
        for (Class<? extends Annotation> annotationType : getMetaAnnotationTypes()) {
            if (annotatedAnnotation.isAnnotationPresent(annotationType)) {
                this.valid = true;
            }
        }
    }
287908
public boolean hasDeclaredMethodAnnotation(final String methodAnnotationName) {
        for (final MethodInfo mi : getDeclaredMethodInfo()) {
            if (mi.hasAnnotation(methodAnnotationName)) {
                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;

   }
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;
    }
495366
public static void assertOnlyOneMethod(final Collection<Method> methods, Class<? extends Annotation> annotation)
   {
      if (methods.size() > 1)
      {
         throw annotation == null ? MESSAGES.onlyOneMethodCanExist() : MESSAGES.onlyOneMethodCanExist2(annotation);
      }
   }
612360
protected final boolean checkDenyAnnotations(Class<?> controllerClazz, Method actionMethod) {
        List<Class<? extends Annotation>> denyAnnotations = getDenyAnnotationClasses();
        if (denyAnnotations == null || denyAnnotations.size() == 0) {
            return false;
        }
        for (Class<? extends Annotation> denyAnnotation : denyAnnotations) {
            if (denyAnnotation == null) {
                continue;
            }
            BitSet scopeSet = getAnnotationScope(denyAnnotation);
            if (scopeSet.get(AnnotationScope.METHOD.ordinal())) {
                if (actionMethod.isAnnotationPresent(denyAnnotation)) {
                    return checkAnnotation(actionMethod.getAnnotation(denyAnnotation));
                }
            }
            if (scopeSet.get(AnnotationScope.CLASS.ordinal())) {
                if (controllerClazz.isAnnotationPresent(denyAnnotation)) {
                    return checkAnnotation(actionMethod.getAnnotation(denyAnnotation));
                }
            }
            if (scopeSet.get(AnnotationScope.ANNOTATION.ordinal())) {
                for (Annotation annotation : actionMethod.getAnnotations()) {
                    if (annotation.annotationType().isAnnotationPresent(denyAnnotation)) {
                        return checkAnnotation(actionMethod.getAnnotation(denyAnnotation));
                    }
                }
                for (Annotation annotation : controllerClazz.getAnnotations()) {
                    if (annotation.annotationType().isAnnotationPresent(denyAnnotation)) {
                        return checkAnnotation(actionMethod.getAnnotation(denyAnnotation));
                    }
                }
            }
        }
        return false;
    }
422891
public static boolean isDAOValidatorAnnotation(Annotation annotation) {
		
		// Si lm'annotation est nulle
		if(annotation == null) {
			
			// On retourne false
			return false;
		}
		
		// Obtention de la classe de cette annotation
		Class<?> annotationClass = annotation.annotationType();
		
		// Recherchje de l'annotation de validation
		DAOConstraint logicAnnotation = annotationClass.getAnnotation(DAOConstraint.class);
		
		// On retourne le resultat
		return logicAnnotation != null;
	}
48584
public function doesDocBlockContainAnnotation(string $annotation): bool
    {
        $docComment = (new \ReflectionClass($this->fullClassName))->getDocComment();

        if (false === $docComment) {
            return false;
        }

        return false !== strpos($docComment, $annotation);
    }
1311101
public static boolean isAnnotated(AnnotatedElement element, Class<? extends Annotation> annotationType) {
        return findAnnotation(element, annotationType) != null;
    }
1111999
public static boolean hasAnnotation(final MethodNode methodNode, final Class<? extends Annotation> annotationClass) {
        return !methodNode.getAnnotations(new ClassNode(annotationClass)).isEmpty();
    }
1298986
@SuppressWarnings("unchecked")
  public static void addAnnotation(Field field, Annotation annotation) {
    field.getAnnotation(Annotation.class);// prevent declaredAnnotations haven't initialized
    Map<Class<? extends Annotation>, Annotation> annos;
    try {
      annos = (Map<Class<? extends Annotation>, Annotation>) Field_Field_DeclaredAnnotations.get(field);
    } catch (IllegalAccessException e) {
      throw new IllegalStateException(e);
    }
    if (annos.getClass() == Collections.EMPTY_MAP.getClass()) {
      annos = new HashMap<>();
      try {
        Field_Field_DeclaredAnnotations.set(field, annos);
      } catch (IllegalAccessException e) {
        throw new IllegalStateException(e);
      }
    }
    annos.put(annotation.annotationType(), annotation);
  }
934578
public static boolean hasAnnotation(final ClassNode classNode, final Class<? extends Annotation> annotationClass) {
        return !classNode.getAnnotations(new ClassNode(annotationClass)).isEmpty();
    }
127591
public boolean hasParameterAnnotation(final String annotationName) {
        for (final MethodParameterInfo methodParameterInfo : getParameterInfo()) {
            if (methodParameterInfo.hasAnnotation(annotationName)) {
                return true;
            }
        }
        return false;
    }