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
abstract static class NestedCollection.CollectionLoad extends NestedCollection.CollectionBase
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 Modifier Constructor Description protected
CollectionLoad(boolean doubword)
Constructor.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected void
genLoadDone(ContextMethodBuilder mb)
Generate code to clean up after loading items from collection.protected void
genLoadInit(ContextMethodBuilder mb)
Generate code to initialize collection for loading items.protected abstract BranchWrapper
genLoadItem(ContextMethodBuilder mb)
Generate code to load next item from collection.-
Methods inherited from class org.jibx.binding.def.NestedCollection.CollectionBase
appendPOP, appendSWAP
-
-
-
-
Method Detail
-
genLoadInit
protected void genLoadInit(ContextMethodBuilder mb) throws JiBXException
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
protected abstract BranchWrapper genLoadItem(ContextMethodBuilder mb) throws JiBXException
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
protected void genLoadDone(ContextMethodBuilder mb) throws JiBXException
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
-
-