Package org.eclipse.xtext.nodemodel.impl
Class InvariantChecker
- java.lang.Object
-
- org.eclipse.xtext.nodemodel.impl.InvariantChecker
-
public class InvariantChecker extends java.lang.Object- Noextend:
- This class is not intended to be subclassed by clients.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classInvariantChecker.InconsistentNodeModelException
-
Constructor Summary
Constructors Constructor Description InvariantChecker()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcheckInvariant(INode node)Assert the invariant of completely build node model.protected intdoCheckChildNodeAndReturnTotalLength(INode child, ICompositeNode parent, int startsAt)protected intdoCheckCompositeNodeAndReturnTotalLength(ICompositeNode node, int startsAt)protected voiddoCheckInvariant(ICompositeNode rootNode)protected intdoCheckLeafNodeAndReturnLength(ILeafNode leafNode, int startsAt)
-
-
-
Method Detail
-
checkInvariant
public void checkInvariant(INode node) throws InvariantChecker.InconsistentNodeModelException
Assert the invariant of completely build node model. Checks that every pointer is correct, e.g.- a parent points to its first child,
- siblings point to the very same parent,
- the offset and length data is in sync, and
- no null fields are present (besides some empty first child pointers).
- Parameters:
node- an arbitrary node of the complete node model that should be checked.- Throws:
InvariantChecker.InconsistentNodeModelException- if the node is part of an inconsistent node tree.
-
doCheckInvariant
protected void doCheckInvariant(ICompositeNode rootNode)
-
doCheckCompositeNodeAndReturnTotalLength
protected int doCheckCompositeNodeAndReturnTotalLength(ICompositeNode node, int startsAt)
-
doCheckChildNodeAndReturnTotalLength
protected int doCheckChildNodeAndReturnTotalLength(INode child, ICompositeNode parent, int startsAt)
-
doCheckLeafNodeAndReturnLength
protected int doCheckLeafNodeAndReturnLength(ILeafNode leafNode, int startsAt)
-
-