Class PythonInterfaceDefaults.DefaultMethod

java.lang.Object
io.micronaut.context.python.PythonInterfaceDefaults.DefaultMethod
Enclosing class:
PythonInterfaceDefaults

@Internal public static final class PythonInterfaceDefaults.DefaultMethod extends Object
A default method (with its overloads) installed on a Python class; invoke(Value, Value) is what the installed Python method calls.
Since:
5.2.3
  • Method Details

    • name

      public String name()
      The Java method name, which is the name the method is installed under in Python.
      Returns:
      The name
    • invoke

      public @Nullable Object invoke(org.graalvm.polyglot.Value self, org.graalvm.polyglot.Value arguments)
      Invokes the default method on the Java view of a Python instance.
      Parameters:
      self - The Python instance
      arguments - The Python arguments
      Returns:
      The result, coerced back to the Python context