|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.codehaus.modello.plugin.java.javasource.JField
public class JField
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.
Constructor Summary | |
---|---|
JField(JType type,
java.lang.String name)
|
Method Summary | |
---|---|
JDocComment |
getComment()
Returns the comment describing this member. |
JClass |
getDeclaringClass()
Returns the class in which this JField has been declared |
java.lang.String |
getInitString()
Returns the initialization String for this JField |
JModifiers |
getModifiers()
Returns the modifiers for this JField |
java.lang.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(java.lang.String comment)
Sets the comment describing this member. |
protected void |
setDeclaringClass(JClass declaringClass)
|
void |
setInitString(java.lang.String init)
Sets the initialization string for this JField; Allows some flexibility in declaring default values. |
void |
setModifiers(JModifiers modifiers)
|
void |
setName(java.lang.String name)
Sets the name of this JField |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public JField(JType type, java.lang.String name)
Method Detail |
---|
public JDocComment getComment()
public JClass getDeclaringClass()
public java.lang.String getInitString()
public JModifiers getModifiers()
public java.lang.String getName()
public JType getType()
public void setComment(JDocComment comment)
comment
- the JDocComment for this memberpublic void setComment(java.lang.String comment)
comment
- the JDocComment for this memberpublic void setInitString(java.lang.String init)
init
- the initialization string for this member.public void setName(java.lang.String name) throws java.lang.IllegalArgumentException
name
- the name of this JField
java.lang.IllegalArgumentException
- when the
name is not a valid Java member name, or if a member
with the given name already exists in the declaring classpublic void setModifiers(JModifiers modifiers)
protected void setDeclaringClass(JClass declaringClass)
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |