public class

StringExpression

extends Object
implements Expression
java.lang.Object
   ↳ org.apache.commons.betwixt.expression.StringExpression

Class Overview

StringExpression returns the current context object as a string.

Summary

Public Constructors
StringExpression()
Base constructor.
Public Methods
Object evaluate(Context context)
Return the context bean as a string
static StringExpression getInstance()
Gets the singleton
String toString()
Returns something useful for logging.
void update(Context context, String newValue)
Do nothing
[Expand]
Inherited Methods
From class java.lang.Object
From interface org.apache.commons.betwixt.expression.Expression

Public Constructors

public StringExpression ()

Base constructor. Should this be private?

Public Methods

public Object evaluate (Context context)

Return the context bean as a string

Parameters
context evaluate expression against this context
Returns
  • the toString() representation of the context bean

public static StringExpression getInstance ()

Gets the singleton

Returns
  • the singleton StringExpression instance

public String toString ()

Returns something useful for logging.

Returns
  • the (short) class name

public void update (Context context, String newValue)

Do nothing

Parameters
context update this Context
newValue the new value for this expression
See Also