Package io.deephaven.integrations.python
Class PythonObjectWrapper
java.lang.Object
io.deephaven.integrations.python.PythonObjectWrapper
This is a helper class for wrapping a Java object in a Python wrapper and unwrapping a Python wrapper to a raw Java
object.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
init()
Ensure that the class initializer runs.static Object
unwrap
(org.jpy.PyObject t) Unwrap a Python object to return the wrapped Java object.static org.jpy.PyObject
Wrap a raw Java object with a Python wrapper if one exists for its type, otherwise return a JPY mapped Python object.
-
Constructor Details
-
PythonObjectWrapper
public PythonObjectWrapper()
-
-
Method Details
-
init
public static void init()Ensure that the class initializer runs. -
unwrap
Unwrap a Python object to return the wrapped Java object.- Parameters:
t
- An instance ofPyObject
.- Returns:
- The wrapped Java object.
-
wrap
Wrap a raw Java object with a Python wrapper if one exists for its type, otherwise return a JPY mapped Python object.- Parameters:
t
- A Java object.- Returns:
- A
PyObject
instance representing the Python wrapper object.
-