Package org.eclipse.sisu.inject
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 TypeMethodDescription<T extends Annotation>
TgetAnnotation
(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 bindingannotationType
- The annotation type- Returns:
- The associated annotation;
null
if no such annotation exists
-