public class JAnnotatedElementHelper extends java.lang.Object implements JAnnotatedElement
| Constructor and Description |
|---|
JAnnotatedElementHelper()
Creates a JAnnodatedElementHelper.
|
| Modifier and Type | Method and Description |
|---|---|
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 this source element has any annotations.
|
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.
|
public JAnnotatedElementHelper()
public final JAnnotation getAnnotation(JAnnotationType annotationType)
JAnnotatedElementgetAnnotation in interface JAnnotatedElementannotationType - Annotation type to retrieve#getAnnotation(org.exolab.javasource.JAnnotationType)
{@inheritDoc}public final JAnnotation[] getAnnotations()
JAnnotatedElementgetAnnotations in interface JAnnotatedElement{@inheritDoc}public final boolean isAnnotationPresent(JAnnotationType annotationType)
JAnnotatedElementisAnnotationPresent in interface JAnnotatedElementannotationType - Annotation type to check for presence or absense#isAnnotationPresent(org.exolab.javasource.JAnnotationType)
{@inheritDoc}public final void addAnnotation(JAnnotation annotation)
JAnnotatedElementaddAnnotation in interface JAnnotatedElementannotation - a JAnnotation to add to this source element.#addAnnotation(org.exolab.javasource.JAnnotation)
{@inheritDoc}public final JAnnotation removeAnnotation(JAnnotationType annotationType)
JAnnotatedElementremoveAnnotation in interface JAnnotatedElementannotationType - Annotation type to remove#removeAnnotation(org.exolab.javasource.JAnnotationType)
{@inheritDoc}public final boolean hasAnnotations()
JAnnotatedElementhasAnnotations in interface JAnnotatedElement{@inheritDoc}public final boolean printAnnotations(JSourceWriter jsw)
jsw - the JSourceWriter to print the annotations topublic static void main(java.lang.String[] args)
args - Command-line argumentsIntalio Inc. (C) 1999-2006. All rights reserved http://www.intalio.com