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 java.lang.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
 java.lang.Object evaluate(Context context)
          Return the context bean as a string
static StringExpression getInstance()
          Gets the singleton
 java.lang.String toString()
          Returns something useful for logging.
 void update(Context context, java.lang.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 java.lang.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,
                   java.lang.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 java.lang.String toString()
Returns something useful for logging.

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


Copyright 2002-2008 The Apache Software Foundation. All Rights Reserved.