Top Fields Constructors Methods
org.python.core

public Class PyMethodDescr

extends PyDescriptor
implements Info, Traverseproc
Class Inheritance
All Implemented Interfaces
org.python.core.Traverseproc, org.python.core.PyBuiltinCallable.Info, java.io.Serializable
Known Direct Subclasses
org.python.core.PyClassMethodDescr
Annotations
@ExposedType
name:method_descriptor
base:PyObject
isBaseType:false
Imports
org.python.expose.ExposedGet, .ExposedMethod, .ExposedType

Field Summary

Modifier and TypeField and Description
protected int
protected PyBuiltinCallable
protected int
Inherited from org.python.core.PyDescriptor:
dtypename

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public PyObject
__call__(PyObject[]
all arguments to the function (including keyword arguments).
args
,
String[]
the keywords used for all keyword arguments.
kwargs
)

Overrides org.python.core.PyObject.__call__.

The basic method to override when implementing a callable object.

public PyObject
__get__(PyObject
- the instance accessing this descriptor. Can be null if this is being accessed by a type.
obj
,
PyObject
- the type accessing this descriptor. Will be null if obj exists as obj is of the type accessing the descriptor.
type
)

Overrides org.python.core.PyObject.__get__.

Get descriptor for this PyObject.

public String
public int
public int
public String

Returns:

a name String
getName
()

Implements org.python.core.PyBuiltinCallable.Info.getName.

Return the name this descriptor is exposed as.

public PyObject

Returns:

this descriptor's owner
getObjClass
()

Return the owner class of this descriptor.

pack-priv final PyObject
pack-priv final PyObject
public boolean
public String
toString()

Overrides org.python.core.PyObject.toString.

Returns a string representation of the object.

public int
traverse(Visitproc visit, Object arg)

Overrides org.python.core.PyDescriptor.traverse.

Implements org.python.core.Traverseproc.traverse.

Traverses all directly contained PyObjects.

public PyException
Inherited from org.python.core.PyDescriptor:
checkCallerTypecheckGetterType

Field Detail

maxargsback to summary
protected int maxargs
methback to summary
protected PyBuiltinCallable meth
minargsback to summary
protected int minargs

Constructor Detail

PyMethodDescrback to summary
public PyMethodDescr(PyType t, PyBuiltinCallable func)

Method Detail

__call__back to summary
public PyObject __call__(PyObject[] args, String[] kwargs)

Overrides org.python.core.PyObject.__call__.

Doc from org.python.core.PyObject.__call__.

The basic method to override when implementing a callable object. The first len(args)-len(keywords) members of args[] are plain arguments. The last len(keywords) arguments are the values of the keyword arguments.

Parameters
args:PyObject[]

all arguments to the function (including keyword arguments).

kwargs:String[]

the keywords used for all keyword arguments.

Annotations
@Override
__get__back to summary
public PyObject __get__(PyObject obj, PyObject type)

Overrides org.python.core.PyObject.__get__.

Doc from org.python.core.PyObject.__get__.

Get descriptor for this PyObject.

Parameters
obj:PyObject

- the instance accessing this descriptor. Can be null if this is being accessed by a type.

type:PyObject

- the type accessing this descriptor. Will be null if obj exists as obj is of the type accessing the descriptor.

Returns:PyObject

- the object defined for this descriptor for the given obj and type.

Annotations
@Override

getDocback to summary
public String getDoc()
Annotations
@ExposedGet
name:__doc__
getMaxargsback to summary
public int getMaxargs()

Implements org.python.core.PyBuiltinCallable.Info.getMaxargs.

Annotations
@Override
getMinargsback to summary
public int getMinargs()

Implements org.python.core.PyBuiltinCallable.Info.getMinargs.

Annotations
@Override
getNameback to summary
public String getName()

Implements org.python.core.PyBuiltinCallable.Info.getName.

Return the name this descriptor is exposed as.

Returns:String

a name String

Annotations
@Override
@ExposedGet
name:__name__

getObjClassback to summary
public PyObject getObjClass()

Return the owner class of this descriptor.

Returns:PyObject

this descriptor's owner

Annotations
@ExposedGet
name:__objclass__

method_descriptor___call__back to summary
pack-priv final PyObject method_descriptor___call__(PyObject[] args, String[] kwargs)
Annotations
@ExposedMethod
method_descriptor___get__back to summary
pack-priv final PyObject method_descriptor___get__(PyObject obj, PyObject type)
Annotations
@ExposedMethod
defaults:null
refersDirectlyToback to summary
public boolean refersDirectlyTo(PyObject ob)

Overrides org.python.core.PyDescriptor.refersDirectlyTo.

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
toStringback to summary
public String toString()

Overrides org.python.core.PyObject.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

Annotations
@Override

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

Overrides org.python.core.PyDescriptor.traverse.

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
unexpectedCallback to summary
public PyException unexpectedCall(int nargs, boolean keywords)

Implements org.python.core.PyBuiltinCallable.Info.unexpectedCall.

Annotations
@Override