Package ghidra.program.model.block
Class SimpleBlockIterator
- java.lang.Object
-
- ghidra.program.model.block.SimpleBlockIterator
-
- All Implemented Interfaces:
CodeBlockIterator
public class SimpleBlockIterator extends java.lang.Object implements CodeBlockIterator
SimpleBlockIteratoris an implementation ofCodeBlockIteratorcapable of iterating in the forward direction over "simple blocks".- See Also:
SimpleBlockModel
-
-
Constructor Summary
Constructors Constructor Description SimpleBlockIterator(SimpleBlockModel model, AddressSetView set, TaskMonitor monitor)Creates a new iterator that will iterate over the program within a given address range set.SimpleBlockIterator(SimpleBlockModel model, TaskMonitor monitor)Creates a new iterator that will iterate over the entire program starting from its current minimum address.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanhasNext()Return true if next() will return a CodeBlock.CodeBlocknext()Return the next CodeBlock.
-
-
-
Constructor Detail
-
SimpleBlockIterator
public SimpleBlockIterator(SimpleBlockModel model, TaskMonitor monitor) throws CancelledException
Creates a new iterator that will iterate over the entire program starting from its current minimum address.- Parameters:
model- the BlockModel the iterator will use in its operations.monitor- task monitor which allows user to cancel operation.- Throws:
CancelledException- if the monitor cancels the operation.
-
SimpleBlockIterator
public SimpleBlockIterator(SimpleBlockModel model, AddressSetView set, TaskMonitor monitor) throws CancelledException
Creates a new iterator that will iterate over the program within a given address range set. All blocks which overlap the address set will be returned.- Parameters:
model- the BlockModel the iterator will use in its operations.set- the address range set which the iterator is to be restricted to.monitor- task monitor which allows user to cancel operation.- Throws:
CancelledException- if the monitor cancels the operation.
-
-
Method Detail
-
hasNext
public boolean hasNext() throws CancelledExceptionDescription copied from interface:CodeBlockIteratorReturn true if next() will return a CodeBlock.- Specified by:
hasNextin interfaceCodeBlockIterator- Throws:
CancelledException- thrown if the operation is cancelled.- See Also:
CodeBlockIterator.hasNext()
-
next
public CodeBlock next() throws CancelledException
Description copied from interface:CodeBlockIteratorReturn the next CodeBlock.- Specified by:
nextin interfaceCodeBlockIterator- Throws:
CancelledException- thrown if the operation is cancelled.- See Also:
CodeBlockIterator.next()
-
-