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

LiteralExpression

open class LiteralExpression : Expression

A very simple hardcoded implementation of the Expression interface that represents a string literal. It is used with CompositeStringExpression when representing a template expression which is made up of pieces - some being real expressions to be handled by an EL implementation like SpEL, and some being just textual elements.

Author
Andy Clement

Author
Juergen Hoeller

Since
3.0

Constructors

<init>

LiteralExpression(literalValue: String)

Functions

getExpressionString

fun getExpressionString(): String

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(context: EvaluationContext): Class<*>
open fun getValueType(): 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