Package org.eclipse.sisu.inject
Class DescriptionSource
- java.lang.Object
-
- org.eclipse.sisu.inject.DescriptionSource
-
- All Implemented Interfaces:
java.lang.annotation.Annotation,AnnotatedSource
final class DescriptionSource extends java.lang.Object implements Description, AnnotatedSource
Implementation of @Descriptionthat can also act as an @AnnotatedSource.
-
-
Constructor Summary
Constructors Constructor Description DescriptionSource(java.lang.Object source, java.lang.String value)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Class<? extends java.lang.annotation.Annotation>annotationType()booleanequals(java.lang.Object rhs)<T extends java.lang.annotation.Annotation>
TgetAnnotation(com.google.inject.Binding<?> binding, java.lang.Class<T> annotationType)Returns the annotation of the given type that is associated with the binding.inthashCode()java.lang.StringtoString()java.lang.Stringvalue()
-
-
-
Method Detail
-
value
public java.lang.String value()
-
annotationType
public java.lang.Class<? extends java.lang.annotation.Annotation> annotationType()
- Specified by:
annotationTypein interfacejava.lang.annotation.Annotation
-
hashCode
public int hashCode()
- Specified by:
hashCodein interfacejava.lang.annotation.Annotation- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object rhs)
- Specified by:
equalsin interfacejava.lang.annotation.Annotation- Overrides:
equalsin classjava.lang.Object
-
toString
public java.lang.String toString()
- Specified by:
toStringin interfacejava.lang.annotation.Annotation- Overrides:
toStringin classjava.lang.Object
-
getAnnotation
public <T extends java.lang.annotation.Annotation> T getAnnotation(com.google.inject.Binding<?> binding, java.lang.Class<T> annotationType)Description copied from interface:AnnotatedSourceReturns the annotation of the given type that is associated with the binding.- Specified by:
getAnnotationin interfaceAnnotatedSource- Parameters:
binding- The bindingannotationType- The annotation type- Returns:
- The associated annotation;
nullif no such annotation exists
-
-