|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectorg.exolab.castor.builder.factory.FieldMemberAndAccessorFactory
org.exolab.castor.builder.factory.CollectionMemberAndAccessorFactory
public class CollectionMemberAndAccessorFactory
This factory takes a CollectionInfo and generates the suitable JFields and the accessor methods into the JClass.
| Constructor Summary | |
|---|---|
CollectionMemberAndAccessorFactory(JavaNaming naming)
Creates a factory that offers public methods to create the field initialization code as well as the accessor methods. |
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class org.exolab.castor.builder.factory.FieldMemberAndAccessorFactory |
|---|
createJavaField, getJavaNaming |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CollectionMemberAndAccessorFactory(JavaNaming naming)
naming - JavaNaming to use| Method Detail |
|---|
public void generateInitializerCode(FieldInfo fieldInfo,
JSourceCode sourceCode)
generateInitializerCode in class FieldMemberAndAccessorFactoryfieldInfo - the fieldInfo to translatesourceCode - the JSourceCode in which to add the source to
public final void createAccessMethods(FieldInfo fieldInfo,
JClass jClass,
boolean useJava50,
AnnotationBuilder[] annotationBuilders)
createAccessMethods in class FieldMemberAndAccessorFactoryfieldInfo - the fieldInfo to translatejClass - the jclass the jField will be added touseJava50 - java version flag
protected 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 to
protected void createEnumerateMethod(CollectionInfo fieldInfo,
JClass jClass,
boolean useJava50)
fieldInfo - the collectionInfo to translatejClass - the jClass to add the method to.useJava50 - java version flag
protected 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 5
protected void createAddByIndexMethod(CollectionInfo fieldInfo,
JClass jClass)
fieldInfo - the collectionInfo to translatejClass - the jClass to add the method to.useJava50 - java version flag
protected void createIteratorMethod(CollectionInfo fieldInfo,
JClass jClass,
boolean useJava50)
fieldInfo - the collectionInfo to translatejClass - the jClass to add the method to.useJava50 - java version flag
protected 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 to
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||