Class PythonHostMembers
java.lang.Object
io.micronaut.context.python.PythonHostMembers
Members of Java objects that GraalPy host interop does not expose: the public methods a public
class inherits from a non-public superclass.
GraalPy only exposes a method whose declaring class is public, so the methods
PullSubscribeOptions.Builder inherits from the protected generic
SubscribeOptions.Builder are invisible (foreign object has no attribute 'stream')
although Java code calls them through the public subclass. The Python class registered for
java.lang.Object in GraalPyContextFactory asks inheritedMember(Object, String) for such a
name after the regular lookup failed; the method is then invoked through a method handle looked
up on the public subclass, which is how compiled Java code reaches it.
- Since:
- 5.2.0
- Author:
- Micronaut Team
-
Method Summary
Modifier and TypeMethodDescriptionstatic @Nullable ObjectinheritedMember(Object receiver, String name) A callable invoking the public methods of the given name that the class of the receiver inherits from a non-public superclass, ornullwhen it has none.
-
Method Details
-
inheritedMember
A callable invoking the public methods of the given name that the class of the receiver inherits from a non-public superclass, ornullwhen it has none.- Parameters:
receiver- The Java objectname- The member name- Returns:
- The callable, or
null
-