Top Fields Constructors Methods
org.python.core

public abstract Class PyBuiltinMethod

extends PyBuiltinCallable
implements ExposeAsSuperclass, Cloneable, Traverseproc
Class Inheritance
All Implemented Interfaces
org.python.core.Traverseproc, java.lang.Cloneable, org.python.expose.ExposeAsSuperclass
Known Direct Subclasses
org.python.core.PyBuiltinMethodNarrow, org.python.core.PyNewWrapper, org.python.core.exceptions.BoundStaticJavaMethod
Imports
org.python.expose.ExposeAsSuperclass

Field Summary

Modifier and TypeField and Description
protected PyObject
Inherited from org.python.core.PyBuiltinCallable:
docinfo

Constructor Summary

AccessConstructor and Description
protected
protected
protected

Method Summary

Modifier and TypeMethod and Description
public int
__cmp__(PyObject
the object to compare this with.
other
)

Overrides org.python.core.PyObject.__cmp__.

Equivalent to the standard Python __cmp__ method.

public PyBuiltinCallable
bind(PyObject bindTo)

Implements abstract org.python.core.PyBuiltinCallable.bind.

Returns a new instance of this type of PyBuiltinFunction bound to self

public PyObject
public int
hashCode()

Overrides org.python.core.PyObject.hashCode.

Returns a hash code value for this object.

public PyMethodDescr
public boolean
public int
traverse(Visitproc visit, Object arg)

Implements org.python.core.Traverseproc.traverse.

Traverses all directly contained PyObjects.

Inherited from org.python.core.PyBuiltinCallable:
fastGetNamegetDocgetModulemakeCallsetInfotoString

Field Detail

selfback to summary
protected PyObject self

Constructor Detail

PyBuiltinMethodback to summary
protected PyBuiltinMethod(PyType type, PyObject self, PyBuiltinCallable.Info info)
PyBuiltinMethodback to summary
protected PyBuiltinMethod(PyObject self, PyBuiltinCallable.Info info)
PyBuiltinMethodback to summary
protected PyBuiltinMethod(String name)

Method Detail

__cmp__back to summary
public int __cmp__(PyObject other)

Overrides org.python.core.PyObject.__cmp__.

Doc from org.python.core.PyObject.__cmp__.

Equivalent to the standard Python __cmp__ method.

Parameters
other:PyObject

the object to compare this with.

Returns:int

-1 if this<o; 0 if this==o; +1 if this>o; -2 if no comparison is implemented

Annotations
@Override

bindback to summary
public PyBuiltinCallable bind(PyObject bindTo)

Implements abstract org.python.core.PyBuiltinCallable.bind.

Doc from org.python.core.PyBuiltinCallable.bind.

Returns a new instance of this type of PyBuiltinFunction bound to self

Annotations
@Override
getSelfback to summary
public PyObject getSelf()

Overrides org.python.core.PyBuiltinCallable.getSelf.

hashCodeback to summary
public int hashCode()

Overrides org.python.core.PyObject.hashCode.

Doc from java.lang.Object.hashCode.

Returns a hash code value for this object. This method is supported for the benefit of hash tables such as those provided by java.util.HashMap.

The general contract of hashCode is:

  • Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
  • If two objects are equal according to the equals method, then calling the hashCode method on each of the two objects must produce the same integer result.
  • It is not required that if two objects are unequal according to the equals method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables.
Returns:int

a hash code value for this object

Annotations
@Override

makeDescriptorback to summary
public PyMethodDescr makeDescriptor(PyType t)
refersDirectlyToback to summary
public boolean refersDirectlyTo(PyObject ob)

Implements org.python.core.Traverseproc.refersDirectlyTo.

Doc from org.python.core.Traverseproc.refersDirectlyTo.

Optional operation. Should only be implemented if it is more efficient than calling traverse(Visitproc, Object) with a visitproc that just watches out for ob. Must return false if ob is null.

Annotations
@Override
traverseback to summary
public int traverse(Visitproc visit, Object arg)

Implements org.python.core.Traverseproc.traverse.

Doc from org.python.core.Traverseproc.traverse.

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.

Annotations
@Override