org.python.core
Class ContextGuard

java.lang.Object
  extended by org.python.core.ContextGuard
All Implemented Interfaces:
ContextManager

public class ContextGuard
extends Object
implements ContextManager

Straightens the call path for some common cases


Method Summary
 PyObject __enter__(ThreadState ts)
           
 boolean __exit__(ThreadState ts, PyException exception)
           
static ContextManager getManager(PyObject manager)
           
static PyObject makeManager(PyObject object)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

__enter__

public PyObject __enter__(ThreadState ts)
Specified by:
__enter__ in interface ContextManager

__exit__

public boolean __exit__(ThreadState ts,
                        PyException exception)
Specified by:
__exit__ in interface ContextManager

getManager

public static ContextManager getManager(PyObject manager)

makeManager

public static PyObject makeManager(PyObject object)


Jython homepage