org.eclipse.xtext.nodemodel.impl
Class LeafNode

java.lang.Object
  extended by org.eclipse.xtext.nodemodel.impl.AbstractNode
      extended by org.eclipse.xtext.nodemodel.impl.LeafNode
All Implemented Interfaces:
java.lang.Iterable<INode>, BidiIterable<INode>, BidiTreeIterable<INode>, ILeafNode, INode
Direct Known Subclasses:
HiddenLeafNode, LeafNodeWithSyntaxError

public class LeafNode
extends AbstractNode
implements ILeafNode

Author:
Sebastian Zarnekow - Initial contribution and API, Mark Christiaens - Serialization support
This class is not intended to be subclassed by clients.
This class is not intended to be subclassed by clients.

Constructor Summary
LeafNode()
           
 
Method Summary
protected  void basicSetTotalLength(int length)
           
protected  void basicSetTotalOffset(int offset)
           
 java.lang.Iterable<ILeafNode> getLeafNodes()
          Returns an iterable for all contained leaf nodes.
 int getLength()
          Returns the length of this node excluding hidden tokens.
 int getOffset()
          Returns the offset of this node excluding hidden tokens.
 int getTotalLength()
          Returns the length of this node including hidden tokens.
 int getTotalOffset()
          Returns the offset of this node including hidden tokens.
 boolean isHidden()
          Returns true if the node was produced by a hidden token.
 
Methods inherited from class org.eclipse.xtext.nodemodel.impl.AbstractNode
basicGetGrammarElement, basicGetLineOfOffset, basicGetNextSibling, basicGetParent, basicGetPreviousSibling, basicGetSemanticElement, basicHasNextSibling, basicHasPreviousSibling, basicHasSiblings, basicIterator, basicSetGrammarElement, basicSetNextSibling, basicSetParent, basicSetPreviousSibling, getAsTreeIterable, getEndLine, getGrammarElement, getNextSibling, getParent, getPreviousSibling, getRootNode, getSemanticElement, getStartLine, getSyntaxErrorMessage, getText, getTotalEndLine, getTotalEndOffset, getTotalStartLine, hasDirectSemanticElement, hasNextSibling, hasPreviousSibling, hasSiblings, iterator, reverse
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.xtext.nodemodel.INode
getAsTreeIterable, getEndLine, getGrammarElement, getNextSibling, getParent, getPreviousSibling, getRootNode, getSemanticElement, getStartLine, getSyntaxErrorMessage, getText, getTotalEndLine, getTotalEndOffset, getTotalStartLine, hasDirectSemanticElement, hasNextSibling, hasPreviousSibling, hasSiblings
 

Constructor Detail

LeafNode

public LeafNode()
Method Detail

isHidden

public boolean isHidden()
Description copied from interface: ILeafNode
Returns true if the node was produced by a hidden token.

Specified by:
isHidden in interface ILeafNode
Returns:
true if the node was produced by a hidden token.

getTotalOffset

public int getTotalOffset()
Description copied from interface: INode
Returns the offset of this node including hidden tokens.

Specified by:
getTotalOffset in interface INode
Returns:
the offset of this node including hidden tokens.

getTotalLength

public int getTotalLength()
Description copied from interface: INode
Returns the length of this node including hidden tokens.

Specified by:
getTotalLength in interface INode
Returns:
the length of this node including hidden tokens.

getOffset

public int getOffset()
Description copied from interface: INode
Returns the offset of this node excluding hidden tokens. If this node is a hidden leaf node or a composite node that does only contain hidden leaf nodes, the total offset is returned.

Specified by:
getOffset in interface INode
Overrides:
getOffset in class AbstractNode
Returns:
the offset of this node excluding hidden tokens.

getLength

public int getLength()
Description copied from interface: INode
Returns the length of this node excluding hidden tokens. If this node is a hidden leaf node, the total length is returned.

Specified by:
getLength in interface INode
Overrides:
getLength in class AbstractNode
Returns:
the length of this node excluding hidden tokens.

basicSetTotalOffset

protected void basicSetTotalOffset(int offset)

basicSetTotalLength

protected void basicSetTotalLength(int length)

getLeafNodes

public java.lang.Iterable<ILeafNode> getLeafNodes()
Description copied from interface: INode
Returns an iterable for all contained leaf nodes. Never null.

Specified by:
getLeafNodes in interface INode
Overrides:
getLeafNodes in class AbstractNode
Returns:
an iterable for all contained leaf nodes. Never null.