-
Notifications
You must be signed in to change notification settings - Fork 64
Closed
dotnet/android
#6533Labels
bugComponent does not function as intendedComponent does not function as intendedgeneratorIssues binding a Java library (generator, class-parse, etc.)Issues binding a Java library (generator, class-parse, etc.)
Description
Given a type like this:
class MapCollections<K, V> {
class MapIterator implements Iterator<Map.Entry<K, V>>, Map.Entry<K, V> {
public K getKey() { ... }
}
}
class-parse does not copy the parent's type parameters to the nested type:
<class
jni-extends="Ljava/lang/Object;"
extends="java.lang.Object"
extends-generic-aware="java.lang.Object"
name="MapCollections.MapIterator"
jni-signature="Landroidx/collection/MapCollections$MapIterator;"
>
<implements
name="java.util.Iterator"
name-generic-aware="java.util.Iterator<java.util.Map.Entry<K, V>>"
jni-type="Ljava/util/Iterator<Ljava/util/Map$Entry<TK;TV;>;>;" />
<implements
name="java.util.Map.Entry"
name-generic-aware="java.util.Map.Entry<K, V>"
jni-type="Ljava/util/Map$Entry<TK;TV;>;" />
<method
name="getKey"
return="K"
jni-return="TK;"
jni-signature="()Ljava/lang/Object;" />
...
</class>
ApiXmlAdjuster does not check parent types for type parameters, and thus cannot resolve K or V within this type:
Error while processing type '[Class] androidx.collection.MapCollections.MapIterator': Type 'K' was not found.
Error while processing type '[Class] androidx.collection.MapCollections.MapIterator': Type 'V' was not found.
Because the implements cannot be resolved, the nested type is removed from the binding.
Metadata
Metadata
Assignees
Labels
bugComponent does not function as intendedComponent does not function as intendedgeneratorIssues binding a Java library (generator, class-parse, etc.)Issues binding a Java library (generator, class-parse, etc.)