public class AnnotationParameterValue extends java.lang.Object implements HasName, java.lang.Comparable<AnnotationParameterValue>
| Modifier and Type | Field and Description |
|---|---|
protected java.lang.Class<?> |
classRef
The class ref, once the class is loaded.
|
protected ScanResult |
scanResult
The scan result.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(AnnotationParameterValue other) |
boolean |
equals(java.lang.Object obj) |
protected void |
findReferencedClassInfo(java.util.Map<java.lang.String,ClassInfo> classNameToClassInfo,
java.util.Set<ClassInfo> refdClassInfo,
LogNode log)
Get
ClassInfo objects for any classes referenced in the annotation parameters. |
protected ClassInfo |
getClassInfo()
Get the
ClassInfo object for the referenced class, or null if the referenced class was not
encountered during scanning (i.e. no ClassInfo object was created for the class during scanning). |
protected java.lang.String |
getClassName()
The name of the class (used by
getClassInfo() to fetch the ClassInfo object for the class). |
java.lang.String |
getName()
Get the annotation parameter name.
|
java.lang.Object |
getValue()
Get the annotation parameter value.
|
int |
hashCode() |
java.lang.String |
toString()
Render to string.
|
protected void |
toString(boolean useSimpleNames,
java.lang.StringBuilder buf)
Render to string.
|
java.lang.String |
toStringWithSimpleNames()
Render to string, using only simple
names for classes.
|
protected transient ScanResult scanResult
protected transient java.lang.Class<?> classRef
public java.lang.String getName()
public java.lang.Object getValue()
Object[] array for array types (and then the array element type may be
one of the types in this list)
AnnotationEnumValue, for enum constants (this wraps the enum class and the string name of
the constant)
AnnotationClassRef, for Class references within annotations (this wraps the name of the
referenced class)
AnnotationInfo, for nested annotations
protected java.lang.String getClassName()
getClassInfo() to fetch the ClassInfo object for the class).protected ClassInfo getClassInfo()
ClassInfo object for the referenced class, or null if the referenced class was not
encountered during scanning (i.e. no ClassInfo object was created for the class during scanning). N.B. even
if this method returns null, loadClass() may be able to load the referenced class by name.ClassInfo object for the referenced class.protected void findReferencedClassInfo(java.util.Map<java.lang.String,ClassInfo> classNameToClassInfo, java.util.Set<ClassInfo> refdClassInfo, LogNode log)
ClassInfo objects for any classes referenced in the annotation parameters.classNameToClassInfo - the map from class name to ClassInfo.refdClassInfo - the referenced class infolog - the logpublic int compareTo(AnnotationParameterValue other)
compareTo in interface java.lang.Comparable<AnnotationParameterValue>public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectprotected void toString(boolean useSimpleNames,
java.lang.StringBuilder buf)
useSimpleNames - if true, use just the simple name of each class.buf - the bufpublic java.lang.String toStringWithSimpleNames()
public java.lang.String toString()
toString in class java.lang.Object