|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The classes that implements this interface represent the objects that holds the objects needed for interpretation.
Method Summary | |
void |
addClassPath(java.lang.String path)
Adds a class search path |
void |
addClassURL(java.net.URL url)
Adds a class search URL |
void |
addLibraryPath(java.lang.String path)
Adds a library search path |
void |
addLibrarySuffix(java.lang.String s)
Adds a library file suffix |
java.lang.Class |
defineClass(java.lang.String name,
byte[] code)
Converts an array of bytes into an instance of class Class |
void |
defineVariable(java.lang.String name,
java.lang.Object value)
Defines a variable in the interpreter environment |
boolean |
getAccessible()
Observe the state of calls to setAccessible() |
java.lang.ClassLoader |
getClassLoader()
Gets the class loader |
java.util.Set |
getClassNames()
Returns the defined class names |
LibraryFinder |
getLibraryFinder()
Gets the library finder |
ParserFactory |
getParserFactory()
Gets the parser factory |
java.lang.Object |
getVariable(java.lang.String name)
Gets the value of a variable |
java.lang.Class |
getVariableClass(java.lang.String name)
Gets the class of a variable |
java.util.Set |
getVariableNames()
Returns the defined variable names |
java.lang.Object |
interpret(java.io.InputStream is,
java.lang.String fname)
Runs the interpreter |
java.lang.Object |
interpret(java.io.Reader r,
java.lang.String fname)
Runs the interpreter |
java.lang.Object |
interpret(java.lang.String fname)
Runs the interpreter |
java.lang.Class |
loadClass(java.lang.String name)
Loads an interpreted class |
void |
setAccessible(boolean accessible)
Set the interpreter contexts to override public/protected/private access restrictions on the methods and fields it handles. |
void |
setVariable(java.lang.String name,
java.lang.Object value)
Sets the value a variable |
Method Detail |
public java.lang.Object interpret(java.io.InputStream is, java.lang.String fname) throws InterpreterException
is
- the input stream from which the statements are readfname
- the name of the parsed stream
InterpreterException
public java.lang.Object interpret(java.io.Reader r, java.lang.String fname) throws InterpreterException
r
- the readerfname
- the name of the parsed stream
InterpreterException
public java.lang.Object interpret(java.lang.String fname) throws InterpreterException, java.io.IOException
fname
- the name of a file to interpret
InterpreterException
java.io.IOException
public void defineVariable(java.lang.String name, java.lang.Object value)
name
- the variable's namevalue
- the initial value of the variable
java.lang.IllegalStateException
- if name is already definedpublic void setVariable(java.lang.String name, java.lang.Object value)
name
- the variable's namevalue
- the value of the variable
java.lang.IllegalStateException
- if the assignment is invalidpublic java.lang.Object getVariable(java.lang.String name)
name
- the variable's name
java.lang.IllegalStateException
- if the variable do not existpublic java.lang.Class getVariableClass(java.lang.String name)
name
- the variable's name
java.lang.IllegalStateException
- if the variable do not existpublic java.util.Set getVariableNames()
public java.util.Set getClassNames()
public void setAccessible(boolean accessible)
public boolean getAccessible()
public void addClassPath(java.lang.String path)
path
- the path to addpublic void addClassURL(java.net.URL url)
url
- the url to addpublic void addLibraryPath(java.lang.String path)
path
- the path to addpublic void addLibrarySuffix(java.lang.String s)
s
- the suffix to addpublic java.lang.Class loadClass(java.lang.String name) throws java.lang.ClassNotFoundException
java.lang.ClassNotFoundException
- if the class cannot be findpublic java.lang.Class defineClass(java.lang.String name, byte[] code)
java.lang.ClassFormatError
- if the class could not be definedpublic java.lang.ClassLoader getClassLoader()
public LibraryFinder getLibraryFinder()
public ParserFactory getParserFactory()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |