org.exolab.castor.builder.info
Class CollectionInfoJ2
java.lang.Object
org.exolab.castor.builder.info.XMLInfo
org.exolab.castor.builder.info.FieldInfo
org.exolab.castor.builder.info.CollectionInfo
org.exolab.castor.builder.info.CollectionInfoJ2
- Direct Known Subclasses:
- CollectionInfoJ2Collection, CollectionInfoJ2Set, CollectionInfoJ2SortedSet
public class CollectionInfoJ2
- extends CollectionInfo
A helper used for generating source that deals with Java 2 Collections.
- Version:
- $Revision: 6755 $ $Date: 2006-02-23 01:08:24 -0700 (Thu, 23 Feb 2006) $
- Author:
- Assaf Arkin
Constructor Summary |
CollectionInfoJ2(XSType contentType,
java.lang.String name,
java.lang.String elementName,
java.lang.String collectionType,
boolean useJava50)
|
Methods inherited from class org.exolab.castor.builder.info.CollectionInfo |
addMaxSizeCheck, createAccessMethods, createAddAndRemoveMethods, createAddByIndexMethod, createBoundPropertyCode, createExtraMethods, createGetAndSetMethods, createGetAsArrayMethod, createGetAsReferenceMethod, createGetByIndexMethod, createGetCountMethod, createIteratorMethod, createRemoveAllMethod, createRemoveByIndexMethod, createRemoveObjectMethod, createSetAsArrayMethod, createSetAsCopyMethod, createSetAsReferenceMethod, createSetByIndexMethod, generateInitializerCode, getContent, getContentName, getContentType, getElementName, getMethodSuffix, getReferenceMethodSuffix, getXSList, isMultivalued, setCreateExtraMethods, setReferenceMethodSuffix |
Methods inherited from class org.exolab.castor.builder.info.FieldInfo |
createGetterComment, createGetterMethod, createHasAndDeleteMethods, createJavaField, createSetterComment, createSetterMethod, getComment, getDeclaringClassInfo, getDefaultValue, getDeleteMethodName, getFixedValue, getHasMethodName, getMethods, getName, getReadMethodName, getSubstitutionGroupMembers, getValidator, getWriteMethodName, getXMLFieldHandler, isBound, isContainer, isHasAndDeleteMethods, isNillable, isTransient, setBound, setComment, setContainer, setDeclaringClassInfo, setDefaultValue, setFieldInfoReference, setFinal, setFixedValue, setMethods, setNillable, setStatic, setSubstitutionGroupMembers, setTransient, setValidator, setVisibility, setXMLFieldHandler |
Methods inherited from class org.exolab.castor.builder.info.XMLInfo |
getNamespacePrefix, getNamespaceURI, getNodeName, getNodeType, getNodeTypeName, getSchemaType, isElementDefinition, isRequired, setElementDefinition, setMultivalued, setNamespacePrefix, setNamespaceURI, setNodeName, setNodeType, setRequired, setSchemaType |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CollectionInfoJ2
public CollectionInfoJ2(XSType contentType,
java.lang.String name,
java.lang.String elementName,
java.lang.String collectionType,
boolean useJava50)
- 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.collectionType
- Java type (e.g., 'arraylist') to use to store the
collection. The name is NOT fully specified and is all lowercase.
Currently, any value but "arraylist" does not work. See
org.exolab.castor.builder.FieldInfoFactory#ARRAY_LIST
useJava50
- true if code is supposed to be generated for Java 5
createCollectionIterationMethods
protected final 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.
To the Java-1 collection iterators, we add the Java-2 Iterator.
- Overrides:
createCollectionIterationMethods
in class CollectionInfo
- Parameters:
jClass
- the JClass to which we add this methoduseJava50
- true if source code is supposed to be generated for Java 5
createEnumerateMethod
protected final void createEnumerateMethod(JClass jClass,
boolean useJava50)
-
- Overrides:
createEnumerateMethod
in class CollectionInfo
createAddMethod
protected final void createAddMethod(JClass jClass)
-
- Overrides:
createAddMethod
in class CollectionInfo
Intalio Inc. (C) 1999-2007. All rights reserved http://www.intalio.com