org.apache.commons.betwixt.expression
Class StringExpression

java.lang.Object
  extended by org.apache.commons.betwixt.expression.StringExpression
All Implemented Interfaces:
Expression

public class StringExpression
extends Object
implements Expression

StringExpression returns the current context object as a string.

Version:
$Revision: 438373 $
Author:
James Strachan

Constructor Summary
StringExpression()
          Base constructor.
 
Method Summary
 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StringExpression

public StringExpression()
Base constructor. Should this be private?

Method Detail

getInstance

public static StringExpression getInstance()
Gets the singleton

Returns:
the singleton StringExpression instance

evaluate

public Object evaluate(Context context)
Return the context bean as a string

Specified by:
evaluate in interface Expression
Parameters:
context - evaluate expression against this context
Returns:
the toString() representation of the context bean

update

public void update(Context context,
                   String newValue)
Do nothing

Specified by:
update in interface Expression
Parameters:
context - update this Context
newValue - the new value for this expression
See Also:
Expression

toString

public String toString()
Returns something useful for logging.

Overrides:
toString in class Object
Returns:
the (short) class name


Copyright © 2002-2010 Apache Software Foundation. All Rights Reserved.