spring-framework / org.springframework.expression.common / CompositeStringExpression

CompositeStringExpression

open class CompositeStringExpression : Expression

Represents a template expression broken into pieces. Each piece will be an Expression but pure text parts to 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.

Author
Andy Clement

Author
Juergen Hoeller

Since
3.0

Constructors

<init>

CompositeStringExpression(expressionString: String, expressions: Array<Expression>)

Functions

getExpressionString

fun getExpressionString(): String

getExpressions

fun getExpressions(): Array<Expression>

getValue

open fun getValue(): String
open fun <T : Any> getValue(expectedResultType: Class<T>): T
open fun getValue(rootObject: Any): String
open fun <T : Any> getValue(rootObject: Any, desiredResultType: Class<T>): T
open fun getValue(context: EvaluationContext): String
open fun <T : Any> getValue(context: EvaluationContext, expectedResultType: Class<T>): T
open fun getValue(context: EvaluationContext, rootObject: Any): String
open fun <T : Any> getValue(context: EvaluationContext, rootObject: Any, desiredResultType: Class<T>): T

getValueType

open fun getValueType(): Class<*>
open fun getValueType(context: EvaluationContext): Class<*>
open fun getValueType(rootObject: Any): Class<*>
open fun getValueType(context: EvaluationContext, rootObject: Any): Class<*>

getValueTypeDescriptor

open fun getValueTypeDescriptor(): TypeDescriptor
open fun getValueTypeDescriptor(rootObject: Any): TypeDescriptor
open fun getValueTypeDescriptor(context: EvaluationContext): TypeDescriptor
open fun getValueTypeDescriptor(context: EvaluationContext, rootObject: Any): TypeDescriptor

isWritable

open fun isWritable(rootObject: Any): Boolean
open fun isWritable(context: EvaluationContext): Boolean
open fun isWritable(context: EvaluationContext, rootObject: Any): Boolean

setValue

open fun setValue(rootObject: Any, value: Any): Unit
open fun setValue(context: EvaluationContext, value: Any): Unit
open fun setValue(context: EvaluationContext, rootObject: Any, value: Any): Unit