org.hprog.code
Class InterpreterFactory
java.lang.Object
|
+--org.hprog.code.InterpreterFactory
- public class InterpreterFactory
- extends java.lang.Object
Creates interpreters by loading classes by name based on languages requested
Method Summary |
static InteractiveInterpreter |
create(java.net.URL base,
java.lang.String lang)
Create an interpreters by constructing an appropriate InteractiveInterpreter instance
with a base URL as its sole constructor parameter |
static void |
init(java.net.URL base)
|
static java.util.Iterator |
languages()
Iterator for all language names supported |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
InterpreterFactory
public InterpreterFactory()
init
public static void init(java.net.URL base)
languages
public static java.util.Iterator languages()
- Iterator for all language names supported
create
public static InteractiveInterpreter create(java.net.URL base,
java.lang.String lang)
- Create an interpreters by constructing an appropriate InteractiveInterpreter instance
with a base URL as its sole constructor parameter
- Parameters:
base
- base URL to use for finding interpreter-specific fileslang
- language code
- Returns:
- an interpreter for the requested language, or null if none exists