Commit 7f1a5ab
authored
[JavaTypeSystem] Enable resolving generic types on declaring types (#916)
Fixes: #815
Given Java code such as:
// Java
public class MyClass<T> {
public class MyNestedClass<U> {
public void doT(T value) {}
public void doU(U value) {}
}
}
`ApiXmlAdjuster` does not look for generic parameter types declared
on parent types, resulting in the method `doT()` being removed:
api.xml.class-parse : warning BG8605: The Java type 'T' could not be found (are you missing a Java reference jar/aar or a Java binding library NuGet?)
`java-resolution-report.log` (f658ab2) reports:
==== Cycle 1 ====
The method '[Method] void doT(T p0)' was removed because the Java parameter type 'T' could not be found.
`JavaTypeSystem` supports this, but it was initially disabled to help
ensure that it was producing the same output as `ApiXmlAdjuster` for
testing purposes.
We can now enable it.1 parent 8daa026 commit 7f1a5ab
File tree
3 files changed
+53
-8
lines changed- src/Java.Interop.Tools.JavaTypeSystem/JavaModels
- tests/Java.Interop.Tools.JavaTypeSystem-Tests
3 files changed
+53
-8
lines changedLines changed: 3 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
116 | 112 | | |
117 | 113 | | |
118 | 114 | | |
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
Lines changed: 49 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
76 | 125 | | |
77 | 126 | | |
0 commit comments