public class

JythonDynamicWrapper

extends Object
java.lang.Object
   ↳ com.pnfsoftware.jeb.client.script.JythonDynamicWrapper

Class Overview

Dynamic wrapper around Jython methods used by the script loader to initialize a Python script.

Summary

Public Constructors
JythonDynamicWrapper(File jythonJarFile)
Public Methods
Object PyObject_call(Object object)
PyObject.__call__()
Object PyObject_tojava(Object object, Class<?> c)
PyObject.__tojava__()
Object PySystemState_init()
PySystemState constructor
void PythonInterpreter_cleanup(Object interpreter)
PythonInterpreter.cleanup()
Object PythonInterpreter_compile(Object interpreter, String s)
PythonInterpreter.compile(String)
Object PythonInterpreter_eval(Object interpreter, String s)
PythonInterpreter.eval(String)
Object PythonInterpreter_eval(Object interpreter, Object pyobj)
PythonInterpreter.eval(PyObject)
void PythonInterpreter_exec(Object interpreter, String s)
PythonInterpreter.exec(String)
Object PythonInterpreter_get(Object interpreter, String name)
PythonInterpreter.get(String)@return
Object PythonInterpreter_init(Object dict, Object systemState)
PythonInterpreter constructor
void PythonInterpreter_initialize(Properties preProperties, Properties postProperties, String[] argv)
Static method PythonInterpreter.initialize()
void PythonInterpreter_set(Object interpreter, String name, Object value)
PythonInterpreter.set(String, Object)
void PythonInterpreter_setErr(Object interpreter, Writer errStream)
PythonInterpreter.setErr(Writer)
void PythonInterpreter_setIn(Object interpreter, Reader inStream)
PythonInterpreter.setIn(Reader)
void PythonInterpreter_setOut(Object interpreter, Writer outStream)
PythonInterpreter.setOut(Writer)
File getJythonJarFile()
Couple<Object, Object> getPyExceptionTypeAndValue(Object pyex)
boolean isPyException(Throwable e)
Determine if the provided exception is a Jython's PyException.
boolean isPyNone(Object pyobj)
boolean isPyObject(Object pyobj)
boolean isPyString(Object pyobj)
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public JythonDynamicWrapper (File jythonJarFile)

Throws
ReflectiveOperationException

Public Methods

public Object PyObject_call (Object object)

PyObject.__call__()

Returns
  • a PyObject
Throws
ReflectiveOperationException

public Object PyObject_tojava (Object object, Class<?> c)

PyObject.__tojava__()

Returns
  • an Object
Throws
ReflectiveOperationException

public Object PySystemState_init ()

PySystemState constructor

Returns
  • a PySystemState
Throws
ReflectiveOperationException

public void PythonInterpreter_cleanup (Object interpreter)

PythonInterpreter.cleanup()

Throws
ReflectiveOperationException

public Object PythonInterpreter_compile (Object interpreter, String s)

PythonInterpreter.compile(String)

Returns
  • a PyCode
Throws
ReflectiveOperationException

public Object PythonInterpreter_eval (Object interpreter, String s)

PythonInterpreter.eval(String)

Returns
  • a PyObject
Throws
ReflectiveOperationException

public Object PythonInterpreter_eval (Object interpreter, Object pyobj)

PythonInterpreter.eval(PyObject)

Returns
  • a PyObject
Throws
ReflectiveOperationException

public void PythonInterpreter_exec (Object interpreter, String s)

PythonInterpreter.exec(String)

Throws
ReflectiveOperationException

public Object PythonInterpreter_get (Object interpreter, String name)

PythonInterpreter.get(String)@return

Throws
ReflectiveOperationException

public Object PythonInterpreter_init (Object dict, Object systemState)

PythonInterpreter constructor

Returns
  • a PythonInterpreter
Throws
ReflectiveOperationException

public void PythonInterpreter_initialize (Properties preProperties, Properties postProperties, String[] argv)

Static method PythonInterpreter.initialize()

Throws
ReflectiveOperationException

public void PythonInterpreter_set (Object interpreter, String name, Object value)

PythonInterpreter.set(String, Object)

Throws
ReflectiveOperationException

public void PythonInterpreter_setErr (Object interpreter, Writer errStream)

PythonInterpreter.setErr(Writer)

Throws
ReflectiveOperationException

public void PythonInterpreter_setIn (Object interpreter, Reader inStream)

PythonInterpreter.setIn(Reader)

Throws
ReflectiveOperationException

public void PythonInterpreter_setOut (Object interpreter, Writer outStream)

PythonInterpreter.setOut(Writer)

Throws
ReflectiveOperationException

public File getJythonJarFile ()

public Couple<Object, Object> getPyExceptionTypeAndValue (Object pyex)

Parameters
pyex a PyException object
Returns
  • a couple
Throws
ReflectiveOperationException

public boolean isPyException (Throwable e)

Determine if the provided exception is a Jython's PyException.

Parameters
e an exception

public boolean isPyNone (Object pyobj)

public boolean isPyObject (Object pyobj)

public boolean isPyString (Object pyobj)