Interface PythonFunctionalInterfaceProvider
The functional interfaces the Python compiler found in the Java types the Python sources
reference: the host access converts a Python callable to each of them by the arity of the
callable, so that a Java method overloaded on functional interfaces, or on a functional
interface and
Iterable, is called with a plain lambda (see PythonCallables).
The compiler generates an implementation per compilation, a singleton bean that is also
registered as a service, naming the functional interfaces the referenced Java types (imported
types, Java bases of Python classes, type hints) accept as method parameters, the interfaces
accepted by the methods of the types those methods return, and the referenced types that are
functional interfaces themselves. A functional interface is an interface annotated with
FunctionalInterface or, outside the JDK, an interface with a single abstract method.
- Since:
- 5.2.4
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final recordA functional interface, named rather than referenced: an interface of a compile-time only dependency is absent at run time, and the host access skips an entry it cannot load instead of failing with the Python context. -
Method Summary
-
Method Details
-
entries
List<PythonFunctionalInterfaceProvider.Entry> entries()- Returns:
- The functional interfaces
-