Package org.apache.el.lang
Class LambdaExpressionNestedState
- java.lang.Object
-
- org.apache.el.lang.LambdaExpressionNestedState
-
public final class LambdaExpressionNestedState extends java.lang.ObjectStores the state required for correct evaluation of lambda expressions. Lambda expressions may be nested. Correct evaluation requires knowledge not just of the current lambda expression, but also of any nested and nesting expressions.The sets of nodes for parsed expressions are cached and, as a result, a set of nodes may be being used by multiple concurrent threads. This means any state relating to evaluation cannot be stored in the nodes. State is therefore stored in the
EvaluationContextwhich is created, used for a single evaluation and then discarded.
-
-
Constructor Summary
Constructors Constructor Description LambdaExpressionNestedState()Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleangetHasFormalParameters()Returns whether the current lambda expression has formal parameters.intgetNestingCount()Returns the current nesting count.voidincrementNestingCount()Increments the nesting count for nested lambda expressions.voidsetHasFormalParameters()Marks that the current lambda expression has formal parameters.
-
-
-
Method Detail
-
incrementNestingCount
public void incrementNestingCount()
Increments the nesting count for nested lambda expressions.
-
getNestingCount
public int getNestingCount()
Returns the current nesting count.- Returns:
- the nesting count
-
setHasFormalParameters
public void setHasFormalParameters()
Marks that the current lambda expression has formal parameters.
-
getHasFormalParameters
public boolean getHasFormalParameters()
Returns whether the current lambda expression has formal parameters.- Returns:
trueif the lambda has formal parameters
-
-