org.exolab.javasource

Class JAnnotatedElementHelper

Implemented Interfaces:
JAnnotatedElement
Known Direct Subclasses:
JConstructor, JEnumConstant, JField, JMethodSignature, JParameter

public class JAnnotatedElementHelper
extends java.lang.Object
implements JAnnotatedElement

Implements JAnnotatedElement interface on behalf of other classes in this package that implement this interface.
Author:
Andrew Fawcett

Constructor Summary

JAnnotatedElementHelper()
Creates a JAnnodatedElementHelper.

Method Summary

void
addAnnotation(JAnnotation annotation)
JAnnotation
getAnnotation(JAnnotationType annotationType)
JAnnotation[]
getAnnotations()
boolean
hasAnnotations()
boolean
isAnnotationPresent(JAnnotationType annotationType)
static void
main(String[] args)
Test.
boolean
printAnnotations(JSourceWriter jsw)
Outputs the list of annotations maintained by this object.
JAnnotation
removeAnnotation(JAnnotationType annotationType)

Constructor Details

JAnnotatedElementHelper

public JAnnotatedElementHelper()
Creates a JAnnodatedElementHelper.

Method Details

addAnnotation

public final void addAnnotation(JAnnotation annotation)
Specified by:
addAnnotation in interface JAnnotatedElement

getAnnotation

public final JAnnotation getAnnotation(JAnnotationType annotationType)
Specified by:
getAnnotation in interface JAnnotatedElement

getAnnotations

public final JAnnotation[] getAnnotations()
Specified by:
getAnnotations in interface JAnnotatedElement
See Also:
{@inheritDoc}

hasAnnotations

public final boolean hasAnnotations()
Specified by:
hasAnnotations in interface JAnnotatedElement
See Also:
{@inheritDoc}

isAnnotationPresent

public final boolean isAnnotationPresent(JAnnotationType annotationType)
Specified by:
isAnnotationPresent in interface JAnnotatedElement

main

public static void main(String[] args)
Test.
Parameters:
args - Command-line arguments

printAnnotations

public final boolean printAnnotations(JSourceWriter jsw)
Outputs the list of annotations maintained by this object.
Parameters:
jsw - the JSourceWriter to print the annotations to
Returns:
true if at least one annotation was printed, false otherwise.

removeAnnotation

public final JAnnotation removeAnnotation(JAnnotationType annotationType)
Specified by:
removeAnnotation in interface JAnnotatedElement

Intalio Inc. (C) 1999-2006. All rights reserved http://www.intalio.com