Operations
object provides behaviour to a Java object
by defining, for its Java class, a MethodHandle
on the
implementation of each special method required by the
implementation and enumerated in Slot
. (This is almost
the same as the set of special methods defined by the Python data
model.)
The run-time system will form a mapping from each Java class to
an instance of (a specific sub-class of) Operations
.
Apart from a small collection of bootstrap classes (all of them
built-in types), this mapping will be developed as the classes
are encountered through the use of instances of them in Python
code.
In cases where the behaviour depends on the Python type as well
as the Java class, this is taken care of within the handle
embedded in the Operations
object for the Java class.
Modifier and Type | Class and Description |
---|---|
pack-priv static class | Operations.Accepted
Operations for an accepted implementation (non-canonical implementation) are represented by an instance of this class. |
pack-priv static class | Operations.BinopGrid
A table of binary operations that may be indexed by a pair of
classes (or their |
pack-priv static class | Operations.Clash
Exception reporting that an attempt was made to register a second
|
pack-priv static class | Operations.Derived
Operations for a Python class defined in Python are represented by an instance of this class. |
private static class | Operations.Registry
There is only one instance of this class and it is
|
Modifier and Type | Field and Description |
---|---|
pack-priv static final Operations | DERIVED
The |
pack-priv MethodHandle | op_abs
Handle on special method |
pack-priv MethodHandle | op_add
Handle on special method |
pack-priv MethodHandle | op_aiter
Handle on special method |
pack-priv MethodHandle | op_and
Handle on special method |
pack-priv MethodHandle | op_anext
Handle on special method |
pack-priv MethodHandle | op_await
Handle on special method |
pack-priv MethodHandle | op_bool
Handle on special method |
pack-priv MethodHandle | op_call
Handle on special method |
pack-priv MethodHandle | op_contains
Handle on special method |
pack-priv MethodHandle | op_delattr
Handle on special method |
pack-priv MethodHandle | op_delete
Handle on special method |
pack-priv MethodHandle | op_delitem
Handle on special method |
pack-priv MethodHandle | op_divmod
Handle on special method |
pack-priv MethodHandle | op_eq
Handle on special method |
pack-priv MethodHandle | op_float
Handle on special method |
pack-priv MethodHandle | op_floordiv
Handle on special method |
pack-priv MethodHandle | op_ge
Handle on special method |
pack-priv MethodHandle | op_get
Handle on special method |
pack-priv MethodHandle | op_getattr
Handle on special method |
pack-priv MethodHandle | op_getattribute
Handle on special method |
pack-priv MethodHandle | op_getitem
Handle on special method |
pack-priv MethodHandle | op_gt
Handle on special method |
pack-priv MethodHandle | op_hash
Handle on special method |
pack-priv MethodHandle | op_iadd
Handle on special method |
pack-priv MethodHandle | op_iand
Handle on special method |
pack-priv MethodHandle | op_ifloordiv
Handle on special method |
pack-priv MethodHandle | op_imatmul
Handle on special method |
pack-priv MethodHandle | op_imod
Handle on special method |
pack-priv MethodHandle | op_imul
Handle on special method |
pack-priv MethodHandle | op_index
Handle on special method |
pack-priv MethodHandle | op_init
Handle on special method |
pack-priv MethodHandle | op_int
Handle on special method |
pack-priv MethodHandle | op_invert
Handle on special method |
pack-priv MethodHandle | op_ior
Handle on special method |
pack-priv MethodHandle | op_isub
Handle on special method |
pack-priv MethodHandle | op_iter
Handle on special method |
pack-priv MethodHandle | op_itruediv
Handle on special method |
pack-priv MethodHandle | op_ixor
Handle on special method |
pack-priv MethodHandle | op_le
Handle on special method |
pack-priv MethodHandle | op_len
Handle on special method |
pack-priv MethodHandle | op_lshift
Handle on special method |
pack-priv MethodHandle | op_lt
Handle on special method |
pack-priv MethodHandle | op_matmul
Handle on special method |
pack-priv MethodHandle | op_mod
Handle on special method |
pack-priv MethodHandle | op_mul
Handle on special method |
pack-priv MethodHandle | op_ne
Handle on special method |
pack-priv MethodHandle | op_neg
Handle on special method |
pack-priv MethodHandle | op_next
Handle on special method |
pack-priv MethodHandle | op_or
Handle on special method |
pack-priv MethodHandle | op_pos
Handle on special method |
pack-priv MethodHandle | op_pow
Handle on special method |
pack-priv MethodHandle | op_radd
Handle on special method |
pack-priv MethodHandle | op_rand
Handle on special method |
pack-priv MethodHandle | op_rdivmod
Handle on special method |
pack-priv MethodHandle | op_repr
Handle on special method |
pack-priv MethodHandle | op_rfloordiv
Handle on special method |
pack-priv MethodHandle | op_rlshift
Handle on special method |
pack-priv MethodHandle | op_rmatmul
Handle on special method |
pack-priv MethodHandle | op_rmod
Handle on special method |
pack-priv MethodHandle | op_rmul
Handle on special method |
pack-priv MethodHandle | op_ror
Handle on special method |
pack-priv MethodHandle | op_rpow
Handle on special method |
pack-priv MethodHandle | op_rrshift
Handle on special method |
pack-priv MethodHandle | op_rshift
Handle on special method |
pack-priv MethodHandle | op_rsub
Handle on special method |
pack-priv MethodHandle | op_rtruediv
Handle on special method |
pack-priv MethodHandle | op_rxor
Handle on special method |
pack-priv MethodHandle | op_set
Handle on special method |
pack-priv MethodHandle | op_setattr
Handle on special method |
pack-priv MethodHandle | op_setitem
Handle on special method |
pack-priv MethodHandle | op_str
Handle on special method |
pack-priv MethodHandle | op_sub
Handle on special method |
pack-priv MethodHandle | op_truediv
Handle on special method |
pack-priv MethodHandle | op_xor
Handle on special method |
pack-priv static final Operations. | registry
Mapping from Java class to the |
Access | Constructor and Description |
---|---|
pack-priv |
Modifier and Type | Method and Description |
---|---|
pack-priv static Operations | |
pack-priv int | Returns: index in the type (0 if canonical)Identify by index which Java implementation of the associated
type this |
pack-priv abstract Class | Returns: class of the implementationGet the Java implementation class this |
pack-priv boolean | |
pack-priv boolean | Returns: target is exactly a Pythonint Fast check that the target is exactly a Python |
pack-priv boolean | Returns: target is a method descriptorFast check that the target is a method descriptor. |
pack-priv static Operations | |
pack-priv static void | register(Class<?>
class with which associated c, Operations the operations object ops)Register the |
pack-priv static void | register(Class<?>[]
classes with which associated c, Operations[] the operations objects ops)Register the |
pack-priv abstract PyType | |
pack-priv abstract PyType | Returns: type representedGet the unique Python type for which this is operations object. |