Package ognl
Class OgnlParser
- java.lang.Object
-
- ognl.OgnlParser
-
- All Implemented Interfaces:
OgnlParserConstants
,OgnlParserTreeConstants
public class OgnlParser extends java.lang.Object implements OgnlParserTreeConstants, OgnlParserConstants
OgnlParser is a JavaCC parser class; it translates OGNL expressions into abstract syntax trees (ASTs) that can then be interpreted by the getValue and setValue methods.
-
-
Field Summary
Fields Modifier and Type Field Description Token
jj_nt
Next token.protected JJTOgnlParserState
jjtree
Token
token
Current token.OgnlParserTokenManager
token_source
Generated Token Manager.-
Fields inherited from interface ognl.OgnlParserConstants
BACK_CHAR_ESC, BACK_CHAR_LITERAL, CHAR_LITERAL, DEC_DIGITS, DEC_FLT, DEFAULT, DIGIT, DYNAMIC_SUBSCRIPT, EOF, ESC, EXPONENT, FLT_LITERAL, FLT_SUFF, IDENT, INT_LITERAL, LETTER, STRING_ESC, STRING_LITERAL, tokenImage, WithinBackCharLiteral, WithinCharLiteral, WithinStringLiteral
-
Fields inherited from interface ognl.OgnlParserTreeConstants
JJTADD, JJTAND, JJTASSIGN, JJTBITAND, JJTBITNEGATE, JJTBITOR, JJTCHAIN, JJTCONST, JJTCTOR, JJTDIVIDE, JJTEQ, JJTEVAL, JJTGREATER, JJTGREATEREQ, JJTIN, JJTINSTANCEOF, JJTKEYVALUE, JJTLESS, JJTLESSEQ, JJTLIST, JJTMAP, JJTMETHOD, JJTMULTIPLY, JJTNEGATE, jjtNodeName, JJTNOT, JJTNOTEQ, JJTNOTIN, JJTOR, JJTPROJECT, JJTPROPERTY, JJTREMAINDER, JJTROOTVARREF, JJTSELECT, JJTSELECTFIRST, JJTSELECTLAST, JJTSEQUENCE, JJTSHIFTLEFT, JJTSHIFTRIGHT, JJTSTATICFIELD, JJTSTATICMETHOD, JJTSUBTRACT, JJTTEST, JJTTHISVARREF, JJTUNSIGNEDSHIFTRIGHT, JJTVARREF, JJTVOID, JJTXOR
-
-
Constructor Summary
Constructors Constructor Description OgnlParser(java.io.InputStream stream)
Constructor with InputStream.OgnlParser(java.io.InputStream stream, java.lang.String encoding)
Constructor with InputStream and supplied encodingOgnlParser(java.io.Reader stream)
Constructor.OgnlParser(OgnlParserTokenManager tm)
Constructor with generated Token Manager.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
additiveExpression()
void
andExpression()
void
assignmentExpression()
java.lang.String
className()
java.lang.String
classReference()
void
conditionalTestExpression()
void
constructorCall()
void
disable_tracing()
Disable tracing.void
enable_tracing()
Enable tracing.void
equalityExpression()
void
exclusiveOrExpression()
void
expression()
ParseException
generateParseException()
Generate ParseException.Token
getNextToken()
Get the next Token.Token
getToken(int index)
Get the specific Token.void
inclusiveOrExpression()
void
index()
void
keyValueExpression()
void
logicalAndExpression()
void
logicalOrExpression()
void
methodCall()
void
multiplicativeExpression()
void
navigationChain()
void
primaryExpression()
void
projection()
Apply an expression to all elements of a collection, creating a new collection as the result.void
propertyName()
void
ReInit(java.io.InputStream stream)
Reinitialise.void
ReInit(java.io.InputStream stream, java.lang.String encoding)
Reinitialise.void
ReInit(java.io.Reader stream)
Reinitialise.void
ReInit(OgnlParserTokenManager tm)
Reinitialise.void
relationalExpression()
void
selectAll()
Apply a boolean expression to all elements of a collection, creating a new collection containing those elements for which the expression returned true.void
selectFirst()
Apply a boolean expression to all elements of a collection, creating a new collection containing those elements for the first element for which the expression returned true.void
selection()
void
selectLast()
Apply a boolean expression to all elements of a collection, creating a new collection containing those elements for the first element for which the expression returned true.void
shiftExpression()
void
staticMethodCall(java.lang.String className)
void
staticReference()
Node
topLevelExpression()
This is the top-level construct of OGNL.void
unaryExpression()
-
-
-
Field Detail
-
jjtree
protected JJTOgnlParserState jjtree
-
token_source
public OgnlParserTokenManager token_source
Generated Token Manager.
-
token
public Token token
Current token.
-
jj_nt
public Token jj_nt
Next token.
-
-
Constructor Detail
-
OgnlParser
public OgnlParser(java.io.InputStream stream)
Constructor with InputStream.
-
OgnlParser
public OgnlParser(java.io.InputStream stream, java.lang.String encoding)
Constructor with InputStream and supplied encoding
-
OgnlParser
public OgnlParser(java.io.Reader stream)
Constructor.
-
OgnlParser
public OgnlParser(OgnlParserTokenManager tm)
Constructor with generated Token Manager.
-
-
Method Detail
-
topLevelExpression
public final Node topLevelExpression() throws ParseException
This is the top-level construct of OGNL.- Throws:
ParseException
-
expression
public final void expression() throws ParseException
- Throws:
ParseException
-
assignmentExpression
public final void assignmentExpression() throws ParseException
- Throws:
ParseException
-
conditionalTestExpression
public final void conditionalTestExpression() throws ParseException
- Throws:
ParseException
-
logicalOrExpression
public final void logicalOrExpression() throws ParseException
- Throws:
ParseException
-
logicalAndExpression
public final void logicalAndExpression() throws ParseException
- Throws:
ParseException
-
inclusiveOrExpression
public final void inclusiveOrExpression() throws ParseException
- Throws:
ParseException
-
exclusiveOrExpression
public final void exclusiveOrExpression() throws ParseException
- Throws:
ParseException
-
andExpression
public final void andExpression() throws ParseException
- Throws:
ParseException
-
equalityExpression
public final void equalityExpression() throws ParseException
- Throws:
ParseException
-
relationalExpression
public final void relationalExpression() throws ParseException
- Throws:
ParseException
-
shiftExpression
public final void shiftExpression() throws ParseException
- Throws:
ParseException
-
additiveExpression
public final void additiveExpression() throws ParseException
- Throws:
ParseException
-
multiplicativeExpression
public final void multiplicativeExpression() throws ParseException
- Throws:
ParseException
-
unaryExpression
public final void unaryExpression() throws ParseException
- Throws:
ParseException
-
navigationChain
public final void navigationChain() throws ParseException
- Throws:
ParseException
-
primaryExpression
public final void primaryExpression() throws ParseException
- Throws:
ParseException
-
keyValueExpression
public final void keyValueExpression() throws ParseException
- Throws:
ParseException
-
staticReference
public final void staticReference() throws ParseException
- Throws:
ParseException
-
classReference
public final java.lang.String classReference() throws ParseException
- Throws:
ParseException
-
className
public final java.lang.String className() throws ParseException
- Throws:
ParseException
-
constructorCall
public final void constructorCall() throws ParseException
- Throws:
ParseException
-
propertyName
public final void propertyName() throws ParseException
- Throws:
ParseException
-
staticMethodCall
public final void staticMethodCall(java.lang.String className) throws ParseException
- Throws:
ParseException
-
methodCall
public final void methodCall() throws ParseException
- Throws:
ParseException
-
projection
public final void projection() throws ParseException
Apply an expression to all elements of a collection, creating a new collection as the result.- Throws:
ParseException
-
selection
public final void selection() throws ParseException
- Throws:
ParseException
-
selectAll
public final void selectAll() throws ParseException
Apply a boolean expression to all elements of a collection, creating a new collection containing those elements for which the expression returned true.- Throws:
ParseException
-
selectFirst
public final void selectFirst() throws ParseException
Apply a boolean expression to all elements of a collection, creating a new collection containing those elements for the first element for which the expression returned true.- Throws:
ParseException
-
selectLast
public final void selectLast() throws ParseException
Apply a boolean expression to all elements of a collection, creating a new collection containing those elements for the first element for which the expression returned true.- Throws:
ParseException
-
index
public final void index() throws ParseException
- Throws:
ParseException
-
ReInit
public void ReInit(java.io.InputStream stream)
Reinitialise.
-
ReInit
public void ReInit(java.io.InputStream stream, java.lang.String encoding)
Reinitialise.
-
ReInit
public void ReInit(java.io.Reader stream)
Reinitialise.
-
ReInit
public void ReInit(OgnlParserTokenManager tm)
Reinitialise.
-
getNextToken
public final Token getNextToken()
Get the next Token.
-
getToken
public final Token getToken(int index)
Get the specific Token.
-
generateParseException
public ParseException generateParseException()
Generate ParseException.
-
enable_tracing
public final void enable_tracing()
Enable tracing.
-
disable_tracing
public final void disable_tracing()
Disable tracing.
-
-