Class StateParser
- java.lang.Object
-
- com.yahoo.documentapi.messagebus.systemstate.parser.StateParser
-
- All Implemented Interfaces:
StateParserConstants
public class StateParser extends java.lang.Object implements StateParserConstants
-
-
Field Summary
Fields Modifier and Type Field Description Token
jj_nt
Next token.Token
token
Current token.StateParserTokenManager
token_source
Generated Token Manager.-
Fields inherited from interface com.yahoo.documentapi.messagebus.systemstate.parser.StateParserConstants
ALPHANUM, AND, ARG, CODE, DEFAULT, DOT, DOTDOT, EOF, EQ, SLASH, SPACE, STRING, tokenImage, WHITESPACE
-
-
Constructor Summary
Constructors Constructor Description StateParser(StateParserTokenManager tm)
Constructor with generated Token Manager.StateParser(java.io.InputStream stream)
Constructor with InputStream.StateParser(java.io.InputStream stream, java.lang.String encoding)
Constructor with InputStream and supplied encodingStateParser(java.io.Reader stream)
Constructor with InputStream.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.yahoo.documentapi.messagebus.systemstate.rule.Argument
argument()
java.util.List<com.yahoo.documentapi.messagebus.systemstate.rule.Argument>
argumentList()
void
disable_tracing()
Disable tracing.void
enable_tracing()
Enable tracing.ParseException
generateParseException()
Generate ParseException.Token
getNextToken()
Token
getToken(int index)
com.yahoo.documentapi.messagebus.systemstate.rule.Location
location(com.yahoo.documentapi.messagebus.systemstate.rule.Location pwd)
java.lang.String
locationItem()
void
ReInit(StateParserTokenManager tm)
Reinitialisevoid
ReInit(java.io.InputStream stream)
Reinitialisevoid
ReInit(java.io.InputStream stream, java.lang.String encoding)
Reinitialisevoid
ReInit(java.io.Reader stream)
Reinitialisecom.yahoo.documentapi.messagebus.systemstate.rule.NodeState
systemState()
boolean
trace_enabled()
-
-
-
Field Detail
-
token_source
public StateParserTokenManager token_source
Generated Token Manager.
-
token
public Token token
Current token.
-
jj_nt
public Token jj_nt
Next token.
-
-
Constructor Detail
-
StateParser
public StateParser(java.io.InputStream stream)
Constructor with InputStream.- Parameters:
stream
- input stream
-
StateParser
public StateParser(java.io.InputStream stream, java.lang.String encoding)
Constructor with InputStream and supplied encoding- Parameters:
stream
- input streamencoding
- charset to be used
-
StateParser
public StateParser(java.io.Reader stream)
Constructor with InputStream.- Parameters:
stream
- char stream
-
StateParser
public StateParser(StateParserTokenManager tm)
Constructor with generated Token Manager.- Parameters:
tm
- Token manager to use
-
-
Method Detail
-
systemState
public final com.yahoo.documentapi.messagebus.systemstate.rule.NodeState systemState() throws ParseException, java.io.UnsupportedEncodingException
- Throws:
ParseException
java.io.UnsupportedEncodingException
-
location
public final com.yahoo.documentapi.messagebus.systemstate.rule.Location location(com.yahoo.documentapi.messagebus.systemstate.rule.Location pwd) throws ParseException, java.io.UnsupportedEncodingException
- Throws:
ParseException
java.io.UnsupportedEncodingException
-
locationItem
public final java.lang.String locationItem() throws ParseException, java.io.UnsupportedEncodingException
- Throws:
ParseException
java.io.UnsupportedEncodingException
-
argumentList
public final java.util.List<com.yahoo.documentapi.messagebus.systemstate.rule.Argument> argumentList() throws ParseException, java.io.UnsupportedEncodingException
- Throws:
ParseException
java.io.UnsupportedEncodingException
-
argument
public final com.yahoo.documentapi.messagebus.systemstate.rule.Argument argument() throws ParseException, java.io.UnsupportedEncodingException
- Throws:
ParseException
java.io.UnsupportedEncodingException
-
ReInit
public void ReInit(java.io.InputStream stream)
Reinitialise- Parameters:
stream
- input stream
-
ReInit
public void ReInit(java.io.InputStream stream, java.lang.String encoding)
Reinitialise- Parameters:
stream
- input streamencoding
- charset to be used
-
ReInit
public void ReInit(java.io.Reader stream)
Reinitialise- Parameters:
stream
- char stream
-
ReInit
public void ReInit(StateParserTokenManager tm)
Reinitialise- Parameters:
tm
- Token manager to use
-
getNextToken
public final Token getNextToken()
- Returns:
- the next Token.
-
getToken
public final Token getToken(int index)
- Parameters:
index
- index to be retrieved- Returns:
- the specific Token.
-
generateParseException
public ParseException generateParseException()
Generate ParseException.- Returns:
- new Exception object. Never
null
-
trace_enabled
public final boolean trace_enabled()
- Returns:
- Always
false
.
-
enable_tracing
public final void enable_tracing()
Enable tracing.
-
disable_tracing
public final void disable_tracing()
Disable tracing.
-
-