type
object. Type objects are normally created
(when created from Java) by a call to
PyType#fromSpec(Spec)
.
Modifier and Type | Class and Description |
---|---|
private static class | PyType.BootstrapTask
A record used to defer the completion of a particular type object. |
public static enum | PyType.Flag
Enumeration of the characteristics of a type. |
public static class | PyType.Spec
A specification for a Python type. |
Modifier and Type | Field and Description |
---|---|
pack-priv final int | acceptedCount
The number of Java classes in |
private PyType | base
The |
private PyType[] | bases
The |
pack-priv final Map | binopTable
Handle arrays for in which to look up binary class-specific methods when these are provided as a supplementary implementation class. |
pack-priv static final Map | bootstrapTasks
Classes for which the type system has to prepare |
pack-priv final Class | classes
The Java classes appearing as operands in the operations and methods of the type. |
pack-priv final Class | definingClass
The Java class defining operations on instances of the type. |
private final Map | dict
The dictionary of the type is always an ordered |
pack-priv static final PyType[] | EMPTY_TYPE_ARRAY
An empty array of type objects |
pack-priv EnumSet | flags
Characteristics of the type, to determine behaviours (such as mutability) of instances or the type itself, or to provide quick answers to frequent questions such as "are instances data descriptors". |
pack-priv final int | |
private static MethodHandles. | LOOKUP
Lookup object on |
private PyType[] | mro
The |
pack-priv final String | name
Name of the type. |
pack-priv static final PyType | OBJECT_TYPE
The type object of |
private static final PyType[] | ONLY_OBJECT
An array containing only 'object', the bases of many types. |
public static final PyType | TYPE
The type object of |
private final PyType | type
Particular type of this |
Access | Constructor and Description |
---|---|
private | PyType()
Partially construct a |
private |
Modifier and Type | Method and Description |
---|---|
protected void | __delattr__(String
of the attribute name)
|
protected Object | Returns: attribute valueof the attribute name)
|
protected Object | |
protected void | __setattr__(String
of the attribute name, Object to give the attribute value)
|
private void | addDefinitions(PyType.
to apply specAdd methods, get-sets, members and special functions as attributes to this type, as discovered through the specification. |
private static PyType | |
pack-priv boolean | |
public boolean | Returns: true iff o is exactly of this typeobject to test o)
|
private void | deduceFlags()
The |
private void | defineOperations(PyType.
Define the Operations objects for this type, posting them to the registry. |
private void | fillDictionary(PyType.
to apply specLoad the dictionary of this type with attributes discovered through the specification. |
pack-priv static PyType | |
public static PyType | |
pack-priv PyType | |
pack-priv PyType[] | |
public final Map | getDict()
Implements org. type in a read-only view.
|
pack-priv static Object | |
pack-priv Class | getJavaClass()
Implements abstract org. PyType object.
|
pack-priv PyType[] | |
public String | |
pack-priv static Object | |
public PyType | |
pack-priv final boolean | Returns: whether a descriptorReturn whether this type uses object.__getattribute__ from . |
pack-priv int | Returns: its index or -1a class matching one of the accepted classes c)Find the index of the given class in the accepted classes for this type. |
pack-priv int | Returns: its index or -1a class matching one of the operand classes c)Find the index of the given class in the known operand classes for this type. |
pack-priv final boolean | Returns: whether a data descriptorOverrides org. __get__ and at least one of __set__ or
__delete__ .
|
pack-priv final boolean | Returns: whether a descriptorReturn whether an instance of this type is a descriptor (defines
|
private static boolean | |
pack-priv final boolean | Returns: whether a method descriptorOverrides org. __get__
participates in the optimised call pattern supported by
Opcode311#LOAD_METHOD .
|
pack-priv final boolean | Returns: whether a data descriptorReturn whether special methods in this type may be assigned new meanings after type creation (or may be safely cached). |
pack-priv boolean | Returns: true if this is a sub-type of b to test b)Determine if this type is a Python sub-type of |
pack-priv Object | |
pack-priv Object | Returns: dictionary entry or nullto look up, must be exactly a name)str Equivalent to |
public static PyType | Returns: the Python type ofobj to inspect obj)Hides org. obj .
|
private void | setAllSlots()
Set all the slots ( |
private void | |
private void | |
public String | |
pack-priv PyType | type(Object
subject of the enquiry x)Implements abstract org. |
private boolean | Returns: true if this is a sub-type of b to test b)Determine if this type is a Python sub-type of |
pack-priv PyType | uniqueType()
Implements abstract org. |
protected void | updateAfterSetAttr(String
of the attribute modified name)Called from |