Class PyJavaInstance

All Implemented Interfaces:
Externalizable, Serializable

public class PyJavaInstance extends PyInstance implements Externalizable
A wrapper around a java instance.
See Also:
  • Constructor Details

    • PyJavaInstance

      public PyJavaInstance()
    • PyJavaInstance

      public PyJavaInstance(PyJavaClass iclass)
    • PyJavaInstance

      public PyJavaInstance(Object proxy)
  • Method Details

    • readExternal

      public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
      Implementation of the Externalizable interface.
      Specified by:
      readExternal in interface Externalizable
      Parameters:
      in - the input stream.
      Throws:
      IOException
      ClassNotFoundException
    • writeExternal

      public void writeExternal(ObjectOutput out) throws IOException
      Implementation of the Externalizable interface.
      Specified by:
      writeExternal in interface Externalizable
      Parameters:
      out - the output stream.
      Throws:
      IOException
    • __init__

      public void __init__(PyObject[] args, String[] keywords)
      Overrides:
      __init__ in class PyInstance
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class PyInstance
    • _is

      public PyObject _is(PyObject o)
      Description copied from class: PyObject
      Implements is operator.
      Overrides:
      _is in class PyObject
      Parameters:
      o - the object to compare this with.
      Returns:
      the result of the comparison
    • _isnot

      public PyObject _isnot(PyObject o)
      Description copied from class: PyObject
      Implements is not operator.
      Overrides:
      _isnot in class PyObject
      Parameters:
      o - the object to compare this with.
      Returns:
      the result of the comparison
    • __cmp__

      public int __cmp__(PyObject o)
      Description copied from class: PyObject
      Equivalent to the standard Python __cmp__ method.
      Overrides:
      __cmp__ in class PyInstance
      Parameters:
      o - the object to compare this with.
      Returns:
      -1 if this < 0; 0 if this == o; +1 if this > o; -2 if no comparison is implemented
    • __str__

      public PyString __str__()
      Description copied from class: PyObject
      Equivalent to the standard Python __str__ method. This method should not typically need to be overridden. The easiest way to configure the string representation of a PyObject is to override the standard Java toString method.
      Overrides:
      __str__ in class PyInstance
    • __repr__

      public PyString __repr__()
      Description copied from class: PyObject
      Equivalent to the standard Python __repr__ method. This method should not typically need to be overrriden. The easiest way to configure the string representation of a PyObject is to override the standard Java toString method.
      Overrides:
      __repr__ in class PyInstance
    • __delattr__

      public void __delattr__(String attr)
      Description copied from class: PyObject
      A variant of the __delattr__ method which accepts a String as the key. This String must be interned. By default, this will call __delattr__(PyString name) with the appropriate args. The only reason to override this method is for performance.
      Overrides:
      __delattr__ in class PyInstance
      Parameters:
      attr - the name which will be removed - must be an interned string .
      See Also: