|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Interpreter
A high level interface that represents an interpreter engine for a particular scripting language.
Method Summary | |
---|---|
void |
bindObject(String name,
Object object)
This method should register a particular Java Object in
the environment of the interpreter. |
void |
dispose()
This method can dispose resources used by the interpreter when it is no longer used. |
Object |
evaluate(Reader scriptreader)
This method should evaluate a piece of script. |
Object |
evaluate(Reader scriptreader,
String description)
This method should evaluate a piece of script associated to a given description. |
Object |
evaluate(String script)
This method should evaluate a piece of script using a String
instead of a Reader . |
String[] |
getMimeTypes()
Returns the content types of the scripting languages this interpreter handles. |
void |
setOut(Writer output)
This method should change the output Writer that will be
used when output function of the scripting langage is used. |
Methods inherited from interface org.apache.batik.i18n.Localizable |
---|
formatMessage, getLocale, setLocale |
Method Detail |
---|
String[] getMimeTypes()
Object evaluate(Reader scriptreader, String description) throws InterpreterException, IOException
scriptreader
- a java.io.Reader
on the piece of scriptdescription
- description which can be later used (e.g., for error
messages).
InterpreterException
IOException
Object evaluate(Reader scriptreader) throws InterpreterException, IOException
scriptreader
- a java.io.Reader
on the piece of script
InterpreterException
IOException
Object evaluate(String script) throws InterpreterException
String
instead of a Reader
. This usually allows do easily do some
caching.
script
- the piece of script
InterpreterException
void bindObject(String name, Object object)
Object
in
the environment of the interpreter.
name
- the name of the script object to createobject
- the Java objectvoid setOut(Writer output)
Writer
that will be
used when output function of the scripting langage is used.
output
- the new out Writer
.void dispose()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |