org.exolab.castor.builder
public class CollectionInfo extends FieldInfo
Version: $Revision: 1.5 $ $Date: 2005/04/09 04:41:20 $
Field Summary | |
---|---|
static String | DEFAULT_REFERENCE_SUFFIX |
static String | REFERENCE_SUFFIX_PROPERTY
The property used to overwrite the reference suffix for
extra collection methods |
protected XSList | xsList |
Constructor Summary | |
---|---|
CollectionInfo(XSType contentType, String name, String elementName)
Creates a new CollectionInfo |
Method Summary | |
---|---|
void | createAccessMethods(JClass jClass)
Creates the Access methods for the collection described
by this CollectionInfo
|
void | createAddInsertMethod(JMethod method)
Creates implementation of add method with an index.
|
void | createAddMethod(JMethod method)
Creates implementation of add method.
|
protected void | createBoundPropertyCode(JSourceCode jsc)
Creates the necessary source code for notifying
PropertyChangeListeners when the collection has
been updated.
|
void | createEnumerateMethod(JMethod method)
Creates implementation of Enumerate method.
|
void | createGetByIndexMethod(JMethod method)
Creates implementation of the get(index) method.
|
void | createGetCollectionReferenceMethod(JMethod method)
Creates implementation of collection reference get method. |
void | createGetCountMethod(JMethod method)
Creates implementation of getCount method.
|
void | createGetMethod(JMethod method)
Creates implementation of object[] get() method.
|
void | createRemoveAllMethod(JMethod method)
Creates implementation of removeAll() method.
|
void | createRemoveByIndexMethod(JMethod method)
Creates implementation of remove(int i) method.
|
void | createRemoveByObjectMethod(JMethod method)
Creates implementation of remove(Object) method.
|
void | createSetArrayMethod(JMethod method)
Creates implementation of array set method
|
void | createSetByIndexMethod(JMethod method)
Creates implementation of set method.
|
void | createSetCollectionMethod(JMethod method)
Creates implementation of collection set method. |
void | createSetCollectionReferenceMethod(JMethod method)
Creates implementation of collection reference set method. |
protected boolean | extraMethods()
Returns true if extra collection methods should be generated.
|
void | generateInitializerCode(JSourceCode jsc)
Creates code for initialization of this Member |
FieldInfo | getContent() |
String | getContentName() |
XSType | getContentType() |
String | getElementName() |
JMethod | getReadMethod()
Returns the main read method for this member |
String | getReadMethodName() |
protected String | getReferenceMethodSuffix()
Returns the suffix (ending) that should be used when
creating the extra collection methods
|
String | getWriteMethodName() |
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(String suffix)
Sets the method suffix (ending) to use when creating
the extra collection methods.
|
Parameters: contentType the content type of the collection, ie. the type of objects that the collection will contain name the name of the Collection elementName the element name for each element in collection
Parameters: jClass the JClass to add the methods to.
Parameters: method the JMethod in which to create the source code.
Parameters: method the JMethod in which to create the source code.
Parameters: jsc the JSourceCode to add the new source code to.
Parameters: method the JMethod in which to create the source code.
Parameters: method the JMethod in which to create the source code.
Parameters: method the JMethod in which to create the source code.
Parameters: method the JMethod in which to create the source code.
Parameters: method the JMethod in which to create the source code.
Parameters: method the JMethod in which to create the source code.
Parameters: method the JMethod in which to create the source code.
Parameters: method the JMethod in which to create the source code.
Parameters: method the JMethod in which to create the source code.
Parameters: method the JMethod in which to create the source code.
Parameters: method the JMethod in which to create the source code.
Returns: true if extra collection methods should be generated
Parameters: jsc the JSourceCode in which to add the source to
Returns: the main read method for this member
Returns: the suffix for the reference methods
Returns: true if this member can appear more than once
Parameters: extraMethods a boolean that when true indicates that extra collection accessor methods should be created. False by default.
See Also: CollectionInfo
Parameters: 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.
See Also: CollectionInfo