|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jikesrvm.classloader.AnnotatedElement
public abstract class AnnotatedElement
A common abstract super class for all elements that can be annotated within the JVM. Namely classes, methods and fields.
Field Summary | |
---|---|
protected Object |
declaredAnnotationDatas
Annotations from the class file that are described as runtime visible. |
private Annotation[] |
declaredAnnotations
Cached array of declared annotations. |
private static Annotation[] |
emptyAnnotationArray
Empty annotation array |
Constructor Summary | |
---|---|
protected |
AnnotatedElement(RVMAnnotation[] annotations)
Constructor used by all annotated elements |
Method Summary | ||
---|---|---|
private Annotation[] |
cloneAnnotations(Annotation[] internal)
Copy array of annotations so can be safely returned to user. |
|
|
getAnnotation(Class<T> annotationClass)
Get the annotation implementing the specified class or null |
|
Annotation[] |
getAnnotations()
Get the annotations for this and all super annotated elements. |
|
(package private) Annotation[] |
getAnnotationsInternal()
|
|
Annotation[] |
getDeclaredAnnotations()
Get the annotations for this annotated element |
|
(package private) Annotation[] |
getDeclaredAnnotationsInternal()
|
|
boolean |
hasAnnotations()
Does the element have any annotations? |
|
boolean |
hasBaselineNoRegistersAnnotation()
Return true if this element has a BaselineNoRegisters annotation. |
|
boolean |
hasBaselineSaveLSRegistersAnnotation()
Return true if this element has a BaselineSaveLSRegisters annotation. |
|
boolean |
hasInlineAnnotation()
Return true if this element has a Inline annotation. |
|
boolean |
hasInterruptibleAnnotation()
Return true if this element has a Interruptible annotation. |
|
boolean |
hasLogicallyUninterruptibleAnnotation()
Return true if this element has a LogicallyUninterruptible annotation. |
|
boolean |
hasNoBoundsCheckAnnotation()
Return true if this element has a NoBoundsCheck annotation. |
|
boolean |
hasNoCheckStoreAnnotation()
Return true if this element has a NoCheckStore annotation. |
|
boolean |
hasNoEscapesAnnotation()
Return true if this element has a NoEscapes annotation. |
|
boolean |
hasNoInlineAnnotation()
Return true if this element has a NoInline annotation. |
|
boolean |
hasNonMovingAllocationAnnotation()
Return true if this element has a NonMovingAllocation annotation. |
|
boolean |
hasNonMovingAnnotation()
Return true if this element has a NonMoving annotation. |
|
boolean |
hasNoNullCheckAnnotation()
Return true if this element has a NoNullCheck annotation. |
|
boolean |
hasNoOptCompileAnnotation()
Return true if this element has a NoOptCompile annotation. |
|
boolean |
hasPreemptibleAnnotation()
Return true if this element has a Preemptible annotation. |
|
boolean |
hasPureAnnotation()
Return true if this element has a Pure annotation. |
|
boolean |
hasRuntimeFinalAnnotation()
Return true if this element has a RuntimeFinal annotation. |
|
boolean |
hasRuntimePureAnnotation()
Return true if this element has a RuntimePure annotation. |
|
boolean |
hasUninterruptibleAnnotation()
Return true if this element has a Uninterruptible annotation. |
|
boolean |
hasUninterruptibleNoWarnAnnotation()
Return true if this element has a UninterruptibleNoWarn annotation. |
|
boolean |
hasUnpreemptibleAnnotation()
Return true if this element has a Unpreemptible annotation. |
|
boolean |
hasUnpreemptibleNoWarnAnnotation()
Return true if this element has a UninterruptibleNoWarn annotation. |
|
boolean |
hasUntracedAnnotation()
Return true if this element has a Untraced annotation. |
|
(package private) boolean |
isAnnotationDeclared(TypeReference annotationTypeRef)
Return true if annotation present. |
|
boolean |
isAnnotationPresent(Class<? extends Annotation> annotationClass)
Is there an annotation of this type implemented on this annotated element? |
|
protected static RVMAnnotation[] |
readAnnotations(int[] constantPool,
DataInputStream input,
ClassLoader classLoader)
Read annotations from a class file and package in an array |
|
(package private) Annotation[] |
toAnnotations(Object datas)
Convert annotations from internal format to annotation instances. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final Object declaredAnnotationDatas
private Annotation[] declaredAnnotations
private static final Annotation[] emptyAnnotationArray
Constructor Detail |
---|
protected AnnotatedElement(RVMAnnotation[] annotations)
annotations
- array of runtime visible annotationsMethod Detail |
---|
protected static RVMAnnotation[] readAnnotations(int[] constantPool, DataInputStream input, ClassLoader classLoader) throws IOException
constantPool
- the constantPool of the RVMClass object
that's being constructedinput
- the DataInputStream to read the method's attributes
from
IOException
public final Annotation[] getAnnotations()
getAnnotations
in interface AnnotatedElement
Annotation[] getAnnotationsInternal()
public final Annotation[] getDeclaredAnnotations()
getDeclaredAnnotations
in interface AnnotatedElement
final Annotation[] getDeclaredAnnotationsInternal()
private Annotation[] cloneAnnotations(Annotation[] internal)
final Annotation[] toAnnotations(Object datas)
datas
- the annotations.
public final <T extends Annotation> T getAnnotation(Class<T> annotationClass)
getAnnotation
in interface AnnotatedElement
public final boolean isAnnotationPresent(Class<? extends Annotation> annotationClass)
isAnnotationPresent
in interface AnnotatedElement
final boolean isAnnotationDeclared(TypeReference annotationTypeRef)
public final boolean hasAnnotations()
public final boolean hasInterruptibleAnnotation()
Interruptible
public final boolean hasLogicallyUninterruptibleAnnotation()
LogicallyUninterruptible
public final boolean hasPreemptibleAnnotation()
Preemptible
public final boolean hasUninterruptibleNoWarnAnnotation()
UninterruptibleNoWarn
public final boolean hasUnpreemptibleNoWarnAnnotation()
UninterruptibleNoWarn
public final boolean hasUninterruptibleAnnotation()
Uninterruptible
public final boolean hasNoCheckStoreAnnotation()
NoCheckStore
public final boolean hasUnpreemptibleAnnotation()
Unpreemptible
public final boolean hasNoOptCompileAnnotation()
NoOptCompile
public final boolean hasInlineAnnotation()
Inline
public final boolean hasNoInlineAnnotation()
NoInline
public final boolean hasBaselineNoRegistersAnnotation()
BaselineNoRegisters
public final boolean hasBaselineSaveLSRegistersAnnotation()
BaselineSaveLSRegisters
public final boolean hasPureAnnotation()
Pure
public final boolean hasRuntimePureAnnotation()
RuntimePure
public final boolean hasNoNullCheckAnnotation()
NoNullCheck
public final boolean hasNoBoundsCheckAnnotation()
NoBoundsCheck
public final boolean hasRuntimeFinalAnnotation()
RuntimeFinal
public final boolean hasNoEscapesAnnotation()
NoEscapes
public final boolean hasUntracedAnnotation()
Untraced
public final boolean hasNonMovingAnnotation()
NonMoving
public final boolean hasNonMovingAllocationAnnotation()
NonMovingAllocation
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |