org.jibx.binding.def
Class NestedCollection.CollectionStore

java.lang.Object
  extended by org.jibx.binding.def.NestedCollection.CollectionBase
      extended by org.jibx.binding.def.NestedCollection.CollectionStore
Direct Known Subclasses:
NestedCollection.AddStore, NestedCollection.ArrayStore, NestedCollection.IndexedStore
Enclosing class:
NestedCollection

abstract static class NestedCollection.CollectionStore
extends NestedCollection.CollectionBase

Base class for collection item store strategy. The implementation class must handle the appropriate form of code generation for the type of collection being used.


Constructor Summary
protected NestedCollection.CollectionStore(boolean doubword)
          Constructor.
 
Method Summary
protected  void genStoreDone(ContextMethodBuilder mb)
          Generate code to clean up after storing items to collection.
protected  void genStoreInit(ContextMethodBuilder mb)
          Generate code to initialize collection for storing items.
protected abstract  void genStoreItem(ContextMethodBuilder mb)
          Generate code to store next item to collection.
 
Methods inherited from class org.jibx.binding.def.NestedCollection.CollectionBase
appendPOP, appendSWAP
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NestedCollection.CollectionStore

protected NestedCollection.CollectionStore(boolean doubword)
Constructor.

Parameters:
doubword - double word value flag
Method Detail

genStoreInit

protected void genStoreInit(ContextMethodBuilder mb)
                     throws JiBXException
Generate code to initialize collection for storing items. This generates the necessary code for handling the initialization, including creating the collection object if appropriate. It must be called before attempting to call the genStoreItem(org.jibx.binding.classes.ContextMethodBuilder) method. The base class implementation does nothing.

Parameters:
mb - method builder
Throws:
JiBXException - if error in configuration

genStoreItem

protected abstract void genStoreItem(ContextMethodBuilder mb)
                              throws JiBXException
Generate code to store next item to collection. This generates the necessary code for handling the store operation, removing the item from the stack. The genStoreInit(org.jibx.binding.classes.ContextMethodBuilder) method must be called before calling this method, and the genStoreDone(org.jibx.binding.classes.ContextMethodBuilder) method must be called after the last call to this method. This method must be overridden by each subclass.

Parameters:
mb - method builder
Throws:
JiBXException - if error in configuration

genStoreDone

protected void genStoreDone(ContextMethodBuilder mb)
                     throws JiBXException
Generate code to clean up after storing items to collection. This generates the necessary code for handling the clean up. It must be called after the last call to genStoreItem(org.jibx.binding.classes.ContextMethodBuilder). The base class implementation does nothing.

Parameters:
mb - method builder
Throws:
JiBXException - if error in configuration


Project Web Site