class InternalSpelExpressionParser extends TemplateAwareExpressionParser
Modifier and Type | Field and Description |
---|---|
private SpelParserConfiguration |
configuration |
private java.util.Deque<SpelNodeImpl> |
constructedNodes |
private java.lang.String |
expressionString |
private java.util.List<Token> |
tokenStream |
private int |
tokenStreamLength |
private int |
tokenStreamPointer |
private static java.util.regex.Pattern |
VALID_QUALIFIED_ID_PATTERN |
Constructor and Description |
---|
InternalSpelExpressionParser(SpelParserConfiguration configuration)
Create a parser with some configured behavior.
|
Modifier and Type | Method and Description |
---|---|
private void |
checkLeftOperand(Token token,
SpelNodeImpl operandExpression) |
private void |
checkOperands(Token token,
SpelNodeImpl left,
SpelNodeImpl right) |
private void |
checkRightOperand(Token token,
SpelNodeImpl operandExpression) |
private void |
consumeArguments(java.util.List<SpelNodeImpl> accumulatedArguments)
Used for consuming arguments for either a method or a constructor call.
|
protected SpelExpression |
doParseExpression(java.lang.String expressionString,
ParserContext context)
Actually parse the expression string and return an Expression object.
|
private void |
eatConstructorArgs(java.util.List<SpelNodeImpl> accumulatedArguments) |
private SpelNodeImpl |
eatDottedNode() |
private SpelNodeImpl |
eatExpression() |
private SpelNodeImpl |
eatLogicalAndExpression() |
private SpelNodeImpl |
eatLogicalOrExpression() |
private SpelNodeImpl |
eatNode() |
private SpelNodeImpl |
eatNonDottedNode() |
private SpelNodeImpl |
eatPossiblyQualifiedId()
Eat an identifier, possibly qualified (meaning that it is dotted).
|
private SpelNodeImpl |
eatPowerIncDecExpression() |
private SpelNodeImpl |
eatPrimaryExpression() |
private SpelNodeImpl |
eatProductExpression() |
private SpelNodeImpl |
eatRelationalExpression() |
private SpelNodeImpl |
eatStartNode() |
private SpelNodeImpl |
eatSumExpression() |
private Token |
eatToken(TokenKind expectedKind) |
private SpelNodeImpl |
eatUnaryExpression() |
private InternalParseException |
internalException(int startPos,
SpelMessage message,
java.lang.Object... inserts) |
private boolean |
isValidQualifiedId(Token node) |
private boolean |
maybeEatBeanReference() |
private boolean |
maybeEatConstructorReference() |
private boolean |
maybeEatFunctionOrVar() |
private boolean |
maybeEatIndexer() |
private boolean |
maybeEatInlineListOrMap() |
private boolean |
maybeEatLiteral() |
private SpelNodeImpl[] |
maybeEatMethodArgs() |
private boolean |
maybeEatMethodOrProperty(boolean nullSafeNavigation) |
private boolean |
maybeEatNullReference() |
private boolean |
maybeEatParenExpression() |
private boolean |
maybeEatProjection(boolean nullSafeNavigation) |
private Token |
maybeEatRelationalOperator() |
private boolean |
maybeEatSelection(boolean nullSafeNavigation) |
private boolean |
maybeEatTypeReference() |
private Token |
nextToken() |
private boolean |
peekIdentifierToken(java.lang.String identifierString) |
private boolean |
peekSelectToken() |
private Token |
peekToken() |
private boolean |
peekToken(TokenKind desiredTokenKind) |
private boolean |
peekToken(TokenKind desiredTokenKind,
boolean consumeIfMatched) |
private boolean |
peekToken(TokenKind possible1,
TokenKind possible2) |
private boolean |
peekToken(TokenKind possible1,
TokenKind possible2,
TokenKind possible3) |
private SpelNodeImpl |
pop() |
private int |
positionOf(Token t) |
private void |
push(SpelNodeImpl newNode) |
private Token |
takeToken() |
java.lang.String |
toString(Token t) |
parseExpression, parseExpression
private static final java.util.regex.Pattern VALID_QUALIFIED_ID_PATTERN
private final SpelParserConfiguration configuration
private final java.util.Deque<SpelNodeImpl> constructedNodes
private java.lang.String expressionString
private java.util.List<Token> tokenStream
private int tokenStreamLength
private int tokenStreamPointer
public InternalSpelExpressionParser(SpelParserConfiguration configuration)
configuration
- custom configuration optionsprotected SpelExpression doParseExpression(java.lang.String expressionString, @Nullable ParserContext context) throws ParseException
TemplateAwareExpressionParser
doParseExpression
in class TemplateAwareExpressionParser
expressionString
- the raw expression string to parsecontext
- a context for influencing this expression parsing routine (optional)ParseException
- an exception occurred during parsing@Nullable private SpelNodeImpl eatExpression()
@Nullable private SpelNodeImpl eatLogicalOrExpression()
@Nullable private SpelNodeImpl eatLogicalAndExpression()
@Nullable private SpelNodeImpl eatRelationalExpression()
@Nullable private SpelNodeImpl eatSumExpression()
@Nullable private SpelNodeImpl eatProductExpression()
@Nullable private SpelNodeImpl eatPowerIncDecExpression()
@Nullable private SpelNodeImpl eatUnaryExpression()
@Nullable private SpelNodeImpl eatPrimaryExpression()
@Nullable private SpelNodeImpl eatNode()
@Nullable private SpelNodeImpl eatNonDottedNode()
private SpelNodeImpl eatDottedNode()
private boolean maybeEatFunctionOrVar()
@Nullable private SpelNodeImpl[] maybeEatMethodArgs()
private void eatConstructorArgs(java.util.List<SpelNodeImpl> accumulatedArguments)
private void consumeArguments(java.util.List<SpelNodeImpl> accumulatedArguments)
@Nullable private SpelNodeImpl eatStartNode()
private boolean maybeEatBeanReference()
private boolean maybeEatTypeReference()
private boolean maybeEatNullReference()
private boolean maybeEatProjection(boolean nullSafeNavigation)
private boolean maybeEatInlineListOrMap()
private boolean maybeEatIndexer()
private boolean maybeEatSelection(boolean nullSafeNavigation)
private SpelNodeImpl eatPossiblyQualifiedId()
private boolean maybeEatMethodOrProperty(boolean nullSafeNavigation)
private boolean maybeEatConstructorReference()
private void push(SpelNodeImpl newNode)
private SpelNodeImpl pop()
private boolean maybeEatLiteral()
private boolean maybeEatParenExpression()
private boolean peekToken(TokenKind desiredTokenKind)
private boolean peekToken(TokenKind desiredTokenKind, boolean consumeIfMatched)
private boolean peekIdentifierToken(java.lang.String identifierString)
private boolean peekSelectToken()
private Token takeToken()
private void checkOperands(Token token, @Nullable SpelNodeImpl left, @Nullable SpelNodeImpl right)
private void checkLeftOperand(Token token, @Nullable SpelNodeImpl operandExpression)
private void checkRightOperand(Token token, @Nullable SpelNodeImpl operandExpression)
private InternalParseException internalException(int startPos, SpelMessage message, java.lang.Object... inserts)