This factory takes a CollectionInfo and generates the suitable JFields
and the accessor methods into the JClass.
addMaxSizeCheck
protected void addMaxSizeCheck(CollectionInfo fieldInfo,
String methodName,
JSourceCode sourceCode)
Creates the add max size check.
fieldInfo
- the collectionInfo to translatemethodName
- the method namesourceCode
- the sourceCode to attach to
createAddByIndexMethod
protected void createAddByIndexMethod(CollectionInfo fieldInfo,
JClass jClass)
Creates the add by index method.
fieldInfo
- the collectionInfo to translatejClass
- the jClass to add the method to.
createAddMethod
protected void createAddMethod(CollectionInfo fieldInfo,
JClass jClass)
Creates the add method for this collection.
fieldInfo
- the collectionInfo to translatejClass
- the jClass to add the method to.
createBoundPropertyCode
protected void createBoundPropertyCode(CollectionInfo fieldInfo,
JSourceCode sourceCode)
Creates bound property code..
fieldInfo
- the collectionInfo to translatesourceCode
- the sourceCode to attach to
createCollectionIterationMethods
protected void createCollectionIterationMethods(CollectionInfo fieldInfo,
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.
fieldInfo
- the collectionI to translatejClass
- the JClass to which we add this methoduseJava50
- true if source code is supposed to be generated for Java 5
createEnumerateMethod
protected void createEnumerateMethod(CollectionInfo fieldInfo,
JClass jClass,
boolean useJava50)
Creates the enumerate method.
fieldInfo
- the collectionInfo to translatejClass
- the jClass to add the method to.useJava50
- java version flag
createGetByIndexMethod
protected void createGetByIndexMethod(CollectionInfo fieldInfo,
JClass jClass)
Creates the get by index method.
fieldInfo
- the collectionInfo to translatejClass
- the jClass to add the method to.
createIteratorMethod
protected void createIteratorMethod(CollectionInfo fieldInfo,
JClass jClass,
boolean useJava50)
Creates the iterate method.
fieldInfo
- the collectionInfo to translatejClass
- the jClass to add the method to.useJava50
- java version flag
createRemoveByIndexMethod
protected void createRemoveByIndexMethod(CollectionInfo fieldInfo,
JClass jClass)
Creates the remove by index method.
fieldInfo
- the collectionInfo to translatejClass
- the jClass to add the method to.
createSetByIndexMethod
protected void createSetByIndexMethod(CollectionInfo fieldInfo,
JClass jClass)
Creates the set by index method.
fieldInfo
- the collectionInfo to translatejClass
- the jClass to add the method to.