CollectionJ2MemberAndAccessorFactory
, CollectionODMG30MemberAndAccessorFactory
public class CollectionMemberAndAccessorFactory extends FieldMemberAndAccessorFactory
Constructor | Description |
---|---|
CollectionMemberAndAccessorFactory(JavaNaming naming) |
Creates a factory that offers public methods to create the
field initialization code as well as the accessor methods.
|
Modifier and Type | Method | Description |
---|---|---|
protected void |
addMaxSizeCheck(CollectionInfo fieldInfo,
java.lang.String methodName,
JSourceCode sourceCode) |
Creates the add max size check.
|
void |
createAccessMethods(FieldInfo fieldInfo,
JClass jClass,
boolean useJava50,
AnnotationBuilder[] annotationBuilders) |
Adds the getter/setter for this field to the jClass.
|
protected void |
createAddByIndexMethod(CollectionInfo fieldInfo,
JClass jClass) |
Creates the add by index method.
|
protected void |
createAddMethod(CollectionInfo fieldInfo,
JClass jClass) |
Creates the add method for this collection.
|
protected void |
createBoundPropertyCode(CollectionInfo fieldInfo,
JSourceCode sourceCode) |
Creates bound property code..
|
protected void |
createCollectionIterationMethods(CollectionInfo fieldInfo,
JClass jClass,
boolean useJava50) |
Generate methods for iterating over the objects in the collection.
|
protected void |
createEnumerateMethod(CollectionInfo fieldInfo,
JClass jClass,
boolean useJava50) |
Creates the enumerate method.
|
protected void |
createGetByIndexMethod(CollectionInfo fieldInfo,
JClass jClass) |
Creates the get by index method.
|
protected void |
createIteratorMethod(CollectionInfo fieldInfo,
JClass jClass,
boolean useJava50) |
Creates the iterate method.
|
protected void |
createRemoveByIndexMethod(CollectionInfo fieldInfo,
JClass jClass) |
Creates the remove by index method.
|
protected void |
createSetByIndexMethod(CollectionInfo fieldInfo,
JClass jClass) |
Creates the set by index method.
|
void |
generateInitializerCode(FieldInfo fieldInfo,
JSourceCode sourceCode) |
Creates the field initialization code in a constructor.
|
createJavaField, getJavaNaming
public CollectionMemberAndAccessorFactory(JavaNaming naming)
naming
- JavaNaming to usepublic void generateInitializerCode(FieldInfo fieldInfo, JSourceCode sourceCode)
generateInitializerCode
in class FieldMemberAndAccessorFactory
fieldInfo
- the fieldInfo to translatesourceCode
- the JSourceCode in which to add the source topublic final void createAccessMethods(FieldInfo fieldInfo, JClass jClass, boolean useJava50, AnnotationBuilder[] annotationBuilders)
createAccessMethods
in class FieldMemberAndAccessorFactory
fieldInfo
- the fieldInfo to translatejClass
- the jclass the jField will be added touseJava50
- java version flagprotected void createAddMethod(CollectionInfo fieldInfo, JClass jClass)
fieldInfo
- the collectionInfo to translatejClass
- the jClass to add the method to.protected void createBoundPropertyCode(CollectionInfo fieldInfo, JSourceCode sourceCode)
fieldInfo
- the collectionInfo to translatesourceCode
- the sourceCode to attach toprotected void createEnumerateMethod(CollectionInfo fieldInfo, JClass jClass, boolean useJava50)
fieldInfo
- the collectionInfo to translatejClass
- the jClass to add the method to.useJava50
- java version flagprotected void createGetByIndexMethod(CollectionInfo fieldInfo, JClass jClass)
fieldInfo
- the collectionInfo to translatejClass
- the jClass to add the method to.protected void createCollectionIterationMethods(CollectionInfo fieldInfo, JClass jClass, boolean useJava50)
fieldInfo
- the collectionI to translatejClass
- the JClass to which we add this methoduseJava50
- true if source code is supposed to be generated for Java 5protected void createAddByIndexMethod(CollectionInfo fieldInfo, JClass jClass)
fieldInfo
- the collectionInfo to translatejClass
- the jClass to add the method to.useJava50
- java version flagprotected void createIteratorMethod(CollectionInfo fieldInfo, JClass jClass, boolean useJava50)
fieldInfo
- the collectionInfo to translatejClass
- the jClass to add the method to.useJava50
- java version flagprotected void createRemoveByIndexMethod(CollectionInfo fieldInfo, JClass jClass)
fieldInfo
- the collectionInfo to translatejClass
- the jClass to add the method to.protected void createSetByIndexMethod(CollectionInfo fieldInfo, JClass jClass)
fieldInfo
- the collectionInfo to translatejClass
- the jClass to add the method to.protected void addMaxSizeCheck(CollectionInfo fieldInfo, java.lang.String methodName, JSourceCode sourceCode)
fieldInfo
- the collectionInfo to translatemethodName
- the method namesourceCode
- the sourceCode to attach toIntalio Inc. (C) 1999-2008. All rights reserved http://www.intalio.com