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 @Description
that 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()
boolean
equals(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.int
hashCode()
java.lang.String
toString()
java.lang.String
value()
-
-
-
Method Detail
-
value
public java.lang.String value()
-
annotationType
public java.lang.Class<? extends java.lang.annotation.Annotation> annotationType()
- Specified by:
annotationType
in interfacejava.lang.annotation.Annotation
-
hashCode
public int hashCode()
- Specified by:
hashCode
in interfacejava.lang.annotation.Annotation
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object rhs)
- Specified by:
equals
in interfacejava.lang.annotation.Annotation
- Overrides:
equals
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Specified by:
toString
in interfacejava.lang.annotation.Annotation
- Overrides:
toString
in 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:AnnotatedSource
Returns the annotation of the given type that is associated with the binding.- Specified by:
getAnnotation
in interfaceAnnotatedSource
- Parameters:
binding
- The bindingannotationType
- The annotation type- Returns:
- The associated annotation;
null
if no such annotation exists
-
-