javax.script
Interface Compilable


public interface Compilable

See Javadoc of Java Scripting API


Method Summary
 CompiledScript compile(java.io.Reader reader)
          Retruns a CompileScript implementation for the script obtained using java.io.Reader as the script source.
 CompiledScript compile(java.lang.String script)
          Returns a CompileScript implementation for the given piece of script which is a abstraction for the intermediate code produced by the compilation.
 

Method Detail

compile

CompiledScript compile(java.lang.String script)
                       throws ScriptException
Returns a CompileScript implementation for the given piece of script which is a abstraction for the intermediate code produced by the compilation.

Parameters:
script - the source of the script represented as String
Returns:
an implementation of CompileScript which can be used to re-execute intermediate code produced by the compilation of script
Throws:
ScriptException - if the compilation fials due to any reason

compile

CompiledScript compile(java.io.Reader reader)
                       throws ScriptException
Retruns a CompileScript implementation for the script obtained using java.io.Reader as the script source.

Parameters:
reader - the reader form which the script source is obtained
Returns:
an implementation of CompileScript which can be used to re-execute intermediate code produced by the compilation of script
Throws:
ScriptException - if the compilation fials due to any reason


Copyright © 1999-2008 Apache Software Foundation. All Rights Reserved.