Class Annotations

org.elasticsearch.common.inject.internal.Annotations

public class Annotations extends
Annotation utilities.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    <?> type,  source, Errors errors)
    Adds an error if there is a misplaced annotations on type.
    static
    findBindingAnnotation​(Errors errors,  member, [] annotations)
    Returns the binding annotation on member, or null if there isn't one.
    static <? extends >
    findScopeAnnotation​(Errors errors, [] annotations)
    Returns the scoping annotation, or null if there isn't one.
    static <? extends >
    findScopeAnnotation​(Errors errors, <?> implementation)
    Returns the scope annotation on type, or null if none is specified.
    static Key<?>
    getKey​(TypeLiteral<?> type,  member, [] annotations, Errors errors)
    Gets a key for the given type, member and annotations.
    static boolean
    <? extends > annotationType)
    Returns true if the given annotation is retained at runtime.
    static boolean
    <? extends > annotationType)
     

    Methods inherited from class java.lang.

    , , , , , , , , , ,
  • Constructor Details

    • Annotations

      public Annotations()
  • Method Details

    • isRetainedAtRuntime

      public static boolean isRetainedAtRuntime(<? extends > annotationType)
      Returns true if the given annotation is retained at runtime.
    • findScopeAnnotation

      public static <? extends > findScopeAnnotation(Errors errors, <?> implementation)
      Returns the scope annotation on type, or null if none is specified.
    • findScopeAnnotation

      public static <? extends > findScopeAnnotation(Errors errors, [] annotations)
      Returns the scoping annotation, or null if there isn't one.
    • isScopeAnnotation

      public static boolean isScopeAnnotation(<? extends > annotationType)
    • checkForMisplacedScopeAnnotations

      public static void checkForMisplacedScopeAnnotations(<?> type,  source, Errors errors)
      Adds an error if there is a misplaced annotations on type. Scoping annotations are not allowed on abstract classes or interfaces.
    • getKey

      public static Key<?> getKey(TypeLiteral<?> type,  member, [] annotations, Errors errors) throws ErrorsException
      Gets a key for the given type, member and annotations.
      Throws:
      ErrorsException
    • findBindingAnnotation

      public static  findBindingAnnotation(Errors errors,  member, [] annotations)
      Returns the binding annotation on member, or null if there isn't one.