final class DescriptionSource extends java.lang.Object implements Description, AnnotatedSource
Description
that can also act as an @AnnotatedSource
.Modifier and Type | Field and Description |
---|---|
private java.lang.Object |
source |
private java.lang.String |
value |
Constructor and Description |
---|
DescriptionSource(java.lang.Object source,
java.lang.String value) |
Modifier and Type | Method and Description |
---|---|
java.lang.Class<? extends java.lang.annotation.Annotation> |
annotationType() |
boolean |
equals(java.lang.Object rhs) |
<T extends java.lang.annotation.Annotation> |
getAnnotation(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() |
private final java.lang.Object source
private final java.lang.String value
DescriptionSource(java.lang.Object source, java.lang.String value)
source
- The owning sourcevalue
- The descriptionpublic java.lang.String value()
public java.lang.Class<? extends java.lang.annotation.Annotation> annotationType()
annotationType
in interface java.lang.annotation.Annotation
public int hashCode()
hashCode
in interface java.lang.annotation.Annotation
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object rhs)
equals
in interface java.lang.annotation.Annotation
equals
in class java.lang.Object
public java.lang.String toString()
toString
in interface java.lang.annotation.Annotation
toString
in class java.lang.Object
public <T extends java.lang.annotation.Annotation> T getAnnotation(com.google.inject.Binding<?> binding, java.lang.Class<T> annotationType)
AnnotatedSource
getAnnotation
in interface AnnotatedSource
binding
- The bindingannotationType
- The annotation typenull
if no such annotation exists