org.exolab.javasource
Class JAnnotationTypeElement

java.lang.Object
  extended by org.exolab.javasource.JAnnotationTypeElement
All Implemented Interfaces:
JMember

public final class JAnnotationTypeElement
extends java.lang.Object
implements JMember

Holds information about a given annotation type element.

Version:
$Revision: 6669 $ $Date: 2006-04-25 16:09:10 -0600 (Tue, 25 Apr 2006) $
Author:
Andrew Fawcett

Constructor Summary
JAnnotationTypeElement(java.lang.String name, JType type)
          Constructs a JAnnotationTypeElement with a given name and type.
 
Method Summary
 JDocComment getComment()
          Returns the JavaDoc comment describing this member.
 java.lang.String getDefaultString()
          Returns the initialization string for this JAnnotationTypeElement.
 JModifiers getModifiers()
          Returns the modifiers for this JAnnotationTypeElement.
 java.lang.String getName()
          Returns the name of this JAnnotationTypeElement.
 JType 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(JDocComment comment)
          Sets the JavaDoc comment describing this member.
 void setComment(java.lang.String comment)
          Sets the JavaDoc comment describing this member.
 void setDefaultString(java.lang.String defaultString)
          Sets the initialization string for this JAnnotationTypeElement.
 void setName(java.lang.String name)
          Sets the name of this JAnnotationTypeElement.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JAnnotationTypeElement

public JAnnotationTypeElement(java.lang.String name,
                              JType type)
Constructs a JAnnotationTypeElement with a given name and type.

Parameters:
name - Name of this new JAnnotatedTypeElement.
type - Type of this new JAnnotatedTypeElement.
Method Detail

getModifiers

public JModifiers getModifiers()
Returns the modifiers for this JAnnotationTypeElement.

Specified by:
getModifiers in interface JMember
Returns:
The modifiers for this JAnnotationTypeElement.

setName

public void setName(java.lang.String name)
Sets the name of this JAnnotationTypeElement.

Parameters:
name - The name of this JAnnotationTypeElement.

getName

public java.lang.String getName()
Returns the name of this JAnnotationTypeElement.

Specified by:
getName in interface JMember
Returns:
The name of this JAnnotationTypeElement.

getType

public JType getType()
Returns the JType representing the type of this JAnnotationTypeElement.

Returns:
The JType representing the type of this JAnnotationTypeElement.

getDefaultString

public java.lang.String getDefaultString()
Returns the initialization string for this JAnnotationTypeElement.

Returns:
The initialization string for this JAnnotationTypeElement.

setDefaultString

public void setDefaultString(java.lang.String defaultString)
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

public void setComment(JDocComment comment)
Sets the JavaDoc comment describing this member.

Parameters:
comment - The JDocComment for this member.

setComment

public void setComment(java.lang.String comment)
Sets the JavaDoc comment describing this member.

Parameters:
comment - The JDocComment for this member.

getComment

public JDocComment getComment()
Returns the JavaDoc comment describing this member.

Returns:
The comment describing this member, or null if no comment has been set.

print

public void print(JSourceWriter jsw)
Outputs the annotation type element to the provided JSourceWriter.

Parameters:
jsw - the JSourceWriter to print this element to


Copyright © 2011. All Rights Reserved.