Package org.python.core
Interface PyProxy
public interface PyProxy
Common methods for all generated proxy classes.
Proxy classes are created whenever a python class inherits from a java class. Instances of such a
python class consists of two objects:
- An instance of the proxy class. The _getPyInstance() will return a reference to the PyInstance.
- An instance of PyInstance. The PyInstance's java proxy attribute contains a reference to the proxy class instance.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
__initProxy__
(Object[] args) Initialize the proxy instance.Return the associated PyObject.Return the associated system state.void
_setPyInstance
(PyObject proxy) Associate a PyObject with this proxy instance.void
Associate an system state with this proxy instance.
-
Method Details
-
_setPyInstance
Associate a PyObject with this proxy instance. This is done during construction and initialization of the proxy instance. -
_getPyInstance
PyObject _getPyInstance()Return the associated PyObject. -
_setPySystemState
Associate an system state with this proxy instance. This is done during construction and initialization of the proxy instance. -
_getPySystemState
PySystemState _getPySystemState()Return the associated system state. -
__initProxy__
Initialize the proxy instance. If the proxy is not initialized, this will call the python constructor withargs
.In some situations is it necessary to call the __initProxy__ method from the java superclass ctor before the ctor makes call to methods that is overridden in python.
In most situation the __initProxy__ is called automatically by the jython runtime.
-