public class InvariantChecker
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
InvariantChecker.InconsistentNodeModelException |
Constructor and Description |
---|
InvariantChecker() |
Modifier and Type | Method and Description |
---|---|
void |
checkInvariant(INode node)
Assert the invariant of completely build node model.
|
protected int |
doCheckChildNodeAndReturnTotalLength(INode child,
ICompositeNode parent,
int startsAt) |
protected int |
doCheckCompositeNodeAndReturnTotalLength(ICompositeNode node,
int startsAt) |
protected void |
doCheckInvariant(ICompositeNode rootNode) |
protected int |
doCheckLeafNodeAndReturnLength(ILeafNode leafNode,
int startsAt) |
public void checkInvariant(INode node) throws InvariantChecker.InconsistentNodeModelException
node
- an arbitrary node of the complete node model that should be checked.InvariantChecker.InconsistentNodeModelException
- if the node is part of an inconsistent node tree.protected void doCheckInvariant(ICompositeNode rootNode)
protected int doCheckCompositeNodeAndReturnTotalLength(ICompositeNode node, int startsAt)
protected int doCheckChildNodeAndReturnTotalLength(INode child, ICompositeNode parent, int startsAt)
protected int doCheckLeafNodeAndReturnLength(ILeafNode leafNode, int startsAt)