org.oddjob.script
Class NotPreCompiled

java.lang.Object
  extended by org.oddjob.script.NotPreCompiled
All Implemented Interfaces:
Evaluatable

public class NotPreCompiled
extends Object
implements Evaluatable

Provide an Evaluatable for a not compile ScriptEngine.

Author:
rob

Constructor Summary
NotPreCompiled(ScriptEngine engine, Reader reader)
           
 
Method Summary
 Object eval()
          Evaluate the evaluatable.
 Object get(String key)
          Get a bean from the engines bindings.
 void put(String key, Object value)
          Add a bean
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NotPreCompiled

public NotPreCompiled(ScriptEngine engine,
                      Reader reader)
Method Detail

eval

public Object eval()
            throws ScriptException
Description copied from interface: Evaluatable
Evaluate the evaluatable.

Specified by:
eval in interface Evaluatable
Returns:
The object returned by the script or null if the script does not return a value.
Throws:
ScriptException

get

public Object get(String key)
Description copied from interface: Evaluatable
Get a bean from the engines bindings.

Specified by:
get in interface Evaluatable
Parameters:
key - The scripts variable name.
Returns:
The bean if one of the name exists.

put

public void put(String key,
                Object value)
Description copied from interface: Evaluatable
Add a bean

Specified by:
put in interface Evaluatable