|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.expression.spel.ast.SpelNodeImpl org.springframework.expression.spel.ast.Elvis
public class Elvis
Represents the elvis operator ?:. For an expression "a?:b" if a is not null, the value of the expression is "a", if a is null then the value of the expression is "b".
Field Summary |
---|
Fields inherited from class org.springframework.expression.spel.ast.SpelNodeImpl |
---|
children, pos |
Constructor Summary | |
---|---|
Elvis(int pos,
SpelNodeImpl... args)
|
Method Summary | |
---|---|
TypedValue |
getValueInternal(ExpressionState state)
Evaluate the condition and if not null, return it. |
java.lang.String |
toStringAST()
|
Methods inherited from class org.springframework.expression.spel.ast.SpelNodeImpl |
---|
getChild, getChildCount, getEndPosition, getObjectClass, getPreviousChild, getStartPosition, getTypedValue, getValue, getValue, isWritable, nextChildIs, setValue |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Elvis(int pos, SpelNodeImpl... args)
Method Detail |
---|
public TypedValue getValueInternal(ExpressionState state) throws EvaluationException
getValueInternal
in class SpelNodeImpl
state
- the expression state
EvaluationException
- if the condition does not evaluate correctly to a boolean or there is a problem
executing the chosen alternativepublic java.lang.String toStringAST()
toStringAST
in interface SpelNode
toStringAST
in class SpelNodeImpl
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |