Class Annotations.AnnotationChecker

java.lang.Object
com.google.inject.internal.Annotations.AnnotationChecker
Enclosing class:
Annotations

static class Annotations.AnnotationChecker extends Object
Checks for the presence of annotations. Caches results because Android doesn't.
  • Field Details

    • annotationTypes

      private final Collection<Class<? extends Annotation>> annotationTypes
    • hasAnnotations

      private com.google.common.cache.CacheLoader<Class<? extends Annotation>,Boolean> hasAnnotations
      Returns true if the given class has one of the desired annotations.
    • cache

      final com.google.common.cache.LoadingCache<Class<? extends Annotation>,Boolean> cache
  • Constructor Details

    • AnnotationChecker

      AnnotationChecker(Collection<Class<? extends Annotation>> annotationTypes)
      Constructs a new checker that looks for annotations of the given types.
  • Method Details

    • hasAnnotations

      boolean hasAnnotations(Class<? extends Annotation> annotated)
      Returns true if the given type has one of the desired annotations.