public interface JavaScriptExecutor
| Modifier and Type | Method and Description |
|---|---|
void |
addCallScript(String source) |
void |
addGlobalFunction(String name,
Object object) |
void |
addGlobalFunction(String name,
Object object,
String method) |
void |
addScriptFile(String file) |
void |
addScriptFile(URL url) |
void |
addScriptSource(String source,
String name) |
void |
dispose() |
void |
run(Reader input,
Writer output) |
void addGlobalFunction(String name, Object object)
name - The name to use of method to make availableobject - The object to make globally available in the environmentvoid addGlobalFunction(String name, Object object, String method)
name - The name to use of method to make availableobject - The object to make globally available in the environmentmethod - The name of the method to publishvoid addScriptSource(String source, String name)
source - The source code of a script to addname - The name of the source for debugging/error reportingvoid addScriptFile(String file)
file - The path of the file to addvoid addCallScript(String source)
source - The source script to evaluate. This should contain %s
where the reader input should be placed.void run(Reader input, Writer output) throws IOException
input - The execution input parametersoutput - The execution resultIOExceptionvoid dispose()
Copyright © 2013. All Rights Reserved.