|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.exolab.castor.builder.XMLInfo org.exolab.castor.builder.FieldInfo org.exolab.castor.builder.CollectionInfo
A helper used for generating source that deals with Collections
Field Summary | |
static java.lang.String |
DEFAULT_REFERENCE_SUFFIX
|
static java.lang.String |
REFERENCE_SUFFIX_PROPERTY
The property used to overwrite the reference suffix for extra collection methods |
Fields inherited from class org.exolab.castor.builder.XMLInfo |
ATTRIBUTE_TYPE, ELEMENT_TYPE, TEXT_TYPE |
Constructor Summary | |
CollectionInfo(org.exolab.castor.builder.types.XSType contentType,
java.lang.String name,
java.lang.String elementName)
Creates a new CollectionInfo |
Method Summary | |
void |
createAccessMethods(org.exolab.javasource.JClass jClass)
Creates the Access methods for the collection described by this CollectionInfo |
void |
createAddInsertMethod(org.exolab.javasource.JMethod method)
Creates implementation of add method with an index. |
void |
createAddMethod(org.exolab.javasource.JMethod method)
Creates implementation of add method. |
void |
createEnumerateMethod(org.exolab.javasource.JMethod method)
Creates implementation of Enumerate method. |
void |
createGetByIndexMethod(org.exolab.javasource.JMethod method)
Creates implementation of the get(index) method. |
void |
createGetCollectionReferenceMethod(org.exolab.javasource.JMethod method)
Creates implementation of collection reference get method. |
void |
createGetCountMethod(org.exolab.javasource.JMethod method)
Creates implementation of getCount method. |
void |
createGetMethod(org.exolab.javasource.JMethod method)
Creates implementation of object[] get() method. |
void |
createRemoveAllMethod(org.exolab.javasource.JMethod method)
Creates implementation of removeAll() method. |
void |
createRemoveByIndexMethod(org.exolab.javasource.JMethod method)
Creates implementation of remove(int i) method. |
void |
createRemoveByObjectMethod(org.exolab.javasource.JMethod method)
Creates implementation of remove(Object) method. |
void |
createSetArrayMethod(org.exolab.javasource.JMethod method)
Creates implementation of array set method |
void |
createSetByIndexMethod(org.exolab.javasource.JMethod method)
Creates implementation of set method. |
void |
createSetCollectionMethod(org.exolab.javasource.JMethod method)
Creates implementation of collection set method. |
void |
createSetCollectionReferenceMethod(org.exolab.javasource.JMethod method)
Creates implementation of collection reference set method. |
void |
generateInitializerCode(org.exolab.javasource.JSourceCode jsc)
Creates code for initialization of this Member |
FieldInfo |
getContent()
|
java.lang.String |
getContentName()
|
org.exolab.castor.builder.types.XSType |
getContentType()
|
java.lang.String |
getElementName()
|
org.exolab.javasource.JMethod |
getReadMethod()
Returns the main read method for this member |
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 |
org.exolab.castor.builder.types.XSList |
getXSList()
|
boolean |
isMultivalued()
Return whether or not this member is a multivalued member or not |
void |
setCreateExtraMethods(boolean extraMethods)
Sets whether or not to create extra collection methods for accessing the actual collection |
void |
setReferenceMethodSuffix(java.lang.String suffix)
Sets the method suffix (ending) to use when creating the extra collection methods. |
Methods inherited from class org.exolab.castor.builder.FieldInfo |
createGetterComment, createJavaField, createSetterComment, getComment, getDeclaringClassInfo, getDefaultValue, getDeleteMethodName, getFixedValue, getHasMethodName, getName, getValidator, getXMLFieldHandler, isBound, isContainer, isTransient, setBound, setComment, setContainer, setDeclaringClassInfo, setDefaultValue, setFinal, setFixedValue, setStatic, setTransient, setValidator, setXMLFieldHandler |
Methods inherited from class org.exolab.castor.builder.XMLInfo |
getNamespacePrefix, getNamespaceURI, getNodeName, getNodeType, getNodeTypeName, getSchemaType, isRequired, setMultivalued, setNamespacePrefix, setNamespaceURI, setNodeName, setNodeType, setRequired, setSchemaType |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String REFERENCE_SUFFIX_PROPERTY
public static final java.lang.String DEFAULT_REFERENCE_SUFFIX
Constructor Detail |
public CollectionInfo(org.exolab.castor.builder.types.XSType contentType, java.lang.String name, java.lang.String elementName)
name
- the name of the CollectionelementName
- the element name for each element in collectionMethod Detail |
public void generateInitializerCode(org.exolab.javasource.JSourceCode jsc)
generateInitializerCode
in class FieldInfo
jsc
- the JSourceCode in which to add the source topublic java.lang.String getReadMethodName()
FieldInfo
getReadMethodName
in class FieldInfo
public java.lang.String getWriteMethodName()
FieldInfo
getWriteMethodName
in class FieldInfo
public void createAccessMethods(org.exolab.javasource.JClass jClass)
createAccessMethods
in class FieldInfo
jClass
- the JClass to add the methods to.public org.exolab.javasource.JMethod getReadMethod()
public org.exolab.castor.builder.types.XSList getXSList()
public java.lang.String getContentName()
public org.exolab.castor.builder.types.XSType getContentType()
public FieldInfo getContent()
public java.lang.String getElementName()
public boolean isMultivalued()
isMultivalued
in class XMLInfo
public void createAddMethod(org.exolab.javasource.JMethod method)
method
- the JMethod in which to create the source
code.public void createAddInsertMethod(org.exolab.javasource.JMethod method)
method
- the JMethod in which to create the source
code.public void createGetMethod(org.exolab.javasource.JMethod method)
method
- the JMethod in which to create the source
code.public void createGetCollectionReferenceMethod(org.exolab.javasource.JMethod method)
method
- the JMethod in which to create the source
code.public void createGetByIndexMethod(org.exolab.javasource.JMethod method)
public void createSetArrayMethod(org.exolab.javasource.JMethod method)
method
- the JMethod in which to create the source
code.public void createSetByIndexMethod(org.exolab.javasource.JMethod method)
method
- the JMethod in which to create the source
code.public void createSetCollectionMethod(org.exolab.javasource.JMethod method)
method
- the JMethod in which to create the source
code.public void createSetCollectionReferenceMethod(org.exolab.javasource.JMethod method)
method
- the JMethod in which to create the source
code.public void setCreateExtraMethods(boolean extraMethods)
extraMethods
- a boolean that when true indicates that
extra collection accessor methods should be created. False
by default.setReferenceMethodSuffix
public void setReferenceMethodSuffix(java.lang.String suffix)
suffix
- the method suffix to use when creating
the extra collection methods. If null or emtpty the default
value, as specified by DEFAULT_REFERENCE_SUFFIX will
used.setCreateExtraMethods
public void createGetCountMethod(org.exolab.javasource.JMethod method)
method
- the JMethod in which to create the source
code.public void createEnumerateMethod(org.exolab.javasource.JMethod method)
method
- the JMethod in which to create the source
code.public void createRemoveByObjectMethod(org.exolab.javasource.JMethod method)
method
- the JMethod in which to create the source
code.public void createRemoveByIndexMethod(org.exolab.javasource.JMethod method)
method
- the JMethod in which to create the source
code.public void createRemoveAllMethod(org.exolab.javasource.JMethod method)
method
- the JMethod in which to create the source
code.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |