Top Description Fields Constructors Methods
org.python.core

public abstract Class PyOverridableNew

extends PyNewWrapper
Class Inheritance

A __new__ function that tells its subclasses to just init if __new__ is being called on the type the function was defined on. Otherwise, it just leaves initting up to the subtype otherwise.

Field Summary

Inherited from org.python.core.PyNewWrapper:
for_type

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public abstract PyObject
createOfSubtype(PyType subtype)

Called when new is invoked on a subtype of for_type.

public abstract PyObject

Returns:

- the new object.
createOfType
(boolean
- if the new object should be initted.
init
,
PyObject[]
- args passed to call
args
,
String[]
- keywords passed to call
keywords
)

Called when new is invoked on the type the new was defined on.

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

Implements abstract org.python.core.PyNewWrapper.new_impl.

Inherited from org.python.core.PyNewWrapper:
__call____call__bindgetWrappedTyperefersDirectlyTosetWrappedTypetraverse

Constructor Detail

PyOverridableNewback to summary
public PyOverridableNew()

Method Detail

createOfSubtypeback to summary
public abstract PyObject createOfSubtype(PyType subtype)

Called when new is invoked on a subtype of for_type.

createOfTypeback to summary
public abstract PyObject createOfType(boolean init, PyObject[] args, String[] keywords)

Called when new is invoked on the type the new was defined on.

Parameters
init:boolean

- if the new object should be initted.

args:PyObject[]

- args passed to call

keywords:String[]

- keywords passed to call

Returns:PyObject

- the new object.

new_implback to summary
public PyObject new_impl(boolean init, PyType subtype, PyObject[] args, String[] keywords)

Implements abstract org.python.core.PyNewWrapper.new_impl.

Annotations
@Override