Returns {@code true} if the given annotation type is marked has retained at runtime.

@see Retention
@see RetentionPolicy#RUNTIME
17655
public static boolean isRetainedAtRuntime(Class<? extends Annotation> annotationClass) {
        Retention retention = requireNonNull(annotationClass, "annotationClass").getAnnotation(Retention.class);
        return retention != null && RUNTIME == retention.value();
    }
72027
public Boolean isKeepAlive(boolean useDefault) {

        if (m_keepAlive != null) {
            return m_keepAlive;
        }
        if (useDefault) {
            return Boolean.TRUE;
        } else {
            return null;
        }

    }
45123
public static boolean isAnnotatedWithTrait(final ClassNode cNode) {
        List<AnnotationNode> traitAnn = cNode.getAnnotations(Traits.TRAIT_CLASSNODE);
        return traitAnn != null && !traitAnn.isEmpty();
    }
161005
public boolean recordTypedef(JSTypeExpression type) {
    if (type != null && !hasAnyTypeRelatedTags() && currentInfo.declareTypedefType(type)) {
      populated = true;
      return true;
    }
    return false;
  }
946285
public static boolean isResolved(Type type) {
    if (type instanceof GenericArrayType) {
      return isResolved(((GenericArrayType) type).getGenericComponentType());
    }
    if (type instanceof ParameterizedType) {
      for (Type t : ((ParameterizedType) type).getActualTypeArguments()) {
        if (!isResolved(t)) {
          return false;
        }
      }
      return true;
    }
    return type instanceof Class;
  }
301776
public static boolean isBindingAnnotation(Class<? extends Annotation> annotation) {
    return annotation.isAnnotationPresent(BindingAnnotation.class)
        || annotation.isAnnotationPresent(Qualifier.class);
  }
674171
public Annotation previous(AnnotationType type) {
      return document() == null ? Fragments.detachedEmptyAnnotation() : document().getAnnotationSet().previous(this,
                                                                                                               type);
   }
720429
public boolean isAnnotationPresent(Class<? extends Annotation> annTypeTest)
  {
    for (Class<?> annType : _annTypes) {
      if (annType.equals(annTypeTest)) {
        return true;
      }
    }

    return false;
  }
573478
public boolean recordThisType(JSTypeExpression type) {
    if (type != null && !hasAnySingletonTypeTags() &&
        !currentInfo.hasThisType()) {
      currentInfo.setThisType(type);
      populated = true;
      return true;
    } else {
      return false;
    }
  }
903617
public static boolean isTypeManagedBeanOrDecoratorOrInterceptor(AnnotatedType<?> annotatedType) {
        Class<?> javaClass = annotatedType.getJavaClass();
        return !javaClass.isEnum() && !Extension.class.isAssignableFrom(javaClass)
                && Reflections.isTopLevelOrStaticNestedClass(javaClass) && !Reflections.isParameterizedTypeWithWildcard(javaClass)
                && hasSimpleCdiConstructor(annotatedType);
    }
96528
public static boolean isInAnnotation(Env<?> env, JCTree tree) {
        TreePath tp = TreePath.getPath(env.toplevel, tree);
        if (tp != null) {
            for (Tree t : tp) {
                if (t.getKind() == Tree.Kind.ANNOTATION)
                    return true;
            }
        }
        return false;
    }
571720
public boolean containsRequiredAnnotations(Collection<Class<? extends Annotation>> requiredAnnotations) {
        if (annotatedType instanceof BackedAnnotatedType<?>) {
            return containsAnnotation((BackedAnnotatedType<?>) annotatedType, requiredAnnotations);
        } else if (annotatedType instanceof UnbackedAnnotatedType<?>) {
            return containsAnnotation((UnbackedAnnotatedType<?>) annotatedType, requiredAnnotations);
        } else {
            throw new IllegalArgumentException("Unknown SlimAnnotatedType implementation: " + annotatedType.getClass().toString());
        }
    }
902971
public static boolean isClassVetoed(Class<?> type) {
        if (type.isAnnotationPresent(Vetoed.class)) {
            return true;
        }
        return isPackageVetoed(type.getPackage());
    }
446156
private void checkRunnable(Class<?> type) {
    if(Runnable.class.isAssignableFrom(type)) {
      try{
        this.method = type.getMethod("run");
      } catch(Exception e) {
        throw new RuntimeException("Cannot get run method of runnable class.", e);
      }
    }
  }
59741
@Override
  public boolean accept(Class<?> type) {

    if (type != null) {
      if (this.forceInheritence) {
        Annotation annotation = this.annotationUtil.getTypeAnnotation(type, this.annotationType);
        return (annotation != null);
      } else {
        return type.isAnnotationPresent(this.annotationType);
      }

    }
    return false;
  }
1311101
public static boolean isAnnotated(AnnotatedElement element, Class<? extends Annotation> annotationType) {
        return findAnnotation(element, annotationType) != null;
    }
927177
protected boolean isMethodInstrumentedByThisAdapter() {
        if (injectedTraceAnnotationVisitor == null) {
            return false;
        }

        List<String> visitedMethodAdapters = injectedTraceAnnotationVisitor.getMethodAdapters();
        return visitedMethodAdapters.contains(getClass().getName());
    }