Skip to content

Add @explicitInterface metadata option to generator #1005

Closed
@jpobst

Description

@jpobst

Context: #1000 (comment)

In order to fully support "reabstraction", we need to emit member names with explicit interface names.

public partial interface ICloseable : global::Java.Lang.IAutoCloseable {
    abstract void IAutoCloseable.Close ();
}

This isn't something we have enough information to figure out automatically, so we should allow it to be specified with metadata using a new explicitInterface attribute.

<attr path="/api/package[@name='java.io']/interface[@name='Closeable']/method[@name='Close']" name="explicitInterface">
    IAutoCloseable
</attr>

Note this is not really a concept that generator "understands", it will simply output whatever is specified in this attribute. Thus the value is the C# interface name, not the Java interface name.

For properties, placing explicitInterface on either the getXXX or setXXX methods will work. The getter value takes precedence if both are specified.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementProposed change to current functionalitygeneratorIssues binding a Java library (generator, class-parse, etc.)

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions