|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.python.core.PyObject org.python.core.PyInstance
A python class instance.
Nested Class Summary |
Nested classes inherited from class org.python.core.PyObject |
PyObject.ConversionException |
Field Summary | |
PyObject |
__dict__
The namespace of this instance. |
PyClass |
instclass
|
Fields inherited from class org.python.core.PyObject |
exposed_name |
Constructor Summary | |
PyInstance()
|
|
PyInstance(PyClass iclass)
|
|
PyInstance(PyClass iclass,
PyObject dict)
Returns a new |
Method Summary | |
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. |
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. |
Methods inherited from class org.python.core.PyObject |
__call__, __call__, __call__, __call__, __call__, __call__, __call__, __coerce__, __delattr__, __delete__, __delitem__, __delslice__, __delslice__, __dir__, __findattr__, __finditem__, __get__, __getattr__, __getattr__, __getitem__, __getslice__, __getslice__, __hash__, __idivmod__, __not__, __pow__, __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, dispatch__init__, equals, fastGetDict, getDict, getDoc, getType, implementsDescrDelete, implementsDescrSet, invoke, invoke, isCallable, isDataDescr, isMappingType, isNumberType, isSequenceType, noAttributeError, readonlyAttributeError, safeRepr, toString, typeSetup |
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
public transient PyClass instclass
public PyObject __dict__
Constructor Detail |
public PyInstance(PyClass iclass, PyObject dict)
public PyInstance(PyClass iclass)
public PyInstance()
Method Detail |
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.
By default, this method will call __findattr__(PyString
name)
with the appropriate args. The only reason to override
this method is for performance.
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
invoke
in class PyObject
name
- the name of the method to call. This must be an
interned string!
public PyObject invoke(java.lang.String name, PyObject arg1)
PyObject
invoke
in class PyObject
name
- the name of the method to call. This must be an
interned string!arg1
- the one argument of the method.
public PyObject invoke(java.lang.String name, PyObject arg1, PyObject arg2)
PyObject
invoke
in class PyObject
name
- the name of the method to call. This must be an
interned string!arg1
- the first argument of the method.arg2
- the second argument of the method.
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 invoke_ex(java.lang.String name, PyObject arg1)
public PyObject invoke_ex(java.lang.String name, PyObject arg1, PyObject arg2)
public PyObject __call__(PyObject[] args, java.lang.String[] keywords)
PyObject
__call__
in class PyObject
args
- all arguments to the function (including
keyword arguments).keywords
- the keywords used for all keyword arguments.public PyString __repr__()
PyObject
PyObject
is to
override the standard Java toString
method.
__repr__
in class PyObject
public PyString __str__()
PyObject
PyObject
is to
override the standard Java toString
method.
__str__
in class PyObject
public int hashCode()
hashCode
in class PyObject
public int __cmp__(PyObject other)
PyObject
__cmp__
in class PyObject
other
- the object to compare this with.
public PyObject __lt__(PyObject o)
PyObject
__lt__
in class PyObject
o
- the object to compare this with.
public PyObject __le__(PyObject o)
PyObject
__le__
in class PyObject
o
- the object to compare this with.
public PyObject __gt__(PyObject o)
PyObject
__gt__
in class PyObject
o
- the object to compare this with.
public PyObject __ge__(PyObject o)
PyObject
__ge__
in class PyObject
o
- the object to compare this with.
public PyObject __eq__(PyObject o)
PyObject
__eq__
in class PyObject
o
- the object to compare this with.
public PyObject __ne__(PyObject o)
PyObject
__ne__
in class PyObject
o
- the object to compare this with.
public boolean __nonzero__()
PyObject
PyObject
is
considered true.
__nonzero__
in class PyObject
public int __len__()
PyObject
__len__
in class 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 container
public 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.__next__()) != null; { // Do somting with item }
__iter__
in class PyObject
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 coercion
public PyString __hex__()
__hex__
in class PyObject
public PyString __oct__()
__oct__
in class PyObject
public PyObject __int__()
__int__
in class PyObject
public PyFloat __float__()
__float__
in class PyObject
public PyLong __long__()
__long__
in class PyObject
public PyComplex __complex__()
__complex__
in class PyObject
public PyObject __pos__()
__pos__
in class PyObject
public PyObject __neg__()
__neg__
in class PyObject
public PyObject __abs__()
__abs__
in class PyObject
public PyObject __invert__()
__invert__
in class PyObject
public PyObject __add__(PyObject o)
__add__
in class PyObject
o
- the object to perform this binary operation with
(the right-hand operand).
public PyObject __radd__(PyObject o)
__radd__
in class PyObject
o
- the object to perform this binary operation with
(the left-hand operand).
public PyObject __iadd__(PyObject o)
__iadd__
in class PyObject
o
- the object to perform this binary operation with
(the right-hand operand).
public PyObject __sub__(PyObject o)
__sub__
in class PyObject
o
- the object to perform this binary operation with
(the right-hand operand).
public PyObject __rsub__(PyObject o)
__rsub__
in class PyObject
o
- the object to perform this binary operation with
(the left-hand operand).
public PyObject __isub__(PyObject o)
__isub__
in class PyObject
o
- the object to perform this binary operation with
(the right-hand operand).
public PyObject __mul__(PyObject o)
__mul__
in class PyObject
o
- the object to perform this binary operation with
(the right-hand operand).
public PyObject __rmul__(PyObject o)
__rmul__
in class PyObject
o
- the object to perform this binary operation with
(the left-hand operand).
public PyObject __imul__(PyObject o)
__imul__
in class PyObject
o
- the object to perform this binary operation with
(the right-hand operand).
public PyObject __div__(PyObject o)
__div__
in class PyObject
o
- the object to perform this binary operation with
(the right-hand operand).
public PyObject __rdiv__(PyObject o)
__rdiv__
in class PyObject
o
- the object to perform this binary operation with
(the left-hand operand).
public PyObject __idiv__(PyObject o)
__idiv__
in class PyObject
o
- the object to perform this binary operation with
(the right-hand operand).
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)
__mod__
in class PyObject
o
- the object to perform this binary operation with
(the right-hand operand).
public PyObject __rmod__(PyObject o)
__rmod__
in class PyObject
o
- the object to perform this binary operation with
(the left-hand operand).
public PyObject __imod__(PyObject o)
__imod__
in class PyObject
o
- the object to perform this binary operation with
(the right-hand operand).
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)
__pow__
in class PyObject
o
- the object to perform this binary operation with
(the right-hand operand).
public PyObject __rpow__(PyObject o)
__rpow__
in class PyObject
o
- the object to perform this binary operation with
(the left-hand operand).
public PyObject __ipow__(PyObject o)
__ipow__
in class PyObject
o
- the object to perform this binary operation with
(the right-hand operand).
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)
__and__
in class PyObject
o
- the object to perform this binary operation with
(the right-hand operand).
public PyObject __rand__(PyObject o)
__rand__
in class PyObject
o
- the object to perform this binary operation with
(the left-hand operand).
public PyObject __iand__(PyObject o)
__iand__
in class PyObject
o
- the object to perform this binary operation with
(the right-hand operand).
public PyObject __or__(PyObject o)
__or__
in class PyObject
o
- the object to perform this binary operation with
(the right-hand operand).
public PyObject __ror__(PyObject o)
__ror__
in class PyObject
o
- the object to perform this binary operation with
(the left-hand operand).
public PyObject __ior__(PyObject o)
__ior__
in class PyObject
o
- the object to perform this binary operation with
(the right-hand operand).
public PyObject __xor__(PyObject o)
__xor__
in class PyObject
o
- the object to perform this binary operation with
(the right-hand operand).
public PyObject __rxor__(PyObject o)
__rxor__
in class PyObject
o
- the object to perform this binary operation with
(the left-hand operand).
public PyObject __ixor__(PyObject o)
__ixor__
in class PyObject
o
- the object to perform this binary operation with
(the right-hand operand).
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |