Commit bd7c60a
authored
[generator] Support //interface/@no-alternatives (#601)
Context: #509
In 105d544 we began cleaning up our existing "alternative" hacks for
bindings that use the new C#8 DIM features. However, as we add new
API interfaces we will continue to generate new `[Obsolete]`
"alternative" classes.
We do not need to add new already-obsolete API to our bindings.
Update `generator` so that Metadata.xml files can now add a
`//interface/@no-alternatives` attribute. When this attribute is
`true`, the alternative types won't be emitted.
This will be used in `Mono.Android.dll` like this:
<attr api-since="30" path="/api/package/interface[contains(@merge.SourceFile,'api-30.xml.in')]" name="no-alternatives">true</attr>
which will prevent any interfaces added in API-R+ from creating
`[Obsolete]` alternative classes.1 parent 105d544 commit bd7c60a
File tree
4 files changed
+43
-0
lines changed- tests/generator-Tests/Unit-Tests
- tools/generator
- Java.Interop.Tools.Generator.CodeGeneration
- Java.Interop.Tools.Generator.Importers
- Java.Interop.Tools.Generator.ObjectModel
4 files changed
+43
-0
lines changedLines changed: 33 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
363 | 363 | | |
364 | 364 | | |
365 | 365 | | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
366 | 399 | | |
367 | 400 | | |
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
732 | 732 | | |
733 | 733 | | |
734 | 734 | | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
735 | 740 | | |
736 | 741 | | |
737 | 742 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
197 | 197 | | |
198 | 198 | | |
199 | 199 | | |
| 200 | + | |
200 | 201 | | |
201 | 202 | | |
202 | 203 | | |
| |||
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
186 | 186 | | |
187 | 187 | | |
188 | 188 | | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
189 | 193 | | |
190 | 194 | | |
191 | 195 | | |
| |||
0 commit comments