|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface Expression
An expression capable of evaluating itself against context objects. Encapsulates the details of a previously parsed expression string. Provides a common abstraction for expression evaluation independent of any language like OGNL or the Unified EL.
| Method Summary | ||
|---|---|---|
String |
getExpressionString()
Returns the original string used to create this expression, unmodified. |
|
Object |
getValue()
Evaluate this expression in the default standard context. |
|
|
getValue(Class<T> desiredResultType)
Evaluate the expression in the default standard context. |
|
Object |
getValue(EvaluationContext context)
Evaluate this expression in the provided context and return the result of evaluation. |
|
|
getValue(EvaluationContext context,
Class<T> desiredResultType)
Evaluate the expression in a specified context which can resolve references to properties, methods, types, etc - the type of the evaluation result is expected to be of a particular class and an exception will be thrown if it is not and cannot be converted to that type. |
|
Class |
getValueType()
Returns the most general type that can be passed to the setValue(EvaluationContext, Object) method using
the default context. |
|
Class |
getValueType(EvaluationContext context)
Returns the most general type that can be passed to the setValue(EvaluationContext, Object) method for
the given context. |
|
TypeDescriptor |
getValueTypeDescriptor()
Returns the most general type that can be passed to the setValue(EvaluationContext, Object) method using
the default context. |
|
TypeDescriptor |
getValueTypeDescriptor(EvaluationContext context)
Returns the most general type that can be passed to the setValue(EvaluationContext, Object) method for
the given context. |
|
boolean |
isWritable(EvaluationContext context)
Determine if an expression can be written to, i.e. |
|
void |
setValue(EvaluationContext context,
Object value)
Set this expression in the provided context to the value provided. |
|
| Method Detail |
|---|
Object getValue()
throws EvaluationException
EvaluationException - if there is a problem during evaluation
<T> T getValue(Class<T> desiredResultType)
throws EvaluationException
desiredResultType - the class the caller would like the result to be
EvaluationException - if there is a problem during evaluation
Object getValue(EvaluationContext context)
throws EvaluationException
context - the context in which to evaluate the expression
EvaluationException - if there is a problem during evaluation
<T> T getValue(EvaluationContext context,
Class<T> desiredResultType)
throws EvaluationException
context - the context in which to evaluate the expressiondesiredResultType - the class the caller would like the result to be
EvaluationException - if there is a problem during evaluation
Class getValueType()
throws EvaluationException
setValue(EvaluationContext, Object) method using
the default context.
EvaluationException - if there is a problem determining the type
Class getValueType(EvaluationContext context)
throws EvaluationException
setValue(EvaluationContext, Object) method for
the given context.
context - the context in which to evaluate the expression
EvaluationException - if there is a problem determining the type
TypeDescriptor getValueTypeDescriptor()
throws EvaluationException
setValue(EvaluationContext, Object) method using
the default context.
EvaluationException - if there is a problem determining the type
TypeDescriptor getValueTypeDescriptor(EvaluationContext context)
throws EvaluationException
setValue(EvaluationContext, Object) method for
the given context.
context - the context in which to evaluate the expression
EvaluationException - if there is a problem determining the type
boolean isWritable(EvaluationContext context)
throws EvaluationException
context - the context in which the expression should be checked
EvaluationException - if there is a problem determining if it is writable
void setValue(EvaluationContext context,
Object value)
throws EvaluationException
context - the context in which to set the value of the expressionvalue - the new value
EvaluationException - if there is a problem during evaluationString getExpressionString()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||