Implementation Note
It must be possible to create an instance of any concrete
descriptor (a sub-class of this one) in circumstances where the
only types in existence are PyType#TYPE and
PyType#OBJECT_TYPE, and where these have not yet been
given their descriptor attributes or operation slots
(op_* slots}.
In order to create a descriptor, the JVM need only complete the static initialisation of the Java class for that descriptor and be able to execute the constructor.
| Modifier and Type | Field and Description |
|---|---|
| protected static final String | |
| protected static final String | |
| protected static final String | |
| protected static final Slot. | |
| protected final String | name
Name of the object described, e.g. "__add__" or "to_bytes". |
| protected final PyType | objclass
Python |
| protected String | qualname
Qualified name of the object described, e.g. "float.__add__" or "int.to_bytes". |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv abstract Object | |
| private String | |
| protected void | |
| pack-priv static Object | |
| protected String | |
| public String | toString()
Overrides org. |
| DESCRIPTOR_DOESNT_APPLY | back to summary |
|---|---|
| protected static final String DESCRIPTOR_DOESNT_APPLY | |
| DESCRIPTOR_NEEDS_ARGUMENT | back to summary |
|---|---|
| protected static final String DESCRIPTOR_NEEDS_ARGUMENT | |
| DESCRIPTOR_REQUIRES | back to summary |
|---|---|
| protected static final String DESCRIPTOR_REQUIRES | |
| EMPTY | back to summary |
|---|---|
| protected static final Slot. Single re-used instance of | |
| name | back to summary |
|---|---|
| protected final String name Name of the object described, e.g. "__add__" or "to_bytes". This
is exposed to Python as
| |
| objclass | back to summary |
|---|---|
| protected final PyType objclass Python | |
| qualname | back to summary |
|---|---|
| protected String qualname Qualified name of the object described, e.g. "float.__add__" or
"int.to_bytes". This is exposed to Python as
| |
| Descriptor | back to summary |
|---|---|
| pack-priv Descriptor(PyType descrtype, PyType objclass, String name) | |
| __get__ | back to summary |
|---|---|
| pack-priv abstract Object __get__(Object obj, PyType type) throws Throwable The API Note Different descriptor types may have quite different
behaviour. In general, a call made with
attribute value, bound object or this attribute
| |
| calculate_qualname | back to summary |
|---|---|
| private String calculate_qualname() throws AttributeError, Throwable | |
| check | back to summary |
|---|---|
| protected void check(Object obj) throws TypeError
| |
| descr_get_qualname | back to summary |
|---|---|
| pack-priv static Object descr_get_qualname(Descriptor descr, Object ignored) throws AttributeError, Throwable | |
| descrRepr | back to summary |
|---|---|
| protected String descrRepr(String kind) Helper for | |
| toString | back to summary |
|---|---|
| public String toString() Overrides org. Doc from java. Returns a string representation of the object. | |