org.exolab.castor.builder

Class CollectionInfoJ2


public class CollectionInfoJ2
extends CollectionInfo

A helper used for generating source that deals with Java 2 Collections.
Version:
$Revision: 6302 $ $Date: 2006-02-23 01:08:24 -0700 (Thu, 23 Feb 2006) $
Author:
Assaf Arkin

Field Summary

Fields inherited from class org.exolab.castor.builder.CollectionInfo

DEFAULT_REFERENCE_SUFFIX, REFERENCE_SUFFIX_PROPERTY

Fields inherited from class org.exolab.castor.builder.FieldInfo

READ_METHOD, READ_WRITE_METHODS, WRITE_METHOD

Fields inherited from class org.exolab.castor.builder.XMLInfo

ATTRIBUTE_TYPE, CHOICE_NODE_NAME_ERROR_INDICATION, ELEMENT_TYPE, TEXT_TYPE

Constructor Summary

CollectionInfoJ2(XSType contentType, String name, String elementName, String collectionType, boolean useJava50)

Method Summary

protected void
createAddMethod(JClass jClass)
protected void
createCollectionIterationMethods(JClass jClass, boolean useJava50)
To the Java-1 collection iterators, we add the Java-2 Iterator.
protected void
createEnumerateMethod(JClass jClass, boolean useJava50)

Methods inherited from class org.exolab.castor.builder.CollectionInfo

addMaxSizeCheck, createAccessMethods, createAddAndRemoveMethods, createAddMethod, createBoundPropertyCode, createCollectionIterationMethods, createEnumerateMethod, createExtraMethods, createGetAndSetMethods, createGetAsArrayMethod, createGetAsReferenceMethod, createGetByIndexMethod, createGetCountMethod, createInsertMethod, 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.FieldInfo

createAccessMethods, createGetterComment, createGetterMethod, createHasAndDeleteMethods, createJavaField, createSetterComment, createSetterMethod, generateInitializerCode, getComment, getDeclaringClassInfo, getDefaultValue, getDeleteMethodName, getFixedValue, getHasMethodName, getMethodSuffix, getMethods, getName, getReadMethodName, getValidator, getWriteMethodName, getXMLFieldHandler, isBound, isContainer, isHasAndDeleteMethods, isNillable, isTransient, setBound, setComment, setContainer, setDeclaringClassInfo, setDefaultValue, setFieldInfoReference, setFinal, setFixedValue, setMethods, setNillable, setStatic, setTransient, setValidator, setXMLFieldHandler

Methods inherited from class org.exolab.castor.builder.XMLInfo

getNamespacePrefix, getNamespaceURI, getNodeName, getNodeType, getNodeTypeName, getSchemaType, isElementDefinition, isMultivalued, isRequired, setElementDefinition, setMultivalued, setNamespacePrefix, setNamespaceURI, setNodeName, setNodeType, setRequired, setSchemaType

Constructor Details

CollectionInfoJ2

public CollectionInfoJ2(XSType contentType,
                        String name,
                        String elementName,
                        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 FieldInfoFactory.ARRAY_LIST
useJava50 - true if source code is supposed to be generated for Java 5

Method Details

createAddMethod

protected void createAddMethod(JClass jClass)
Overrides:
createAddMethod in interface CollectionInfo

createCollectionIterationMethods

protected void createCollectionIterationMethods(JClass jClass,
                                                boolean useJava50)
To the Java-1 collection iterators, we add the Java-2 Iterator.
Overrides:
createCollectionIterationMethods in interface CollectionInfo

createEnumerateMethod

protected void createEnumerateMethod(JClass jClass,
                                     boolean useJava50)
Overrides:
createEnumerateMethod in interface CollectionInfo

Intalio Inc. (C) 1999-2006. All rights reserved http://www.intalio.com