Package org.jibx.binding.def
Class NestedCollection.IndexedStore
java.lang.Object
org.jibx.binding.def.NestedCollection.CollectionBase
org.jibx.binding.def.NestedCollection.CollectionStore
org.jibx.binding.def.NestedCollection.IndexedStore
- Enclosing class:
NestedCollection
Collection item store strategy for collection with items set by
index number.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final boolean
Flag for method returns result.private final ClassItem
Method used to set items by index in collection. -
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 void
Generate code to store next item to collection.Methods inherited from class org.jibx.binding.def.NestedCollection.CollectionBase
appendPOP, appendSWAP
-
Field Details
-
m_setMethod
Method used to set items by index in collection. -
m_isReturned
private final boolean m_isReturnedFlag for method returns result.
-
-
Constructor Details
-
IndexedStore
IndexedStore(ClassItem set, boolean doubword, boolean ret) Constructor.- Parameters:
set
- method used to store items by index in collectiondoubword
- double word value flagret
- value returned by add flag
-
-
Method Details
-
genStoreInit
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 theNestedCollection.CollectionStore.genStoreItem(org.jibx.binding.classes.ContextMethodBuilder)
method. The base class implementation does nothing.- Overrides:
genStoreInit
in classNestedCollection.CollectionStore
- Parameters:
mb
- method builder- Throws:
JiBXException
- if error in configuration
-
genStoreItem
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. TheNestedCollection.CollectionStore.genStoreInit(org.jibx.binding.classes.ContextMethodBuilder)
method must be called before calling this method, and theNestedCollection.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 classNestedCollection.CollectionStore
- Parameters:
mb
- method builder- Throws:
JiBXException
- if error in configuration
-
genStoreDone
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 toNestedCollection.CollectionStore.genStoreItem(org.jibx.binding.classes.ContextMethodBuilder)
. The base class implementation does nothing.- Overrides:
genStoreDone
in classNestedCollection.CollectionStore
- Parameters:
mb
- method builder- Throws:
JiBXException
- if error in configuration
-