org.specrunner.expressions.core
Class ExpressionItemValue

java.lang.Object
  extended by org.specrunner.expressions.core.ExpressionItemValue
All Implemented Interfaces:
IExpressionItem

public class ExpressionItemValue
extends Object
implements IExpressionItem

An expression evaluation item.

Author:
Thiago Santos

Field Summary
protected static ThreadLocal<IExpressionItem> instance
          Thread safe instance.
 
Constructor Summary
ExpressionItemValue()
           
 
Method Summary
 Object eval(IExpressionFactory factory, String text, IContext context, boolean silent)
          Defines a generic evaluation method.
static IExpressionItem get()
          Singleton method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

instance

protected static ThreadLocal<IExpressionItem> instance
Thread safe instance.

Constructor Detail

ExpressionItemValue

public ExpressionItemValue()
Method Detail

get

public static IExpressionItem get()
Singleton method.

Returns:
An expression item.

eval

public Object eval(IExpressionFactory factory,
                   String text,
                   IContext context,
                   boolean silent)
            throws ExpressionException
Description copied from interface: IExpressionItem
Defines a generic evaluation method.

Specified by:
eval in interface IExpressionItem
Parameters:
factory - A expression factory.
text - The expression text.
context - The test context.
silent - The silent mode.
Returns:
The resulting value.
Throws:
ExpressionException - On expression errors.


Copyright © 2015. All rights reserved.