|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.python.core.PyObject
org.python.core.PyMethod
public class PyMethod
A Python method.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.python.core.PyObject |
---|
PyObject.ConversionException |
Field Summary | |
---|---|
PyObject |
im_class
The class associated with a method. |
PyObject |
im_func
The function (or other callable) implementing a method. |
PyObject |
im_self
The instance to which a method is bound; None for unbound methods. |
static PyType |
TYPE
|
Constructor Summary | |
---|---|
PyMethod(PyObject function,
PyObject self,
PyObject type)
|
Method Summary | |
---|---|
PyObject |
__call__(PyObject[] args,
String[] keywords)
The basic method to override when implementing a callable object. |
PyObject |
__call__(ThreadState state,
PyObject[] args,
String[] keywords)
|
int |
__cmp__(PyObject other)
Equivalent to the standard Python __cmp__ method. |
PyObject |
__findattr_ex__(String name)
Attribute lookup hook. |
PyObject |
__get__(PyObject obj,
PyObject type)
Get descriptor for this PyObject. |
PyObject |
getDoc()
|
int |
hashCode()
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final PyType TYPE
public PyObject im_class
public PyObject im_func
public PyObject im_self
Constructor Detail |
---|
public PyMethod(PyObject function, PyObject self, PyObject type)
Method Detail |
---|
public PyObject __findattr_ex__(String name)
PyObject
PyObject.__getattr__(String)
or
PyObject.__findattr__(String)
. Both methods have a clear policy for
failed lookups.
__findattr_ex__
in class PyObject
public PyObject __get__(PyObject obj, PyObject type)
PyObject
__get__
in class PyObject
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.
public PyObject __call__(PyObject[] args, 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 PyObject __call__(ThreadState state, PyObject[] args, String[] keywords)
__call__
in class PyObject
public int __cmp__(PyObject other)
PyObject
__cmp__
in class PyObject
other
- the object to compare this with.
public int hashCode()
hashCode
in class PyObject
public PyObject getDoc()
getDoc
in class PyObject
public String toString()
toString
in class PyObject
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |