org.exolab.javasource
Class JAnnotationTypeElement

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

public class JAnnotationTypeElement
extends java.lang.Object
implements JMember

A class that holds information about a given annotation type element

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 comment describing this member.
 java.lang.String getDefaultString()
          Gets 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 represting the type of this JAnnotationTypeElement
static void main(java.lang.String[] args)
          Test
 void print(JSourceWriter jsw)
          Outputs the annotation type element
 void setComment(JDocComment comment)
          Sets the comment describing this member.
 void setComment(java.lang.String comment)
          Sets the comment describing this member.
 void setDefaultString(java.lang.String defaultString)
          Sets the initialization string for this JAnnotationTypeElement; Allows some flexibility in declaring default values.
 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 -
type -
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)
             throws java.lang.IllegalArgumentException
Sets the name of this JAnnotationTypeElement

Parameters:
name - the name of this JAnnotationTypeElement
Throws:
java.lang.IllegalArgumentException - when the name is not a valid Java member name

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 represting the type of this JAnnotationTypeElement

Returns:
the JClass represting the type of this JAnnotationTypeElement

getDefaultString

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

Returns:
Gets the initialization string for this JAnnotationTypeElement

setDefaultString

public void setDefaultString(java.lang.String defaultString)
Sets the initialization string for this JAnnotationTypeElement; Allows some flexibility in declaring default values.

Parameters:
defaultString - the default string for this member.

setComment

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

Parameters:
comment - the JDocComment for this member

setComment

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

Parameters:
comment - the JDocComment for this member

getComment

public JDocComment getComment()
Returns the 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

Parameters:
jsw -

main

public static void main(java.lang.String[] args)
Test

Parameters:
args -


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