|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.exolab.javasource.JAnnotatedElementHelper
Class implements JAnnotatedElement interface on behalf of other classes in this package that implement this interface.
Constructor Summary | |
JAnnotatedElementHelper()
Creates a JAnnodatedElementHelper |
Method Summary | |
void |
addAnnotation(JAnnotation annotation)
Adds a JAnnotation to this source element. |
JAnnotation |
getAnnotation(JAnnotationType annotationType)
Retrieves a JAnnotation for the given JAnnotationType, returns null if no annotation has been set. |
JAnnotation[] |
getAnnotations()
Returns a list of JAnnotation's already set on this source element |
boolean |
hasAnnotations()
Returns true if annotations have been added to this source element |
boolean |
isAnnotationPresent(JAnnotationType annotationType)
Returns true if a JAnnotation exists for the given JAnnotationType |
static void |
main(java.lang.String[] args)
Test |
boolean |
printAnnotations(JSourceWriter jsw)
Outputs the list of annotations maintained by this object |
JAnnotation |
removeAnnotation(JAnnotationType annotationType)
Removes the JAnnotation from this source element for the given JAnnotationType, throws a IllegalArgumentException if no JAnnotation has been added. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public JAnnotatedElementHelper()
Method Detail |
public JAnnotation getAnnotation(JAnnotationType annotationType)
JAnnotatedElement
getAnnotation
in interface JAnnotatedElement
annotationType
-
public JAnnotation[] getAnnotations()
JAnnotatedElement
getAnnotations
in interface JAnnotatedElement
public boolean isAnnotationPresent(JAnnotationType annotationType)
JAnnotatedElement
isAnnotationPresent
in interface JAnnotatedElement
annotationType
-
public void addAnnotation(JAnnotation annotation)
JAnnotatedElement
addAnnotation
in interface JAnnotatedElement
annotation
- public JAnnotation removeAnnotation(JAnnotationType annotationType)
JAnnotatedElement
removeAnnotation
in interface JAnnotatedElement
annotationType
-
public boolean hasAnnotations()
JAnnotatedElement
hasAnnotations
in interface JAnnotatedElement
public boolean printAnnotations(JSourceWriter jsw)
jsw
- public static void main(java.lang.String[] args)
args
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |