org.exolab.javasource
public class JField extends Object implements JMember
Version: $Revision: 1.1.1.1 $ $Date: 2003/03/03 07:09:54 $
| Constructor Summary | |
|---|---|
| JField(JType type, String name) | |
| Method Summary | |
|---|---|
| JDocComment | getComment()
Returns the comment describing this member. |
| JClass | getDeclaringClass()
Returns the class in which this JField has been declared |
| String | getInitString()
Returns the initialization String for this JField |
| JModifiers | getModifiers()
Returns the modifiers for this JField |
| String | getName()
Returns the name of this JField |
| JType | getType()
Returns the JType represting the type of this JField |
| void | setComment(JDocComment comment)
Sets the comment describing this member. |
| void | setComment(String comment)
Sets the comment describing this member. |
| protected void | setDeclaringClass(JClass declaringClass) |
| void | setInitString(String init)
Sets the initialization string for this JField;
Allows some flexibility in declaring default values. |
| void | setModifiers(JModifiers modifiers) |
| void | setName(String name)
Sets the name of this JField |
| String | toString() |
Returns: the comment describing this member, or null if no comment has been set.
Returns: the class in which this JField has been declared
Returns: the initialization String for this JField, or null if no initialization String was specified.
Returns: the modifiers for this JField
Returns: the name of this JField
Returns: the JClass represting the type of this JField
Parameters: comment the JDocComment for this member
Parameters: comment the JDocComment for this member
Parameters: init the initialization string for this member.
Parameters: name the name of this JField
Throws: IllegalArgumentException when the name is not a valid Java member name, or if a member with the given name already exists in the declaring class