Class PythonObjectWrapper

java.lang.Object
io.deephaven.integrations.python.PythonObjectWrapper

public class PythonObjectWrapper extends Object
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

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • PythonObjectWrapper

      public PythonObjectWrapper()
  • Method Details

    • init

      public static void init()
      Ensure that the class initializer runs.
    • unwrap

      public static Object unwrap(org.jpy.PyObject t)
      Unwrap a Python object to return the wrapped Java object.
      Parameters:
      t - An instance of PyObject.
      Returns:
      The wrapped Java object.
    • wrap

      public static org.jpy.PyObject wrap(Object t)
      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.