org.python.core

Class PyType

public class PyType extends PyObject implements Serializable

first-class Python type.
Nested Class Summary
static interfacePyType.Newstyle
Field Summary
static Stringexposed_name
Method Summary
voiddelBases()
voiddelDict()
PyObjectfastGetDict()
StringfastGetName()
static PyTypefromClass(Class c)
PyObjectgetBase()
PyObjectgetBases()
PyObjectgetDict()
StringgetFullName()
PyObjectgetModule()
PyTuplegetMro()
intgetNumSlots()
PyObjectgetStatic()
PyObjectinstDict()
booleanisSubType(PyType supertype)
booleanlayoutAligns(PyType other)
Checks that the physical layout between this type and other are compatible.
PyObjectlookup(String name)
INTERNAL lookup for name through mro objects' dicts
PyObjectlookup_where(String name, PyObject[] where)
static PyObjectnewType(PyNewWrapper new_, PyType metatype, String name, PyTuple bases, PyObject dict)
StringsafeRepr()
voidsetBases(PyObject newBasesTuple)
voidsetDict(PyObject newDict)
PyObjectsuper_lookup(PyType ref, String name)
StringtoString()
static voidtypeSetup(PyObject dict, PyType.Newstyle marker)
PyObjecttype_getSubclasses()
static PyObjecttype_new(PyNewWrapper new_, boolean init, PyType subtype, PyObject[] args, String[] keywords)
PyObject__call__(PyObject[] args, String[] keywords)
void__delattr__(String name)
PyObject__findattr__(String name)
void__setattr__(String name, PyObject value)
Object__tojava__(Class c)

Field Detail

exposed_name

public static final String exposed_name

Method Detail

delBases

public void delBases()

delDict

public void delDict()

fastGetDict

public PyObject fastGetDict()

See Also: fastGetDict

fastGetName

public String fastGetName()

fromClass

public static PyType fromClass(Class c)

getBase

public PyObject getBase()

getBases

public PyObject getBases()

getDict

public PyObject getDict()

getFullName

public String getFullName()

getModule

public PyObject getModule()

getMro

public PyTuple getMro()

getNumSlots

public int getNumSlots()

getStatic

public PyObject getStatic()

instDict

public PyObject instDict()

isSubType

public boolean isSubType(PyType supertype)

layoutAligns

public boolean layoutAligns(PyType other)
Checks that the physical layout between this type and other are compatible.

lookup

public PyObject lookup(String name)
INTERNAL lookup for name through mro objects' dicts

Parameters: name attribute name (must be interned)

Returns: found object or null

lookup_where

public PyObject lookup_where(String name, PyObject[] where)

newType

public static PyObject newType(PyNewWrapper new_, PyType metatype, String name, PyTuple bases, PyObject dict)

safeRepr

public String safeRepr()

See Also: safeRepr

setBases

public void setBases(PyObject newBasesTuple)

setDict

public void setDict(PyObject newDict)

super_lookup

public PyObject super_lookup(PyType ref, String name)

toString

public String toString()

typeSetup

public static void typeSetup(PyObject dict, PyType.Newstyle marker)

type_getSubclasses

public final PyObject type_getSubclasses()

type_new

public static PyObject type_new(PyNewWrapper new_, boolean init, PyType subtype, PyObject[] args, String[] keywords)

__call__

public PyObject __call__(PyObject[] args, String[] keywords)

See Also: (org.python.core.PyObject[], java.lang.String[])

__delattr__

public void __delattr__(String name)

See Also: PyObject

__findattr__

public PyObject __findattr__(String name)

See Also: PyObject

__setattr__

public void __setattr__(String name, PyObject value)

See Also: PyObject

__tojava__

public Object __tojava__(Class c)
Jython homepage