org.exolab.castor.builder
public class CollectionInfo extends FieldInfo
Version: $Revision: 6387 $ $Date: 2006-02-23 01:08:24 -0700 (Thu, 23 Feb 2006) $
Field Summary | |
---|---|
static String | DEFAULT_REFERENCE_SUFFIX |
static String | REFERENCE_SUFFIX_PROPERTY
The property used to overwrite the reference suffix for extra collection
methods |
Constructor Summary | |
---|---|
CollectionInfo(XSType contentType, String name, String elementName, boolean useJava50)
Creates a new CollectionInfo
|
Method Summary | |
---|---|
protected void | addMaxSizeCheck(String methodName, JSourceCode sourceCode) |
void | createAccessMethods(JClass jClass, boolean useJava50)
Generate the various accessor methods.
{@inheritDoc }
|
protected void | createAddAndRemoveMethods(JClass jClass) |
protected void | createAddMethod(JClass jClass) |
protected void | createBoundPropertyCode(JSourceCode sourceCode)
Creates the necessary source code for notifying PropertyChangeListeners
when the collection has been updated.
|
protected void | createCollectionIterationMethods(JClass jClass, boolean useJava50)
Generate methods for iterating over the objects in the collection. |
protected void | createEnumerateMethod(JClass jClass, boolean useJava50) |
protected boolean | createExtraMethods()
Returns true if extra collection methods should be generated. |
protected void | createGetAndSetMethods(JClass jClass, boolean useJava50) |
protected void | createGetAsArrayMethod(JClass jClass, boolean useJava50) |
protected void | createGetAsReferenceMethod(JClass jClass) |
protected void | createGetByIndexMethod(JClass jClass) |
protected void | createGetCountMethod(JClass jClass) |
protected void | createInsertMethod(JClass jClass) |
protected void | createIteratorMethod(JClass jClass, boolean useJava50) |
protected void | createRemoveAllMethod(JClass jClass)
Creates implementation of removeAll() method.
|
protected void | createRemoveByIndexMethod(JClass jClass)
Creates implementation of remove(int i) method.
|
protected void | createRemoveObjectMethod(JClass jClass)
Creates implementation of remove(Object) method.
|
protected void | createSetAsArrayMethod(JClass jClass, boolean useJava50) |
protected void | createSetAsCopyMethod(JClass jClass)
Creates implementation of collection set method. |
protected void | createSetAsReferenceMethod(JClass jClass, boolean useJava50)
Creates implementation of collection reference set method. |
protected void | createSetByIndexMethod(JClass jClass) |
void | generateInitializerCode(JSourceCode sourceCode)
{@inheritDoc }
|
FieldInfo | getContent() |
String | getContentName() |
XSType | getContentType() |
String | getElementName() |
protected String | getMethodSuffix()
{@inheritDoc }
|
protected String | getReferenceMethodSuffix()
Returns the suffix (ending) that should be used when creating the extra
collection methods.
|
XSList | getXSList() |
boolean | isMultivalued()
{@inheritDoc }
|
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 useJava50 true if source code is supposed to be generated for Java 5
See Also: FieldInfo
Parameters: jClass
Parameters: sourceCode the JSourceCode to add the new source code to.
Parameters: jClass the JClass to which we add this method useJava50 true if source code is supposed to be generated for Java 5
Returns: true if extra collection methods should be generated
Parameters: jClass the JClass to which we add this method useJava50 true if source code is supposed to be generated for Java 5
Parameters: jClass the JClass to which we add this method
Parameters: jClass the JClass to which we add this method
Parameters: jClass the JClass to which we add this method
Parameters: jClass
Parameters: jClass useJava50 true if source code is supposed to be generated for Java 5
See Also: generateInitializerCode
See Also: getMethodSuffix
Returns: the suffix for the reference methods
See Also: isMultivalued
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