U
- The type of the annotation.public static class AnnotationValue.ForAnnotationDescription<U extends java.lang.annotation.Annotation> extends AnnotationValue.AbstractBase<AnnotationDescription,U>
Annotation
as a value of another annotation.Modifier and Type | Class and Description |
---|---|
static class |
AnnotationValue.ForAnnotationDescription.IncompatibleRuntimeType
Represents an annotation value which was attempted to ba loaded by a type that does not represent
an annotation value.
|
static class |
AnnotationValue.ForAnnotationDescription.Loaded<V extends java.lang.annotation.Annotation>
A loaded version of the described annotation.
|
AnnotationValue.AbstractBase<U,V>, AnnotationValue.ForAnnotationDescription<U extends java.lang.annotation.Annotation>, AnnotationValue.ForConstant<U>, AnnotationValue.ForDescriptionArray<U,V>, AnnotationValue.ForEnumerationDescription<U extends java.lang.Enum<U>>, AnnotationValue.ForTypeDescription<U extends java.lang.Class<U>>, AnnotationValue.RenderingDispatcher
Modifier and Type | Field and Description |
---|---|
private AnnotationDescription |
annotationDescription
The annotation description that this value represents.
|
UNDEFINED
Constructor and Description |
---|
ForAnnotationDescription(AnnotationDescription annotationDescription)
Creates a new annotation value for a given annotation description.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object other) |
int |
hashCode() |
AnnotationValue.Loaded<U> |
load(java.lang.ClassLoader classLoader)
Returns the loaded value of this annotation.
|
static <V extends java.lang.annotation.Annotation> |
of(TypeDescription annotationType,
java.util.Map<java.lang.String,? extends AnnotationValue<?,?>> annotationValues)
Creates an annotation value instance for describing the given annotation type and values.
|
AnnotationDescription |
resolve()
Resolves the unloaded value of this annotation.
|
java.lang.String |
toString() |
loadSilent, resolve
private final AnnotationDescription annotationDescription
public ForAnnotationDescription(AnnotationDescription annotationDescription)
annotationDescription
- The annotation description that this value represents.public static <V extends java.lang.annotation.Annotation> AnnotationValue<AnnotationDescription,V> of(TypeDescription annotationType, java.util.Map<java.lang.String,? extends AnnotationValue<?,?>> annotationValues)
V
- The type of the annotation.annotationType
- The annotation type.annotationValues
- The values of the annotation.public AnnotationDescription resolve()
public AnnotationValue.Loaded<U> load(java.lang.ClassLoader classLoader) throws java.lang.ClassNotFoundException
classLoader
- The class loader for loading this value.java.lang.ClassNotFoundException
- If a type that represents a loaded value cannot be found.public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object