Commit e709c94
[TrimmableTypeMap] JavaPeerScanner execution logic
Add JavaPeerScanner — the second phase that consumes AssemblyIndex
results and produces the final list of JavaPeerInfo for the app:
- Walks all indexed types and resolves their Java peer registrations
- Handles inheritance: traverses base types across assemblies to find
the nearest registered Java peer ancestor
- Detects activation constructors (IntPtr+JniHandleOwnership) and
distinguishes between direct declarations and inherited ones
- Collects marshal methods ([Register] on methods) and exported
methods ([Export]) with their JNI signatures
- Merges component attribute metadata ([Activity], etc.) and resolves
JNI names from attribute properties
- Flags types for unconditional preservation when component attributes
with non-default JNI names are present
The scanner is designed as a pure function: assemblies in → peer info
out, with no side effects or global state.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 850f838 commit e709c94
File tree
2 files changed
+737
-7
lines changed- src/Microsoft.Android.Sdk.TrimmableTypeMap
- Scanner
2 files changed
+737
-7
lines changedLines changed: 2 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
| 14 | + | |
20 | 15 | | |
21 | 16 | | |
22 | 17 | | |
| |||
0 commit comments