Class PySuper

All Implemented Interfaces:
Serializable, Traverseproc
Direct Known Subclasses:
PySuperDerived

public class PySuper extends PyObject implements Traverseproc
The Python super type.
See Also:
  • Field Details

    • TYPE

      public static final PyType TYPE
  • Constructor Details

    • PySuper

      public PySuper()
    • PySuper

      public PySuper(PyType subType)
  • Method Details

    • super___init__

      public void super___init__(PyObject[] args, String[] keywords)
    • __findattr_ex__

      public PyObject __findattr_ex__(String name)
      Description copied from class: PyObject
      Attribute lookup hook. If the attribute is not found, null may be returned or a Py.AttributeError can be thrown, whatever is more correct, efficient and/or convenient for the implementing class. Client code should use PyObject.__getattr__(String) or PyObject.__findattr__(String). Both methods have a clear policy for failed lookups.
      Overrides:
      __findattr_ex__ in class PyObject
      Returns:
      The looked up value. May return null if the attribute is not found
    • __get__

      public PyObject __get__(PyObject obj, PyObject type)
      Description copied from class: PyObject
      Get descriptor for this PyObject.
      Overrides:
      __get__ in class PyObject
      Parameters:
      obj - - the instance accessing this descriptor. Can be null if this is being accessed by a type.
      type - - the type accessing this descriptor. Will be null if obj exists as obj is of the type accessing the descriptor.
      Returns:
      - the object defined for this descriptor for the given obj and type.
    • toString

      public String toString()
      Overrides:
      toString in class PyObject
    • getSuperType

      public PyType getSuperType()
    • getObj

      public PyObject getObj()
    • getObjType

      public PyType getObjType()
    • traverse

      public int traverse(Visitproc visit, Object arg)
      Description copied from interface: Traverseproc
      Traverses all directly contained PyObjects. Like in CPython, arg must be passed unmodified to visit as its second parameter. If Visitproc.visit(PyObject, Object) returns nonzero, this return value must be returned immediately by traverse. Visitproc.visit(PyObject, Object) must not be called with a null PyObject-argument.
      Specified by:
      traverse in interface Traverseproc
    • refersDirectlyTo

      public boolean refersDirectlyTo(PyObject ob)
      Description copied from interface: Traverseproc
      Optional operation. Should only be implemented if it is more efficient than calling Traverseproc.traverse(Visitproc, Object) with a visitproc that just watches out for ob. Must return false if ob is null.
      Specified by:
      refersDirectlyTo in interface Traverseproc