Top Fields Constructors Methods
org.python.core

public abstract Class PyNewWrapper

extends PyBuiltinMethod
implements Traverseproc
Class Inheritance
All Implemented Interfaces
org.python.core.Traverseproc
Known Direct Subclasses
org.python.core.PyOverridableNew

Field Summary

Modifier and TypeField and Description
public PyType
Inherited from org.python.core.PyBuiltinMethod:
self

Constructor Summary

AccessConstructor and Description
public
PyNewWrapper()

Creates a wrapper without binding it to a type.

public
PyNewWrapper(Class<T> c, String name, int minargs, int maxargs)

public
PyNewWrapper(PyType type, String name, int minargs, int maxargs)

Method Summary

Modifier and TypeMethod and Description
public PyObject
__call__(PyObject[]
all arguments to the function.
args
)

Overrides org.python.core.PyObject.__call__.

A variant of the __call__ method when no keywords are passed.

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

Overrides org.python.core.PyObject.__call__.

The basic method to override when implementing a callable object.

public PyBuiltinCallable
bind(PyObject self)

Overrides org.python.core.PyBuiltinMethod.bind.

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

public PyType
public abstract PyObject
new_impl(boolean init, PyType subtype, PyObject[] args, String[] keywords)

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

Overrides org.python.core.PyBuiltinMethod.traverse.

Implements org.python.core.Traverseproc.traverse.

Traverses all directly contained PyObjects.

Inherited from org.python.core.PyBuiltinMethod:
__cmp__getSelfhashCodemakeDescriptor

Field Detail

for_typeback to summary
public PyType for_type

Constructor Detail

PyNewWrapperback to summary
public PyNewWrapper()

Creates a wrapper without binding it to a type. setWrappedType must be called before this wrapper can be used.

PyNewWrapperback to summary
public PyNewWrapper(Class<T> c, String name, int minargs, int maxargs)
PyNewWrapperback to summary
public PyNewWrapper(PyType type, String name, int minargs, int maxargs)

Method Detail

__call__back to summary
public PyObject __call__(PyObject[] args)

Overrides org.python.core.PyObject.__call__.

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

A variant of the __call__ method when no keywords are passed. The default behavior is to invoke __call__(args, keywords) with the appropriate arguments. The only reason to override this function would be for improved performance.

Parameters
args:PyObject[]

all arguments to the function.

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

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).

keywords:String[]

the keywords used for all keyword arguments.

bindback to summary
public PyBuiltinCallable bind(PyObject self)

Overrides org.python.core.PyBuiltinMethod.bind.

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

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

getWrappedTypeback to summary
public PyType getWrappedType()
new_implback to summary
public abstract PyObject new_impl(boolean init, PyType subtype, PyObject[] args, String[] keywords)
refersDirectlyToback to summary
public boolean refersDirectlyTo(PyObject ob)

Overrides org.python.core.PyBuiltinMethod.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
setWrappedTypeback to summary
public void setWrappedType(PyType type)
traverseback to summary
public int traverse(Visitproc visit, Object arg)

Overrides org.python.core.PyBuiltinMethod.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