MethodHandle
s for converting
arguments when calling a Java method from Python. The class enables
the implementation of built-in (or extension) Python types to be
written in a natural way using Java standard and primitive types.
The class name refers to the CPython Argument Clinic (by Larry Hastings) which generates argument processing code for exposed methods defined in C and by a textual header.
Modifier and Type | Field and Description |
---|---|
private static final MethodHandle | |
private static final MethodHandle | |
private static final MethodHandle | |
private static final MethodHandle | |
private static final MethodHandle | |
private static final MethodHandles. | LOOKUP
Lookup for resolving handles throughout the class. |
private static final Class | |
private static final MethodHandle | |
private static final MethodHandle |
Access | Constructor and Description |
---|---|
private |
Modifier and Type | Method and Description |
---|---|
private static MethodHandle | Returns: filter converting Python object toc .Java type c)The logic of this method defines the standard for converting Python types to a specified Java type. |
private static MethodHandle | Returns: filter convertingc to a Python object.Java type c)The logic of this method defines the standard for converting specified Java types to Python. |
pack-priv static MethodHandle[] | Returns: array of filter-adaptors to expectObject .type to adapt. mt, int index in the type at which to start. pos)Create an array of filters to convert an existing method handle,
with the given type, to one that expects arguments (starting at a
given index) that are all |
pack-priv static MethodHandle[] | Returns: array of filter-adaptors to expectObject .type to adapt. mt)Equivalent to |
pack-priv static MethodHandle | Returns: null or a filter-adapter to return
Object .type to adapt. mt)Return a filter that will adapt an existing method handle with
the given type, to one that the returns |
private static String |
booleanValueMH | back to summary |
---|---|
private static final MethodHandle booleanValueMH |
doubleArgMH | back to summary |
---|---|
private static final MethodHandle doubleArgMH |
doubleValueMH | back to summary |
---|---|
private static final MethodHandle doubleValueMH |
intArgMH | back to summary |
---|---|
private static final MethodHandle intArgMH |
intValueMH | back to summary |
---|---|
private static final MethodHandle intValueMH |
LOOKUP | back to summary |
---|---|
private static final MethodHandles. Lookup for resolving handles throughout the class. |
O | back to summary |
---|---|
private static final Class<?> O |
stringArgMH | back to summary |
---|---|
private static final MethodHandle stringArgMH |
voidValueMH | back to summary |
---|---|
private static final MethodHandle voidValueMH |
Clinic | back to summary |
---|---|
private Clinic() |
adaptParameterToObject | back to summary |
---|---|
private static MethodHandle adaptParameterToObject(Class<?> c) The logic of this method defines the standard for converting Python types to a specified Java type.
|
adaptReturnToObject | back to summary |
---|---|
private static MethodHandle adaptReturnToObject(Class<?> c) The logic of this method defines the standard for converting specified Java types to Python.
|
argumentFilter | back to summary |
---|---|
pack-priv static MethodHandle[] argumentFilter(MethodType mt, int pos) Create an array of filters to convert an existing method handle,
with the given type, to one that expects arguments (starting at a
given index) that are all
Where the existing method (described by
Where the existing method expects some other reference type, a
When using this filter to adapt a handle on a purported
implementation of an exposed Python method, types
|
argumentFilter | back to summary |
---|---|
pack-priv static MethodHandle[] argumentFilter(MethodType mt) Equivalent to
|
returnFilter | back to summary |
---|---|
pack-priv static MethodHandle returnFilter(MethodType mt) Return a filter that will adapt an existing method handle with
the given type, to one that the returns
This adapter will often be a constructor for the implementation
type or equivalent convenience method. If the return type of is
If the return type is already
|
stringArg | back to summary |
---|---|
private static String stringArg(Object o) throws TypeError, Throwable
|