|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.daileon.notsupported.RuntimeAnnotationsHelper
class RuntimeAnnotationsHelper
The RuntimeAnnotationsHelper
class provides several static
methods for dealing with annotations. This class is useful for the default
approach of keeping the annotations that correspond to each domain annotation
in elements indicated in template annotations.
Field Summary | |
---|---|
private static String |
CLASS_TEMPLATE
The fully-qualified name of the ClassTemplate annotation |
private static String |
FIELD_TEMPLATE
The fully-qualified name of the FieldTemplate annotation |
private static String |
METHOD_TEMPLATE
The fully-qualified name of the MethodTemplate annotation |
Constructor Summary | |
---|---|
private |
RuntimeAnnotationsHelper()
Class constructor. |
Method Summary | |
---|---|
(package private) static String |
getAnnotationName(String annotation)
Gets the name (in the format package.name) of a particular annotation. |
(package private) static String |
getClassPath(String path,
String className)
Gets the physical path of a given class. |
(package private) static String |
getResourcePath(String path,
org.objectweb.asm.attrs.Annotation annotation)
Gets the physical path of a given annotation. |
(package private) static boolean |
isDomainAnnotation(String path,
org.objectweb.asm.attrs.Annotation annotation)
Informs whether a given annotation is a domain annotation. |
(package private) static boolean |
isTemplateAnnotation(org.objectweb.asm.attrs.Annotation collectedAnnotation)
Verifies if an annotation is a template annotation, that is, if it is a ClassTemplate , FieldTemplate or
MethodTemplate annotation. |
(package private) static org.objectweb.asm.attrs.RuntimeVisibleAnnotations |
retrieveAnnotations(String path,
org.objectweb.asm.attrs.Annotation annotation)
Retrieves the annotations that correspond to a domain annotation. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final String CLASS_TEMPLATE
ClassTemplate
annotation
private static final String METHOD_TEMPLATE
MethodTemplate
annotation
private static final String FIELD_TEMPLATE
FieldTemplate
annotation
Constructor Detail |
---|
private RuntimeAnnotationsHelper()
Method Detail |
---|
static boolean isDomainAnnotation(String path, org.objectweb.asm.attrs.Annotation annotation)
path
- The path to the annotation.annotation
- The annotation to be verified.
boolean
value that can be:
true
if the given annotation is a domain
annotation;false
if the given annotation is not a domain
annotation.static String getAnnotationName(String annotation)
annotation
- The name of the annotation.
static org.objectweb.asm.attrs.RuntimeVisibleAnnotations retrieveAnnotations(String path, org.objectweb.asm.attrs.Annotation annotation) throws DuplicateAnnotationException
path
- The path to the domain annotation to be evaluated.annotation
- The domain annotation to be evaluated.
DuplicateAnnotationException
- If the domain annotation evaluates to an annotation that
already annotates the element, or if a domain annotation
annotates another domain annotation, and both of them
evaluate to the same annotation.static boolean isTemplateAnnotation(org.objectweb.asm.attrs.Annotation collectedAnnotation)
ClassTemplate
, FieldTemplate
or
MethodTemplate
annotation.
collectedAnnotation
- The annotation to be verified.
boolean
value that can be:
true
if the given annotation is a template
annotation;false
if the given annotation is not a template
annotation.static String getResourcePath(String path, org.objectweb.asm.attrs.Annotation annotation)
path
- The path to the annotation.annotation
- The annotation itself.
static String getClassPath(String path, String className)
path
- The path to the annotation.className
- The fully-qualified name of the class.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |