addMaxSizeCheck
protected void addMaxSizeCheck(String methodName,
JSourceCode sourceCode)
createAddAndRemoveMethods
protected void createAddAndRemoveMethods(JClass jClass)
createAddMethod
protected void createAddMethod(JClass jClass)
createBoundPropertyCode
protected void createBoundPropertyCode(JSourceCode sourceCode)
Creates the necessary source code for notifying PropertyChangeListeners
when the collection has been updated.
sourceCode
- the JSourceCode to add the new source code to.
createCollectionIterationMethods
protected void createCollectionIterationMethods(JClass jClass,
boolean useJava50)
Generate methods for iterating over the objects in the collection. For
Java-1 collections, we only generate an Enumerator. Implementations for
other versions of Java should call this method for backward compatbility
and then add any additional new methods.
jClass
- the JClass to which we add this methoduseJava50
- true if source code is supposed to be generated for Java 5
createEnumerateMethod
protected void createEnumerateMethod(JClass jClass,
boolean useJava50)
createExtraMethods
protected final boolean createExtraMethods()
Returns true if extra collection methods should be generated. The extra
collection methods are methods which return an actual reference to the
underlying collection as opposed to an enumeration, iterator, or copy.
- true if extra collection methods should be generated
createGetAndSetMethods
protected void createGetAndSetMethods(JClass jClass,
boolean useJava50)
jClass
- the JClass to which we add this methoduseJava50
- true if source code is supposed to be generated for Java 5
createGetAsArrayMethod
protected void createGetAsArrayMethod(JClass jClass,
boolean useJava50)
createGetAsReferenceMethod
protected void createGetAsReferenceMethod(JClass jClass)
createGetByIndexMethod
protected void createGetByIndexMethod(JClass jClass)
createGetCountMethod
protected void createGetCountMethod(JClass jClass)
createInsertMethod
protected void createInsertMethod(JClass jClass)
createIteratorMethod
protected void createIteratorMethod(JClass jClass,
boolean useJava50)
createRemoveAllMethod
protected void createRemoveAllMethod(JClass jClass)
Creates implementation of removeAll() method.
jClass
- the JClass to which we add this method
createRemoveByIndexMethod
protected void createRemoveByIndexMethod(JClass jClass)
Creates implementation of remove(int i) method.
jClass
- the JClass to which we add this method
createRemoveObjectMethod
protected void createRemoveObjectMethod(JClass jClass)
Creates implementation of remove(Object) method.
jClass
- the JClass to which we add this method
createSetAsArrayMethod
protected void createSetAsArrayMethod(JClass jClass,
boolean useJava50)
createSetAsCopyMethod
protected void createSetAsCopyMethod(JClass jClass)
Creates implementation of collection set method. The method will assign
the field a copy of the given collection.
The fields will be checked for type safety.
createSetAsReferenceMethod
protected void createSetAsReferenceMethod(JClass jClass,
boolean useJava50)
Creates implementation of collection reference set method. This method is
a non-type safe method which simply assigns the given collection to the
field.
jClass
- useJava50
- true if source code is supposed to be generated for Java 5
createSetByIndexMethod
protected void createSetByIndexMethod(JClass jClass)
getContentName
public String getContentName()
getContentType
public XSType getContentType()
getElementName
public String getElementName()
getReferenceMethodSuffix
protected final String getReferenceMethodSuffix()
Returns the suffix (ending) that should be used when creating the extra
collection methods.
- the suffix for the reference methods
getXSList
public XSList getXSList()
setCreateExtraMethods
public void setCreateExtraMethods(boolean extraMethods)
Sets whether or not to create extra collection methods for accessing the
actual collection.
extraMethods
- a boolean that when true indicates that extra collection
accessor methods should be created. False by default.
setReferenceMethodSuffix
public void setReferenceMethodSuffix(String suffix)
Sets the method suffix (ending) to use when creating the extra collection
methods.
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.