|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnl.tudelft.simulation.dsol.interpreter.Interpreter
public final class Interpreter
The Java interpreter.
(c) copyright 2002-2005 Delft
University of Technology , the Netherlands.
See for project information www.simulation.tudelft.nl
License of use: Lesser
General Public License (LGPL) , no warranty.
Field Summary | |
---|---|
static FactoryInterface |
INTERPRETER_FACTORY
the interpreter factory class name |
Method Summary | |
---|---|
static Frame |
aThrow(Operation operation,
Frame frame,
Stack frameStack)
throws an exception |
static Frame |
createFrame(Object object,
AccessibleObject method,
Object[] arguments)
creates a frame for a method |
static Object |
interpret(Stack frameStack)
interprets the frameStack |
static Object |
invoke(Object object,
AccessibleObject method,
Object[] arguments)
interpretes the invocation of a method on an object |
static Object |
invoke(Object object,
String methodName,
Object[] arguments,
Class[] argumentTypes)
interpretes the invocation of a method on an object |
static void |
setFactory(FactoryInterface factory)
sets the Interpreter factory. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static FactoryInterface INTERPRETER_FACTORY
Method Detail |
---|
public static void setFactory(FactoryInterface factory)
factory
- the factory to usepublic static Frame createFrame(Object object, AccessibleObject method, Object[] arguments) throws ClassNotFoundException, IOException
object
- the object on which the method must be invokedmethod
- the method or constructorarguments
- the arguments
ClassNotFoundException
- whenever the classpath is incomplete
IOException
- on IOExceptionpublic static Frame aThrow(Operation operation, Frame frame, Stack frameStack)
operation
- the aThrow operation to invokeframe
- the frame to start withframeStack
- the framestack
public static Object interpret(Stack frameStack) throws InterpreterException
frameStack
- the frameStack of the interpreter
InterpreterException
- on failurepublic static Object invoke(Object object, String methodName, Object[] arguments, Class[] argumentTypes)
object
- the object on which the method must be invokedmethodName
- the methodNamearguments
- the argumentsargumentTypes
- the classes of the arguments
public static Object invoke(Object object, AccessibleObject method, Object[] arguments) throws InterpreterException
object
- the object on which the method must be invokedmethod
- the methodarguments
- the arguments
InterpreterException
- on failure
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |