Class SQLTemplateParser
java.lang.Object
org.apache.cayenne.template.parser.SQLTemplateParser
- All Implemented Interfaces:
SQLTemplateParserConstants,SQLTemplateParserTreeConstants
public class SQLTemplateParser
extends Object
implements SQLTemplateParserTreeConstants, SQLTemplateParserConstants
Parser of Cayenne Templates.
- Since:
- 4.1
-
Field Summary
FieldsModifier and TypeFieldDescriptionNext token.protected JJTSQLTemplateParserStateCurrent token.Generated Token Manager.Fields inherited from interface org.apache.cayenne.template.parser.SQLTemplateParserConstants
ARGS, COMMA, DEC_DIGITS, DEC_FLT, DEFAULT, DIGIT, DOLLAR, DOT, DOUBLE_QUOTED_STRING, ELSE, END, EOF, ESC, EXPONENT, FALSE, FLOAT_LITERAL, FLT_SUFF, IDENTIFIER, IF, IN_SINGLE_LINE_COMMENT, INT_LITERAL, LBRACKET, LETTER, LSBRACKET, NOT_TEXT, RBRACKET, RSBRACKET, SHARP, SINGLE_LINE_COMMENT_END, SINGLE_QUOTED_STRING, STRING_ESC, TEXT, TEXT_OTHER, tokenImage, TRUE, WithinDoubleQuoteLiteral, WithinSingleQuoteLiteralFields inherited from interface org.apache.cayenne.template.parser.SQLTemplateParserTreeConstants
JJTARRAY, JJTBLOCK, JJTBOOLSCALAR, JJTDIRECTIVE, JJTEXPRESSION, JJTFLOATSCALAR, JJTIFELSE, JJTINTSCALAR, JJTMETHOD, jjtNodeName, JJTSTRINGSCALAR, JJTTEXT, JJTVARIABLE, JJTVOID -
Constructor Summary
ConstructorsConstructorDescriptionSQLTemplateParser(InputStream stream) Constructor with InputStream.SQLTemplateParser(InputStream stream, String encoding) Constructor with InputStream and supplied encodingSQLTemplateParser(Reader stream) Constructor.Constructor with generated Token Manager. -
Method Summary
Modifier and TypeMethodDescriptionfinal voidarray()final voidblock()final voidfinal voidDisable tracing.final voidEnable tracing.final voidGenerate ParseException.final TokenGet the next Token.final TokengetToken(int index) Get the specific Token.final voidifElse()final voidmethod()voidReInit(InputStream stream) Reinitialise.voidReInit(InputStream stream, String encoding) Reinitialise.voidReinitialise.voidReinitialise.final voidscalar()final Nodetemplate()final voidtext()final booleanTrace enabled.final voidvariable()
-
Field Details
-
jjtree
-
token_source
Generated Token Manager. -
token
Current token. -
jj_nt
Next token.
-
-
Constructor Details
-
SQLTemplateParser
Constructor with InputStream. -
SQLTemplateParser
Constructor with InputStream and supplied encoding -
SQLTemplateParser
Constructor. -
SQLTemplateParser
Constructor with generated Token Manager.
-
-
Method Details
-
template
- Throws:
ParseException
-
block
- Throws:
ParseException
-
text
- Throws:
ParseException
-
ifElse
- Throws:
ParseException
-
directive
- Throws:
ParseException
-
expression
- Throws:
ParseException
-
scalar
- Throws:
ParseException
-
variable
- Throws:
ParseException
-
method
- Throws:
ParseException
-
array
- Throws:
ParseException
-
ReInit
Reinitialise. -
ReInit
Reinitialise. -
ReInit
Reinitialise. -
ReInit
Reinitialise. -
getNextToken
Get the next Token. -
getToken
Get the specific Token. -
generateParseException
Generate ParseException. -
trace_enabled
public final boolean trace_enabled()Trace enabled. -
enable_tracing
public final void enable_tracing()Enable tracing. -
disable_tracing
public final void disable_tracing()Disable tracing.
-