Each piece will be an Expression, but pure text parts of the
template will be represented as LiteralExpression objects. An example
of a template expression might be:
"Hello ${getName()}"
which will be represented as a CompositeStringExpression of two parts:
the first part being a LiteralExpression representing 'Hello ' and the
second part being a real expression that will call getName() when invoked.
| Modifier and Type | Field and Description |
|---|---|
| private final Expression[] | expressions
The array of expressions that make up the composite expression. |
| private final String |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public final Expression[] | |
| public final String | getExpressionString()
Implements org. |
| public String | getValue()
Implements org. |
| public <T> T | getValue(Class<T>
the type the caller would like the result to be expectedResultType)Implements org. |
| public String | getValue(Object
the root object against which to evaluate the expression rootObject)Implements org. |
| public <T> T | getValue(Object
the root object against which to evaluate the expression rootObject, Class<T> the type the caller would like the result to be desiredResultType)Implements org. |
| public String | getValue(EvaluationContext
the context in which to evaluate the expression context)Implements org. |
| public <T> T | getValue(EvaluationContext
the context in which to evaluate the expression context, Class<T> the type the caller would like the result to be expectedResultType)Implements org. |
| public String | getValue(EvaluationContext
the context in which to evaluate the expression context, Object the root object against which to evaluate the expression rootObject)Implements org. |
| public <T> T | getValue(EvaluationContext
the context in which to evaluate the expression context, Object the root object against which to evaluate the expression rootObject, Class<T> the type the caller would like the result to be desiredResultType)Implements org. The supplied root object overrides any specified in the supplied context. |
| public Class | getValueType()
Implements org. setValue(EvaluationContext, Object) method using the default context.
|
| public Class | getValueType(EvaluationContext
the context in which to evaluate the expression context)Implements org. setValue(EvaluationContext, Object) method for the given context.
|
| public Class | getValueType(Object
the root object against which to evaluate the expression rootObject)Implements org. setValue(Object, Object) method using the default context.
|
| public Class | getValueType(EvaluationContext
the context in which to evaluate the expression context, Object the root object against which to evaluate the expression rootObject)Implements org. setValue(EvaluationContext, Object, Object) method for the given
context.
|
| public TypeDescriptor | getValueTypeDescriptor()
Implements org. setValue(...) methods using the default context.
|
| public TypeDescriptor | getValueTypeDescriptor(Object
the root object against which to evaluate the expression rootObject)Implements org. setValue(Object, Object) method using the default context.
|
| public TypeDescriptor | getValueTypeDescriptor(EvaluationContext
the context in which to evaluate the expression context)Implements org. setValue(EvaluationContext, Object) method for the given context.
|
| public TypeDescriptor | getValueTypeDescriptor(EvaluationContext
the context in which to evaluate the expression context, Object the root object against which to evaluate the expression rootObject)Implements org. setValue(EvaluationContext, Object, Object) method for the given
context.
|
| public boolean | isWritable(Object
the root object against which to evaluate the expression rootObject)Implements org. |
| public boolean | isWritable(EvaluationContext
the context in which the expression should be checked context)Implements org. |
| public boolean | isWritable(EvaluationContext
the context in which the expression should be checked context, Object the root object against which to evaluate the expression rootObject)Implements org. |
| public void | setValue(Object
the root object against which to evaluate the expression rootObject, Object the new value value)Implements org. |
| public void | setValue(EvaluationContext
the context in which to set the value of the expression context, Object the new value value)Implements org. |
| public void | setValue(EvaluationContext
the context in which to set the value of the expression context, Object the root object against which to evaluate the expression rootObject, Object the new value value)Implements org. |
| expressions | back to summary |
|---|---|
| private final Expression[] expressions The array of expressions that make up the composite expression. | |
| expressionString | back to summary |
|---|---|
| private final String expressionString | |
| CompositeStringExpression | back to summary |
|---|---|
| public CompositeStringExpression(String expressionString, Expression[] expressions) | |
| getExpressions | back to summary |
|---|---|
| public final Expression[] getExpressions() | |
| getExpressionString | back to summary |
|---|---|
| public final String getExpressionString() Implements org. Doc from org. Return the original string used to create this expression (unmodified). | |
| getValue | back to summary |
|---|---|
| public String getValue() throws EvaluationException Implements org. Doc from org. Evaluate this expression in the default standard context.
| |
| getValue | back to summary |
|---|---|
| public <T> T getValue(Class<T> expectedResultType) throws EvaluationException Implements org. Doc from org. Evaluate this expression in the default context. If the result of the evaluation does not match (and cannot be converted to) the expected result type then an exception will be thrown.
| |
| getValue | back to summary |
|---|---|
| public String getValue(Object rootObject) throws EvaluationException Implements org. Doc from org. Evaluate this expression against the specified root object.
| |
| getValue | back to summary |
|---|---|
| public <T> T getValue(Object rootObject, Class<T> desiredResultType) throws EvaluationException Implements org. Doc from org. Evaluate this expression in the default context against the specified root object. If the result of the evaluation does not match (and cannot be converted to) the expected result type then an exception will be thrown.
| |
| getValue | back to summary |
|---|---|
| public String getValue(EvaluationContext context) throws EvaluationException Implements org. Doc from org. Evaluate this expression in the provided context and return the result of evaluation.
| |
| getValue | back to summary |
|---|---|
| public <T> T getValue(EvaluationContext context, Class<T> expectedResultType) throws EvaluationException Implements org. Doc from org. Evaluate this expression in the provided context which can resolve references to properties, methods, types, etc. The type of the evaluation result is expected to be of a particular type, and an exception will be thrown if it is not and cannot be converted to that type.
| |
| getValue | back to summary |
|---|---|
| public String getValue(EvaluationContext context, Object rootObject) throws EvaluationException Implements org. Doc from org. 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.
| |
| getValue | back to summary |
|---|---|
| public <T> T getValue(EvaluationContext context, Object rootObject, Class<T> desiredResultType) throws EvaluationException Implements org. Doc from org. Evaluate this expression in the provided context which can resolve references to properties, methods, types, etc. The type of the evaluation result is expected to be of a particular type, and an exception will be thrown if it is not and cannot be converted to that type.j The supplied root object overrides any specified in the supplied context.
| |
| getValueType | back to summary |
|---|---|
| public Class Implements org. Doc from org. Return the most general type that can be passed to the
| |
| getValueType | back to summary |
|---|---|
| public Class Implements org. Doc from org. Return the most general type that can be passed to the
| |
| getValueType | back to summary |
|---|---|
| public Class Implements org. Doc from org. Return the most general type that can be passed to the
| |
| getValueType | back to summary |
|---|---|
| public Class Implements org. Doc from org. Return the most general type that can be passed to the
The supplied root object overrides any specified in the supplied context.
| |
| getValueTypeDescriptor | back to summary |
|---|---|
| public TypeDescriptor getValueTypeDescriptor() Implements org. Doc from org. Return a descriptor for the most general type that can be passed to one of
the
| |
| getValueTypeDescriptor | back to summary |
|---|---|
| public TypeDescriptor getValueTypeDescriptor(Object rootObject) throws EvaluationException Implements org. Doc from org. Return a descriptor for the most general type that can be passed to the
| |
| getValueTypeDescriptor | back to summary |
|---|---|
| public TypeDescriptor getValueTypeDescriptor(EvaluationContext context) Implements org. Doc from org. Return a descriptor for the most general type that can be passed to the
| |
| getValueTypeDescriptor | back to summary |
|---|---|
| public TypeDescriptor getValueTypeDescriptor(EvaluationContext context, Object rootObject) throws EvaluationException Implements org. Doc from org. Return a descriptor for the most general type that can be passed to the
The supplied root object overrides any specified in the supplied context.
| |
| isWritable | back to summary |
|---|---|
| public boolean isWritable(Object rootObject) throws EvaluationException Implements org. Doc from org. Determine if this expression can be written to, i.e. setValue() can be called.
| |
| isWritable | back to summary |
|---|---|
| public boolean isWritable(EvaluationContext context) Implements org. Doc from org. Determine if this expression can be written to, i.e. setValue() can be called.
| |
| isWritable | back to summary |
|---|---|
| public boolean isWritable(EvaluationContext context, Object rootObject) throws EvaluationException Implements org. Doc from org. Determine if this expression can be written to, i.e. setValue() can be called. The supplied root object overrides any specified in the supplied context.
| |
| setValue | back to summary |
|---|---|
| public void setValue(Object rootObject, Object value) throws EvaluationException Implements org. Doc from org. Set this expression in the provided context to the value provided.
| |
| setValue | back to summary |
|---|---|
| public void setValue(EvaluationContext context, Object value) throws EvaluationException Implements org. Doc from org. Set this expression in the provided context to the value provided.
| |
| setValue | back to summary |
|---|---|
| public void setValue(EvaluationContext context, Object rootObject, Object value) throws EvaluationException Implements org. Doc from org. Set this expression in the provided context to the value provided. The supplied root object overrides any specified in the supplied context.
| |