org.jibx.binding.def
Class NestedCollection.ArrayStore

java.lang.Object
  extended by org.jibx.binding.def.NestedCollection.CollectionStore
      extended by org.jibx.binding.def.NestedCollection.ArrayStore
Enclosing class:
NestedCollection

static class NestedCollection.ArrayStore
extends NestedCollection.CollectionStore

Collection item store strategy for array.


Field Summary
private  java.lang.String m_itemType
          Array item type.
 
Constructor Summary
NestedCollection.ArrayStore(java.lang.String itype)
          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  void genStoreItem(ContextMethodBuilder mb)
          Generate code to store next item to collection.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_itemType

private final java.lang.String m_itemType
Array item type.

Constructor Detail

NestedCollection.ArrayStore

NestedCollection.ArrayStore(java.lang.String itype)
Constructor.

Parameters:
itype - array item type
Method Detail

genStoreInit

protected void genStoreInit(ContextMethodBuilder mb)
                     throws JiBXException
Description copied from class: NestedCollection.CollectionStore
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 NestedCollection.CollectionStore.genStoreItem(org.jibx.binding.classes.ContextMethodBuilder) method. The base class implementation does nothing.

Overrides:
genStoreInit in class NestedCollection.CollectionStore
Parameters:
mb - method builder
Throws:
JiBXException - if error in configuration

genStoreItem

protected void genStoreItem(ContextMethodBuilder mb)
                     throws JiBXException
Description copied from class: NestedCollection.CollectionStore
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 NestedCollection.CollectionStore.genStoreInit(org.jibx.binding.classes.ContextMethodBuilder) method must be called before calling this method, and the NestedCollection.CollectionStore.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.

Specified by:
genStoreItem in class NestedCollection.CollectionStore
Parameters:
mb - method builder
Throws:
JiBXException - if error in configuration

genStoreDone

protected void genStoreDone(ContextMethodBuilder mb)
                     throws JiBXException
Description copied from class: NestedCollection.CollectionStore
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 NestedCollection.CollectionStore.genStoreItem(org.jibx.binding.classes.ContextMethodBuilder). The base class implementation does nothing.

Overrides:
genStoreDone in class NestedCollection.CollectionStore
Parameters:
mb - method builder
Throws:
JiBXException - if error in configuration


Project Web Site