Public Member Functions | |
JField (JType type, String name) | |
JDocComment | getComment () |
JClass | getDeclaringClass () |
String | getInitString () |
JModifiers | getModifiers () |
String | getName () |
JType | getType () |
void | setComment (JDocComment comment) |
void | setComment (String comment) |
void | setInitString (String init) |
void | setName (String name) throws IllegalArgumentException |
void | setModifiers (JModifiers modifiers) |
String | toString () |
Protected Member Functions | |
void | setDeclaringClass (JClass declaringClass) |
A class which holds information about a field. Modelled closely after the Java Reflection API. This class is part of package which is used to create source code in memory.
org.exolab.javasource.JField.JField | ( | JType | type, | |
String | name | |||
) |
JDocComment org.exolab.javasource.JField.getComment | ( | ) |
Returns the comment describing this member.
Referenced by org.exolab.javasource.JInterface.print(), and org.exolab.javasource.JClass.print().
JClass org.exolab.javasource.JField.getDeclaringClass | ( | ) |
String org.exolab.javasource.JField.getInitString | ( | ) |
Returns the initialization String for this JField
Referenced by org.exolab.javasource.JInterface.print(), and org.exolab.javasource.JClass.print().
JModifiers org.exolab.javasource.JField.getModifiers | ( | ) |
Returns the modifiers for this JField
Implements org.exolab.javasource.JMember.
Referenced by org.exolab.castor.builder.FieldInfo.createJavaField(), org.exolab.javasource.JClass.main(), org.exolab.javasource.JInterface.print(), and org.exolab.javasource.JClass.print().
String org.exolab.javasource.JField.getName | ( | ) |
Returns the name of this JField
Implements org.exolab.javasource.JMember.
Referenced by org.exolab.castor.builder.SourceFactory.createEqualsMethod(), org.exolab.castor.builder.SourceFactory.createTestableMethods(), org.exolab.javasource.JInterface.print(), org.exolab.javasource.JClass.print(), and org.exolab.javasource.JClass.removeField().
JType org.exolab.javasource.JField.getType | ( | ) |
Returns the JType represting the type of this JField
Referenced by org.exolab.castor.builder.SourceFactory.createEqualsMethod(), org.exolab.castor.builder.SourceFactory.createTestableMethods(), org.exolab.javasource.JInterface.print(), and org.exolab.javasource.JClass.print().
void org.exolab.javasource.JField.setComment | ( | String | comment | ) |
Sets the comment describing this member.
comment | the JDocComment for this member |
void org.exolab.javasource.JField.setComment | ( | JDocComment | comment | ) |
Sets the comment describing this member.
comment | the JDocComment for this member |
Referenced by org.exolab.castor.builder.FieldInfo.createJavaField().
void org.exolab.javasource.JField.setDeclaringClass | ( | JClass | declaringClass | ) | [protected] |
void org.exolab.javasource.JField.setInitString | ( | String | init | ) |
Sets the initialization string for this JField; Allows some flexibility in declaring default values.
init | the initialization string for this member. |
Referenced by org.exolab.castor.builder.FieldInfo.createJavaField().
void org.exolab.javasource.JField.setModifiers | ( | JModifiers | modifiers | ) |
void org.exolab.javasource.JField.setName | ( | String | name | ) | throws IllegalArgumentException |
Sets the name of this JField
name | the name of this JField |
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 |
Referenced by org.exolab.javasource.JField.JField().
String org.exolab.javasource.JField.toString | ( | ) |
References org.exolab.javasource.JModifiers.toString().