Package org.jibx.binding.def
Class NestedCollection.IteratorLoad
- java.lang.Object
-
- org.jibx.binding.def.NestedCollection.CollectionBase
-
- org.jibx.binding.def.NestedCollection.CollectionLoad
-
- org.jibx.binding.def.NestedCollection.IteratorLoad
-
- Enclosing class:
- NestedCollection
static class NestedCollection.IteratorLoad extends NestedCollection.CollectionLoad
Collection item load strategy for collection with items accessed by iterator or enumeration.
-
-
Field Summary
Fields Modifier and Type Field Description private ClassItem
m_iterMethod
Method used to get iterator for collection.private java.lang.String
m_moreName
Fully qualified method name to test if more in iteration.private java.lang.String
m_nextName
Fully qualified method name to get next item in iteration.
-
Constructor Summary
Constructors Constructor Description IteratorLoad(ClassItem iter, boolean doubword, java.lang.String more, java.lang.String next)
Constructor.
-
Method Summary
All Methods Instance 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 BranchWrapper
genLoadItem(ContextMethodBuilder mb)
Generate code to load next item from collection.-
Methods inherited from class org.jibx.binding.def.NestedCollection.CollectionBase
appendPOP, appendSWAP
-
-
-
-
Field Detail
-
m_iterMethod
private final ClassItem m_iterMethod
Method used to get iterator for collection.
-
m_moreName
private final java.lang.String m_moreName
Fully qualified method name to test if more in iteration.
-
m_nextName
private final java.lang.String m_nextName
Fully qualified method name to get next item in iteration.
-
-
Constructor Detail
-
IteratorLoad
IteratorLoad(ClassItem iter, boolean doubword, java.lang.String more, java.lang.String next)
Constructor.- Parameters:
iter
- method to get iterator or enumerator from collectiondoubword
- double word value flagmore
- fully qualified method name to test if more in iterationnext
- fully qualified method name to get next item in iteration
-
-
Method Detail
-
genLoadInit
protected void genLoadInit(ContextMethodBuilder mb) throws JiBXException
Description copied from class:NestedCollection.CollectionLoad
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 theNestedCollection.CollectionLoad.genLoadItem(org.jibx.binding.classes.ContextMethodBuilder)
method. The base class implementation does nothing.- Overrides:
genLoadInit
in classNestedCollection.CollectionLoad
- Parameters:
mb
- method builder- Throws:
JiBXException
- if error in configuration
-
genLoadItem
protected BranchWrapper genLoadItem(ContextMethodBuilder mb) throws JiBXException
Description copied from class:NestedCollection.CollectionLoad
Generate code to load next item from collection. This generates the necessary code for handling the load operation, leaving the item on the stack. TheNestedCollection.CollectionLoad.genLoadInit(org.jibx.binding.classes.ContextMethodBuilder)
method must be called before calling this method, and theNestedCollection.CollectionLoad.genLoadDone(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:
genLoadItem
in classNestedCollection.CollectionLoad
- 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
Description copied from class:NestedCollection.CollectionLoad
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 toNestedCollection.CollectionLoad.genLoadItem(org.jibx.binding.classes.ContextMethodBuilder)
. The base class implementation does nothing.- Overrides:
genLoadDone
in classNestedCollection.CollectionLoad
- Parameters:
mb
- method builder- Throws:
JiBXException
- if error in configuration
-
-