Package org.apache.commons.el
Class ArraySuffix
java.lang.Object
org.apache.commons.el.ValueSuffix
org.apache.commons.el.ArraySuffix
- Direct Known Subclasses:
PropertySuffix
Represents an operator that obtains a Map entry, an indexed value, a property value, or an indexed property value of an object. The following are the rules for evaluating this operator:
Evaluating a[b] (assuming a.b == a["b"]) a is null return null b is null return null a is Map !a.containsKey (b) return null a.get(b) == null return null otherwise return a.get(b) a is List or array coerce b to int (using coercion rules) coercion couldn't be performed error a.get(b) or Array.get(a, b) throws ArrayIndexOutOfBoundsException or IndexOutOfBoundsException return null a.get(b) or Array.get(a, b) throws other exception error return a.get(b) or Array.get(a, b) coerce b to String b is a readable property of a getter throws an exception error otherwise return result of getter call otherwise error
- Version:
- $Change: 181177 $$DateTime: 2001/06/26 08:45:09 $$Author: luehe $
- Author:
- Nathan Abramson - Art Technology Group, Shawn Bayern
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionevaluate
(Object pValue, javax.servlet.jsp.el.VariableResolver pResolver, javax.servlet.jsp.el.FunctionMapper functions, Logger pLogger) Evaluates the expression in the given context, operating on the given value.(package private) Object
evaluateIndex
(javax.servlet.jsp.el.VariableResolver pResolver, javax.servlet.jsp.el.FunctionMapper functions, Logger pLogger) Gets the value of the indexReturns the expression in the expression language syntaxgetIndex()
(package private) String
Returns the operator symbolvoid
setIndex
(Expression pIndex)
-
Field Details
-
sNoArgs
-
mIndex
Expression mIndex
-
-
Constructor Details
-
ArraySuffix
Constructor
-
-
Method Details
-
getIndex
-
setIndex
-
evaluateIndex
Object evaluateIndex(javax.servlet.jsp.el.VariableResolver pResolver, javax.servlet.jsp.el.FunctionMapper functions, Logger pLogger) throws javax.servlet.jsp.el.ELException Gets the value of the index- Throws:
javax.servlet.jsp.el.ELException
-
getOperatorSymbol
String getOperatorSymbol()Returns the operator symbol -
getExpressionString
Returns the expression in the expression language syntax- Specified by:
getExpressionString
in classValueSuffix
-
evaluate
public Object evaluate(Object pValue, javax.servlet.jsp.el.VariableResolver pResolver, javax.servlet.jsp.el.FunctionMapper functions, Logger pLogger) throws javax.servlet.jsp.el.ELException Evaluates the expression in the given context, operating on the given value.- Specified by:
evaluate
in classValueSuffix
- Throws:
javax.servlet.jsp.el.ELException
-