public final class RVMAnnotation extends Object
RVMClass
.Modifier and Type | Class and Description |
---|---|
private class |
RVMAnnotation.AnnotationFactory
Class used to implement annotations as proxies
|
private static class |
RVMAnnotation.AnnotationMember
A class to decode and hold the name and its associated value for
an annotation member
|
Modifier and Type | Field and Description |
---|---|
private RVMAnnotation.AnnotationMember[] |
elementValuePairs
Members of this annotation
|
private static Object |
NO_VALUE
Encoding of when a result cannot be returned
|
private TypeReference |
type
The type of the annotation.
|
private static ImmutableEntryHashMapRVM<RVMAnnotation,RVMAnnotation> |
uniqueMap
Remembered unique annotations
|
private Annotation |
value
The concrete annotation represented by this RVMAnnotation
|
Modifier | Constructor and Description |
---|---|
private |
RVMAnnotation(TypeReference type,
RVMAnnotation.AnnotationMember[] elementValuePairs)
Construct a read annotation
|
Modifier and Type | Method and Description |
---|---|
private boolean |
annotationEquals(Annotation a,
Annotation b) |
private int |
annotationHashCode() |
(package private) TypeReference |
annotationType()
Return the TypeReference of the declared annotation, ie an
interface and not the class object of this instance
|
private Annotation |
createValue()
Create an instance of this type of annotation with the values
given in the members
|
private String |
elementString(String name,
Object value) |
boolean |
equals(Object o) |
(package private) static Object |
firstUse(Object value) |
private Object |
getElementValue(String name,
Class<?> valueType) |
(package private) Annotation |
getValue()
Return the annotation represented by this RVMAnnotation.
|
int |
hashCode() |
(package private) static RVMAnnotation |
readAnnotation(int[] constantPool,
DataInputStream input,
ClassLoader classLoader) |
(package private) static <T> Object |
readValue(TypeReference type,
int[] constantPool,
DataInputStream input,
ClassLoader classLoader) |
private static <T> Object |
readValue(TypeReference type,
int[] constantPool,
DataInputStream input,
ClassLoader classLoader,
byte elementValue_tag) |
String |
toString() |
private static String |
toStringHelper(Object value) |
private final TypeReference type
private final RVMAnnotation.AnnotationMember[] elementValuePairs
private static final ImmutableEntryHashMapRVM<RVMAnnotation,RVMAnnotation> uniqueMap
private Annotation value
private RVMAnnotation(TypeReference type, RVMAnnotation.AnnotationMember[] elementValuePairs)
type
- the name of the type this annotation's value will
implementelementValuePairs
- values for the fields in the annotation
that override the defaultsstatic RVMAnnotation readAnnotation(int[] constantPool, DataInputStream input, ClassLoader classLoader) throws IOException, ClassNotFoundException
IOException
ClassNotFoundException
Annotation getValue()
private Annotation createValue()
static <T> Object readValue(TypeReference type, int[] constantPool, DataInputStream input, ClassLoader classLoader) throws IOException, ClassNotFoundException
IOException
ClassNotFoundException
private static <T> Object readValue(TypeReference type, int[] constantPool, DataInputStream input, ClassLoader classLoader, byte elementValue_tag) throws IOException, ClassNotFoundException
IOException
ClassNotFoundException
TypeReference annotationType()
private String elementString(String name, Object value)
name
- the namevalue
- the valueprivate static String toStringHelper(Object value)
private Object getElementValue(String name, Class<?> valueType)
private int annotationHashCode()
private boolean annotationEquals(Annotation a, Annotation b)