public class PyInstance extends PyObject
PyObject.ConversionException
Modifier and Type | Field and Description |
---|---|
PyObject |
__dict__
The namespace of this instance.
|
PyClass |
instclass |
exposed_name
Constructor and Description |
---|
PyInstance() |
PyInstance(PyClass iclass) |
PyInstance(PyClass iclass,
PyObject dict)
Returns a new
|
Modifier and Type | Method and Description |
---|---|
PyObject |
__abs__()
Implements the __abs__ method by looking it up
in the instance's dictionary and calling it if it is found.
|
PyObject |
__add__(PyObject o)
Implements the __add__ method by looking it up
in the instance's dictionary and calling it if it is found.
|
PyObject |
__and__(PyObject o)
Implements the __and__ method by looking it up
in the instance's dictionary and calling it if it is found.
|
PyObject |
__call__(PyObject[] args,
java.lang.String[] keywords)
The basic method to override when implementing a callable object.
|
int |
__cmp__(PyObject other)
Equivalent to the standard Python __cmp__ method.
|
java.lang.Object |
__coerce_ex__(PyObject o)
Implements numeric coercion
|
PyComplex |
__complex__()
Implements the __complex__ method by looking it up
in the instance's dictionary and calling it if it is found.
|
boolean |
__contains__(PyObject o)
Equivalent to the standard Python __contains__ method.
|
void |
__delattr__(java.lang.String name)
A variant of the __delattr__ method which accepts a String
as the key.
|
void |
__delitem__(PyObject key)
Equivalent to the standard Python __delitem__ method.
|
PyObject |
__div__(PyObject o)
Implements the __div__ method by looking it up
in the instance's dictionary and calling it if it is found.
|
PyObject |
__divmod__(PyObject o)
Implements the __divmod__ method by looking it up
in the instance's dictionary and calling it if it is found.
|
PyObject |
__eq__(PyObject o)
Equivalent to the standard Python __eq__ method.
|
PyObject |
__findattr__(java.lang.String name)
A variant of the __findattr__ method which accepts a Java
String as the name. |
PyObject |
__findattr__(java.lang.String name,
boolean stopAtJava) |
PyObject |
__finditem__(int key)
A variant of the __finditem__ method which accepts a primitive
int as the key. |
PyObject |
__finditem__(PyObject key)
Very similar to the standard Python __getitem__ method.
|
PyFloat |
__float__()
Implements the __float__ method by looking it up
in the instance's dictionary and calling it if it is found.
|
PyObject |
__floordiv__(PyObject o)
Implements the __floordiv__ method by looking it up
in the instance's dictionary and calling it if it is found.
|
PyObject |
__ge__(PyObject o)
Equivalent to the standard Python __ge__ method.
|
PyObject |
__getitem__(PyObject key)
Equivalent to the standard Python __getitem__ method.
|
PyObject |
__gt__(PyObject o)
Equivalent to the standard Python __gt__ method.
|
PyString |
__hex__()
Implements the __hex__ method by looking it up
in the instance's dictionary and calling it if it is found.
|
PyObject |
__iadd__(PyObject o)
Implements the __iadd__ method by looking it up
in the instance's dictionary and calling it if it is found.
|
PyObject |
__iand__(PyObject o)
Implements the __iand__ method by looking it up
in the instance's dictionary and calling it if it is found.
|
PyObject |
__idiv__(PyObject o)
Implements the __idiv__ method by looking it up
in the instance's dictionary and calling it if it is found.
|
PyObject |
__ifloordiv__(PyObject o)
Implements the __ifloordiv__ method by looking it up
in the instance's dictionary and calling it if it is found.
|
PyObject |
__ilshift__(PyObject o)
Implements the __ilshift__ method by looking it up
in the instance's dictionary and calling it if it is found.
|
PyObject |
__imod__(PyObject o)
Implements the __imod__ method by looking it up
in the instance's dictionary and calling it if it is found.
|
PyObject |
__imul__(PyObject o)
Implements the __imul__ method by looking it up
in the instance's dictionary and calling it if it is found.
|
void |
__init__(PyObject[] args,
java.lang.String[] keywords) |
PyObject |
__int__()
Implements the __int__ method by looking it up
in the instance's dictionary and calling it if it is found.
|
PyObject |
__invert__()
Implements the __invert__ method by looking it up
in the instance's dictionary and calling it if it is found.
|
PyObject |
__ior__(PyObject o)
Implements the __ior__ method by looking it up
in the instance's dictionary and calling it if it is found.
|
PyObject |
__ipow__(PyObject o)
Implements the __ipow__ method by looking it up
in the instance's dictionary and calling it if it is found.
|
PyObject |
__irshift__(PyObject o)
Implements the __irshift__ method by looking it up
in the instance's dictionary and calling it if it is found.
|
PyObject |
__isub__(PyObject o)
Implements the __isub__ method by looking it up
in the instance's dictionary and calling it if it is found.
|
PyObject |
__iter__()
Return an iterator that is used to iterate the element of this
sequence.
|
PyObject |
__iternext__()
Return the next element of the sequence that this is an iterator
for.
|
PyObject |
__itruediv__(PyObject o)
Implements the __itruediv__ method by looking it up
in the instance's dictionary and calling it if it is found.
|
PyObject |
__ixor__(PyObject o)
Implements the __ixor__ method by looking it up
in the instance's dictionary and calling it if it is found.
|
PyObject |
__jfindattr__(java.lang.String name) |
PyObject |
__le__(PyObject o)
Equivalent to the standard Python __le__ method.
|
int |
__len__()
Equivalent to the standard Python __len__ method.
|
PyLong |
__long__()
Implements the __long__ method by looking it up
in the instance's dictionary and calling it if it is found.
|
PyObject |
__lshift__(PyObject o)
Implements the __lshift__ method by looking it up
in the instance's dictionary and calling it if it is found.
|
PyObject |
__lt__(PyObject o)
Equivalent to the standard Python __lt__ method.
|
PyObject |
__mod__(PyObject o)
Implements the __mod__ method by looking it up
in the instance's dictionary and calling it if it is found.
|
PyObject |
__mul__(PyObject o)
Implements the __mul__ method by looking it up
in the instance's dictionary and calling it if it is found.
|
PyObject |
__ne__(PyObject o)
Equivalent to the standard Python __ne__ method.
|
PyObject |
__neg__()
Implements the __neg__ method by looking it up
in the instance's dictionary and calling it if it is found.
|
boolean |
__nonzero__()
Equivalent to the standard Python __nonzero__ method.
|
PyString |
__oct__()
Implements the __oct__ method by looking it up
in the instance's dictionary and calling it if it is found.
|
PyObject |
__or__(PyObject o)
Implements the __or__ method by looking it up
in the instance's dictionary and calling it if it is found.
|
PyObject |
__pos__()
Implements the __pos__ method by looking it up
in the instance's dictionary and calling it if it is found.
|
PyObject |
__pow__(PyObject o)
Implements the __pow__ method by looking it up
in the instance's dictionary and calling it if it is found.
|
PyObject |
__radd__(PyObject o)
Implements the __radd__ method by looking it up
in the instance's dictionary and calling it if it is found.
|
PyObject |
__rand__(PyObject o)
Implements the __rand__ method by looking it up
in the instance's dictionary and calling it if it is found.
|
PyObject |
__rdiv__(PyObject o)
Implements the __rdiv__ method by looking it up
in the instance's dictionary and calling it if it is found.
|
PyObject |
__rdivmod__(PyObject o)
Implements the __rdivmod__ method by looking it up
in the instance's dictionary and calling it if it is found.
|
PyString |
__repr__()
Equivalent to the standard Python __repr__ method.
|
PyObject |
__rfloordiv__(PyObject o)
Implements the __rfloordiv__ method by looking it up
in the instance's dictionary and calling it if it is found.
|
PyObject |
__rlshift__(PyObject o)
Implements the __rlshift__ method by looking it up
in the instance's dictionary and calling it if it is found.
|
PyObject |
__rmod__(PyObject o)
Implements the __rmod__ method by looking it up
in the instance's dictionary and calling it if it is found.
|
PyObject |
__rmul__(PyObject o)
Implements the __rmul__ method by looking it up
in the instance's dictionary and calling it if it is found.
|
PyObject |
__ror__(PyObject o)
Implements the __ror__ method by looking it up
in the instance's dictionary and calling it if it is found.
|
PyObject |
__rpow__(PyObject o)
Implements the __rpow__ method by looking it up
in the instance's dictionary and calling it if it is found.
|
PyObject |
__rrshift__(PyObject o)
Implements the __rrshift__ method by looking it up
in the instance's dictionary and calling it if it is found.
|
PyObject |
__rshift__(PyObject o)
Implements the __rshift__ method by looking it up
in the instance's dictionary and calling it if it is found.
|
PyObject |
__rsub__(PyObject o)
Implements the __rsub__ method by looking it up
in the instance's dictionary and calling it if it is found.
|
PyObject |
__rtruediv__(PyObject o)
Implements the __rtruediv__ method by looking it up
in the instance's dictionary and calling it if it is found.
|
PyObject |
__rxor__(PyObject o)
Implements the __rxor__ method by looking it up
in the instance's dictionary and calling it if it is found.
|
void |
__setattr__(java.lang.String name,
PyObject value)
A variant of the __setattr__ method which accepts a String
as the key.
|
void |
__setitem__(PyObject key,
PyObject value)
Equivalent to the standard Python __setitem__ method.
|
PyString |
__str__()
Equivalent to the standard Python __str__ method.
|
PyObject |
__sub__(PyObject o)
Implements the __sub__ method by looking it up
in the instance's dictionary and calling it if it is found.
|
java.lang.Object |
__tojava__(java.lang.Class c)
Equivalent to the Jython __tojava__ method.
|
PyObject |
__truediv__(PyObject o)
Implements the __truediv__ method by looking it up
in the instance's dictionary and calling it if it is found.
|
PyUnicode |
__unicode__() |
PyObject |
__xor__(PyObject o)
Implements the __xor__ method by looking it up
in the instance's dictionary and calling it if it is found.
|
PyObject |
fastGetClass() |
int |
hashCode() |
PyObject |
invoke_ex(java.lang.String name) |
PyObject |
invoke_ex(java.lang.String name,
PyObject arg1) |
PyObject |
invoke_ex(java.lang.String name,
PyObject[] args,
java.lang.String[] keywords) |
PyObject |
invoke_ex(java.lang.String name,
PyObject arg1,
PyObject arg2) |
PyObject |
invoke(java.lang.String name)
Shortcut for calling a method on a PyObject with no args.
|
PyObject |
invoke(java.lang.String name,
PyObject arg1)
Shortcut for calling a method on a PyObject with one arg.
|
PyObject |
invoke(java.lang.String name,
PyObject arg1,
PyObject arg2)
Shortcut for calling a method on a PyObject with two args.
|
__call__, __call__, __call__, __call__, __call__, __call__, __call__, __coerce__, __delattr__, __delete__, __delitem__, __delslice__, __delslice__, __dir__, __findattr__, __finditem__, __get__, __getattr__, __getattr__, __getitem__, __getnewargs__, __getslice__, __getslice__, __hash__, __idivmod__, __not__, __pow__, __reduce__, __set__, __setattr__, __setitem__, __setitem__, __setslice__, __setslice__, _add, _and, _callextra, _cmp, _div, _divmod, _doget, _doget, _doset, _eq, _floordiv, _ge, _gt, _in, _is, _isnot, _jcall, _jcallexc, _jthrow, _le, _lshift, _lt, _mod, _mul, _ne, _notin, _or, _pow, _rshift, _sub, _truediv, _xor, asInt, asLong, asName, asString, asStringOrNull, delDict, delType, dispatch__init__, equals, fastGetDict, getDict, getDoc, getType, implementsDescrDelete, implementsDescrSet, invoke, invoke, isCallable, isDataDescr, isMappingType, isNumberType, isSequenceType, noAttributeError, readonlyAttributeError, safeRepr, setDict, setType, toString, typeSetup
public transient PyClass instclass
public PyObject __dict__
public PyInstance(PyClass iclass)
public PyInstance()
public PyObject fastGetClass()
fastGetClass
in class PyObject
public java.lang.Object __tojava__(java.lang.Class c)
PyObject
Py.NoConversion
if this PyObject
can not be converted to the
desired Java class.__tojava__
in class PyObject
c
- the Class to convert this PyObject
to.public void __init__(PyObject[] args, java.lang.String[] keywords)
public PyObject __jfindattr__(java.lang.String name)
public PyObject __findattr__(java.lang.String name)
PyObject
String
as the name.
Warning: name must be an interned string!__findattr__
in class PyObject
name
- the name to lookup in this namespace
must be an interned string .PyObject.__findattr__(PyString)
public PyObject __findattr__(java.lang.String name, boolean stopAtJava)
public PyObject invoke(java.lang.String name)
PyObject
public PyObject invoke(java.lang.String name, PyObject arg1)
PyObject
public PyObject invoke(java.lang.String name, PyObject arg1, PyObject arg2)
PyObject
public void __setattr__(java.lang.String name, PyObject value)
PyObject
__setattr__
in class PyObject
name
- the name whose value will be set -
must be an interned string .value
- the value to set this name toPyObject.__setattr__(PyString, PyObject)
public void __delattr__(java.lang.String name)
PyObject
__delattr__(PyString name)
with the appropriate args.
The only reason to override this method is for performance.__delattr__
in class PyObject
name
- the name which will be removed -
must be an interned string .PyObject.__delattr__(PyString)
public PyObject invoke_ex(java.lang.String name, PyObject[] args, java.lang.String[] keywords)
public PyObject invoke_ex(java.lang.String name)
public PyObject __call__(PyObject[] args, java.lang.String[] keywords)
PyObject
public PyString __repr__()
PyObject
PyObject
is to
override the standard Java toString
method.public PyString __str__()
PyObject
PyObject
is to
override the standard Java toString
method.public PyUnicode __unicode__()
__unicode__
in class PyObject
public int __cmp__(PyObject other)
PyObject
public PyObject __lt__(PyObject o)
PyObject
public PyObject __le__(PyObject o)
PyObject
public PyObject __gt__(PyObject o)
PyObject
public PyObject __ge__(PyObject o)
PyObject
public PyObject __eq__(PyObject o)
PyObject
public PyObject __ne__(PyObject o)
PyObject
public boolean __nonzero__()
PyObject
PyObject
is
considered true.__nonzero__
in class PyObject
public int __len__()
PyObject
public PyObject __finditem__(int key)
PyObject
int
as the key. By default, this method will call
__finditem__(PyObject key)
with the appropriate args.
The only reason to override this method is for performance.__finditem__
in class PyObject
key
- the key to lookup in this sequence.PyObject.__finditem__(PyObject)
public PyObject __finditem__(PyObject key)
PyObject
__finditem__
in class PyObject
key
- the key to lookup in this containerpublic PyObject __getitem__(PyObject key)
PyObject
__finditem__
method instead.__getitem__
in class PyObject
key
- the key to lookup in this container.PyObject.__finditem__(PyObject)
public void __setitem__(PyObject key, PyObject value)
PyObject
__setitem__
in class PyObject
key
- the key whose value will be setvalue
- the value to set this key topublic void __delitem__(PyObject key)
PyObject
__delitem__
in class PyObject
key
- the key to be removed from the containerpublic PyObject __iter__()
PyObject
If a PyObject subclass should support iteration based in the __finditem__() method, it must supply an implementation of __iter__() like this:
public PyObject __iter__() { return new PySequenceIter(this); }When iterating over a python sequence from java code, it should be done with code like this:
PyObject iter = seq.__iter__(); for (PyObject item; (item = iter.__iternext__()) != null;) { // Do somting with item }
public PyObject __iternext__()
PyObject
__iternext__
in class PyObject
public boolean __contains__(PyObject o)
PyObject
__contains__
in class PyObject
o
- the element to search for in this container.public java.lang.Object __coerce_ex__(PyObject o)
PyObject
__coerce_ex__
in class PyObject
o
- the other object involved in the coercionpublic PyString __hex__()
public PyString __oct__()
public PyObject __int__()
public PyFloat __float__()
public PyLong __long__()
public PyComplex __complex__()
__complex__
in class PyObject
public PyObject __pos__()
public PyObject __neg__()
public PyObject __abs__()
public PyObject __invert__()
__invert__
in class PyObject
public PyObject __add__(PyObject o)
public PyObject __radd__(PyObject o)
public PyObject __iadd__(PyObject o)
public PyObject __sub__(PyObject o)
public PyObject __rsub__(PyObject o)
public PyObject __isub__(PyObject o)
public PyObject __mul__(PyObject o)
public PyObject __rmul__(PyObject o)
public PyObject __imul__(PyObject o)
public PyObject __div__(PyObject o)
public PyObject __rdiv__(PyObject o)
public PyObject __idiv__(PyObject o)
public PyObject __floordiv__(PyObject o)
__floordiv__
in class PyObject
o
- the object to perform this binary operation with
(the right-hand operand).public PyObject __rfloordiv__(PyObject o)
__rfloordiv__
in class PyObject
o
- the object to perform this binary operation with
(the left-hand operand).public PyObject __ifloordiv__(PyObject o)
__ifloordiv__
in class PyObject
o
- the object to perform this binary operation with
(the right-hand operand).public PyObject __truediv__(PyObject o)
__truediv__
in class PyObject
o
- the object to perform this binary operation with
(the right-hand operand).public PyObject __rtruediv__(PyObject o)
__rtruediv__
in class PyObject
o
- the object to perform this binary operation with
(the left-hand operand).public PyObject __itruediv__(PyObject o)
__itruediv__
in class PyObject
o
- the object to perform this binary operation with
(the right-hand operand).public PyObject __mod__(PyObject o)
public PyObject __rmod__(PyObject o)
public PyObject __imod__(PyObject o)
public PyObject __divmod__(PyObject o)
__divmod__
in class PyObject
o
- the object to perform this binary operation with
(the right-hand operand).public PyObject __rdivmod__(PyObject o)
__rdivmod__
in class PyObject
o
- the object to perform this binary operation with
(the left-hand operand).public PyObject __pow__(PyObject o)
public PyObject __rpow__(PyObject o)
public PyObject __ipow__(PyObject o)
public PyObject __lshift__(PyObject o)
__lshift__
in class PyObject
o
- the object to perform this binary operation with
(the right-hand operand).public PyObject __rlshift__(PyObject o)
__rlshift__
in class PyObject
o
- the object to perform this binary operation with
(the left-hand operand).public PyObject __ilshift__(PyObject o)
__ilshift__
in class PyObject
o
- the object to perform this binary operation with
(the right-hand operand).public PyObject __rshift__(PyObject o)
__rshift__
in class PyObject
o
- the object to perform this binary operation with
(the right-hand operand).public PyObject __rrshift__(PyObject o)
__rrshift__
in class PyObject
o
- the object to perform this binary operation with
(the left-hand operand).public PyObject __irshift__(PyObject o)
__irshift__
in class PyObject
o
- the object to perform this binary operation with
(the right-hand operand).public PyObject __and__(PyObject o)
public PyObject __rand__(PyObject o)
public PyObject __iand__(PyObject o)
public PyObject __or__(PyObject o)
public PyObject __ror__(PyObject o)
public PyObject __ior__(PyObject o)
public PyObject __xor__(PyObject o)
public PyObject __rxor__(PyObject o)