Package org.jibx.binding.def
Class NestedCollection.CollectionLoad
java.lang.Object
org.jibx.binding.def.NestedCollection.CollectionBase
org.jibx.binding.def.NestedCollection.CollectionLoad
- Direct Known Subclasses:
NestedCollection.ArrayLoad
,NestedCollection.IndexedLoad
,NestedCollection.IteratorLoad
- Enclosing class:
NestedCollection
Base class for collection item load 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 loading items from collection.protected void
Generate code to initialize collection for loading items.protected abstract BranchWrapper
Generate code to load next item from collection.Methods inherited from class org.jibx.binding.def.NestedCollection.CollectionBase
appendPOP, appendSWAP
-
Constructor Details
-
CollectionLoad
protected CollectionLoad(boolean doubword) Constructor.- Parameters:
doubword
- double word value flag
-
-
Method Details
-
genLoadInit
Generate code to initialize collection for loading items. This generates the necessary code for handling the initialization. It must be called before attempting to call thegenLoadItem(org.jibx.binding.classes.ContextMethodBuilder)
method. The base class implementation does nothing.- Parameters:
mb
- method builder- Throws:
JiBXException
- if error in configuration
-
genLoadItem
Generate code to load next item from collection. This generates the necessary code for handling the load operation, leaving the item on the stack. ThegenLoadInit(org.jibx.binding.classes.ContextMethodBuilder)
method must be called before calling this method, and thegenLoadDone(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- Returns:
- branch wrapper for case of done with collection
- Throws:
JiBXException
- if error in configuration
-
genLoadDone
Generate code to clean up after loading items from collection. This generates the necessary code for handling the clean up. It must be called after the last call togenLoadItem(org.jibx.binding.classes.ContextMethodBuilder)
. The base class implementation does nothing.- Parameters:
mb
- method builder- Throws:
JiBXException
- if error in configuration
-