U
- The type of the Class
that is described.public static class AnnotationValue.ForType<U extends Class<U>> extends AnnotationValue.AbstractBase<TypeDescription,U>
Class
as a value of an annotation.Modifier and Type | Class and Description |
---|---|
protected static class |
AnnotationValue.ForType.Loaded<U extends Class<U>>
A loaded annotation value for a given type.
|
AnnotationValue.AbstractBase<U,V>, AnnotationValue.ForAnnotation<U extends Annotation>, AnnotationValue.ForComplexArray<U,V>, AnnotationValue.ForConstant<U>, AnnotationValue.ForEnumeration<U extends Enum<U>>, AnnotationValue.ForType<U extends Class<U>>
UNDEFINED
Constructor and Description |
---|
ForType(TypeDescription typeDescription)
Creates a new annotation value that represents a type.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object other) |
int |
hashCode() |
AnnotationValue.Loaded<U> |
load(ClassLoader classLoader)
Returns the loaded value of this annotation.
|
static <V extends Class<V>> |
of(TypeDescription typeDescription)
Creates an annotation value for representing the given type.
|
TypeDescription |
resolve()
Resolves the unloaded value of this annotation.
|
String |
toString() |
resolve
public ForType(TypeDescription typeDescription)
typeDescription
- The represented type.public static <V extends Class<V>> AnnotationValue<TypeDescription,V> of(TypeDescription typeDescription)
V
- The represented type.typeDescription
- The type to represent.public TypeDescription resolve()
AnnotationValue
public AnnotationValue.Loaded<U> load(ClassLoader classLoader) throws ClassNotFoundException
AnnotationValue
classLoader
- The class loader for loading this value.ClassNotFoundException
- If a type that represents a loaded value cannot be found.Copyright © 2014–2016. All rights reserved.