|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.exolab.castor.builder.XMLInfo
org.exolab.castor.builder.FieldInfo
A class for representing field members of a Class. FieldInfo objects hold all the information required about a member in order to be able to produce marshal/unmarshal and validation code.
Field Summary |
Fields inherited from class org.exolab.castor.builder.XMLInfo |
ATTRIBUTE_TYPE, ELEMENT_TYPE, TEXT_TYPE |
Constructor Summary | |
FieldInfo(XSType type,
java.lang.String name)
Creates a new FieldInfo with the given XML Schema type and the given member name |
Method Summary | |
void |
createAccessMethods(JClass jClass)
Creates the access methods for this FieldInfo |
void |
createGetterComment(JDocComment jDocComment)
Creates the Javadoc comments for the getter method associated with this FieldInfo. |
void |
createJavaField(JClass jClass)
Creates the JMembers for this FieldInfo, sometimes a "field" requires more than one java field |
void |
createSetterComment(JDocComment jDocComment)
Creates the Javadoc comments for the setter method associated with this FieldInfo. |
void |
generateInitializerCode(JSourceCode jsc)
Creates code for initialization of this Member |
java.lang.String |
getComment()
Returns the comment associated with this Member |
ClassInfo |
getDeclaringClassInfo()
Returns the ClassInfo to which this Member was declared, for inheritance reasons |
java.lang.String |
getDefaultValue()
Returns the default value for this FieldInfo |
java.lang.String |
getDeleteMethodName()
Returns the name of the delete method for this FieldInfo. |
java.lang.String |
getFixedValue()
Returns the fixed production for this FieldInfo, or null if no fixed value has been specified. |
java.lang.String |
getHasMethodName()
Returns the name of the has method for this FieldInfo |
java.lang.String |
getName()
Returns the name of this FieldInfo |
java.lang.String |
getReadMethodName()
Returns the name of the read method for this FieldInfo |
java.lang.String |
getWriteMethodName()
Returns the name of the write method for this FieldInfo |
boolean |
isBound()
Returns true if this FieldInfo represents a bound property |
boolean |
isContainer()
Returns true if this FieldInfo describes a container class. |
boolean |
isTransient()
Returns true if this FieldInfo is a transient member. |
protected java.lang.String |
methodSuffix()
Returns the method suffix for creating method names. |
void |
setBound(boolean bound)
Sets whether or not this FieldInfo represents a bound property |
void |
setComment(java.lang.String comment)
Sets the comment for this Member |
void |
setContainer(boolean isContainer)
Sets whether or not this FieldInfo describes a container field. |
void |
setDeclaringClassInfo(ClassInfo declaringClassInfo)
|
void |
setDefaultValue(java.lang.String defaultValue)
Sets the default value for this FieldInfo |
void |
setFinal(boolean isFinal)
Sets the "final" status of this FieldInfo. |
void |
setFixedValue(java.lang.String fixedValue)
Sets the fixed value in which instances of this field type must lexically match |
void |
setStatic(boolean isStatic)
Sets the "static" status of this FieldInfo. |
void |
setTransient(boolean isTransient)
Sets the transient status of this FieldInfo. |
Methods inherited from class org.exolab.castor.builder.XMLInfo |
getNamespacePrefix, getNamespaceURI, getNodeName, getNodeType, getSchemaType, isMultivalued, isRequired, setMultivalued, setNamespacePrefix, setNamespaceURI, setNodeName, setNodeType, setRequired, setSchemaType |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public FieldInfo(XSType type, java.lang.String name)
name
- the name of the memberMethod Detail |
public void createJavaField(JClass jClass)
public void createAccessMethods(JClass jClass)
jClass
- the JClass to add the methods topublic void createGetterComment(JDocComment jDocComment)
jDocComment
- the JDocComment to add the Javadoc
comments to.public void createSetterComment(JDocComment jDocComment)
jDocComment
- the JDocComment to add the Javadoc
comments to.public java.lang.String getDefaultValue()
public java.lang.String getFixedValue()
public java.lang.String getDeleteMethodName()
public java.lang.String getHasMethodName()
public java.lang.String getReadMethodName()
public java.lang.String getWriteMethodName()
public void generateInitializerCode(JSourceCode jsc)
jsc
- the JSourceCode in which to add the source topublic java.lang.String getComment()
public java.lang.String getName()
public boolean isBound()
public boolean isContainer()
public boolean isTransient()
public void setComment(java.lang.String comment)
comment
- the comment or description for this Memberpublic ClassInfo getDeclaringClassInfo()
public void setBound(boolean bound)
bound
- the flag when true indicates that this FieldInfo
represents a bound propertypublic void setContainer(boolean isContainer)
isContainer
- the boolean value when true indicates
this class should be a container class.public void setDeclaringClassInfo(ClassInfo declaringClassInfo)
public void setDefaultValue(java.lang.String defaultValue)
defaultValue
- the default valuepublic void setFinal(boolean isFinal)
isFinal
- the boolean indicating the final status,
if true this FieldInfo will be treated as final.public void setFixedValue(java.lang.String fixedValue)
fixedValue
- the fixed production for this FieldInfo
public void setStatic(boolean isStatic)
isStatic
- the boolean indicating the static status,
if true this FieldInfo will be treated as staticpublic void setTransient(boolean isTransient)
isTransient
- the boolean indicating the transient status,
if true this FieldInfo will be treated as transientprotected java.lang.String methodSuffix()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |