public interface Expression
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getExpressionString()
Returns the original string used to create this expression, unmodified.
|
java.lang.Object |
getValue()
Evaluate this expression in the default standard context.
|
<T> T |
getValue(java.lang.Class<T> desiredResultType)
Evaluate the expression in the default context.
|
java.lang.Object |
getValue(EvaluationContext context)
Evaluate this expression in the provided context and return the result of evaluation.
|
<T> T |
getValue(EvaluationContext context,
java.lang.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.
|
java.lang.Object |
getValue(EvaluationContext context,
java.lang.Object rootObject)
Evaluate this expression in the provided context and return the result of evaluation, but use
the supplied root context as an override for any default root object specified in the context.
|
<T> T |
getValue(EvaluationContext context,
java.lang.Object rootObject,
java.lang.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.
|
java.lang.Object |
getValue(java.lang.Object rootObject)
Evaluate this expression against the specified root object
|
<T> T |
getValue(java.lang.Object rootObject,
java.lang.Class<T> desiredResultType)
Evaluate the expression in the default context against the specified root object.
|
java.lang.Class |
getValueType()
Returns the most general type that can be passed to the
setValue(EvaluationContext, Object)
method using the default context. |
java.lang.Class |
getValueType(EvaluationContext context)
Returns the most general type that can be passed to the
setValue(EvaluationContext, Object)
method for the given context. |
java.lang.Class |
getValueType(EvaluationContext context,
java.lang.Object rootObject)
Returns the most general type that can be passed to the
setValue(EvaluationContext, Object)
method for the given context. |
java.lang.Class |
getValueType(java.lang.Object rootObject)
Returns the most general type that can be passed to the
setValue(EvaluationContext, Object)
method using the default 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. |
TypeDescriptor |
getValueTypeDescriptor(EvaluationContext context,
java.lang.Object rootObject)
Returns the most general type that can be passed to the
setValue(EvaluationContext, Object) method for
the given context. |
TypeDescriptor |
getValueTypeDescriptor(java.lang.Object rootObject)
Returns the most general type that can be passed to the
setValue(EvaluationContext, Object)
method using the default context. |
boolean |
isWritable(EvaluationContext context)
Determine if an expression can be written to, i.e.
|
boolean |
isWritable(EvaluationContext context,
java.lang.Object rootObject)
Determine if an expression can be written to, i.e.
|
boolean |
isWritable(java.lang.Object rootObject)
Determine if an expression can be written to, i.e.
|
void |
setValue(EvaluationContext context,
java.lang.Object value)
Set this expression in the provided context to the value provided.
|
void |
setValue(EvaluationContext context,
java.lang.Object rootObject,
java.lang.Object value)
Set this expression in the provided context to the value provided.
|
void |
setValue(java.lang.Object rootObject,
java.lang.Object value)
Set this expression in the provided context to the value provided.
|
java.lang.Object getValue() throws EvaluationException
EvaluationException
- if there is a problem during evaluationjava.lang.Object getValue(java.lang.Object rootObject) throws EvaluationException
rootObject
- the root object against which properties/etc will be resolvedEvaluationException
- if there is a problem during evaluation<T> T getValue(java.lang.Class<T> desiredResultType) throws EvaluationException
desiredResultType
- the class the caller would like the result to beEvaluationException
- if there is a problem during evaluation<T> T getValue(java.lang.Object rootObject, java.lang.Class<T> desiredResultType) throws EvaluationException
rootObject
- the root object against which properties/etc will be resolveddesiredResultType
- the class the caller would like the result to beEvaluationException
- if there is a problem during evaluationjava.lang.Object getValue(EvaluationContext context) throws EvaluationException
context
- the context in which to evaluate the expressionEvaluationException
- if there is a problem during evaluationjava.lang.Object getValue(EvaluationContext context, java.lang.Object rootObject) throws EvaluationException
context
- the context in which to evaluate the expressionrootObject
- the root object against which properties/etc will be resolvedEvaluationException
- if there is a problem during evaluation<T> T getValue(EvaluationContext context, java.lang.Class<T> desiredResultType) throws EvaluationException
context
- the context in which to evaluate the expressiondesiredResultType
- the class the caller would like the result to beEvaluationException
- if there is a problem during evaluation<T> T getValue(EvaluationContext context, java.lang.Object rootObject, java.lang.Class<T> desiredResultType) throws EvaluationException
context
- the context in which to evaluate the expressionrootObject
- the root object against which properties/etc will be resolveddesiredResultType
- the class the caller would like the result to beEvaluationException
- if there is a problem during evaluationjava.lang.Class getValueType() throws EvaluationException
setValue(EvaluationContext, Object)
method using the default context.EvaluationException
- if there is a problem determining the typejava.lang.Class getValueType(java.lang.Object rootObject) throws EvaluationException
setValue(EvaluationContext, Object)
method using the default context.rootObject
- the root object against which to evaluate the expressionEvaluationException
- if there is a problem determining the typejava.lang.Class getValueType(EvaluationContext context) throws EvaluationException
setValue(EvaluationContext, Object)
method for the given context.context
- the context in which to evaluate the expressionEvaluationException
- if there is a problem determining the typejava.lang.Class getValueType(EvaluationContext context, java.lang.Object rootObject) throws EvaluationException
setValue(EvaluationContext, Object)
method for the given context. The supplied root object overrides any specified in the context.context
- the context in which to evaluate the expressionrootObject
- the root object against which to evaluate the expressionEvaluationException
- if there is a problem determining the typeTypeDescriptor getValueTypeDescriptor() throws EvaluationException
setValue(EvaluationContext, Object)
method using the default context.EvaluationException
- if there is a problem determining the typeTypeDescriptor getValueTypeDescriptor(java.lang.Object rootObject) throws EvaluationException
setValue(EvaluationContext, Object)
method using the default context.rootObject
- the root object against which to evaluate the expressionEvaluationException
- if there is a problem determining the typeTypeDescriptor getValueTypeDescriptor(EvaluationContext context) throws EvaluationException
setValue(EvaluationContext, Object)
method for the given context.context
- the context in which to evaluate the expressionEvaluationException
- if there is a problem determining the typeTypeDescriptor getValueTypeDescriptor(EvaluationContext context, java.lang.Object rootObject) throws EvaluationException
setValue(EvaluationContext, Object)
method for
the given context. The supplied root object overrides any specified in the context.context
- the context in which to evaluate the expressionrootObject
- the root object against which to evaluate the expressionEvaluationException
- if there is a problem determining the typeboolean isWritable(EvaluationContext context) throws EvaluationException
context
- the context in which the expression should be checkedEvaluationException
- if there is a problem determining if it is writableboolean isWritable(EvaluationContext context, java.lang.Object rootObject) throws EvaluationException
context
- the context in which the expression should be checkedrootObject
- the root object against which to evaluate the expressionEvaluationException
- if there is a problem determining if it is writableboolean isWritable(java.lang.Object rootObject) throws EvaluationException
rootObject
- the root object against which to evaluate the expressionEvaluationException
- if there is a problem determining if it is writablevoid setValue(EvaluationContext context, java.lang.Object value) throws EvaluationException
context
- the context in which to set the value of the expressionvalue
- the new valueEvaluationException
- if there is a problem during evaluationvoid setValue(java.lang.Object rootObject, java.lang.Object value) throws EvaluationException
rootObject
- the root object against which to evaluate the expressionvalue
- the new valueEvaluationException
- if there is a problem during evaluationvoid setValue(EvaluationContext context, java.lang.Object rootObject, java.lang.Object value) throws EvaluationException
context
- the context in which to set the value of the expressionrootObject
- the root object against which to evaluate the expressionvalue
- the new valueEvaluationException
- if there is a problem during evaluationjava.lang.String getExpressionString()