Interface AnnotatedSource

All Known Implementing Classes:
DescriptionSource, HiddenSource, PrioritySource

public interface AnnotatedSource
Binding source locations can implement this interface to supply annotations to the BeanLocator.
See Also:
  • Binder.withSource(Object)
  • Method Summary

    Modifier and Type
    Method
    Description
    <T extends Annotation>
    T
    getAnnotation(com.google.inject.Binding<?> binding, Class<T> annotationType)
    Returns the annotation of the given type that is associated with the binding.
  • Method Details

    • getAnnotation

      <T extends Annotation> T getAnnotation(com.google.inject.Binding<?> binding, Class<T> annotationType)
      Returns the annotation of the given type that is associated with the binding.
      Parameters:
      binding - The binding
      annotationType - The annotation type
      Returns:
      The associated annotation; null if no such annotation exists