|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.rice.cs.cunit.subAnnot.AAnnotatedElementEx
public abstract class AAnnotatedElementEx
Abstract class for annotated elements supporting annotations with subtyping.
Field Summary | |
---|---|
protected RuntimeVisibleAnnotationsAttributeInfo[] |
_ai
Annotations attribute. |
protected boolean |
_classFileNotFound
True if the class file was not found and only the information given by Java's Class class is available. |
protected java.lang.ClassLoader |
_classLoader
Class loader to use, or null to use the bootstrap class loader. |
protected static java.util.ArrayList<java.lang.String> |
_classPath
List of class path entries. |
Constructor Summary | |
---|---|
protected |
AAnnotatedElementEx()
Constructor leaving the _classLoader field empty. |
protected |
AAnnotatedElementEx(java.lang.ClassLoader cl)
Constructor setting the _classLoader field. |
Method Summary | ||
---|---|---|
protected void |
findMethodAnnotationsAttributeInfo(java.lang.reflect.Member member,
java.lang.String name,
java.lang.Class<?>[] types)
Find the annotations attribute and assign it to the _ai field. |
|
protected abstract java.lang.reflect.AnnotatedElement |
getAnnotatedElement()
Return the annotated element. |
|
java.lang.annotation.Annotation[] |
getAnnotations()
Return an array of all annotations attached to the element. |
|
|
getAnnotations(java.lang.Class<A> c)
Return an array of the annotations attached to the element that are subclasses of the specified class. |
|
|
getAnnotations(ClassEx<A> c)
Return an array of the annotations attached to the element that are subclasses of the specified class. |
|
java.lang.ClassLoader |
getClassLoader()
Returns the class loader used. |
|
java.lang.annotation.Annotation[] |
getDeclaredAnnotations()
Return an array of all annotations attached directly to the element. |
|
|
getDeclaredAnnotations(java.lang.Class<A> c)
Return an array of the annotations attached to the element that are subclasses of the specified class. |
|
|
getDeclaredAnnotations(ClassEx<A> c)
Return an array of the annotations attached to the element that are subclasses of the specified class. |
|
protected RuntimeVisibleLocalVariableAnnotationsAttributeInfo |
getLocalVarAnnotationsAttributeInfo(java.lang.reflect.Member member,
java.lang.String name,
java.lang.Class<?>[] types)
Return the local variable annotations attribute. |
|
protected RuntimeVisibleParameterAnnotationsAttributeInfo |
getParameterAnnotationsAttributeInfo(java.lang.reflect.Member member,
java.lang.String name,
java.lang.Class<?>[] types)
Return the parameter annotations attribute. |
|
boolean |
isAnnotationPresent(java.lang.Class<? extends java.lang.annotation.Annotation> c)
Returns true if an annotation for the specified type or one of its subtypes is present on this element, else false. |
|
boolean |
isAnnotationPresent(ClassEx<? extends java.lang.annotation.Annotation> c)
Returns true if an annotation for the specified type or one of its subtypes is present on this element, else false. |
|
boolean |
isAvailable()
Returns true if the class file was found and additional information is available beyond what Java's Class class might return. |
|
boolean |
isDeclaredAnnotationPresent(java.lang.Class<? extends java.lang.annotation.Annotation> c)
Returns true if an annotation for the specified type or one of its subtypes is present on this element, else false. |
|
boolean |
isDeclaredAnnotationPresent(ClassEx<? extends java.lang.annotation.Annotation> c)
Returns true if an annotation for the specified type or one of its subtypes is present on this element, else false. |
|
protected void |
setClassFileNotFound(boolean b)
Set the state of the _classFileNotFound flag. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected RuntimeVisibleAnnotationsAttributeInfo[] _ai
protected boolean _classFileNotFound
protected java.lang.ClassLoader _classLoader
protected static java.util.ArrayList<java.lang.String> _classPath
Constructor Detail |
---|
protected AAnnotatedElementEx()
protected AAnnotatedElementEx(java.lang.ClassLoader cl)
cl
- class loaderMethod Detail |
---|
public java.lang.ClassLoader getClassLoader()
public boolean isAvailable()
isAvailable
in interface AnnotatedElementEx
protected void setClassFileNotFound(boolean b)
b
- new state of the _classFileNotFound flag.public boolean isAnnotationPresent(ClassEx<? extends java.lang.annotation.Annotation> c)
isAnnotationPresent
in interface AnnotatedElementEx
c
- class
public boolean isAnnotationPresent(java.lang.Class<? extends java.lang.annotation.Annotation> c)
isAnnotationPresent
in interface AnnotatedElementEx
c
- class
public <A extends java.lang.annotation.Annotation> java.util.List<A> getAnnotations(ClassEx<A> c)
getAnnotations
in interface AnnotatedElementEx
c
- class
public <A extends java.lang.annotation.Annotation> java.util.List<A> getAnnotations(java.lang.Class<A> c)
getAnnotations
in interface AnnotatedElementEx
c
- class
public java.lang.annotation.Annotation[] getAnnotations()
getAnnotations
in interface AnnotatedElementEx
public boolean isDeclaredAnnotationPresent(ClassEx<? extends java.lang.annotation.Annotation> c)
isDeclaredAnnotationPresent
in interface AnnotatedElementEx
c
- class
public boolean isDeclaredAnnotationPresent(java.lang.Class<? extends java.lang.annotation.Annotation> c)
isDeclaredAnnotationPresent
in interface AnnotatedElementEx
c
- class
public <A extends java.lang.annotation.Annotation> java.util.List<A> getDeclaredAnnotations(ClassEx<A> c)
getDeclaredAnnotations
in interface AnnotatedElementEx
c
- class
public <A extends java.lang.annotation.Annotation> java.util.List<A> getDeclaredAnnotations(java.lang.Class<A> c)
getDeclaredAnnotations
in interface AnnotatedElementEx
c
- class
public java.lang.annotation.Annotation[] getDeclaredAnnotations()
getDeclaredAnnotations
in interface AnnotatedElementEx
protected abstract java.lang.reflect.AnnotatedElement getAnnotatedElement()
protected void findMethodAnnotationsAttributeInfo(java.lang.reflect.Member member, java.lang.String name, java.lang.Class<?>[] types)
member
- member whose annotations attribute should be foundname
- member nametypes
- parameter typesprotected RuntimeVisibleParameterAnnotationsAttributeInfo getParameterAnnotationsAttributeInfo(java.lang.reflect.Member member, java.lang.String name, java.lang.Class<?>[] types)
member
- member whose parameter annotations attribute should be foundname
- member nametypes
- parameter types
protected RuntimeVisibleLocalVariableAnnotationsAttributeInfo getLocalVarAnnotationsAttributeInfo(java.lang.reflect.Member member, java.lang.String name, java.lang.Class<?>[] types)
member
- member whose parameter annotations attribute should be foundname
- member nametypes
- parameter types
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |