Class ParseNode
- java.lang.Object
- 
- com.inductiveautomation.snap.parse.ParseNode
 
- 
- All Implemented Interfaces:
- java.lang.Cloneable
 - Direct Known Subclasses:
- ParseUtils.NestedParseNode
 
 public class ParseNode extends java.lang.Object implements java.lang.CloneableA parse node.
- 
- 
Constructor SummaryConstructors Constructor Description ParseNode()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.StringcreateString()Creates the match string.java.lang.ObjectgetCustomNode()Returns the custom node created by parser or rule handler, should there be one.<T> TgetCustomNode(java.lang.Class<T> aClass)Returns the custom node as the given class type.intgetEnd()Returns the match end.TokengetEndToken()Returns the end token for this node.intgetLength()Returns the match length.intgetLineIndex()Returns the line index.java.lang.StringgetName()Returns the rule name.ParsergetParser()Returns the parser.java.lang.StringgetPattern()Returns the rule pattern.ParseRulegetRule()Returns the rule.intgetStart()Returns the match start.TokengetStartToken()Returns the start token for this node.java.lang.StringgetString()Returns the match string.voidinit(Parser aParser, ParseRule aRule, Token aStartToken, Token anEndToken)Creates a new parse nodevoidsetCustomNode(java.lang.Object anObj)Sets the custom node created by parser or rule handler, should there be one.java.lang.StringtoString()Returns a string representation of node.java.lang.StringtoStringSimple()Returns a string representation of node (just .
 
- 
- 
- 
Method Detail- 
initpublic void init(Parser aParser, ParseRule aRule, Token aStartToken, Token anEndToken) Creates a new parse node
 - 
getParserpublic Parser getParser() Returns the parser.
 - 
getRulepublic ParseRule getRule() Returns the rule.
 - 
getNamepublic java.lang.String getName() Returns the rule name.
 - 
getPatternpublic java.lang.String getPattern() Returns the rule pattern.
 - 
getStartTokenpublic Token getStartToken() Returns the start token for this node.
 - 
getEndTokenpublic Token getEndToken() Returns the end token for this node.
 - 
getStartpublic int getStart() Returns the match start.
 - 
getEndpublic int getEnd() Returns the match end.
 - 
getLengthpublic int getLength() Returns the match length.
 - 
getLineIndexpublic int getLineIndex() Returns the line index.
 - 
getStringpublic java.lang.String getString() Returns the match string.
 - 
createStringprotected java.lang.String createString() Creates the match string.
 - 
getCustomNodepublic java.lang.Object getCustomNode() Returns the custom node created by parser or rule handler, should there be one.
 - 
setCustomNodepublic void setCustomNode(java.lang.Object anObj) Sets the custom node created by parser or rule handler, should there be one.
 - 
getCustomNodepublic <T> T getCustomNode(java.lang.Class<T> aClass) Returns the custom node as the given class type.
 - 
toStringpublic java.lang.String toString() Returns a string representation of node.- Overrides:
- toStringin class- java.lang.Object
 
 - 
toStringSimplepublic java.lang.String toStringSimple() Returns a string representation of node (just .
 
- 
 
-