U
- The type of the Class
that is described.public static class AnnotationValue.ForTypeDescription<U extends java.lang.Class<U>> extends AnnotationValue.AbstractBase<TypeDescription,U>
Class
as a value of an annotation.Modifier and Type | Class and Description |
---|---|
protected static class |
AnnotationValue.ForTypeDescription.Loaded<U extends java.lang.Class<U>>
A loaded annotation value for a given type.
|
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 static boolean |
NO_INITIALIZATION
Indicates to a class loading process that class initializers are not required to be executed when loading a type.
|
private TypeDescription |
typeDescription
A description of the represented type.
|
UNDEFINED
Modifier | Constructor and Description |
---|---|
protected |
ForTypeDescription(TypeDescription typeDescription)
Creates a new annotation value that represents a type.
|
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.Class<V>> |
of(TypeDescription typeDescription)
Creates an annotation value for representing the given type.
|
TypeDescription |
resolve()
Resolves the unloaded value of this annotation.
|
java.lang.String |
toString() |
loadSilent, resolve
private static final boolean NO_INITIALIZATION
private final TypeDescription typeDescription
protected ForTypeDescription(TypeDescription typeDescription)
typeDescription
- The represented type.public static <V extends java.lang.Class<V>> AnnotationValue<TypeDescription,V> of(TypeDescription typeDescription)
V
- The represented type.typeDescription
- The type to represent.public TypeDescription 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