Interface ValueCoercible.GeneratedPropertyMembers

Enclosing interface:
ValueCoercible

public static interface ValueCoercible.GeneratedPropertyMembers
Build-time generated JavaBean accessor aliases for Python wrappers.

Only generated classes that need property aliases implement this contract. That keeps the generic ValueCoercible path free of Java method/field reflection while still preserving Python-side calls such as getName() for generated bean wrappers.

  • Method Details

    • micronautValueCoercibleGetterPropertyName

      @Nullable String micronautValueCoercibleGetterPropertyName(String key)
      Resolves a generated JavaBean getter method name to the Python property it should read.

      Generated wrappers use this for aliases such as getName() when the underlying Python object only has a name attribute.

      Parameters:
      key - The requested proxy member name.
      Returns:
      The Python property name, or null when the member is not a generated getter alias.
    • micronautValueCoercibleSetterPropertyName

      @Nullable String micronautValueCoercibleSetterPropertyName(String key)
      Resolves a generated JavaBean setter method name to the Python property it should write.

      Generated wrappers use this for aliases such as setName(value) when the underlying Python object only has a name attribute.

      Parameters:
      key - The requested proxy member name.
      Returns:
      The Python property name, or null when the member is not a generated setter alias.
    • micronautValueCoercibleSetMember

      default boolean micronautValueCoercibleSetMember(String key, org.graalvm.polyglot.Value value)
      Gives generated wrappers a chance to handle an incoming member assignment directly.

      Returning true means the assignment has been fully handled and the generic ValueCoercible.putMember(String, Value) path must not write the member again.

      Parameters:
      key - The member being assigned.
      value - The incoming polyglot value.
      Returns:
      true when the generated wrapper consumed the assignment.
    • micronautValueCoerciblePutMember

      default boolean micronautValueCoerciblePutMember(String key, org.graalvm.polyglot.Value value)
      Receives the value that was written to the wrapped Python object.

      Generated wrappers use this hook to keep Java-side fields and remembered async members in sync with Python-side property writes.

      Parameters:
      key - The Python property or member name that was written.
      value - The value now stored on the wrapped Python object.
      Returns:
      true when the generated wrapper consumed the notification.