Package org.exolab.javasource
Class JAnnotationTypeElement
java.lang.Object
org.exolab.javasource.JAnnotationTypeElement
- All Implemented Interfaces:
JMember
Holds information about a given annotation type element.
- Version:
- $Revision$ $Date: 2006-04-25 16:09:10 -0600 (Tue, 25 Apr 2006) $
- Author:
- Andrew Fawcett
-
Constructor Summary
ConstructorsConstructorDescriptionJAnnotationTypeElement
(String name, JType type) Constructs a JAnnotationTypeElement with a given name and type. -
Method Summary
Modifier and TypeMethodDescriptionReturns the JavaDoc comment describing this member.Returns the initialization string for this JAnnotationTypeElement.Returns the modifiers for this JAnnotationTypeElement.getName()
Returns the name of this JAnnotationTypeElement.getType()
Returns the JType representing the type of this JAnnotationTypeElement.void
print
(JSourceWriter jsw) Outputs the annotation type element to the provided JSourceWriter.void
setComment
(String comment) Sets the JavaDoc comment describing this member.void
setComment
(JDocComment comment) Sets the JavaDoc comment describing this member.void
setDefaultString
(String defaultString) Sets the initialization string for this JAnnotationTypeElement.void
Sets the name of this JAnnotationTypeElement.
-
Constructor Details
-
JAnnotationTypeElement
-
-
Method Details
-
getModifiers
Returns the modifiers for this JAnnotationTypeElement.- Specified by:
getModifiers
in interfaceJMember
- Returns:
- The modifiers for this JAnnotationTypeElement.
-
setName
Sets the name of this JAnnotationTypeElement.- Parameters:
name
- The name of this JAnnotationTypeElement.
-
getName
-
getType
Returns the JType representing the type of this JAnnotationTypeElement.- Returns:
- The JType representing the type of this JAnnotationTypeElement.
-
getDefaultString
Returns the initialization string for this JAnnotationTypeElement.- Returns:
- The initialization string for this JAnnotationTypeElement.
-
setDefaultString
Sets the initialization string for this JAnnotationTypeElement. This method allows some flexibility in declaring default values.- Parameters:
defaultString
- The default string for this member.
-
setComment
Sets the JavaDoc comment describing this member.- Parameters:
comment
- The JDocComment for this member.
-
setComment
Sets the JavaDoc comment describing this member.- Parameters:
comment
- The JDocComment for this member.
-
getComment
Returns the JavaDoc comment describing this member.- Returns:
- The comment describing this member, or null if no comment has been set.
-
print
Outputs the annotation type element to the provided JSourceWriter.- Parameters:
jsw
- the JSourceWriter to print this element to
-