Package org.jibx.binding.def
Class NestedCollection.CollectionStore
java.lang.Object
org.jibx.binding.def.NestedCollection.CollectionBase
org.jibx.binding.def.NestedCollection.CollectionStore
- Direct Known Subclasses:
NestedCollection.AddStore
,NestedCollection.ArrayStore
,NestedCollection.IndexedStore
- Enclosing class:
NestedCollection
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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
Generate code to clean up after storing items to collection.protected void
Generate code to initialize collection for storing items.protected abstract void
Generate code to store next item to collection.Methods inherited from class org.jibx.binding.def.NestedCollection.CollectionBase
appendPOP, appendSWAP
-
Constructor Details
-
CollectionStore
protected CollectionStore(boolean doubword) Constructor.- Parameters:
doubword
- double word value flag
-
-
Method Details
-
genStoreInit
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 thegenStoreItem(org.jibx.binding.classes.ContextMethodBuilder)
method. The base class implementation does nothing.- Parameters:
mb
- method builder- Throws:
JiBXException
- if error in configuration
-
genStoreItem
Generate code to store next item to collection. This generates the necessary code for handling the store operation, removing the item from the stack. ThegenStoreInit(org.jibx.binding.classes.ContextMethodBuilder)
method must be called before calling this method, and thegenStoreDone(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
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 togenStoreItem(org.jibx.binding.classes.ContextMethodBuilder)
. The base class implementation does nothing.- Parameters:
mb
- method builder- Throws:
JiBXException
- if error in configuration
-