diff --git a/.gitmodules b/.gitmodules
index 760c2b84aeb..8882eb33f2f 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -10,10 +10,6 @@
path = external/debugger-libs
url = https://github.com/mono/debugger-libs
branch = main
-[submodule "external/Java.Interop"]
- path = external/Java.Interop
- url = https://github.com/dotnet/java-interop
- branch = main
[submodule "external/libunwind"]
path = external/libunwind
url = https://github.com/libunwind/libunwind.git
@@ -37,3 +33,7 @@
[submodule "external/termux-elf-cleaner"]
path = external/termux-elf-cleaner
url = https://github.com/termux/termux-elf-cleaner
+[submodule "external/Java.Interop/external/xamarin-android-tools"]
+ path = external/Java.Interop/external/xamarin-android-tools
+ url = https://github.com/xamarin/xamarin-android-tools.git
+ branch = main
diff --git a/build-tools/automation/azure-pipelines-public.yaml b/build-tools/automation/azure-pipelines-public.yaml
index 1d73956a3d7..535abc23b67 100644
--- a/build-tools/automation/azure-pipelines-public.yaml
+++ b/build-tools/automation/azure-pipelines-public.yaml
@@ -412,6 +412,19 @@ stages:
parameters:
condition: true
+# Java.Interop Tests Stage
+- template: /build-tools/automation/yaml-templates/stage-java-interop-tests.yaml@self
+ parameters:
+ windowsPool:
+ name: $(NetCorePublicPoolName)
+ demands:
+ - ImageOverride -equals $(WindowsPoolImageNetCorePublic)
+ macPool:
+ name: AcesShared
+ demands:
+ - ImageOverride -equals ACES_VM_SharedPool_Tahoe
+ os: macOS
+
# MAUI Tests Stage
- stage: maui_tests
displayName: MAUI Tests
diff --git a/build-tools/automation/azure-pipelines.yaml b/build-tools/automation/azure-pipelines.yaml
index 3c868ae2d18..7d2d53a1a3e 100644
--- a/build-tools/automation/azure-pipelines.yaml
+++ b/build-tools/automation/azure-pipelines.yaml
@@ -99,6 +99,8 @@ extends:
parameters:
usesCleanImages: ${{ parameters.macTestAgentsUseCleanImages }}
+ - template: /build-tools/automation/yaml-templates/stage-java-interop-tests.yaml@self
+
- stage: maui_tests
displayName: MAUI Tests
dependsOn: mac_build
diff --git a/build-tools/automation/yaml-templates/cache-gradle.yaml b/build-tools/automation/yaml-templates/cache-gradle.yaml
index 33a89b5bc8b..b10abce2bf1 100644
--- a/build-tools/automation/yaml-templates/cache-gradle.yaml
+++ b/build-tools/automation/yaml-templates/cache-gradle.yaml
@@ -9,14 +9,14 @@ parameters:
steps:
- script: |
- git submodule status --cached external/Java.Interop > $(Agent.TempDirectory)/java-interop-submodule-hash.txt
+ git log -1 --format=%H external/Java.Interop > $(Agent.TempDirectory)/java-interop-submodule-hash.txt
echo "##vso[task.setvariable variable=GRADLE_CACHE_DIR]$HOME/.gradle/caches"
workingDirectory: ${{ parameters.xaSourcePath }}
displayName: prepare Gradle cache variables
condition: ne(variables['Agent.OS'], 'Windows_NT')
- pwsh: |
- git submodule status --cached external/Java.Interop > $(Agent.TempDirectory)/java-interop-submodule-hash.txt
+ git log -1 --format=%H external/Java.Interop > $(Agent.TempDirectory)/java-interop-submodule-hash.txt
$gradleCacheDir = Join-Path $env:USERPROFILE ".gradle\caches"
Write-Host "##vso[task.setvariable variable=GRADLE_CACHE_DIR]$gradleCacheDir"
workingDirectory: ${{ parameters.xaSourcePath }}
diff --git a/build-tools/automation/yaml-templates/stage-java-interop-tests.yaml b/build-tools/automation/yaml-templates/stage-java-interop-tests.yaml
new file mode 100644
index 00000000000..05316ca44f9
--- /dev/null
+++ b/build-tools/automation/yaml-templates/stage-java-interop-tests.yaml
@@ -0,0 +1,107 @@
+# Java.Interop tests stage
+#
+# Mirrors the two jobs from
+# external/Java.Interop/build-tools/automation/azure-pipelines.yaml
+# (windows_dotnet_build, mac_dotnet_build) so that the Java.Interop
+# build + tests continue to run as part of dotnet/android CI now that
+# Java.Interop has been merged in-tree.
+#
+# Referenced from both:
+# - build-tools/automation/azure-pipelines.yaml (official / 1ES)
+# - build-tools/automation/azure-pipelines-public.yaml (public PR validation)
+
+parameters:
+- name: stageName
+ type: string
+ default: java_interop_tests
+- name: dependsOn
+ type: object
+ default: []
+- name: condition
+ type: string
+ default: succeeded()
+- name: windowsPool
+ type: object
+ default:
+ name: Azure Pipelines
+ vmImage: $(HostedWinImage)
+- name: macPool
+ type: object
+ default:
+ name: Azure Pipelines
+ vmImage: $(HostedMacImage)
+
+stages:
+- stage: ${{ parameters.stageName }}
+ displayName: Java.Interop Tests
+ dependsOn: ${{ parameters.dependsOn }}
+ condition: ${{ parameters.condition }}
+ variables:
+ # Variables consumed by external/Java.Interop/build-tools/automation/templates/*.yaml.
+ # Defined at stage scope so they don't conflict with dotnet/android-wide
+ # variables (e.g. DotNetTargetFramework=net11.0).
+ DotNetCoreVersion: $(DotNetSdkVersion).x
+ DotNetTargetFramework: $(DotNetStableTargetFramework)
+ NetCoreTargetFrameworkPathSuffix: -$(DotNetStableTargetFramework)
+ Build.Configuration: Release
+ RunningOnCI: true
+ jobs:
+
+ # Check - "Xamarin.Android (Java.Interop Tests Windows - .NET)"
+ - job: java_interop_windows_dotnet_build
+ displayName: Windows - .NET
+ pool: ${{ parameters.windowsPool }}
+ timeoutInMinutes: 60
+ workspace:
+ clean: all
+ steps:
+ - checkout: self
+ submodules: recursive
+ clean: true
+
+ - template: /external/Java.Interop/build-tools/automation/templates/install-dependencies.yaml@self
+
+ - template: /external/Java.Interop/build-tools/automation/templates/core-build.yaml@self
+
+ - template: /external/Java.Interop/build-tools/automation/templates/core-tests.yaml@self
+ parameters:
+ runNativeDotnetTests: true
+ nativeAotRid: win-x64
+ platformName: .NET - Windows
+
+ - template: /external/Java.Interop/build-tools/automation/templates/fail-on-dirty-tree.yaml@self
+
+ - template: /external/Java.Interop/build-tools/automation/templates/fail-on-issue.yaml@self
+
+ # Check - "Xamarin.Android (Java.Interop Tests Mac - .NET)"
+ - job: java_interop_mac_dotnet_build
+ displayName: Mac - .NET
+ pool: ${{ parameters.macPool }}
+ timeoutInMinutes: 20
+ workspace:
+ clean: all
+ steps:
+ - checkout: self
+ submodules: recursive
+ clean: true
+
+ - bash: |
+ set -e
+ if ! command -v cmake >/dev/null 2>&1 ; then
+ brew install cmake
+ fi
+ displayName: Ensure cmake is installed
+
+ - template: /external/Java.Interop/build-tools/automation/templates/install-dependencies.yaml@self
+
+ - template: /external/Java.Interop/build-tools/automation/templates/core-build.yaml@self
+
+ - template: /external/Java.Interop/build-tools/automation/templates/core-tests.yaml@self
+ parameters:
+ runNativeTests: true
+ nativeAotRid: osx-arm64
+ platformName: .NET - MacOS
+
+ - template: /external/Java.Interop/build-tools/automation/templates/fail-on-dirty-tree.yaml@self
+
+ - template: /external/Java.Interop/build-tools/automation/templates/fail-on-issue.yaml@self
diff --git a/build-tools/scripts/XAVersionInfo.targets b/build-tools/scripts/XAVersionInfo.targets
index 72cd05dcd46..5e2889a3fc7 100644
--- a/build-tools/scripts/XAVersionInfo.targets
+++ b/build-tools/scripts/XAVersionInfo.targets
@@ -16,9 +16,8 @@
- <_SubmoduleBranchInfo Include="external/Java.Interop">
- _BuildInfo_JavaInteropCommit
-
+
<_SubmoduleBranchInfo Include="external/xamarin-android-tools">
_BuildInfo_XamarinAndroidToolsCommit
diff --git a/external/Java.Interop b/external/Java.Interop
deleted file mode 160000
index 6ec1345165f..00000000000
--- a/external/Java.Interop
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit 6ec1345165fa7385c935f16ccaa8cc38be50a080
diff --git a/external/Java.Interop/.devcontainer/devcontainer.json b/external/Java.Interop/.devcontainer/devcontainer.json
new file mode 100644
index 00000000000..165213b119b
--- /dev/null
+++ b/external/Java.Interop/.devcontainer/devcontainer.json
@@ -0,0 +1,34 @@
+// For format details, see https://aka.ms/devcontainer.json. For config options, see the
+// README at: https://github.com/devcontainers/templates/tree/main/src/dotnet
+{
+ "name": "Linux Universal Image",
+ // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
+ "image": "mcr.microsoft.com/devcontainers/universal:2-linux"
+
+ // Features to add to the dev container. More info: https://containers.dev/features.
+ , "features": {
+ "ghcr.io/devcontainers/features/java:1": {
+ "version": "17",
+ "jdkDistro": "ms"
+ }
+ }
+
+ // Use 'forwardPorts' to make a list of ports inside the container available locally.
+ // "forwardPorts": [5000, 5001],
+ // "portsAttributes": {
+ // "5001": {
+ // "protocol": "https"
+ // }
+ // }
+
+ // Use 'postCreateCommand' to run commands after the container is created.
+ // Have GitHub Codespaces checkout all submodules
+ // https://github.com/orgs/community/discussions/25429
+ , "postCreateCommand": "git submodule update --init --recursive"
+
+ // Configure tool-specific properties.
+ // "customizations": {},
+
+ // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
+ // "remoteUser": "root"
+}
diff --git a/external/Java.Interop/.editorconfig b/external/Java.Interop/.editorconfig
new file mode 100644
index 00000000000..fa6269db147
--- /dev/null
+++ b/external/Java.Interop/.editorconfig
@@ -0,0 +1,500 @@
+###############################
+# Core EditorConfig Options #
+###############################
+
+root = true
+
+# All files
+[*]
+charset = utf-8
+trim_trailing_whitespace = true
+
+# MSBuild
+[*.{csproj,proj,projitems,shproj,fsproj,targets,props}]
+indent_style = space
+indent_size = 2
+
+# XML config files
+[*.{xml,axml,xaml,config,nuspec,resx}]
+indent_style = space
+indent_size = 2
+
+# RESX files
+[*.resx]
+trim_trailing_whitespace = false
+
+# JSON files
+[*.json]
+indent_style = space
+indent_size = 2
+
+# F# files
+[*.{fs, fsx, fsi}]
+indent_style = space
+indent_size = 4
+
+# Code files
+[*.{cs,csx,java,vb,vbx}]
+insert_final_newline = true
+indent_style = tab
+tab_width = 8
+indent_size = 8
+max_line_length = 180
+
+###############################
+# .NET Coding Conventions #
+###############################
+
+[*.{cs,vb}]
+# Organize usings
+dotnet_sort_system_directives_first = true
+dotnet_separate_import_directive_groups = false
+
+# Avoid "this." and "Me." if not necessary
+dotnet_style_qualification_for_field = false:suggestion
+dotnet_style_qualification_for_property = false:suggestion
+dotnet_style_qualification_for_method = false:suggestion
+dotnet_style_qualification_for_event = false:suggestion
+
+# Use language keywords instead of framework type names for type references
+dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion
+dotnet_style_predefined_type_for_member_access = true:suggestion
+
+# Suggest more modern language features when available
+dotnet_style_object_initializer = true:suggestion
+dotnet_style_collection_initializer = true:suggestion
+dotnet_style_coalesce_expression = true:suggestion
+dotnet_style_null_propagation = true:suggestion
+dotnet_style_explicit_tuple_names = true:suggestion
+
+# Parentheses preferences
+dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:silent
+dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:silent
+dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:silent
+dotnet_style_parentheses_in_other_operators = never_if_unnecessary:silent
+
+# Avoid redundant accessibility modifiers when they're default
+dotnet_style_require_accessibility_modifiers = omit_if_default:suggestion
+dotnet_style_readonly_field = true:suggestion
+
+# Expression-level preferences
+dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion
+dotnet_style_prefer_inferred_tuple_names = true:suggestion
+dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion
+dotnet_style_prefer_auto_properties = true:silent
+dotnet_style_prefer_conditional_expression_over_assignment = true:silent
+dotnet_style_prefer_conditional_expression_over_return = true:silent
+
+###############################
+# Naming Conventions #
+###############################
+
+# Style Definitions
+dotnet_naming_style.pascal_case_style.capitalization = pascal_case
+
+dotnet_naming_style.underline_separator.word_separator = _
+dotnet_naming_style.underline_separator.capitalization = all_lower
+
+# Symbol Definitions
+dotnet_naming_symbols.parameters.applicable_kinds = parameter
+dotnet_naming_symbols.parameters.applicable_accessibilities = *
+
+dotnet_naming_symbols.fields.applicable_kinds = field
+
+dotnet_naming_symbols.constant_fields.applicable_kinds = field
+dotnet_naming_symbols.constant_fields.applicable_accessibilities = *
+dotnet_naming_symbols.constant_fields.required_modifiers = const
+
+# Use CamelCase for parameters
+dotnet_naming_rule.method_parameters_should_be_camel_case.severity = suggestion
+dotnet_naming_rule.method_parameters_should_be_camel_case.symbols = parameters
+dotnet_naming_rule.method_parameters_should_be_camel_case.style = camel_case
+
+# Use PascalCase for constant fields
+dotnet_naming_rule.constant_fields_should_be_pascal_case.severity = suggestion
+dotnet_naming_rule.constant_fields_should_be_pascal_case.symbols = constant_fields
+dotnet_naming_rule.constant_fields_should_be_pascal_case.style = pascal_case_style
+
+# Use underline separator for instance fields
+dotnet_naming_rule.fields_should_be_underline_separator.severity = suggestion
+dotnet_naming_rule.fields_should_be_underline_separator.symbols = fields
+dotnet_naming_rule.fields_should_be_underline_separator.style = underline_separator
+
+
+###############################
+# C# Code Style Rules #
+###############################
+
+[*.cs]
+# var preferences
+csharp_style_var_for_built_in_types = true:silent
+csharp_style_var_when_type_is_apparent = true:silent
+csharp_style_var_elsewhere = true:silent
+
+# Expression-bodied members
+csharp_style_expression_bodied_methods = false:silent
+csharp_style_expression_bodied_constructors = false:silent
+csharp_style_expression_bodied_operators = false:silent
+csharp_style_expression_bodied_properties = true:silent
+csharp_style_expression_bodied_indexers = true:silent
+csharp_style_expression_bodied_accessors = true:silent
+
+# Pattern-matching preferences
+csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
+csharp_style_pattern_matching_over_as_with_null_check = true:suggestion
+
+# Null-checking preferences
+csharp_style_throw_expression = true:suggestion
+csharp_style_conditional_delegate_call = true:suggestion
+
+# Modifier preferences
+csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async:suggestion
+
+# Expression-level preferences
+csharp_prefer_braces = true:silent
+csharp_style_deconstructed_variable_declaration = true:suggestion
+csharp_prefer_simple_default_expression = true:suggestion
+csharp_style_pattern_local_over_anonymous_function = true:suggestion
+csharp_style_inlined_variable_declaration = true:suggestion
+
+###############################
+# C# Formatting Rules #
+###############################
+
+# Newline settings
+csharp_new_line_before_open_brace = methods,types
+csharp_new_line_before_else = false
+csharp_new_line_before_catch = false
+csharp_new_line_before_finally = false
+csharp_new_line_before_members_in_object_initializers = true
+csharp_new_line_before_members_in_anonymous_types = true
+
+# Indentation preferences
+csharp_indent_switch_labels = false
+csharp_indent_case_contents = true
+csharp_indent_switch_labels = true
+
+# Space preferences
+csharp_space_after_cast = true
+csharp_space_after_keywords_in_control_flow_statements = true
+csharp_space_between_method_call_parameter_list_parentheses = false
+csharp_space_between_method_declaration_parameter_list_parentheses = false
+csharp_space_between_parentheses = false
+csharp_space_before_colon_in_inheritance_clause = true
+csharp_space_after_colon_in_inheritance_clause = true
+csharp_space_around_binary_operators = before_and_after
+csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
+csharp_space_between_method_call_name_and_opening_parenthesis = true
+csharp_space_between_method_call_empty_parameter_list_parentheses = false
+csharp_space_between_method_declaration_name_and_open_parenthesis = true
+csharp_space_after_keywords_in_control_flow_statements = true
+csharp_space_before_open_square_brackets = true
+
+# Wrapping preferences
+csharp_preserve_single_line_statements = true
+csharp_preserve_single_line_blocks = true
+
+##################################
+# Visual Basic Code Style Rules #
+##################################
+
+[*.vb]
+# Modifier preferences
+visual_basic_preferred_modifier_order = Partial,Default,Private,Protected,Public,Friend,NotOverridable,Overridable,MustOverride,Overloads,Overrides,MustInherit,NotInheritable,Static,Shared,Shadows,ReadOnly,WriteOnly,Dim,Const,WithEvents,Widening,Narrowing,Custom,Async:suggestion
+
+##################################
+# DevDiv Recommended Analyzers #
+##################################
+
+# Code files
+[*.{cs,vb}]
+
+dotnet_diagnostic.CA2153.severity = error # Do Not Catch Corrupted State Exceptions
+dotnet_diagnostic.CA2301.severity = error # Do not call BinaryFormatter.Deserialize without first setting BinaryFormatter.Binder
+dotnet_diagnostic.CA2302.severity = error # Ensure BinaryFormatter.Binder is set before calling BinaryFormatter.Deserialize
+dotnet_diagnostic.CA2305.severity = error # Do not use insecure deserializer LosFormatter
+dotnet_diagnostic.CA2311.severity = error # Do not deserialize without first setting NetDataContractSerializer.Binder
+dotnet_diagnostic.CA2312.severity = error # Ensure NetDataContractSerializer.Binder is set before deserializing
+dotnet_diagnostic.CA2315.severity = error # Do not use insecure deserializer ObjectStateFormatter
+dotnet_diagnostic.CA2321.severity = error # Do not deserialize with JavaScriptSerializer using a SimpleTypeResolver
+dotnet_diagnostic.CA2327.severity = error # Do not use insecure JsonSerializerSettings
+dotnet_diagnostic.CA2328.severity = error # Ensure that JsonSerializerSettings are secure
+dotnet_diagnostic.CA2329.severity = error # Do not deserialize with JsonSerializer using an insecure configuration
+dotnet_diagnostic.CA2330.severity = error # Ensure that JsonSerializer has a secure configuration when deserializing
+dotnet_diagnostic.CA3061.severity = error # Do Not Add Schema By URL
+dotnet_diagnostic.CA3075.severity = error # Insecure DTD processing in XML
+dotnet_diagnostic.CA3076.severity = error # Insecure XSLT script processing.
+dotnet_diagnostic.CA3077.severity = error # Insecure Processing in API Design, XmlDocument and XmlTextReader
+dotnet_diagnostic.CA3147.severity = error # Mark Verb Handlers With Validate Antiforgery Token
+dotnet_diagnostic.CA5350.severity = error # Do Not Use Weak Cryptographic Algorithms
+dotnet_diagnostic.CA5351.severity = error # Do Not Use Broken Cryptographic Algorithms
+dotnet_diagnostic.CA5358.severity = error # Review cipher mode usage with cryptography experts
+dotnet_diagnostic.CA5361.severity = error # Do Not Disable SChannel Use of Strong Crypto
+dotnet_diagnostic.CA5364.severity = error # Do Not Use Deprecated Security Protocols
+dotnet_diagnostic.CA5378.severity = error # Do not disable ServicePointManagerSecurityProtocols
+dotnet_diagnostic.CA5397.severity = error # Do not use deprecated SslProtocols values
+dotnet_diagnostic.IA5350.severity = error # Do Not Use Weak Cryptographic Algorithms
+dotnet_diagnostic.IA5351.severity = error # Do Not Use Broken Cryptographic Algorithms
+dotnet_diagnostic.IA5352.severity = error # Do Not Misuse Cryptographic APIs
+
+dotnet_diagnostic.CA2322.severity = suggestion # Ensure JavaScriptSerializer is not initialized with SimpleTypeResolver before deserializing
+dotnet_diagnostic.CA2350.severity = suggestion # Do not use DataTable.ReadXml() with untrusted data
+dotnet_diagnostic.CA2351.severity = suggestion # Do not use DataSet.ReadXml() with untrusted data
+dotnet_diagnostic.CA2352.severity = suggestion # Unsafe DataSet or DataTable in serializable type can be vulnerable to remote code execution attacks
+dotnet_diagnostic.CA2353.severity = suggestion # Unsafe DataSet or DataTable in serializable type
+dotnet_diagnostic.CA2354.severity = suggestion # Unsafe DataSet or DataTable in deserialized object graph can be vulnerable to remote code execution attacks
+dotnet_diagnostic.CA2355.severity = suggestion # Unsafe DataSet or DataTable type found in deserializable object graph
+dotnet_diagnostic.CA2356.severity = suggestion # Unsafe DataSet or DataTable type in web deserializable object graph
+dotnet_diagnostic.CA2361.severity = suggestion # Ensure autogenerated class containing DataSet.ReadXml() is not used with untrusted data
+dotnet_diagnostic.CA2362.severity = suggestion # Unsafe DataSet or DataTable in autogenerated serializable type can be vulnerable to remote code execution attacks
+dotnet_diagnostic.CA3001.severity = suggestion # Review code for SQL injection vulnerabilities
+dotnet_diagnostic.CA3002.severity = suggestion # Review code for XSS vulnerabilities
+dotnet_diagnostic.CA3003.severity = suggestion # Review code for file path injection vulnerabilities
+dotnet_diagnostic.CA3004.severity = suggestion # Review code for information disclosure vulnerabilities
+dotnet_diagnostic.CA3005.severity = suggestion # Review code for LDAP injection vulnerabilities
+dotnet_diagnostic.CA3006.severity = suggestion # Review code for process command injection vulnerabilities
+dotnet_diagnostic.CA3007.severity = suggestion # Review code for open redirect vulnerabilities
+dotnet_diagnostic.CA3008.severity = suggestion # Review code for XPath injection vulnerabilities
+dotnet_diagnostic.CA3009.severity = suggestion # Review code for XML injection vulnerabilities
+dotnet_diagnostic.CA3010.severity = suggestion # Review code for XAML injection vulnerabilities
+dotnet_diagnostic.CA3011.severity = suggestion # Review code for DLL injection vulnerabilities
+dotnet_diagnostic.CA3012.severity = suggestion # Review code for regex injection vulnerabilities
+dotnet_diagnostic.CA5359.severity = suggestion # Do Not Disable Certificate Validation
+dotnet_diagnostic.CA5380.severity = suggestion # Do Not Add Certificates To Root Store
+dotnet_diagnostic.CA5381.severity = suggestion # Ensure Certificates Are Not Added To Root Store
+dotnet_diagnostic.CA5395.severity = suggestion # Miss HttpVerb attribute for action methods
+dotnet_diagnostic.CA5396.severity = suggestion # Set HttpOnly to true for HttpCookie
+dotnet_diagnostic.CA5398.severity = suggestion # Avoid hardcoded SslProtocols values
+dotnet_diagnostic.CA5386.severity = suggestion # Avoid hardcoding SecurityProtocolType value
+dotnet_diagnostic.CA5391.severity = suggestion # Use antiforgery tokens in ASP.NET Core MVC controllers
+dotnet_diagnostic.IA6450.severity = suggestion # Custom web token handler was found
+dotnet_diagnostic.IA6451.severity = suggestion # Implement required validations for app asserted actor token
+
+# Adding the NetAnalyzers NuGet package automatically starts analyzing code at the default
+# severity levels for each rule. We're not ready for that yet, so disable all other rules.
+
+dotnet_diagnostic.CA2310.severity = none # Do not use insecure deserializer NetDataContractSerializer
+dotnet_diagnostic.Async001.severity = none
+dotnet_diagnostic.Async002.severity = none
+dotnet_diagnostic.Async003.severity = none
+dotnet_diagnostic.Async004.severity = none
+dotnet_diagnostic.Async005.severity = none
+dotnet_diagnostic.Async006.severity = none
+dotnet_diagnostic.CA1000.severity = none # Do not declare static members on generic types
+dotnet_diagnostic.CA1001.severity = none # Types that own disposable fields should be disposable
+dotnet_diagnostic.CA1002.severity = none # Do not expose generic lists
+dotnet_diagnostic.CA1003.severity = none # Use generic event handler instances
+dotnet_diagnostic.CA1005.severity = none # Avoid excessive parameters on generic types
+dotnet_diagnostic.CA1008.severity = none # Enums should have zero value
+dotnet_diagnostic.CA1010.severity = none # Generic interface should also be implemented
+dotnet_diagnostic.CA1012.severity = none # Abstract types should not have public constructors
+dotnet_diagnostic.CA1014.severity = none # Mark assemblies with CLSCompliant
+dotnet_diagnostic.CA1016.severity = none # Mark assemblies with assembly version
+dotnet_diagnostic.CA1017.severity = none # Mark assemblies with ComVisible
+dotnet_diagnostic.CA1018.severity = none # Mark attributes with AttributeUsageAttribute
+dotnet_diagnostic.CA1019.severity = none # Define accessors for attribute arguments
+dotnet_diagnostic.CA1021.severity = none # Avoid out parameters
+dotnet_diagnostic.CA1024.severity = none # Use properties where appropriate
+dotnet_diagnostic.CA1027.severity = none # Mark enums with FlagsAttribute
+dotnet_diagnostic.CA1028.severity = none # Enum Storage should be Int32
+dotnet_diagnostic.CA1030.severity = none # Use events where appropriate
+dotnet_diagnostic.CA1031.severity = none # Do not catch general exception types
+dotnet_diagnostic.CA1032.severity = none # Implement standard exception constructors
+dotnet_diagnostic.CA1033.severity = none # Interface methods should be callable by child types
+dotnet_diagnostic.CA1034.severity = none # Nested types should not be visible
+dotnet_diagnostic.CA1036.severity = none # Override methods on comparable types
+dotnet_diagnostic.CA1040.severity = none # Avoid empty interfaces
+dotnet_diagnostic.CA1041.severity = none # Provide ObsoleteAttribute message
+dotnet_diagnostic.CA1043.severity = none # Use Integral Or String Argument For Indexers
+dotnet_diagnostic.CA1044.severity = none # Properties should not be write only
+dotnet_diagnostic.CA1045.severity = none # Do not pass types by reference
+dotnet_diagnostic.CA1046.severity = none # Do not overload equality operator on reference types
+dotnet_diagnostic.CA1047.severity = none # Do not declare protected member in sealed type
+dotnet_diagnostic.CA1050.severity = none # Declare types in namespaces
+dotnet_diagnostic.CA1051.severity = none # Do not declare visible instance fields
+dotnet_diagnostic.CA1052.severity = none # Static holder types should be Static or NotInheritable
+dotnet_diagnostic.CA1054.severity = none # URI-like parameters should not be strings
+dotnet_diagnostic.CA1055.severity = none # URI-like return values should not be strings
+dotnet_diagnostic.CA1056.severity = none # URI-like properties should not be strings
+dotnet_diagnostic.CA1058.severity = none # Types should not extend certain base types
+dotnet_diagnostic.CA1060.severity = none # Move pinvokes to native methods class
+dotnet_diagnostic.CA1061.severity = none # Do not hide base class methods
+dotnet_diagnostic.CA1062.severity = none # Validate arguments of public methods
+dotnet_diagnostic.CA1063.severity = none # Implement IDisposable Correctly
+dotnet_diagnostic.CA1064.severity = none # Exceptions should be public
+dotnet_diagnostic.CA1065.severity = none # Do not raise exceptions in unexpected locations
+dotnet_diagnostic.CA1066.severity = none # Implement IEquatable when overriding Object.Equals
+dotnet_diagnostic.CA1067.severity = none # Override Object.Equals(object) when implementing IEquatable<T>
+dotnet_diagnostic.CA1068.severity = none # CancellationToken parameters must come last
+dotnet_diagnostic.CA1069.severity = none # Enums values should not be duplicated
+dotnet_diagnostic.CA1070.severity = none # Do not declare event fields as virtual
+dotnet_diagnostic.CA1200.severity = none # Avoid using cref tags with a prefix
+dotnet_diagnostic.CA1303.severity = none # Do not pass literals as localized parameters
+dotnet_diagnostic.CA1304.severity = none # Specify CultureInfo
+dotnet_diagnostic.CA1305.severity = none # Specify IFormatProvider
+#dotnet_diagnostic.CA1307.severity = none # Specify StringComparison - Controlled via Directory.Build.props
+dotnet_diagnostic.CA1308.severity = none # Normalize strings to uppercase
+#dotnet_diagnostic.CA1309.severity = none # Use ordinal stringcomparison - Controlled via Directory.Build.props
+dotnet_diagnostic.CA1401.severity = none # P/Invokes should not be visible
+dotnet_diagnostic.CA1417.severity = none # Do not use 'OutAttribute' on string parameters for P/Invokes
+dotnet_diagnostic.CA1501.severity = none # Avoid excessive inheritance
+dotnet_diagnostic.CA1502.severity = none # Avoid excessive complexity
+dotnet_diagnostic.CA1505.severity = none # Avoid unmaintainable code
+dotnet_diagnostic.CA1506.severity = none # Avoid excessive class coupling
+dotnet_diagnostic.CA1507.severity = none # Use nameof to express symbol names
+dotnet_diagnostic.CA1508.severity = none # Avoid dead conditional code
+dotnet_diagnostic.CA1509.severity = none # Invalid entry in code metrics rule specification file
+dotnet_diagnostic.CA1700.severity = none # Do not name enum values 'Reserved'
+dotnet_diagnostic.CA1707.severity = none # Identifiers should not contain underscores
+dotnet_diagnostic.CA1708.severity = none # Identifiers should differ by more than case
+dotnet_diagnostic.CA1710.severity = none # Identifiers should have correct suffix
+dotnet_diagnostic.CA1711.severity = none # Identifiers should not have incorrect suffix
+dotnet_diagnostic.CA1712.severity = none # Do not prefix enum values with type name
+dotnet_diagnostic.CA1713.severity = none # Events should not have 'Before' or 'After' prefix
+dotnet_diagnostic.CA1714.severity = none # Flags enums should have plural names
+dotnet_diagnostic.CA1715.severity = none # Identifiers should have correct prefix
+dotnet_diagnostic.CA1716.severity = none # Identifiers should not match keywords
+dotnet_diagnostic.CA1717.severity = none # Only FlagsAttribute enums should have plural names
+dotnet_diagnostic.CA1720.severity = none # Identifier contains type name
+dotnet_diagnostic.CA1721.severity = none # Property names should not match get methods
+dotnet_diagnostic.CA1724.severity = none # Type names should not match namespaces
+dotnet_diagnostic.CA1725.severity = none # Parameter names should match base declaration
+dotnet_diagnostic.CA1801.severity = none # Review unused parameters
+dotnet_diagnostic.CA1802.severity = none # Use literals where appropriate
+dotnet_diagnostic.CA1805.severity = none # Do not initialize unnecessarily
+dotnet_diagnostic.CA1806.severity = none # Do not ignore method results
+dotnet_diagnostic.CA1810.severity = none # Initialize reference type static fields inline
+dotnet_diagnostic.CA1812.severity = none # Avoid uninstantiated internal classes
+dotnet_diagnostic.CA1813.severity = none # Avoid unsealed attributes
+dotnet_diagnostic.CA1814.severity = none # Prefer jagged arrays over multidimensional
+dotnet_diagnostic.CA1815.severity = none # Override equals and operator equals on value types
+dotnet_diagnostic.CA1816.severity = none # Dispose methods should call SuppressFinalize
+dotnet_diagnostic.CA1819.severity = none # Properties should not return arrays
+dotnet_diagnostic.CA1820.severity = none # Test for empty strings using string length
+dotnet_diagnostic.CA1821.severity = none # Remove empty Finalizers
+dotnet_diagnostic.CA1822.severity = none # Mark members as static
+dotnet_diagnostic.CA1823.severity = none # Avoid unused private fields
+dotnet_diagnostic.CA1824.severity = none # Mark assemblies with NeutralResourcesLanguageAttribute
+dotnet_diagnostic.CA1825.severity = none # Avoid zero-length array allocations
+dotnet_diagnostic.CA1826.severity = none # Do not use Enumerable methods on indexable collections
+dotnet_diagnostic.CA1827.severity = none # Do not use Count() or LongCount() when Any() can be used
+dotnet_diagnostic.CA1828.severity = none # Do not use CountAsync() or LongCountAsync() when AnyAsync() can be used
+dotnet_diagnostic.CA1829.severity = none # Use Length/Count property instead of Count() when available
+dotnet_diagnostic.CA1830.severity = none # Prefer strongly-typed Append and Insert method overloads on StringBuilder
+dotnet_diagnostic.CA1831.severity = none # Use AsSpan or AsMemory instead of Range-based indexers when appropriate
+dotnet_diagnostic.CA1832.severity = none # Use AsSpan or AsMemory instead of Range-based indexers when appropriate
+dotnet_diagnostic.CA1833.severity = none # Use AsSpan or AsMemory instead of Range-based indexers when appropriate
+dotnet_diagnostic.CA1834.severity = none # Consider using 'StringBuilder.Append(char)' when applicable
+dotnet_diagnostic.CA1835.severity = none # Prefer the 'Memory'-based overloads for 'ReadAsync' and 'WriteAsync'
+dotnet_diagnostic.CA1836.severity = none # Prefer IsEmpty over Count
+dotnet_diagnostic.CA1837.severity = none # Use 'Environment.ProcessId'
+dotnet_diagnostic.CA1838.severity = none # Avoid 'StringBuilder' parameters for P/Invokes
+dotnet_diagnostic.CA2000.severity = none # Dispose objects before losing scope
+dotnet_diagnostic.CA2002.severity = none # Do not lock on objects with weak identity
+dotnet_diagnostic.CA2007.severity = none # Consider calling ConfigureAwait on the awaited task
+dotnet_diagnostic.CA2008.severity = none # Do not create tasks without passing a TaskScheduler
+dotnet_diagnostic.CA2009.severity = none # Do not call ToImmutableCollection on an ImmutableCollection value
+dotnet_diagnostic.CA2010.severity = none
+dotnet_diagnostic.CA2011.severity = none # Avoid infinite recursion
+dotnet_diagnostic.CA2012.severity = none # Use ValueTasks correctly
+dotnet_diagnostic.CA2013.severity = none # Do not use ReferenceEquals with value types
+dotnet_diagnostic.CA2014.severity = none # Do not use stackalloc in loops
+dotnet_diagnostic.CA2015.severity = none # Do not define finalizers for types derived from MemoryManager<T>
+dotnet_diagnostic.CA2016.severity = none # Forward the 'CancellationToken' parameter to methods that take one
+dotnet_diagnostic.CA2100.severity = none # Review SQL queries for security vulnerabilities
+dotnet_diagnostic.CA2101.severity = none # Specify marshaling for P/Invoke string arguments
+dotnet_diagnostic.CA2109.severity = none # Review visible event handlers
+dotnet_diagnostic.CA2119.severity = none # Seal methods that satisfy private interfaces
+dotnet_diagnostic.CA2200.severity = none # Rethrow to preserve stack details
+dotnet_diagnostic.CA2201.severity = none # Do not raise reserved exception types
+dotnet_diagnostic.CA2207.severity = none # Initialize value type static fields inline
+dotnet_diagnostic.CA2208.severity = none # Instantiate argument exceptions correctly
+dotnet_diagnostic.CA2211.severity = none # Non-constant fields should not be visible
+dotnet_diagnostic.CA2213.severity = none # Disposable fields should be disposed
+dotnet_diagnostic.CA2214.severity = none # Do not call overridable methods in constructors
+dotnet_diagnostic.CA2215.severity = none # Dispose methods should call base class dispose
+dotnet_diagnostic.CA2216.severity = none # Disposable types should declare finalizer
+dotnet_diagnostic.CA2217.severity = none # Do not mark enums with FlagsAttribute
+dotnet_diagnostic.CA2218.severity = none # Override GetHashCode on overriding Equals
+dotnet_diagnostic.CA2219.severity = none # Do not raise exceptions in finally clauses
+dotnet_diagnostic.CA2224.severity = none # Override Equals on overloading operator equals
+dotnet_diagnostic.CA2225.severity = none # Operator overloads have named alternates
+dotnet_diagnostic.CA2226.severity = none # Operators should have symmetrical overloads
+dotnet_diagnostic.CA2227.severity = none # Collection properties should be read only
+dotnet_diagnostic.CA2229.severity = none # Implement serialization constructors
+dotnet_diagnostic.CA2231.severity = none # Overload operator equals on overriding value type Equals
+dotnet_diagnostic.CA2234.severity = none # Pass system uri objects instead of strings
+dotnet_diagnostic.CA2235.severity = none # Mark all non-serializable fields
+dotnet_diagnostic.CA2237.severity = none # Mark ISerializable types with serializable
+dotnet_diagnostic.CA2241.severity = none # Provide correct arguments to formatting methods
+dotnet_diagnostic.CA2242.severity = none # Test for NaN correctly
+dotnet_diagnostic.CA2243.severity = none # Attribute string literals should parse correctly
+dotnet_diagnostic.CA2244.severity = none # Do not duplicate indexed element initializations
+dotnet_diagnostic.CA2245.severity = none # Do not assign a property to itself
+dotnet_diagnostic.CA2246.severity = none # Assigning symbol and its member in the same statement
+dotnet_diagnostic.CA2247.severity = none # Argument passed to TaskCompletionSource constructor should be TaskCreationOptions enum instead of TaskContinuationOptions enum
+dotnet_diagnostic.CA2248.severity = none # Provide correct 'enum' argument to 'Enum.HasFlag'
+dotnet_diagnostic.CA2249.severity = none # Consider using 'string.Contains' instead of 'string.IndexOf'
+dotnet_diagnostic.CA2300.severity = none # Do not use insecure deserializer BinaryFormatter
+dotnet_diagnostic.CA2326.severity = none # Do not use TypeNameHandling values other than None
+dotnet_diagnostic.CA5360.severity = none # Do Not Call Dangerous Methods In Deserialization
+dotnet_diagnostic.CA5362.severity = none # Potential reference cycle in deserialized object graph
+dotnet_diagnostic.CA5363.severity = none # Do Not Disable Request Validation
+dotnet_diagnostic.CA5365.severity = none # Do Not Disable HTTP Header Checking
+dotnet_diagnostic.CA5366.severity = none # Use XmlReader For DataSet Read Xml
+dotnet_diagnostic.CA5367.severity = none # Do Not Serialize Types With Pointer Fields
+dotnet_diagnostic.CA5368.severity = none # Set ViewStateUserKey For Classes Derived From Page
+dotnet_diagnostic.CA5369.severity = none # Use XmlReader For Deserialize
+dotnet_diagnostic.CA5370.severity = none # Use XmlReader For Validating Reader
+dotnet_diagnostic.CA5371.severity = none # Use XmlReader For Schema Read
+dotnet_diagnostic.CA5372.severity = none # Use XmlReader For XPathDocument
+dotnet_diagnostic.CA5373.severity = none # Do not use obsolete key derivation function
+dotnet_diagnostic.CA5374.severity = none # Do Not Use XslTransform
+dotnet_diagnostic.CA5375.severity = none # Do Not Use Account Shared Access Signature
+dotnet_diagnostic.CA5376.severity = none # Use SharedAccessProtocol HttpsOnly
+dotnet_diagnostic.CA5377.severity = none # Use Container Level Access Policy
+dotnet_diagnostic.CA5379.severity = none # Do Not Use Weak Key Derivation Function Algorithm
+dotnet_diagnostic.CA5382.severity = none # Use Secure Cookies In ASP.Net Core
+dotnet_diagnostic.CA5383.severity = none # Ensure Use Secure Cookies In ASP.Net Core
+dotnet_diagnostic.CA5384.severity = none # Do Not Use Digital Signature Algorithm (DSA)
+dotnet_diagnostic.CA5385.severity = none # Use Rivest–Shamir–Adleman (RSA) Algorithm With Sufficient Key Size
+dotnet_diagnostic.CA5387.severity = none # Do Not Use Weak Key Derivation Function With Insufficient Iteration Count
+dotnet_diagnostic.CA5388.severity = none # Ensure Sufficient Iteration Count When Using Weak Key Derivation Function
+dotnet_diagnostic.CA5389.severity = none # Do Not Add Archive Item's Path To The Target File System Path
+dotnet_diagnostic.CA5390.severity = none # Do not hard-code encryption key
+dotnet_diagnostic.CA5392.severity = none # Use DefaultDllImportSearchPaths attribute for P/Invokes
+dotnet_diagnostic.CA5393.severity = none # Do not use unsafe DllImportSearchPath value
+dotnet_diagnostic.CA5394.severity = none # Do not use insecure randomness
+dotnet_diagnostic.CA5399.severity = none # HttpClients should enable certificate revocation list checks
+dotnet_diagnostic.CA5400.severity = none # Ensure HttpClient certificate revocation list check is not disabled
+dotnet_diagnostic.CA5401.severity = none # Do not use CreateEncryptor with non-default IV
+dotnet_diagnostic.CA5402.severity = none # Use CreateEncryptor with the default IV
+dotnet_diagnostic.CA5403.severity = none # Do not hard-code certificate
+dotnet_diagnostic.CA9999.severity = none # Analyzer version mismatch
+dotnet_diagnostic.IA2989.severity = none # Do not use banned insecure deserialization APIs
+dotnet_diagnostic.IA2992.severity = none # Do Not Use Banned APIs For Insecure Deserializers
+dotnet_diagnostic.IA2993.severity = none # Do Not Use Banned Constructors For Insecure Deserializers
+dotnet_diagnostic.IA2994.severity = none # Do Not Use ResourceSet Without ResourceReader
+dotnet_diagnostic.IA2995.severity = none # Do Not Use ResourceReader
+dotnet_diagnostic.IA2996.severity = none # Do Not Use ResXResourceReader Without ITypeResolutionService
+dotnet_diagnostic.IA2997.severity = none # Do Not Use TypeNameHandling Other Than None
+dotnet_diagnostic.IA2998.severity = none # Do Not Deserialize With BinaryFormatter Without Binder
+dotnet_diagnostic.IA2999.severity = none # Do Not Set BinaryFormatter.Binder to null
+dotnet_diagnostic.IA5359.severity = none # Use approved crypto libraries for the supported platform
+dotnet_diagnostic.IL3000.severity = none # Avoid using accessing Assembly file path when publishing as a single-file
+dotnet_diagnostic.IL3001.severity = none # Avoid using accessing Assembly file path when publishing as a single-file
+dotnet_diagnostic.RS1000.severity = none
+dotnet_diagnostic.RS1001.severity = none
+dotnet_diagnostic.RS1002.severity = none
+dotnet_diagnostic.RS1003.severity = none
+dotnet_diagnostic.RS1004.severity = none
+dotnet_diagnostic.RS1005.severity = none
+dotnet_diagnostic.RS1006.severity = none
+dotnet_diagnostic.RS1007.severity = none
+dotnet_diagnostic.RS1008.severity = none
+dotnet_diagnostic.RS1009.severity = none
+dotnet_diagnostic.RS1010.severity = none
+dotnet_diagnostic.RS1011.severity = none
+dotnet_diagnostic.RS1012.severity = none
+dotnet_diagnostic.RS1013.severity = none
+dotnet_diagnostic.RS1014.severity = none
diff --git a/external/Java.Interop/.gitattributes b/external/Java.Interop/.gitattributes
new file mode 100644
index 00000000000..02cae14c35b
--- /dev/null
+++ b/external/Java.Interop/.gitattributes
@@ -0,0 +1,45 @@
+# NOTE: this file is for git 1.6.6 (and possibly older)
+# Post-1.7.2 there is eol and text, and crlf is deprecated
+# but we can't depend on an unreleased version...
+
+# This file mainly controls line ending conversion behaviour, if
+# the user has the setting core.autocrlf true.
+
+# The meaning of the attributes is a little odd
+# -crlf means DO NOT convert line endings
+# crlf means CONVERT to lf in the repo & Linux/Mac, crlf on Windows
+
+# sln is always CRLF, even on linux, so don't convert
+*.sln eol=crlf
+*.bat eol=crlf
+*.cmd eol=crlf
+*.rtf eol=crlf
+
+# Mostly generated by VS, so avoid extra noise
+*.Designer.cs eol=crlf
+
+*.cs text
+*.resx text
+*.xlf text
+*.xml text
+*.md text
+Makefile eol=lf
+*.targets eol=crlf
+*.proj eol=crlf
+*.vcproj eol=crlf
+*.vcxproj eol=crlf
+*.csproj eol=crlf
+*.shproj eol=crlf
+*.projitems eol=crlf
+*.tpnitems eol=crlf
+*.wixproj eol=crlf
+*.wxs eol=crlf
+*.rtf eol=crlf
+
+# Gradle wrapper must stay LF on all platforms (executed under Bash on Unix)
+gradlew eol=lf
+*.properties eol=lf
+*.kt eol=lf
+*.kts eol=lf
+
+.github/workflows/*.lock.yml linguist-generated=true merge=ours
\ No newline at end of file
diff --git a/external/Java.Interop/.github/agents/agentic-workflows.md b/external/Java.Interop/.github/agents/agentic-workflows.md
new file mode 100644
index 00000000000..9a2e0130e84
--- /dev/null
+++ b/external/Java.Interop/.github/agents/agentic-workflows.md
@@ -0,0 +1,224 @@
+---
+name: Agentic Workflows
+description: GitHub Agentic Workflows (gh-aw) - Create, debug, and upgrade AI-powered workflows with intelligent prompt routing.
+disable-model-invocation: true
+---
+
+# GitHub Agentic Workflows Agent
+
+This agent helps you work with **GitHub Agentic Workflows (gh-aw)**, a CLI extension for creating AI-powered workflows in natural language using markdown files.
+
+## What This Agent Does
+
+This is a **dispatcher agent** that routes your request to the appropriate specialized prompt based on your task:
+
+- **Creating new workflows**: Routes to `create` prompt
+- **Updating existing workflows**: Routes to `update` prompt
+- **Debugging workflows**: Routes to `debug` prompt
+- **Upgrading workflows**: Routes to `upgrade-agentic-workflows` prompt
+- **Creating report-generating workflows**: Routes to `report` prompt — consult this whenever the workflow posts status updates, audits, analyses, or any structured output as issues, discussions, or comments
+- **Creating shared components**: Routes to `create-shared-agentic-workflow` prompt
+- **Fixing Dependabot PRs**: Routes to `dependabot` prompt — use this when Dependabot opens PRs that modify generated manifest files (`.github/workflows/package.json`, `.github/workflows/requirements.txt`, `.github/workflows/go.mod`). Never merge those PRs directly; instead update the source `.md` files and rerun `gh aw compile --dependabot` to bundle all fixes
+- **Analyzing test coverage**: Routes to `test-coverage` prompt — consult this whenever the workflow reads, analyzes, or reports on test coverage data from PRs or CI runs
+- **Rendering ASCII charts in markdown**: Routes to `asciicharts` guide — consult this whenever the workflow needs compact charts that render reliably in GitHub issues, comments, or discussions
+- **CLI commands and triggering workflows**: Routes to `cli-commands` guide — consult this whenever the user asks how to run, compile, debug, or manage workflows from the command line, or when they need the MCP tool equivalent of a `gh aw` command
+- **Reducing token consumption / cost optimization**: Routes to `token-optimization` guide — consult this whenever the user asks how to reduce token usage, lower costs, speed up workflows, or measure the impact of prompt changes with experiments
+- **Choosing workflow architectures and design patterns**: Routes to `patterns` guide — consult this whenever the user asks for strategy, architecture, operating models, or pattern selection for agentic workflows
+
+Workflows may optionally include:
+
+- **Project tracking / monitoring** (GitHub Projects updates, status reporting)
+- **Orchestration / coordination** (one workflow assigning agents or dispatching and coordinating other workflows)
+
+## Files This Applies To
+
+- Workflow files: `.github/workflows/*.md` and `.github/workflows/**/*.md`
+- Workflow lock files: `.github/workflows/*.lock.yml`
+- Shared components: `.github/workflows/shared/*.md`
+- Configuration: `.github/aw/github-agentic-workflows.md`
+
+## Problems This Solves
+
+- **Workflow Creation**: Design secure, validated agentic workflows with proper triggers, tools, and permissions
+- **Workflow Debugging**: Analyze logs, identify missing tools, investigate failures, and fix configuration issues
+- **Version Upgrades**: Migrate workflows to new gh-aw versions, apply codemods, fix breaking changes
+- **Component Design**: Create reusable shared workflow components that wrap MCP servers
+
+## How to Use
+
+When you interact with this agent, it will:
+
+1. **Understand your intent** - Determine what kind of task you're trying to accomplish
+2. **Route to the right prompt** - Load the specialized prompt file for your task
+3. **Execute the task** - Follow the detailed instructions in the loaded prompt
+
+## Available Prompts
+
+### Create New Workflow
+**Load when**: User wants to create a new workflow from scratch, add automation, or design a workflow that doesn't exist yet
+
+**Prompt file**: `.github/aw/create-agentic-workflow.md`
+
+**Use cases**:
+- "Create a workflow that triages issues"
+- "I need a workflow to label pull requests"
+- "Design a weekly research automation"
+
+### Update Existing Workflow
+**Load when**: User wants to modify, improve, or refactor an existing workflow
+
+**Prompt file**: `.github/aw/update-agentic-workflow.md`
+
+**Use cases**:
+- "Add web-fetch tool to the issue-classifier workflow"
+- "Update the PR reviewer to use discussions instead of issues"
+- "Improve the prompt for the weekly-research workflow"
+
+### Debug Workflow
+**Load when**: User needs to investigate, audit, debug, or understand a workflow, troubleshoot issues, analyze logs, or fix errors
+
+**Prompt file**: `.github/aw/debug-agentic-workflow.md`
+
+**Use cases**:
+- "Why is this workflow failing?"
+- "Analyze the logs for workflow X"
+- "Investigate missing tool calls in run #12345"
+
+### Upgrade Agentic Workflows
+**Load when**: User wants to upgrade workflows to a new gh-aw version or fix deprecations
+
+**Prompt file**: `.github/aw/upgrade-agentic-workflows.md`
+
+**Use cases**:
+- "Upgrade all workflows to the latest version"
+- "Fix deprecated fields in workflows"
+- "Apply breaking changes from the new release"
+
+### Create a Report-Generating Workflow
+**Load when**: The workflow being created or updated produces reports — recurring status updates, audit summaries, analyses, or any structured output posted as a GitHub issue, discussion, or comment
+
+**Prompt file**: `.github/aw/report.md`
+
+**Use cases**:
+- "Create a weekly CI health report"
+- "Post a daily security audit to Discussions"
+- "Add a status update comment to open PRs"
+
+### Create Shared Agentic Workflow
+**Load when**: User wants to create a reusable workflow component or wrap an MCP server
+
+**Prompt file**: `.github/aw/create-shared-agentic-workflow.md`
+
+**Use cases**:
+- "Create a shared component for Notion integration"
+- "Wrap the Slack MCP server as a reusable component"
+- "Design a shared workflow for database queries"
+
+### Fix Dependabot PRs
+**Load when**: User needs to close or fix open Dependabot PRs that update dependencies in generated manifest files (`.github/workflows/package.json`, `.github/workflows/requirements.txt`, `.github/workflows/go.mod`)
+
+**Prompt file**: `.github/aw/dependabot.md`
+
+**Use cases**:
+- "Fix the open Dependabot PRs for npm dependencies"
+- "Bundle and close the Dependabot PRs for workflow dependencies"
+- "Update @playwright/test to fix the Dependabot PR"
+
+### Analyze Test Coverage
+**Load when**: The workflow reads, analyzes, or reports test coverage — whether triggered by a PR, a schedule, or a slash command. Always consult this prompt before designing the coverage data strategy.
+
+**Prompt file**: `.github/aw/test-coverage.md`
+
+**Use cases**:
+- "Create a workflow that comments coverage on PRs"
+- "Analyze coverage trends over time"
+- "Add a coverage gate that blocks PRs below a threshold"
+
+### CLI Commands Reference
+**Load when**: The user asks how to run, compile, debug, or manage workflows from the command line; needs the MCP tool equivalent of a `gh aw` command; or is in a restricted environment (e.g., Copilot Cloud) without direct CLI access.
+
+**Reference file**: `.github/aw/cli-commands.md`
+
+**Use cases**:
+- "How do I trigger workflow X on the main branch?"
+- "What's the MCP equivalent of `gh aw logs`?"
+- "I'm in Copilot Cloud — how do I compile a workflow?"
+- "Show me all available gh aw commands"
+
+### Token Consumption Optimization
+**Load when**: The user asks how to reduce token usage, lower workflow costs, make a workflow faster or cheaper, or measure the impact of prompt or configuration changes.
+
+**Reference file**: `.github/aw/token-optimization.md`
+
+**Use cases**:
+- "How do I reduce the token cost of this workflow?"
+- "My workflow is too expensive — how do I optimize it?"
+- "How do I compare token usage between two runs?"
+- "Should I use gh-proxy or the MCP server?"
+- "How do I use sub-agents to reduce costs?"
+- "How do I measure the impact of a prompt change?"
+
+### Workflow Pattern Selection
+**Load when**: The user asks for architecture, strategy, operating model selection, or pattern recommendations for building agentic workflows.
+
+**Reference file**: `.github/aw/patterns.md`
+
+**Use cases**:
+- "Which pattern should I use for multi-repo rollout?"
+- "How should I structure this workflow architecture?"
+- "What pattern fits slash-command triage?"
+- "Should this be DispatchOps or DailyOps?"
+
+## Instructions
+
+When a user interacts with you:
+
+1. **Identify the task type** from the user's request
+2. **Load the appropriate prompt** from the repository paths listed above
+3. **Follow the loaded prompt's instructions** exactly
+4. **If uncertain**, ask clarifying questions to determine the right prompt
+
+## Quick Reference
+
+```bash
+# Initialize repository for agentic workflows
+gh aw init
+
+# Generate the lock file for a workflow
+gh aw compile [workflow-name]
+
+# Trigger a workflow on demand (preferred over gh workflow run)
+gh aw run # interactive input collection
+gh aw run --ref main # run on a specific branch
+
+# Debug workflow runs
+gh aw logs [workflow-name]
+gh aw audit
+
+# Upgrade workflows
+gh aw fix --write
+gh aw compile --validate
+```
+
+## Key Features of gh-aw
+
+- **Natural Language Workflows**: Write workflows in markdown with YAML frontmatter
+- **AI Engine Support**: Copilot, Claude, Codex, or custom engines
+- **MCP Server Integration**: Connect to Model Context Protocol servers for tools
+- **Safe Outputs**: Structured communication between AI and GitHub API
+- **Strict Mode**: Security-first validation and sandboxing
+- **Shared Components**: Reusable workflow building blocks
+- **Repo Memory**: Persistent git-backed storage for agents
+- **Sandboxed Execution**: All workflows run in the Agent Workflow Firewall (AWF) sandbox, enabling full `bash` and `edit` tools by default
+
+## Important Notes
+
+- Always reference the instructions file at `.github/aw/github-agentic-workflows.md` for complete documentation
+- Use the MCP tool `agentic-workflows` when running in GitHub Copilot Cloud
+- Workflows must be compiled to `.lock.yml` files before running in GitHub Actions
+- **Bash tools are enabled by default** - Don't restrict bash commands unnecessarily since workflows are sandboxed by the AWF
+- Follow security best practices: minimal permissions, explicit network access, no template injection
+- **Network configuration**: Use ecosystem identifiers (`node`, `python`, `go`, etc.) or explicit FQDNs in `network.allowed`. Bare shorthands like `npm` or `pypi` are **not** valid. See `.github/aw/network.md` for the full list of valid ecosystem identifiers and domain patterns.
+- **Single-file output**: When creating a workflow, produce exactly **one** workflow `.md` file. Do not create separate documentation files (architecture docs, runbooks, usage guides, etc.). If documentation is needed, add a brief `## Usage` section inside the workflow file itself.
+- **Triggering runs**: Always use `gh aw run ` to trigger a workflow on demand — not `gh workflow run .lock.yml`. `gh aw run` handles workflow resolution by short name, input parsing and validation, and correct run-tracking for agentic workflows. Use `--ref ` to run on a specific branch.
+- **CLI commands reference**: For a complete guide on all `gh aw` commands and their MCP tool equivalents (for restricted environments), see `.github/aw/cli-commands.md`
diff --git a/external/Java.Interop/.github/aw/actions-lock.json b/external/Java.Interop/.github/aw/actions-lock.json
new file mode 100644
index 00000000000..84e3231b543
--- /dev/null
+++ b/external/Java.Interop/.github/aw/actions-lock.json
@@ -0,0 +1,19 @@
+{
+ "entries": {
+ "actions/github-script@v9.0.0": {
+ "repo": "actions/github-script",
+ "version": "v9.0.0",
+ "sha": "3a2844b7e9c422d3c10d287c895573f7108da1b3"
+ },
+ "github/gh-aw-actions/setup-cli@v0.79.8": {
+ "repo": "github/gh-aw-actions/setup-cli",
+ "version": "v0.79.8",
+ "sha": "c0338fef4749d08c21f8f975fb0e37efa17dda47"
+ },
+ "github/gh-aw-actions/setup@v0.79.8": {
+ "repo": "github/gh-aw-actions/setup",
+ "version": "v0.79.8",
+ "sha": "c0338fef4749d08c21f8f975fb0e37efa17dda47"
+ }
+ }
+}
diff --git a/external/Java.Interop/.github/copilot-instructions.md b/external/Java.Interop/.github/copilot-instructions.md
new file mode 100644
index 00000000000..4109925d133
--- /dev/null
+++ b/external/Java.Interop/.github/copilot-instructions.md
@@ -0,0 +1,156 @@
+# Java.Interop Copilot Instructions
+
+## Project Overview
+
+**Java.Interop** is a .NET library that provides Java Native Interface (JNI) bindings for managed languages such as C#. It enables bidirectional interoperability between .NET's Common Language Runtime (CLR) and Java Virtual Machines (JVMs), allowing .NET code to invoke Java methods and Java code to call back into managed code.
+
+**Primary Use Cases**:
+- .NET for Android development (successor to Xamarin.Android)
+- Desktop Java interop scenarios
+- Binding Java libraries for .NET consumption
+- Cross-platform Java integration
+
+## Architecture & Core Concepts
+
+### JNI (Java Native Interface)
+- Industry-standard interface for Java-native code interaction
+- Provides type-safe bindings using structs like `JniObjectReference` instead of raw `IntPtr`
+- Supports both SafeHandle-based (safer) and IntPtr-based (faster) implementations
+- Reference types: Local, Global, and WeakGlobal references with proper lifecycle management
+
+### Type System & Marshaling
+- **JavaObject**: Base class for managed wrappers of Java objects
+- **JniPeerMembers**: Caches method and field IDs for efficient access
+- **Value Marshaling**: Converts between Java and .NET types (e.g., `java.lang.String` ↔ `System.String`)
+- **Exception Marshaling**: Translates Java exceptions to .NET exceptions
+
+### Code Generation Pipeline
+1. **API Description**: XML files describing Java APIs
+2. **Generator Tool**: Converts API descriptions to C# binding code
+3. **Java Callable Wrappers (JCWs)**: Java stubs for calling managed methods
+4. **Marshal Methods**: Runtime-generated or pre-compiled bridging code
+
+## Repository Structure
+
+### Core Libraries (`src/`)
+- **`Java.Interop/`**: Main JNI binding library with core types and runtime
+- **`Java.Interop.Export/`**: `[Export]` attribute support for exposing managed methods to Java
+
+### Code Generation Tools (`tools/`)
+- **`generator/`**: Primary tool for generating C# bindings from Java API descriptions
+- **`class-parse/`**: Parses Java `.class` files and generates API descriptions
+- **`java-source-utils/`**: Utilities for processing Java source code
+- **`jcw-gen/`**: Generates Java Callable Wrapper classes
+- **`param-name-importer/`**: Imports parameter names from Java source
+
+### Supporting Libraries
+- **`Java.Interop.Tools.JavaSource/`**: Javadoc parsing and XML documentation conversion
+- **`Java.Interop.Tools.Maven/`**: Maven project integration and dependency resolution
+- **`Xamarin.Android.Tools.Bytecode/`**: Java bytecode analysis and processing
+- **`Xamarin.SourceWriter/`**: Code generation utilities
+
+### Testing (`tests/`)
+- Unit tests for the core JNI binding and code-generation components
+- Integration tests with real JVM instances where needed
+- Generator tests with sample API descriptions
+
+### Samples (`samples/`)
+- **`Hello-NativeAOT*/`**: Ahead-of-time compilation scenarios
+
+## Development Patterns & Conventions
+
+### Code Formatting
+
+C# code uses tabs (not spaces) and the Mono code-formatting style defined in `.editorconfig`
+
+* Your mission is to make diffs as absolutely as small as possible, preserving existing code formatting.
+
+* If you encounter additional spaces or formatting within existing code blocks, LEAVE THEM AS-IS.
+
+* If you encounter code comments, LEAVE THEM AS-IS.
+
+* Place a space prior to any parentheses `(` or `[`
+
+* Use `""` for empty string and *not* `string.Empty`
+
+* Use `[]` for empty arrays and *not* `Array.Empty()`
+
+Examples of properly formatted code:
+
+```csharp
+Foo ();
+Bar (1, 2, "test");
+myarray [0] = 1;
+
+if (someValue) {
+ // Code here
+}
+
+try {
+ // Code here
+} catch (Exception e) {
+ // Code here
+}
+```
+
+### Code Comments
+- Use XML documentation comments (`///`) for public APIs
+- Document JNI interop behavior and threading requirements
+- Include usage examples for complex scenarios
+
+### Error Handling
+- Java exceptions are automatically converted to .NET exceptions
+- Use `JniEnvironment.Errors.ExceptionOccurred()` for manual exception checking
+- Wrap JNI calls in `try`/`finally` blocks for proper resource cleanup
+
+### Memory Management
+- Local references: Automatically cleaned up by JVM
+- Global references: Must be explicitly freed via `JniObjectReference.Dispose()`
+- Use `using` statements or `try`/`finally` for proper cleanup
+
+### Threading
+- JNI environments are thread-local
+- Use `JniEnvironment.Current` to access the current thread's JNI environment
+- Java objects can be shared across threads with proper reference management
+
+## Build System
+
+### Prerequisites
+- .NET 9+ SDK
+- Java Development Kit (for compiling Java test classes)
+- Platform-specific JVM libraries
+
+### Build Commands
+```bash
+# Initialize submodules and prepare build
+dotnet build -t:Prepare
+
+# Build all projects
+dotnet build
+
+# Run specific tests
+dotnet test tests/Java.Interop.Tools.Generator-Tests/Java.Interop.Tools.Generator-Tests.csproj
+
+# Build with specific configuration
+dotnet build -c Release
+```
+
+### Configuration
+- Use `Configuration.Override.props` for local build customization
+- Set `$(JdkJvmPath)` to specify JVM library location
+- Configure `$(JAVA_HOME)` for Java tooling
+
+## Useful Resources
+
+- [JNI Specification](http://docs.oracle.com/javase/8/docs/technotes/guides/jni/spec/jniTOC.html)
+- [.NET for Android Documentation](https://learn.microsoft.com/en-us/dotnet/android/)
+- [Android JNI Performance Guide](https://developer.android.com/training/articles/perf-jni)
+- [Project Architecture Documentation](Documentation/Architecture.md)
+- [Build Configuration Guide](Documentation/BuildConfiguration.md)
+
+## Getting Help
+
+- Review existing tests for usage patterns
+- Check [GitHub Issues](https://github.com/dotnet/java-interop/issues) for known problems
+- Consult the [.NET Discord](https://aka.ms/dotnet-discord) for community support
+- Follow [Coding Guidelines](http://www.mono-project.com/community/contributing/coding-guidelines/) for contributions
\ No newline at end of file
diff --git a/external/Java.Interop/.github/skills/agentic-workflows/SKILL.md b/external/Java.Interop/.github/skills/agentic-workflows/SKILL.md
new file mode 100644
index 00000000000..b4505045ca5
--- /dev/null
+++ b/external/Java.Interop/.github/skills/agentic-workflows/SKILL.md
@@ -0,0 +1,79 @@
+---
+name: agentic-workflows
+description: Route gh-aw workflow design/create/debug/upgrade requests to the right prompts.
+---
+
+# Agentic Workflows Router
+
+Use this skill when a user asks to design, create, update, debug, or upgrade GitHub Agentic Workflows in this repository.
+
+This skill is a dispatcher: identify the task type, load the matching workflow prompt/skill file, and follow it directly. Keep responses concise and ask a clarifying question if the correct prompt is unclear.
+
+Read only the files you need:
+Load these files from `github/gh-aw` (they are not available locally).
+- `.github/aw/agentic-chat.md`
+- `.github/aw/agentic-workflows-mcp.md`
+- `.github/aw/asciicharts.md`
+- `.github/aw/campaign.md`
+- `.github/aw/charts-trending.md`
+- `.github/aw/charts.md`
+- `.github/aw/cli-commands.md`
+- `.github/aw/context.md`
+- `.github/aw/create-agentic-workflow.md`
+- `.github/aw/create-shared-agentic-workflow.md`
+- `.github/aw/debug-agentic-workflow.md`
+- `.github/aw/dependabot.md`
+- `.github/aw/deployment-status.md`
+- `.github/aw/experiments.md`
+- `.github/aw/github-agentic-workflows.md`
+- `.github/aw/github-mcp-server.md`
+- `.github/aw/llms.md`
+- `.github/aw/mcp-clis.md`
+- `.github/aw/memory.md`
+- `.github/aw/messages.md`
+- `.github/aw/network.md`
+- `.github/aw/patterns.md`
+- `.github/aw/pr-reviewer.md`
+- `.github/aw/report.md`
+- `.github/aw/reuse.md`
+- `.github/aw/safe-outputs-automation.md`
+- `.github/aw/safe-outputs-content.md`
+- `.github/aw/safe-outputs-management.md`
+- `.github/aw/safe-outputs-runtime.md`
+- `.github/aw/safe-outputs.md`
+- `.github/aw/serena-tool.md`
+- `.github/aw/shared-safe-jobs.md`
+- `.github/aw/skills.md`
+- `.github/aw/subagents.md`
+- `.github/aw/syntax-agentic.md`
+- `.github/aw/syntax-core.md`
+- `.github/aw/syntax-tools-imports.md`
+- `.github/aw/syntax.md`
+- `.github/aw/test-coverage.md`
+- `.github/aw/test-expression.md`
+- `.github/aw/token-optimization.md`
+- `.github/aw/triggers.md`
+- `.github/aw/update-agentic-workflow.md`
+- `.github/aw/upgrade-agentic-workflows.md`
+- `.github/aw/visual-regression.md`
+- `.github/aw/workflow-constraints.md`
+- `.github/aw/workflow-editing.md`
+- `.github/aw/workflow-patterns.md`
+
+- `.github/skills/agentic-workflow-designer/SKILL.md`
+After loading the matching workflow prompt or skill, follow it directly:
+- Design workflows from scratch via interview: `skills/agentic-workflow-designer/SKILL.md`
+- Create new workflows: `.github/aw/create-agentic-workflow.md`
+- Update existing workflows: `.github/aw/update-agentic-workflow.md`
+- Debug, audit, or investigate workflows: `.github/aw/debug-agentic-workflow.md`
+- Upgrade workflows and fix deprecations: `.github/aw/upgrade-agentic-workflows.md`
+- Create shared components or MCP wrappers: `.github/aw/create-shared-agentic-workflow.md`
+- Create report-generating workflows: `.github/aw/report.md`
+- Fix Dependabot manifest PRs: `.github/aw/dependabot.md`
+- Analyze coverage workflows: `.github/aw/test-coverage.md`
+- Render compact markdown charts: `.github/aw/asciicharts.md`
+- Map CLI commands to MCP usage: `.github/aw/cli-commands.md`
+- Choose workflow architecture and patterns: `.github/aw/patterns.md`
+- Optimize token usage and cost: `.github/aw/token-optimization.md`
+
+When the task involves OTEL, OTLP, traces, observability backends, or telemetry-driven analysis, also read and follow `skills/otel-queries/SKILL.md` after loading the matching workflow prompt or skill.
diff --git a/external/Java.Interop/.github/skills/build-and-test/SKILL.md b/external/Java.Interop/.github/skills/build-and-test/SKILL.md
new file mode 100644
index 00000000000..0d7747c4e42
--- /dev/null
+++ b/external/Java.Interop/.github/skills/build-and-test/SKILL.md
@@ -0,0 +1,82 @@
+---
+name: build-and-test
+description: Build and test the Java.Interop repository. Use when asked to build, compile, run tests, verify changes, or check for regressions. Handles submodule initialization, build preparation, compilation, test execution, and result summarization. Also use after making code changes to validate they compile and pass tests.
+---
+
+# Build and Test
+
+Build and test the Java.Interop .NET/JNI interop repository.
+
+## Prerequisites
+
+- .NET SDK (9+)
+- Java Development Kit (JDK)
+- Platform-specific JVM libraries
+
+## Workflow
+
+1. Initialize submodules (if needed)
+2. Prepare the build
+3. Build the solution
+4. Run tests
+5. Summarize results
+
+## Step 1: Initialize Submodules
+
+Run only if `external/xamarin-android-tools` is empty or missing:
+
+```bash
+git submodule update --init --recursive
+```
+
+## Step 2: Prepare + Build
+
+```bash
+dotnet build -t:Prepare
+dotnet build Java.Interop.sln
+```
+
+If the user only wants to build (not test), stop here and report success/failure.
+
+## Step 3: Run Tests
+
+Run all tests:
+
+```bash
+dotnet test Java.Interop.sln
+```
+
+Run a specific test project (when the user specifies one or when iterating on a focused area):
+
+```bash
+dotnet test tests//.csproj
+```
+
+Common test projects:
+- `Java.Interop-Tests` — core JNI binding tests (largest suite)
+- `Java.Interop.Export-Tests` — export attribute tests
+- `generator-Tests` — C# binding generator tests
+- `Java.Interop.Tools.JavaCallableWrappers-Tests` — JCW generation tests
+
+## Step 4: Summarize Results
+
+Parse the `dotnet test` output. Extract lines matching `Passed!` or `Failed!` patterns.
+
+Present a summary table:
+
+| Test Assembly | Passed | Failed | Skipped |
+|---|---|---|---|
+| Assembly-Name | N | N | N |
+
+**Total: X passed, Y failed, Z skipped.**
+
+If any tests failed, show the failure details and relevant error messages.
+
+## Handling Failures
+
+**Build failures**: Show the full error output. Common issues:
+- Missing submodules → run `git submodule update --init --recursive`
+- Missing JDK → check `$JAVA_HOME` is set
+- Missing JVM → check `$JdkJvmPath` in `Configuration.Override.props`
+
+**Test failures**: Show the failing test names and assertion messages. If a specific test fails, suggest re-running just that test project for faster iteration.
diff --git a/external/Java.Interop/.github/skills/java-interop-reviewer/SKILL.md b/external/Java.Interop/.github/skills/java-interop-reviewer/SKILL.md
new file mode 100644
index 00000000000..95e9f75a4d9
--- /dev/null
+++ b/external/Java.Interop/.github/skills/java-interop-reviewer/SKILL.md
@@ -0,0 +1,124 @@
+---
+name: java-interop-reviewer
+description: >-
+ Review dotnet/java-interop PRs against established rules. Trigger on "review this PR",
+ a GitHub PR URL, or code review requests. Checks C#, JNI interop, nullable, async,
+ security, error handling, formatting, performance, native code, and generator codegen.
+---
+
+# Java.Interop PR Reviewer
+
+Review PRs against guidelines distilled from past reviews by senior maintainers of dotnet/java-interop.
+
+## Review Mindset
+
+Be polite but skeptical. Prioritize bugs, performance regressions, safety issues, and pattern violations over style nitpicks. **3 important comments > 15 nitpicks.**
+
+Flag severity clearly in every comment:
+- ❌ **error** — Must fix before merge. Bugs, security issues, JNI reference leaks, broken codegen.
+- ⚠️ **warning** — Should fix. Performance issues, missing validation, inconsistency with patterns.
+- 💡 **suggestion** — Consider changing. Style, readability, optional improvements.
+
+**Every review should produce at least one inline comment.** Even clean PRs have opportunities for improvement — code consolidation, missing edge-case tests, perf micro-optimizations, or documentation gaps. Use 💡 suggestions for these. A review with zero comments appears superficial and misses the chance to share knowledge. Only omit inline comments if the PR is truly trivial (e.g., a 1-line typo fix or dependency bump).
+
+## Workflow
+
+### 1. Identify the PR
+
+If triggered from an agentic workflow (slash command on a PR), use the PR from the event context. Otherwise, extract `owner`, `repo`, `pr_number` from a URL or reference provided by the user.
+Formats: `https://github.com/{owner}/{repo}/pull/{number}`, `{owner}/{repo}#{number}`, or bare number (defaults to `dotnet/java-interop`).
+
+### 2. Gather context (before reading PR description)
+
+```
+gh pr diff {number} --repo {owner}/{repo}
+gh pr view {number} --repo {owner}/{repo} --json files
+```
+
+For each changed file, read the **full source file** (not just the diff) to understand surrounding invariants, call patterns, and data flow. If the change modifies a public/internal API or utility, search for callers. Check whether sibling types need the same fix.
+
+**Form an independent assessment** of what the change does and what problems it has *before* reading the PR description.
+
+### 3. Incorporate PR narrative and reconcile
+
+```
+gh pr view {number} --repo {owner}/{repo} --json title,body
+```
+
+Now read the PR description and linked issues. Treat them as claims to verify, not facts to accept. Where your independent reading disagrees with the PR description, investigate further. If the PR claims a performance improvement, require evidence (benchmarks, profiling data). If it claims a bug fix, verify the bug exists and the fix addresses root cause — not symptoms.
+
+### 4. Check CI status
+
+```
+gh pr checks {number} --repo {owner}/{repo}
+```
+
+Review the CI results. **Never post ✅ LGTM if any required CI check is failing or if the code doesn't build.** If CI is failing:
+- Investigate the failure.
+- If the failure is caused by the PR's code changes, flag it as ❌ error.
+- If the failure is a known infrastructure issue or pre-existing flake unrelated to the PR, note it in the summary but still use ⚠️ Needs Changes — the PR isn't mergeable until CI is green.
+
+### 5. Load review rules
+
+Based on the file types identified in step 2, read the appropriate rule files from this skill's `references/` directory.
+
+**Always load:**
+- `references/repo-conventions.md` — Formatting, style, and patterns specific to this repository.
+- `references/ai-pitfalls.md` — Common AI-generated code mistakes.
+
+**Conditionally load based on changed file types:**
+- `references/csharp-rules.md` — When any `.cs` files changed. Covers nullable, async, error handling, performance, and code organization.
+- `references/interop-rules.md` — When the diff contains JNI interop code (e.g., `JniObjectReference`, `JniPeerMembers`, `[Register]`, `DllImport`, `[MarshalAs]`, `[StructLayout]`, `JNIEnv`), or when both C# and native files changed.
+- `references/native-rules.md` — When `.c`, `.cc`, `.cpp`, `.h`, or `.hpp` files changed (e.g., files under `src/java-interop/`).
+- `references/msbuild-rules.md` — When `.targets`, `.props`, `.projitems`, or `.csproj` files changed.
+- `references/testing-rules.md` — When test files changed (e.g., files under `tests/`, `*-Tests/`, or test project directories).
+- `references/security-rules.md` — When any code files changed (C#, C/C++, or MSBuild).
+
+### 6. Analyze the diff
+
+For each changed file, check against the review rules. Record issues as:
+
+```json
+{ "path": "src/Example.cs", "line": 42, "side": "RIGHT", "body": "..." }
+```
+
+**What to look for (in priority order):**
+1. **Bugs & correctness** — race conditions, null dereferences, off-by-one, logic errors, JNI reference leaks
+2. **Safety** — thread safety, resource leaks, security vulnerabilities
+3. **Performance** — O(n²) patterns, unnecessary allocations, startup time regressions
+4. **Trimmer/NativeAOT compatibility** — reflection without annotations, `Type.GetType()` misuse
+5. **Missing tests** — untested error paths, edge cases, missing regression tests for bug fixes
+6. **Code duplication** — near-identical methods that should be consolidated
+7. **Consistency** — patterns mixed within the same PR, API return types inconsistent with repo conventions
+8. **Documentation** — misleading comments, undocumented behavioral decisions
+
+Constraints:
+- Only comment on added/modified lines in the diff — the API rejects out-of-range lines.
+- `line` = line number in the NEW file (right side). Double-check against the diff.
+- One issue per comment.
+- **Don't pile on.** If the same issue appears many times, flag it once with a note listing all affected files.
+- **Don't flag what CI catches.** Skip compiler errors, formatting the linter will catch, etc.
+- **Avoid false positives.** Verify the concern actually applies given the full context. If unsure, phrase it as a question rather than a firm claim.
+
+### 7. Post the review
+
+Post your findings directly:
+
+- **Inline comments** on specific lines of the diff with the severity, category, and explanation.
+- **Review summary** with the overall verdict (✅ LGTM, ⚠️ Needs Changes, or ❌ Reject), issue counts by severity, and positive callouts.
+
+If no issues found **and CI is green**, submit with at most one or two 💡 suggestions and a positive summary. Truly trivial PRs (dependency bumps, 1-line typo fixes) may have no inline comments.
+
+**Copilot-authored PRs:** If the PR author is `Copilot` (the GitHub Copilot coding agent) and the verdict is ⚠️ Needs Changes or ❌ Reject, prefix the review summary with `@copilot ` so the comment automatically triggers Copilot to address the feedback. Do NOT add the prefix for ✅ LGTM verdicts.
+
+## Comment format
+
+```
+🤖 {severity} **{Category}** — {What's wrong and what to do instead.}
+
+_{Rule: Brief name}_
+```
+
+Where `{severity}` is ❌, ⚠️, or 💡.
+
+**Categories:** Nullable · Async pattern · Error handling · Resource management · Security · Formatting · Performance · Code organization · Naming · JNI interop · JNI references · Generator codegen · Native C/C++ · Testing · YAGNI · API design · Trimmer/AOT · Documentation
diff --git a/external/Java.Interop/.github/skills/java-interop-reviewer/references/ai-pitfalls.md b/external/Java.Interop/.github/skills/java-interop-reviewer/references/ai-pitfalls.md
new file mode 100644
index 00000000000..c2fc5154e54
--- /dev/null
+++ b/external/Java.Interop/.github/skills/java-interop-reviewer/references/ai-pitfalls.md
@@ -0,0 +1,25 @@
+# AI Code Generation Pitfalls
+
+Patterns that AI-generated code consistently gets wrong. Always loaded during reviews.
+
+---
+
+| Pattern | What to watch for |
+|---------|------------------|
+| **Reinventing the wheel** | AI creates new infrastructure instead of using existing utilities. ALWAYS check if a similar utility exists before accepting new wrapper code. This is the most expensive AI pattern — hundreds of lines of plausible code that duplicates what's already there. |
+| **Over-engineering** | HttpClient injection "for testability", speculative helper classes, unused overloads. If no caller needs it today, remove it. |
+| **Swallowed errors** | AI catch blocks love to eat exceptions silently. Check EVERY catch block. Also check that exit codes are checked consistently. |
+| **Null-forgiving operator (`!`)** | The postfix `!` null-forgiving operator (e.g., `foo!.Bar`) is banned. If the value can be null, add a proper null check. If it can't be null, make the parameter/variable non-nullable. AI frequently sprinkles `!` to silence the compiler — this turns compile-time warnings into runtime `NullReferenceException`s. Note: this rule is about the postfix `!` operator, not the logical negation `!` (e.g., `if (!someBool)` or `if (!string.IsNullOrEmpty (s))`). |
+| **Wrong formatting** | AI generates standard C# formatting (no space before parens). This repo requires Mono style: `Foo ()`, `array [0]`. |
+| **`string.Empty` and `Array.Empty()`** | AI defaults to these. Use `""` and `[]` instead. |
+| **Sloppy structure** | Multiple types in one file, block-scoped namespaces, `#region` directives, classes where records would do. New helpers marked `public` when `internal` suffices. |
+| **Docs describe intent not reality** | AI doc comments often describe what the code *should* do, not what it *actually* does. Review doc comments against the implementation. |
+| **Unused parameters** | AI adds `CancellationToken` parameters but never observes them, or accepts `additionalArgs` as a string and interpolates it into a command. Unused CancellationToken is a broken contract; string args are injection risks. |
+| **Confidently wrong domain facts** | AI makes authoritative claims about JNI behavior, Java type system details, or .NET interop semantics that are wrong. Always verify domain-specific claims against official docs (JNI spec, .NET docs). |
+| **Over-mocking** | Not everything needs to be mocked. Integration tests with `Assert.Ignore` on failure are fine and catch real API changes that mocks never will. |
+| **`Debug.WriteLine` for logging** | AI catch blocks often log with `System.Diagnostics.Debug.WriteLine()` or `Console.WriteLine()` — neither integrates with MSBuild or codebase logger patterns. |
+| **`git commit --amend`** | AI uses `--amend` on commits that are already pushed or belong to another author. Always create new commits — the maintainer will squash as needed. |
+| **Commit messages omit non-obvious choices** | Behavioral decisions ("JNI local refs are not eagerly disposed in this path") and known limitations belong in the commit message, not just the code. |
+| **Typos in user-visible strings** | Users copy-paste error messages into bug reports. Get them right. |
+| **Filler words in docs** | "So" at the start of a sentence adds nothing. Be direct. |
+| **Ignoring trimmer/AOT** | AI uses `Type.GetType()`, `Activator.CreateInstance()`, or other reflection APIs without proper `[DynamicallyAccessedMembers]` annotations. These break under trimming and NativeAOT. |
diff --git a/external/Java.Interop/.github/skills/java-interop-reviewer/references/csharp-rules.md b/external/Java.Interop/.github/skills/java-interop-reviewer/references/csharp-rules.md
new file mode 100644
index 00000000000..04d21820258
--- /dev/null
+++ b/external/Java.Interop/.github/skills/java-interop-reviewer/references/csharp-rules.md
@@ -0,0 +1,77 @@
+# C# Review Rules
+
+General C# guidance applicable to any .NET repository.
+
+---
+
+## Nullable Reference Types
+
+| Check | What to look for |
+|-------|-----------------|
+| **`#nullable enable`** | New files should have `#nullable enable` at the top — unless nullable is already enabled at the project level via the `Nullable` MSBuild property, in which case it is not needed per-file. |
+| **Never use `!` (null-forgiving operator)** | The postfix `!` null-forgiving operator (e.g., `foo!.Bar`) is banned. If the value can be null, add a proper null check. If it can't be null, make the type non-nullable. AI-generated code frequently sprinkles `!` to silence warnings — this turns compile-time safety into runtime `NullReferenceException`s. Note: this rule is about the postfix `!` operator, not the logical negation `!` (e.g., `if (!someBool)` or `if (!string.IsNullOrEmpty (s))`). |
+
+---
+
+## Async, Cancellation & Thread Safety Patterns
+
+| Check | What to look for |
+|-------|-----------------|
+| **CancellationToken propagation** | Every `async` method that accepts a `CancellationToken` must pass it to ALL downstream async calls. A token that's accepted but never used is a broken contract. |
+| **OperationCanceledException** | Catch-all blocks (`catch (Exception)`) must NOT swallow `OperationCanceledException`. Catch it explicitly first and rethrow, or use a type filter. |
+| **Honor the token** | If a method accepts `CancellationToken`, it must observe it — register a callback to kill processes, check `IsCancellationRequested` in loops, pass it downstream. Don't accept it just for API completeness. |
+| **Thread safety of shared state** | If a new field or property can be accessed from multiple threads (e.g., static caches, event handlers), verify thread-safe access: `ConcurrentDictionary`, `Interlocked`, or explicit locks. A `Dictionary` read concurrently with a write is undefined behavior. |
+| **Lock ordering** | If code acquires multiple locks, the order must be consistent everywhere. Document the ordering. Inconsistent ordering → deadlock. |
+| **Avoid double-checked locking — use `Lazy` or `LazyInitializer`** | The double-checked locking (DCL) pattern is error-prone and [discouraged by Microsoft](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/volatile). Prefer `Lazy` or `LazyInitializer.EnsureInitialized()`. If DCL is truly necessary, verify all initialization completes before the field is assigned and no thread can observe a partially-initialized instance. |
+| **Singleton initialization completeness** | When a singleton is initialized behind a lock, ensure ALL setup steps (not just construction) complete before publishing the instance. If `Initialize()` does `instance = new Foo(); instance.Setup();`, another thread can see `instance != null` and use it before `Setup()` runs. |
+
+---
+
+## Error Handling
+
+| Check | What to look for |
+|-------|-----------------|
+| **No empty catch blocks** | Every `catch` must capture the `Exception` and log it (or rethrow). No silent swallowing. |
+| **Validate parameters** | Enum parameters and string-typed "mode" values must be validated — throw `ArgumentException` or `NotSupportedException` for unexpected values. |
+| **Fail fast on critical ops** | If a critical operation fails, throw immediately. Silently continuing leads to confusing downstream failures. |
+| **Check process exit codes** | If one operation checks the process exit code, ALL similar operations must too. Inconsistent error checking creates a false sense of safety. |
+| **Log messages must have context** | A bare `"Operation failed"` could be anything. Include *what* you were doing and relevant identifiers. |
+| **Differentiate similar error messages** | Two messages saying `"X failed"` for different operations are impossible to debug. Make each unique. |
+| **Assert boundary invariants** | If a name=value pair array must have even length, assert `(length % 2) == 0` before indexing `[i+1]`. |
+| **Include actionable details in exceptions** | Use `nameof` for parameter names. Include the unsupported value or unexpected type. Never throw empty exceptions. |
+| **Initialize output parameters in all paths** | Methods with `out` parameters must initialize them in all error paths, not just the success path. |
+| **Challenge exception swallowing** | When a PR adds `catch { continue; }` or `catch { return null; }`, question whether the exception is truly expected or masking a deeper problem. The default should be to let unexpected exceptions propagate. |
+
+---
+
+## Performance
+
+| Check | What to look for |
+|-------|-----------------|
+| **Avoid unnecessary allocations** | Don't create intermediate collections when LINQ chaining or a single list would do. Char arrays for `string.Split()` should be `static readonly` fields. |
+| **ArrayPool for large buffers** | Buffers ≥ 1 KB should use `ArrayPool.Shared.Rent()` with `try`/`finally` return. Large allocations go to the LOH and are expensive to GC. |
+| **`HashSet.Add()` already handles duplicates** | Calling `.Contains()` before `.Add()` does the hash lookup twice. Just call `.Add()`. |
+| **Don't wrap a value in an interpolated string** | `$"{someString}"` creates an unnecessary `string.Format` call when `someString` is already a string. |
+| **Pre-allocate collections when size is known** | Use `new List(capacity)` or `new Dictionary(count)` when the size is known or estimable. Repeated resizing is O(n) allocation waste. |
+| **Avoid closures in hot paths** | Lambdas that capture local variables allocate a closure object on every call. In loops or frequently-called methods, extract the lambda to a static method or cache the delegate. |
+| **Place cheap checks before expensive ones** | In validation chains, test simple conditions (null checks, boolean flags) before allocating strings or doing I/O. Short-circuit with `&&`/`||`. |
+| **Cache repeated accessor calls** | If `foo.Bar.Baz` is used multiple times in a block, assign it to a local. This avoids repeated property evaluation and makes intent clearer. |
+| **Watch for O(n²)** | Nested loops over the same or related collections, repeated `.Contains()` on a `List`, or LINQ `.Where()` inside a loop are O(n²). Switch to `HashSet` or `Dictionary` for lookups. |
+| **Extract throw helpers** | Code like `if (x) throw new SomeException(...)` in a frequently-called method prevents inlining. Extract into a `[DoesNotReturn]` helper so the JIT can inline the happy path. |
+| **`Split()` with count parameter** | `line.Split (new char[]{'='}, 2)` prevents values containing `=` from being split incorrectly. Follow existing patterns. |
+
+---
+
+## Code Organization
+
+| Check | What to look for |
+|-------|-----------------|
+| **One type per file** | Each public class, struct, enum, or interface must be in its own `.cs` file named after the type. |
+| **Use `record` for data types** | Immutable data-carrier types should be `record` types — they get value equality, `ToString()`, and deconstruction for free. |
+| **Remove unused code** | Dead methods, speculative helpers, and code "for later" should be removed. Ship only what's needed. No commented-out code — Git has history. |
+| **New helpers default to `internal`** | New utility methods should be `internal` unless a confirmed external consumer needs them. Use `InternalsVisibleTo` for test access. |
+| **Use interfaces over concrete types** | Fields and parameters should prefer interfaces (`IMetadataResolver`) over concrete classes. When the implementation changes, you swap the implementation — not every call site. |
+| **Reduce indentation with early returns** | `foreach (var x in items ?? [])` eliminates a null-check nesting level. Invert logic for the common case with `continue` so complex cases have less nesting. |
+| **Don't initialize fields to default values** | `bool flag = false;` and `int count = 0;` are noise. The CLR zero-initializes all fields. Only assign when the initial value is non-default. |
+| **`sealed` classes skip full Dispose** | A `sealed` class doesn't need `Dispose(bool)` + `GC.SuppressFinalize`. Just implement `IDisposable.Dispose()` directly. The full pattern is only for unsealed base classes. |
+| **Well-named constants over magic numbers** | `if (retryCount > 3)` should be `if (retryCount > MaxRetries)`. Constants document intent and make the value easy to find and change. |
diff --git a/external/Java.Interop/.github/skills/java-interop-reviewer/references/interop-rules.md b/external/Java.Interop/.github/skills/java-interop-reviewer/references/interop-rules.md
new file mode 100644
index 00000000000..a29330e7fa7
--- /dev/null
+++ b/external/Java.Interop/.github/skills/java-interop-reviewer/references/interop-rules.md
@@ -0,0 +1,31 @@
+# Managed ↔ Native Interop Review Rules
+
+Rules for the boundary between C# and C/C++ code — P/Invoke declarations, JNI
+bindings, and shared structs. Load when both managed and native files change, or
+when the diff contains interop markers (`JniObjectReference`, `JniPeerMembers`,
+`DllImport`, `[Register]`, `JNIEnv`, `[MarshalAs]`, `[StructLayout]`).
+
+---
+
+## JNI Interop Checks
+
+| Check | What to look for |
+|-------|-----------------|
+| **`JniObjectReference` lifecycle** | Every `JniObjectReference` obtained from JNI calls must be disposed in a `try`/`finally` block. Local references that escape their JNI frame exhaust the local reference table (default 512 entries). Global references that aren't freed are permanent leaks. |
+| **`JniPeerMembers` for method/field IDs** | Method and field IDs should be cached via `JniPeerMembers.InstanceMethods`, `JniPeerMembers.StaticMethods`, or `JniPeerMembers.InstanceFields`. Looking up IDs on every call is expensive. |
+| **Virtual vs non-virtual dispatch** | Default interface method implementations should use `InvokeNonvirtualVoidMethod()` (non-virtual). Class method overrides should use `InvokeVirtualVoidMethod()` (virtual). Getting this wrong changes dispatch semantics. |
+| **`[Register]` attribute accuracy** | `[Register]` attributes must exactly match the Java method name and JNI signature. Mismatches cause `NoSuchMethodError` at runtime. Verify against the Java API description. |
+| **`JniTransition` for native callbacks** | Entry points from Java into managed code should use `JniTransition` to properly handle exception marshaling. Without it, managed exceptions propagate into the JVM as undefined behavior. |
+| **Exception checking after JNI calls** | After JNI calls that can throw (most of them), check for pending Java exceptions via `JniEnvironment.Errors.ExceptionOccurred()` or rely on the built-in checking in `JniPeerMembers` wrappers. Don't ignore JNI error return codes. |
+
+---
+
+## P/Invoke Checks
+
+| Check | What to look for |
+|-------|-----------------|
+| **`static_cast` over C-style casts** | `static_cast(val)` is checked at compile time. `(int)val` can silently reinterpret bits. Always use C++ casts in interop boundaries. |
+| **`nullptr` over `NULL`** | `NULL` is `0` in C++, which can silently convert to integral types. `nullptr` has proper pointer semantics. |
+| **Struct field ordering for padding** | When defining structs shared between managed and native code, order fields largest-to-smallest to minimize padding. Explicit `[StructLayout(LayoutKind.Sequential)]` and matching C struct must be kept in sync. |
+| **Bool marshalling** | Boolean marshalling is a common source of bugs. C++ `bool` is 1 byte, Windows `BOOL` is 4 bytes. When P/Invoking, explicitly specify `[MarshalAs(UnmanagedType.U1)]` or `[MarshalAs(UnmanagedType.Bool)]` (4-byte). |
+| **String marshalling charset** | P/Invoke string parameters should specify `CharSet.Unicode` (UTF-16) or use `[MarshalAs(UnmanagedType.LPUTF8Str)]` for UTF-8. Don't rely on the default (ANSI on Windows). |
diff --git a/external/Java.Interop/.github/skills/java-interop-reviewer/references/msbuild-rules.md b/external/Java.Interop/.github/skills/java-interop-reviewer/references/msbuild-rules.md
new file mode 100644
index 00000000000..0dd47653f66
--- /dev/null
+++ b/external/Java.Interop/.github/skills/java-interop-reviewer/references/msbuild-rules.md
@@ -0,0 +1,44 @@
+# MSBuild Review Rules
+
+Guidance for MSBuild targets, props, and project files. Loaded when `.targets`,
+`.props`, `.projitems`, or `.csproj` files change.
+
+---
+
+## Task Logging
+
+| Check | What to look for |
+|-------|-----------------|
+| **Don't use `Debug.WriteLine` or `Console.WriteLine`** | MSBuild tasks must use the task's logging facilities (e.g., `Log.LogMessage`, `Log.LogWarning`, `Log.LogError`). `Debug.WriteLine()` only reaches attached debuggers (invisible in CI). `Console.WriteLine()` bypasses MSBuild's logging pipeline entirely. |
+| **Use appropriate log levels** | Use `MessageImportance.Low` for verbose diagnostics, `MessageImportance.Normal` for progress, and `MessageImportance.High` for important status. Don't spam high-importance messages. |
+
+---
+
+## Process Management in Tasks
+
+| Check | What to look for |
+|-------|-----------------|
+| **Don't redirect stdout/stderr without draining** | Background processes with `RedirectStandardOutput = true` must have async readers draining the output. Otherwise the OS pipe buffer fills and the child process deadlocks. For fire-and-forget processes, set `Redirect* = false`. |
+| **Check exit codes consistently** | If one task operation checks the process exit code, ALL similar operations must too. Inconsistent error checking creates a false sense of safety. |
+| **Include stdout in error diagnostics** | When a task captures stdout, pass it to error reporting so failure messages include all output, not just stderr. |
+
+---
+
+## MSBuild Targets & XML
+
+| Check | What to look for |
+|-------|-----------------|
+| **Underscore prefix for private names** | Internal targets, properties, and item groups should be prefixed with `_` (e.g., `_CompileJava`, `$(_JarFile)`). MSBuild has no visibility — the underscore signals "internal." |
+| **Incremental builds (`Inputs`/`Outputs`)** | Every target that *writes files* must have `Inputs` and `Outputs` so MSBuild can skip it when nothing changed. Targets that only read files, set properties, or populate item groups do NOT need them. |
+| **`FileWrites` for intermediate files** | Intermediate files must be added to `@(FileWrites)` so `IncrementalClean` doesn't delete them. |
+| **XML indentation** | MSBuild/XML files use 2 spaces for indentation (per `.editorconfig`), not tabs. |
+| **`Condition` attribute first** | On `` and task elements, put the `Condition` attribute first — it's the most important for debugging. |
+
+---
+
+## Downstream Coordination
+
+| Check | What to look for |
+|-------|-----------------|
+| **Port, don't rewrite** | If a downstream consumer already has working logic for the same task, port it rather than writing new code. The existing code has real-world edge cases already handled. |
+| **Draft downstream PR before merging** | Shared library changes should be accompanied by a draft PR in the consuming repo (dotnet/android) that proves the API actually works. |
diff --git a/external/Java.Interop/.github/skills/java-interop-reviewer/references/native-rules.md b/external/Java.Interop/.github/skills/java-interop-reviewer/references/native-rules.md
new file mode 100644
index 00000000000..b599486f900
--- /dev/null
+++ b/external/Java.Interop/.github/skills/java-interop-reviewer/references/native-rules.md
@@ -0,0 +1,35 @@
+# Native Code (C/C++) Review Rules
+
+The native interop layer (`src/java-interop/`) provides low-level JNI and
+platform integration. Bugs here cause crashes and memory leaks that are
+extremely hard to diagnose.
+
+---
+
+## Memory Management
+
+| Check | What to look for |
+|-------|-----------------|
+| **Every `new` needs a `delete` or justification** | If a `new` has no matching cleanup, document *why* the leak is acceptable and its worst-case size. |
+| **Quantify leaks** | Is the leaked path hit once per process lifetime or once per invocation? The answer determines whether a leak matters. |
+| **Use RAII (`std::unique_ptr`, etc.)** | Use smart pointers or RAII to ensure cleanup. Don't rely on manual `delete`. |
+| **Watch for leaks in external APIs** | Functions that allocate memory for the caller must have their return values freed. Check the docs for every external API call. |
+
+---
+
+## C++ Best Practices
+
+| Check | What to look for |
+|-------|-----------------|
+| **`nullptr` over `NULL`** | `NULL` is `0` in C++, which can silently convert to integral types. `nullptr` has proper pointer semantics. Use `!= nullptr` consistently in null checks. |
+| **Use C++ standard headers** | Prefer `` over ``, `` over ``, etc. The C++ headers place names in `std::`. |
+| **Virtual destructor on base classes** | Any base class with virtual methods must have a public virtual destructor. Without one, `delete`-through-base-pointer is undefined behavior. |
+| **Delete copy/move constructors when inappropriate** | Types holding non-copyable resources (JNI references, file handles) must use `= delete` on copy constructor and assignment operator. |
+| **Prefer `private` over `protected`** | Unless the type is explicitly designed for subclassing, use `private`. Don't speculatively make things `protected`. |
+| **Use `const` where possible** | If a parameter or function argument isn't modified, declare it `const`. |
+| **Handle `EINTR` for system calls** | `read()`, `write()`, and other syscalls can return `EINTR` when interrupted by a signal. Retry in a loop. |
+| **Use `sizeof()` not magic numbers** | `16` should be `sizeof(some_type)` or equivalent. Magic numbers make code fragile. |
+| **`static_cast` over C-style casts** | `static_cast(val)` is checked at compile time. `(int)val` can silently reinterpret bits. |
+| **No commented-out code** | If it's not needed, delete it. Git has history. |
+| **Don't use compiler-reserved identifiers** | Double-underscore `__` prefixed names are reserved by the C/C++ standard. |
+| **Reasonable line width** | Don't combine two 80-char lines into one 160-char line. Keep code readable. |
diff --git a/external/Java.Interop/.github/skills/java-interop-reviewer/references/repo-conventions.md b/external/Java.Interop/.github/skills/java-interop-reviewer/references/repo-conventions.md
new file mode 100644
index 00000000000..85e74715d4a
--- /dev/null
+++ b/external/Java.Interop/.github/skills/java-interop-reviewer/references/repo-conventions.md
@@ -0,0 +1,96 @@
+# Repo Conventions
+
+Formatting, style, and patterns specific to the dotnet/java-interop repository.
+Always loaded during reviews.
+
+---
+
+## Formatting & Style
+
+This project uses Mono style with tabs. Formatting violations create noisy diffs
+and merge conflicts.
+
+| Check | What to look for |
+|-------|-----------------|
+| **Tabs, not spaces** | Indentation must use tabs (width 8 in `.editorconfig`). MSBuild/XML files use 2 spaces. |
+| **Space before `(` and `[`** | Method calls: `Foo ()`, `Bar (1, 2)`. Array access: `array [0]`. This is Mono style — omitting the space is wrong here even though it's standard elsewhere. |
+| **`""` not `string.Empty`** | Use `""` for empty strings. Use `[]` not `Array.Empty()` for empty arrays. |
+| **No `#region`/`#endregion`** | Region directives hide code and make reviews harder. Remove them. |
+| **`#else`/`#endif` comments** | Always annotate `#else` and `#endif` with the original expression: `#else // !NETCOREAPP` and `#endif // !NETCOREAPP`. |
+| **Minimal diffs** | Don't leave random empty lines. Preserve existing formatting and comments in files you didn't write. Only format code you add or modify; never reformat existing lines. |
+| **Reasonable line width** | Max 180 characters per `.editorconfig`. Don't merge two lines into a single 160-character monster. |
+| **Attributes on their own line** | Long attributes like `[DynamicallyAccessedMembers (...)]` should be on their own line, not inline with the method/parameter declaration. Each parameter with long attributes should get its own line. |
+| **Named parameters for many-argument calls** | When calling a method with more than 4 parameters, use named parameters for clarity. |
+
+---
+
+## Naming
+
+| Check | What to look for |
+|-------|-----------------|
+| **Disambiguate Java vs C# names** | Terms like `FullName`, `Name`, or `ReferenceType` are ambiguous in a JNI interop context. When both Java and C# interpretations exist, prefer a prefix (`JavaFullName`, `ManagedFullName`) or clear documentation. |
+| **Method names must reflect behavior** | If `CreateFoo()` sometimes returns an existing instance, rename it `GetOrCreateFoo()` or `GetFoo()`. |
+| **Named constants for string lengths** | `n.Length - 7` should be `n.Length - "Invoker".Length`. Magic numbers for string suffix lengths are fragile and unreadable. |
+| **No magic numbers** | Literal values like buffer sizes and permission masks should be named constants. `sizeof()` in native code, `const` or `static readonly` in C#. |
+| **`KeyedCollection` for name-indexed lists** | When a `List` is frequently searched by a name property, consider `KeyedCollection` or `Dictionary` for O(1) lookups. |
+
+---
+
+## Error Messages & Localization
+
+| Check | What to look for |
+|-------|-----------------|
+| **Error/warning codes are required** | User-facing errors/warnings in generator and other tools must have codes (e.g., `BG####`, `JM####`). Error codes must not collide with existing ones. |
+| **Error messages must be actionable** | Tell the user what to do, not just what went wrong. "Unable to find type" → "Unable to find type '…'. Make sure the paths to all referenced assemblies are provided with the `-L` option." |
+| **Demote non-actionable messages** | If a warning can't suggest an action, demote it to informational. Warnings that users can't act on are noise. |
+| **Localization resource comments** | Include comments explaining what terms should NOT be translated: `The following terms should not be translated: Metadata.xml, -L.` |
+| **Don't use internal jargon in messages** | Terms like "Cecil" or "corlib" are meaningless to users. Use "referenced assemblies" or "mscorlib" instead. |
+| **Error messages in resource files** | New error/warning messages should be added to `.resx` resource files and referenced via `Properties.Resources`, not hard-coded in C# strings. |
+
+---
+
+## JNI Interop Patterns
+
+| Check | What to look for |
+|-------|-----------------|
+| **JNI reference lifecycle** | Every `JniObjectReference` must be properly disposed. Use `try`/`finally` or `using` patterns. Local references are cleaned up by the JVM at JNI frame boundaries, but explicit cleanup prevents native reference table exhaustion. |
+| **Use `JniTransition` for exception marshaling** | Native callbacks into managed code should use `JniTransition` to properly handle exception marshaling between Java and C#. |
+| **`JniPeerMembers` caching** | Method and field IDs should be accessed via `JniPeerMembers` for efficient caching. Don't look up method IDs on every call. |
+| **Thread-local JNI environments** | JNI environments are thread-local. Always use `JniEnvironment.Current` to access the current thread's environment. Don't cache `JNIEnv*` across threads. |
+| **`[Register]` attribute correctness** | `[Register]` attributes must match the Java method signature exactly. Mismatches cause runtime `NoSuchMethodError`. |
+
+---
+
+## Performance
+
+| Check | What to look for |
+|-------|-----------------|
+| **Startup time is critical** | Changes to `Java.Interop` core affect every .NET Android app startup. Minimize type loading, lazy-initialize where possible, avoid unnecessary allocations in hot paths. |
+| **Prefer arrays over dictionaries for small lookups** | For datasets with < ~50 items, linear search through an array is faster than dictionary lookup due to hash computation overhead and initialization cost. Back assertions with benchmarks. |
+| **`StringComparison.Ordinal` for identifiers** | Use `StringComparison.Ordinal` for Java/C# identifier comparisons. `string.EndsWith(string)` without a `StringComparison` is locale-aware and slower. Use `StringComparison.OrdinalIgnoreCase` only for filesystem paths. |
+| **Static `readonly` for reusable fields** | Static fields like singletons or shared instances should be `readonly` when they shouldn't be reassigned. `static HttpClient` instances are mandatory (no per-use disposal). |
+| **Consider trimmer/NativeAOT impact** | Use `[DynamicallyAccessedMembers]` for types accessed via reflection. Use `[UnconditionalSuppressMessage]` instead of `#pragma` for trimmer warnings. Avoid `Type.GetType()` with assembly-qualified names when a direct type reference or typemap lookup can be used. |
+
+---
+
+## Downstream Impact
+
+| Check | What to look for |
+|-------|-----------------|
+| **Consider dotnet/android consumers** | Changes to shared types (`JniPeerMembers`, `JavaObject`, `JniRuntime`, `JniTypeManager`) affect dotnet/android. API changes should be validated with a draft downstream PR. |
+| **Port, don't rewrite** | If dotnet/android already has working logic for the same task, port it rather than writing new code. Existing code has real-world edge cases already handled. |
+| **Target framework compatibility** | Tools shipped to customers (e.g., `generator`, `class-parse`) must target the correct .NET version. Verify against the oldest supported target framework. |
+
+---
+
+## Patterns & Conventions
+
+| Check | What to look for |
+|-------|-----------------|
+| **Comments explain "why", not "what"** | `// increment i` adds nothing. `// skip the BOM — XmlReader chokes on it` explains intent. If a comment restates the code, delete it. |
+| **Track TODOs as issues** | A `// TODO` hidden in code will be forgotten. File an issue and reference it in the comment. |
+| **Remove stale comments** | If the code changed, update the comment. Comments that describe old behavior are misleading. |
+| **Use existing utilities** | Check for existing helpers before writing new ones. Duplicating existing logic is the most expensive AI pattern. |
+| **Return `IReadOnlyList`** | Public methods should return `IReadOnlyList` or `IReadOnlyCollection` instead of mutable `List`. |
+| **Prefer C# pattern matching** | Use `is`, `switch` expressions, and property patterns instead of `if`/`else` type-check chains. |
+| **Use `record` for data types** | Immutable data-carrier types should be `record` types — they get value equality, `ToString()`, and deconstruction for free. |
diff --git a/external/Java.Interop/.github/skills/java-interop-reviewer/references/security-rules.md b/external/Java.Interop/.github/skills/java-interop-reviewer/references/security-rules.md
new file mode 100644
index 00000000000..4b7da5de353
--- /dev/null
+++ b/external/Java.Interop/.github/skills/java-interop-reviewer/references/security-rules.md
@@ -0,0 +1,22 @@
+# Security Review Rules
+
+Security checklist for code reviews. Applicable to any repository handling file
+I/O, archives, or process execution.
+
+---
+
+## Archive & Path Safety
+
+| Check | What to look for |
+|-------|-----------------|
+| **Zip Slip protection** | Archive extraction must validate that every entry path, after `Path.GetFullPath()`, resolves under the destination directory. Never use `ZipFile.ExtractToDirectory()` for untrusted archives without entry-by-entry validation. |
+| **Path traversal** | `StartsWith()` checks on paths must normalize with `Path.GetFullPath()` first. A path like `C:\Program Files\..\Users\evil` bypasses naive prefix checks. Also check for directory boundary issues (`C:\Program FilesX` matching `C:\Program Files`). |
+
+---
+
+## Process & Command Safety
+
+| Check | What to look for |
+|-------|-----------------|
+| **Command injection** | Arguments passed to `Process.Start` must be sanitized. Use `ArgumentList` (not string interpolation into command strings). Never interpolate user/external input into command strings. |
+| **Elevation** | Don't auto-elevate. Don't include `IsElevated()` helpers that silently re-launch elevated. The calling tool should handle elevation prompts. The library should error if it lacks permissions. |
diff --git a/external/Java.Interop/.github/skills/java-interop-reviewer/references/testing-rules.md b/external/Java.Interop/.github/skills/java-interop-reviewer/references/testing-rules.md
new file mode 100644
index 00000000000..32702e3499f
--- /dev/null
+++ b/external/Java.Interop/.github/skills/java-interop-reviewer/references/testing-rules.md
@@ -0,0 +1,18 @@
+# Testing Review Rules
+
+Guidance for test code in dotnet/java-interop. Loaded when test files change.
+
+---
+
+## Testing Checks
+
+| Check | What to look for |
+|-------|-----------------|
+| **NUnit conventions** | Use `[TestFixture]`, `[Test]`, `[NonParallelizable]` (for tests that hang without it). |
+| **Bug fixes need regression tests** | Every PR that fixes a bug should include a test that fails without the fix and passes with it. If the PR description says "fixes #N" but adds no test, ask for one. |
+| **Test assertions must be specific** | `Assert.IsNotNull(result)` or `Assert.IsTrue(success)` don't tell you what went wrong. Prefer `Assert.AreEqual(expected, actual)` or NUnit constraints (`Assert.That` with `Does.Contain`, `Is.EqualTo`, etc.) for richer failure messages. |
+| **Deterministic test data** | Tests should not depend on system locale, timezone, or current date. Use explicit `CultureInfo.InvariantCulture` and hardcoded dates when testing formatting. |
+| **Test edge cases** | Empty collections, null inputs, boundary values, concurrent calls, and very large inputs should all be considered. If the PR only tests the happy path, suggest edge cases. |
+| **Generator tests must include Invoker types** | Tests for generated binding code should verify both the interface/class output and the `*Invoker` type behavior. Invoker codegen has historically had subtle bugs with default interface methods and virtual dispatch. |
+| **JVM-dependent tests** | Tests that require a running JVM should be in projects that configure the JVM environment (e.g., `Java.Interop-Tests`). Verify that test classes requiring a JVM are not placed in unit-test-only projects. |
+| **Expected codegen output tests** | Generator tests that compare expected output should be updated when the expected output format changes. Stale expected output files cause spurious test failures. |
diff --git a/external/Java.Interop/.github/workflows/java-interop-reviewer.md b/external/Java.Interop/.github/workflows/java-interop-reviewer.md
new file mode 100644
index 00000000000..72c7542fabe
--- /dev/null
+++ b/external/Java.Interop/.github/workflows/java-interop-reviewer.md
@@ -0,0 +1,64 @@
+---
+on:
+ slash_command:
+ name: review
+ events: [pull_request_comment]
+ roles: [admin, maintainer, write]
+environment: copilot-pr-reviewer
+permissions:
+ contents: read
+ pull-requests: read
+engine:
+ id: copilot
+ model: claude-opus-4.8
+max-daily-ai-credits: -1
+max-ai-credits: -1
+network:
+ allowed:
+ - defaults
+ - dotnet
+ - github
+ - "aka.ms"
+ - "microsoft.com"
+tools:
+ github:
+ github-token: ${{ secrets.GITHUB_TOKEN }}
+ toolsets: [pull_requests, repos]
+ # Allow reading PR content from external/first-time contributors.
+ # The /review command is gated to maintainers, so only trusted users can trigger it.
+ min-integrity: none
+safe-outputs:
+ github-token: ${{ secrets.GITHUB_TOKEN }}
+ create-pull-request-review-comment:
+ max: 50
+ submit-pull-request-review:
+ max: 1
+ allowed-events: [COMMENT, REQUEST_CHANGES]
+---
+
+# Java.Interop PR Reviewer
+
+A maintainer commented `/review` on this pull request. Perform a thorough code review following the dotnet/java-interop review guidelines.
+
+## Instructions
+
+1. Read the review methodology from `.github/skills/java-interop-reviewer/SKILL.md` — this defines the review workflow, mindset, severity levels, and comment format.
+2. Read the review rules from the `.github/skills/java-interop-reviewer/references/` directory — load the appropriate rule files based on the changed file types, as described in the SKILL.md workflow.
+3. Follow the skill's workflow to analyze the pull request:
+ - Gather context: read the diff and changed files
+ - For each changed file, read the **full source file** to understand surrounding context
+ - Form an independent assessment before reading the PR description
+ - Read the PR title and description — treat claims as things to verify
+ - Check CI status
+ - Analyze the diff against the review rules
+4. Post your findings as inline review comments and a review summary.
+
+## Constraints
+
+- Only comment on added/modified lines visible in the diff.
+- One issue per inline comment.
+- If the same issue appears many times, flag it once listing all affected files.
+- Don't flag what CI catches (compiler errors, linter issues).
+- Avoid false positives — verify concerns given the full file context.
+- **Never submit an APPROVE event.** Use COMMENT for clean PRs and REQUEST_CHANGES when issues are found.
+- Prioritize: bugs > safety > performance > missing tests > duplication > consistency > documentation.
diff --git a/external/Java.Interop/.gitignore b/external/Java.Interop/.gitignore
new file mode 100644
index 00000000000..f3996b884b5
--- /dev/null
+++ b/external/Java.Interop/.gitignore
@@ -0,0 +1,20 @@
+bin
+Configuration.Override.props
+obj
+JavaDeveloper-2013005_dp__11m4609.pkg
+LocalJDK
+TestResult.xml
+TestResult-*.xml
+lib/gendarme-*
+gendarme.html
+gendarme.xml
+packages
+.vs/
+.nuget/
+*.userprefs
+*.user
+Resource.designer.cs
+*.binlog
+*.rej
+*.orig
+*~
diff --git a/external/Java.Interop/.gitmodules b/external/Java.Interop/.gitmodules
new file mode 100644
index 00000000000..5349df98200
--- /dev/null
+++ b/external/Java.Interop/.gitmodules
@@ -0,0 +1,4 @@
+[submodule "external/xamarin-android-tools"]
+ path = external/xamarin-android-tools
+ url = https://github.com/xamarin/xamarin-android-tools.git
+ branch = main
diff --git a/external/Java.Interop/.vscode/extensions.json b/external/Java.Interop/.vscode/extensions.json
new file mode 100644
index 00000000000..53b2f67debc
--- /dev/null
+++ b/external/Java.Interop/.vscode/extensions.json
@@ -0,0 +1,10 @@
+{
+ "recommendations": [
+ "ms-vscode.csharp",
+ "ms-vscode.cpptools",
+ "ms-vscode.mono-debug",
+ "wghats.vscode-nxunit-test-adapter",
+ "visualstudioexptteam.vscodeintellicode",
+ "zbecknell.t4-support",
+ ]
+}
\ No newline at end of file
diff --git a/external/Java.Interop/.vscode/launch.json b/external/Java.Interop/.vscode/launch.json
new file mode 100644
index 00000000000..6c63e562088
--- /dev/null
+++ b/external/Java.Interop/.vscode/launch.json
@@ -0,0 +1,48 @@
+{
+ // Use IntelliSense to learn about possible attributes.
+ // Hover to view descriptions of existing attributes.
+ // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
+ "version": "0.2.0",
+ "configurations": [
+ {
+ "name": "Launch",
+ "type": "mono",
+ "request": "launch",
+ "program": "${workspaceRoot}/packages/NUnit.ConsoleRunner.3.9.0/tools/nunit3-console.exe ${workspaceRoot}/bin/TestDebug/generator-Tests.dll",
+ "cwd": "${workspaceRoot}bin/TestDebug/"
+ },
+ {
+ "name": "Attach",
+ "type": "mono",
+ "request": "attach",
+ "address": "localhost",
+ "port": 55555
+ },
+ {
+ "name": "Launch Generator",
+ "type": "mono",
+ "request": "launch",
+ "preLaunchTask": "Build Generator",
+ "program": "${workspaceRoot}/bin/TestDebug/generator.exe",
+ "args": [
+ "--public",
+ "--product-version=7",
+ "--api-level=29",
+ "-o=obj/Debug/android-29/mcw/",
+ "--codegen-target=XAJavaInterop1",
+ "--fixup=metadata",
+ "--preserve-enums",
+ "--enumflags=enumflags",
+ "--enumfields=map.csv",
+ "--enummethods=methodmap.csv",
+ "--enummetadata=obj/Debug/android-29/mcw/enummetadata",
+ "--apiversions=${env:HOME}/android-toolchain/sdk/platforms/android-29/data/api-versions.xml",
+ "--annotations=${env:HOME}/android-toolchain/sdk/platforms/android-29/data/annotations.zip",
+ "--type-map-report=obj/Debug/android-29/mcw/type-mapping.txt",
+ "--enumdir=obj/Debug/android-29/mcw",
+ "obj/Debug/android-29/mcw/api.xml"
+ ],
+ "cwd": "${workspaceRoot}/../xamarin-android/src/Mono.Android",
+ }
+ ]
+}
\ No newline at end of file
diff --git a/external/Java.Interop/.vscode/settings.json b/external/Java.Interop/.vscode/settings.json
new file mode 100644
index 00000000000..ae48674213e
--- /dev/null
+++ b/external/Java.Interop/.vscode/settings.json
@@ -0,0 +1,11 @@
+{
+ "java.configuration.updateBuildConfiguration": "automatic",
+ "nxunitExplorer.nunit": "packages/NUnit.ConsoleRunner.3.9.0/tools/nunit3-console.exe",
+ "nxunitExplorer.modules": [
+ "bin/TestDebug/generator-Tests.dll",
+ "bin/TestDebug/Java.Interop.Tools.JavaCallableWrappers-Tests.dll",
+ "bin/TestDebug/LogcatParse-Tests.dll",
+ "bin/TestDebug/Xamarin.Android.Tools.ApiXmlAdjuster-Tests.dll",
+ "bin/TestDebug/Xamarin.Android.Tools.Bytecode-Tests.dll",
+ ]
+}
\ No newline at end of file
diff --git a/external/Java.Interop/.vscode/tasks.json b/external/Java.Interop/.vscode/tasks.json
new file mode 100644
index 00000000000..7825fd0f5d2
--- /dev/null
+++ b/external/Java.Interop/.vscode/tasks.json
@@ -0,0 +1,67 @@
+{
+ // See https://go.microsoft.com/fwlink/?LinkId=733558
+ // for the documentation about the tasks.json format
+ "version": "2.0.0",
+ "tasks": [
+ {
+ "label": "Build Java.Interop",
+ "type": "shell",
+ "command": "msbuild Java.Interop.sln /restore /t:Build",
+ "group": {
+ "kind": "build",
+ "isDefault": true
+ },
+ "problemMatcher": [
+ "$msCompile"
+ ]
+ },
+ {
+ "label": "Clean Java.Interop",
+ "type": "shell",
+ "command": "msbuild Java.Interop.sln /restore /t:Clean",
+ "group": {
+ "kind": "build",
+ "isDefault": true
+ },
+ "problemMatcher": [
+ "$msCompile"
+ ]
+ },
+ {
+ "label": "Build Generator",
+ "type": "shell",
+ "command": "msbuild tools/generator/generator.sln /restore /t:Build",
+ "group": {
+ "kind": "build",
+ "isDefault": true
+ },
+ "problemMatcher": [
+ "$msCompile"
+ ]
+ },
+ {
+ "label": "Clean Generator",
+ "type": "shell",
+ "command": "msbuild tools/generator/generator.sln /restore /t:Clean",
+ "group": {
+ "kind": "build",
+ "isDefault": true
+ },
+ "problemMatcher": [
+ "$msCompile"
+ ]
+ },
+ {
+ "label": "Run Generator Unit Tests",
+ "type": "shell",
+ "command": "msbuild tools/generator/generator.sln /restore /t:RunNunitTests",
+ "group": {
+ "kind": "test",
+ "isDefault": true
+ },
+ "problemMatcher": [
+ "$msCompile"
+ ]
+ }
+ ]
+}
diff --git a/external/Java.Interop/CODE-OF-CONDUCT.md b/external/Java.Interop/CODE-OF-CONDUCT.md
new file mode 100644
index 00000000000..775f221c98e
--- /dev/null
+++ b/external/Java.Interop/CODE-OF-CONDUCT.md
@@ -0,0 +1,6 @@
+# Code of Conduct
+
+This project has adopted the code of conduct defined by the Contributor Covenant
+to clarify expected behavior in our community.
+
+For more information, see the [.NET Foundation Code of Conduct](https://dotnetfoundation.org/code-of-conduct).
diff --git a/external/Java.Interop/Configuration.Override.props.in b/external/Java.Interop/Configuration.Override.props.in
new file mode 100644
index 00000000000..f9421ed40ec
--- /dev/null
+++ b/external/Java.Interop/Configuration.Override.props.in
@@ -0,0 +1,17 @@
+
+
+
+ /Library/Java/JavaVirtualMachines/microsoft-11.jdk/Contents/Home/lib/jli/libjli.dylib
+ /Library/Frameworks/Mono.framework/Libraries/libmonosgen-2.0.1.dylib
+ $(MSBuildThisFileDirectory)bin\$(Configuration)\
+
+
+
+
+
+
+
+
+
+
+
diff --git a/external/Java.Interop/Directory.Build.props b/external/Java.Interop/Directory.Build.props
new file mode 100644
index 00000000000..ad0ce48ddaa
--- /dev/null
+++ b/external/Java.Interop/Directory.Build.props
@@ -0,0 +1,78 @@
+
+
+
+
+ Debug
+ true
+ <_OutputPath>$(MSBuildThisFileDirectory)bin\Build$(Configuration)\
+ true
+ true
+
+ true
+ 10.0
+ net$(DotNetTargetFrameworkVersion)
+
+
+
+
+
+
+
+
+
+
+
+ true
+
+ False
+ False
+ obj\
+
+
+
+ $(MSBuildThisFileDirectory)external\xamarin-android-tools
+
+
+ dotnet
+ cmake
+ $(MSBuildThisFileDirectory)build-tools\gradle
+ $(GradleHome)\gradlew
+ --stacktrace --no-daemon
+ 11
+ 11
+ <_BootClassPath Condition=" '$(JreRtJarPath)' != '' ">-bootclasspath "$(JreRtJarPath)"
+ <_JavacSourceOptions>--release $(JavacTargetVersion) $(_BootClassPath)
+
+
+ $([System.IO.Path]::GetFullPath ('$(XamarinAndroidToolsDirectory)'))
+
+
+
+
+ $(NoWarn);CS8981
+
+
+
diff --git a/external/Java.Interop/Directory.Build.targets b/external/Java.Interop/Directory.Build.targets
new file mode 100644
index 00000000000..2da41427e38
--- /dev/null
+++ b/external/Java.Interop/Directory.Build.targets
@@ -0,0 +1,54 @@
+
+
+
+
+
+
+
+
+
+ $(DefineConstants);INTERNAL_NULLABLE_ATTRIBUTES
+
+
+
+
+ 13.0
+
+
+
+
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
+
+
+
+
+
+
diff --git a/external/Java.Interop/Documentation/Architecture.md b/external/Java.Interop/Documentation/Architecture.md
new file mode 100644
index 00000000000..3f8035953e5
--- /dev/null
+++ b/external/Java.Interop/Documentation/Architecture.md
@@ -0,0 +1,276 @@
+# Architecture
+
+## Xamarin.Android Architecture
+
+For reference/comparision, The [Xamarin.Android architecture][xa-arch] and
+[JNI use][xa-jni] is reasonably well documented; *how* it all fits together
+isn't.
+
+[xa-arch]: http://developer.xamarin.com/guides/android/under_the_hood/architecture/
+[xa-jni]: http://developer.xamarin.com/guides/android/advanced_topics/java_integration_overview/working_with_jni/
+
+Within Xamarin.Android, there are four "moving parts":
+
+1. `Mono.Android.dll`, which contains two things: (1) a `generator`-produced
+ (2) binding of the Android API, and a fair bit of "glue code" to make
+ things actually work -- type marshaling, method invocation, helper types,
+ etc.
+
+2. [tools/generator](tools/generator),
+ which generates *binding assemblies*, which in turn contain
+ three things: (1) JNI glue code to permit managed code to invoke Java code;
+ (2) JNI marshal methods to facilitate Java code calling managed code; and
+ (3) lots of custom attributes to facilitate Android Callable Wrapper
+ generation.
+
+3. [Java Callable Wrappers][xa-acw], which are "Java stubs" containing Java
+ code with native method declarations for all methods overridden or
+ implemented from managed code. See also
+ [Java.Interop.Tools.JavaCallableWrappers](src/Java.Interop.Tools.JavaCallableWrappers).
+
+[xa-acw]: http://developer.xamarin.com/guides/android/advanced_topics/java_integration_overview/android_callable_wrappers/
+
+4. MSBuild glue code to glue various things together. See
+ [xamarin-android/src/Xamarin.Android.Build.Tasks][xa-tasks].
+
+[xa-tasks]: https://github.com/xamarin/xamarin-android/tree/master/src/Xamarin.Android.Build.Tasks
+
+Furthermore, there's a matter of "time": binding assemblies (2) are emitted
+at one time, while everything else (1, 3, 4) are bundled with the SDK and
+thus could potentially change. Consequently, all four need to be kept in sync;
+there is, in effect, an ABI between `Mono.Android.dll`, binding assemblies,
+the build process, and Java callable wrappers. Any fix that involves the
+boundary between these may "leak" into other areas, or otherwise not be
+viable without requiring e.g. that customers rebuild binding assemblies.
+
+What would such a change be?
+
+For example, we would like Xamarin.Android to support *Ahead Of Time* (AOT)
+compilation of assemblies into native code, to reduce or eliminate JIT
+overheads during process startup and runtime execution.
+
+The problem is that, at present, *everything* needs to be wrapped in a
+runtime-generated `try`/`catch` block (emitted via `System.Reflection.Emit`)
+to perform Java exception marshaling duties.
+
+To "fully" do this for AOT, the *binding assembly* would need to contain the
+exception marshaling logic, which (1) originally couldn't be *written* in C#
+(it used IL fault blocks), and (2) would increase the ABI requirements.
+Alternatively, we'd need to instead generate "new" marshal methods at
+packaging time, resulting in *3* places using *2* different code generators
+that generate marshal methods (binding assemblies, AOT, `[Export]`).
+
+*Then* there's the "minor" problem of the implementation of the
+[`[Export]` custom attribute][xa-export], which currently *always* requires runtime
+code generation. It would be nice to remove this requirement.
+
+[xa-export]: http://developer.xamarin.com/guides/android/advanced_topics/java_integration_overview/working_with_jni/#ExportAttribute_and_ExportFieldAttribute
+
+*Finally*, none of this is *extensible*: lots of marshaling logic is hardcoded,
+e.g. translating `java.io.InputStream` to `System.IO.Stream` (and back),
+and there's no facility for additional types to participate in *any* of this.
+
+It's a big, monolithic, ball of mud.
+
+## Proposed Java.Interop Architecture
+
+Java.Interop aims to (eventually) change everything. (This is the end-game; the
+commit history at the time of this writing does *not* fulfill this.)
+
+The problem with Xamarin.Android is a lack of flexibility:
+
+* Binding assemblies limit wide-scale improvements.
+* Marshaling control and behavior is restricted from public use.
+* Tying JNI glue code mechanics with the Android API makes it harder to reuse
+ JNI glue code elsewhere (the desktop JVM?).
+* An incomplete binding ABI restricts fully embracing AOT
+
+Relatedly, there has long been a desire to embrace
+[System.Linq.Expressions][System.Linq.Expressions], which supports generating IL
+for execution at runtime (or saving to disk).
+
+[System.Linq.Expressions]: https://msdn.microsoft.com/en-us/library/system.linq.expressions.aspx
+
+Thus, the solution to *all our problems*? *Embrace* `System.Linq.Expressions`.
+We still need a separate code generator for binding assemblies, but *instead*
+of emitting "static" C# code that hardcodes all information about marshaling,
+have it call into a runtime method that performs the work *at runtime*:
+
+ // generator-emitted marshal method:
+ // Old-and-busted (current Xamarin.Android behavior)
+ static IntPtr n_Clone (IntPtr jnienv, IntPtr native__this)
+ {
+ Java.Lang.Object __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
+ return JNIEnv.ToLocalJniHandle (__this.Clone ());
+ }
+
+ // New hotness *from generator* (proposed Java.Interop behavior)
+ [Dynamic]
+ static IntPtr n_Clone (IntPtr jnienv, IntPtr native__this)
+ {
+ Func d = Delegate.CreateDelegate (...);
+ JniEnvironment.Runtime.InvokeMethod (jnienv, native__this, d /*, args... */);
+ }
+
+(API needs work/thinking through.)
+
+The idea is that the generator-emitted methods would be "shims" into
+Java.Interop methods which would do the heavy lifting.
+
+This would, of course, result in additional runtime overhead.
+
+To rectify this, we could use a post-build step which would *replace*
+all these shims with *real* method bodies:
+
+ // Post-build generated code
+ static IntPtr n_Clone (IntPtr jnienv, IntPtr native__this)
+ {
+ JniTransition __envp = new JniTransition (jnienv);
+ try {
+ var __jvm = __envp.Runtime;
+ var __this = __jvm.ValueManager.GetValue(native__this);
+ var __mret = __this.Clone ();
+ var __jret = References.NewReturnToJniRef(__mret);
+ return __jret;
+ }
+ catch (Exception __e) {
+ __envp.SetPendingException (__e);
+ }
+ finally {
+ __envp.Dispose ();
+ }
+ }
+
+By making everything dynamic and then *replacing* everything of consequence
+at package time, we loosen up ABI restrictions, allow marshaling bugs to
+be inserted in future releases without requiring re-generation of binding
+assemblies, and allow new types to participate in the marshal method code
+generation. This allows for a more flexible marshaling system, with fewer
+interdependencies, and could permit long-desired features such as
+[value marshaling][value-marshaling] (copying Java values into managed types
+which *don't* inherit from `JavaObject`, e.g. marshal a
+`Android.Graphics.Point` into a `System.Drawing.Point`, eliminating the need
+for a long-held, GC-tracked, JNI Global Reference.)
+
+[value-marshaling]: https://trello.com/c/M8zkFtR3/143-research-adding-valuetype-semantics-to-some-types
+
+Furthermore, by *relying* on a post-build step, this also allows for easily
+supporting `[Export]`/`[JavaCallable]` annotated methods without *requiring*
+runtime code generation, *and* to AOT the marshal methods for them!
+
+We *centralize* the *actual* value marshaling logic into `Java.Interop`,
+removing code duplication from `generator`, and use that infrastructure
+for as much as possible: C# 4 `dynamic`, post-build code generation,
+runtime code generation (to support Debug builds so post-build steps
+aren't always required).
+
+That said, we also want to *emphasize* the efficient path: we don't want
+the "simple" path to require code generation; we want the simple path
+to support and prefer the post-build AOT-supporting codegen path.
+This in turn means that certain implemented features -- such as generic
+argument marshaling -- need to change so that they're not inadvertently
+used.
+
+## Type Safety
+
+The start of the reboot was to use strongly typed [`SafeHandle`][SafeHandle]
+subclasses everywhere instead of `IntPtr`. This allows a local reference to be
+type-checked and distinct from a global ref, complete with compiler
+type checking.
+
+[SafeHandle]: http://msdn.microsoft.com/en-us/library/system.runtime.interopservices.safehandle.aspx
+
+Since we now have actual types in more places, we can move the current `JNIEnv`
+methods into more semantically meaningful types.
+
+Unfortunately, various tests demonstrated that while `SafeHandle`s provided
+increased type safety, they did so at a large runtime cost:
+
+1. `SafeHandle`s are reference types, increasing GC heap allocations and pressure.
+2. [`SafeHandle`s are *thread-safe* in order to prevent race conditions and handle recycling attacks][reliability].
+
+[reliability]: http://blogs.msdn.com/b/bclteam/archive/2005/03/16/396900.aspx
+
+Compared to a Xamarin.Android-like "use `IntPtr`s for *everything*" binding
+approach, the overhead is significant: to *just* invoke
+`JNIEnv::CallObjectMethod()`, using `SafeHandle`s for everything causes
+execution time to take ~1.4x longer than a comparable struct-oriented approach.
+
+Make the test more realistic -- compared to current Xamarin.Android and
+current Java.Interop -- so that `JniEnvironment.Members.CallObjectMethod()`
+also calls `JniEnvironment.Errors.ExceptionOccurred()`, which also returns
+a JNI local reference -- and runtime execution time *jumped to ~3.6x*:
+
+ # SafeHandle timing: 00:00:09.9393493
+ # Average Invocation: 0.00099393493ms
+ # JniObjectReference timing: 00:00:02.7254572
+ # Average Invocation: 0.00027254572ms
+
+(See the [tests/invocation-overhead](tests/invocation-overhead) directory
+for the invocation comparison sourcecode.)
+
+*This is not acceptable*. Performance is a concern with Xamarin.Android;
+we can't be making it *worse*.
+
+Meanwhile, I *really* dislike using `IntPtr`s everywhere, as it doesn't let you
+know what the value actually represents.
+
+To solve this issue, *avoid `SafeHandle` types* in the public API.
+
+Downside: this means we can't have the GC collect our garbage JNI references.
+
+Upside: the Java.Interop effort will actually be usable.
+
+Instead of using `SafeHandle` types, we introduce a
+`JniObjectReference` struct type. This represents a JNI Local, Global, or
+WeakGlobal object reference. The `JniObjectReference` struct also contains
+the *reference type* as `JniObjectReferenceType`.
+`jmethodID` and `jfieldID` become "normal" class types, permitting type safety,
+but lose their `SafeHandle` status, which was never really necessary because
+they don't require cleanup *anyway*. Furthermore, these values should be
+*cached* -- see `JniPeerMembers` -- so making them GC objects shouldn't be
+a long-term problem.
+
+Historically, `JniObjectReference` retained an optional `SafeHandle`
+implementation behind a build-time feature switch so the safer but slower
+representation could be compared with the `IntPtr` representation during the
+migration. That experiment is no longer active: the supported implementation is
+the `IntPtr`-backed `JniObjectReference` struct, with explicit ownership
+transfer and disposal via `JniObjectReference.Dispose (ref reference)`.
+
+
+## Naming Conventions
+
+Types with a `Java` prefix are "high-level" types which participate in cross-VM
+object-reference semantics, e.g. you could add a `JavaObject` subclass to a
+Java-side collection, perform a GC, and the instance will survive the GC.
+
+Types with a `Jni` prefix are "low-level" types and do *not* participate in
+object-reference semantics.
+
+
+## Notes
+
+### JDK and Global References
+
+The JDK VM supports an effectively unlimited number of global references.
+While Dalvik bails out after creating ~64k GREFs, consider the following
+on the JDK:
+
+ var t = new JniType ("java/lang/Object");
+ var c = t.GetConstructor ("()V");
+ var o = t.NewInstance (c);
+ int count = 0;
+ while (true) {
+ Console.WriteLine ("count: {0}", count++);
+ o.NewGlobalRef ();
+ }
+
+I halted the above loop after reaching 25686556 instances.
+
+ count: 25686556
+ ^C
+
+I'm not sure when the JDK would stop handing out references, but it's probably
+bound to process heap limits (e.g. depends on 32-bit vs. 64-bit process).
+
diff --git a/external/Java.Interop/Documentation/BuildConfiguration.md b/external/Java.Interop/Documentation/BuildConfiguration.md
new file mode 100644
index 00000000000..13984d29263
--- /dev/null
+++ b/external/Java.Interop/Documentation/BuildConfiguration.md
@@ -0,0 +1,49 @@
+# Build Configuration
+
+The Java.Interop build can be configured by specifying MSBuild properties to control
+behavior or by overriding **make**(1) variables on the command line.
+
+## MSBuild Properties
+
+MSbuild properties may be placed into the file `Configuration.Override.props`,
+which can be copied from
+[`Configuration.Override.props.in`](Configuration.Override.props.in).
+The `Configuration.Override.props` file is ``ed by
+[`Directory.Build.props`](Directory.Build.props); there is no need to
+`` it within other project files.
+
+Overridable MSBuild properties include:
+
+* `$(CecilSourceDirectory)`: If the empty string, Cecil will be obtained from
+ NuGet packages. Otherwise, `$(UtilityOutputFullPath)Xamarin.Android.Cecil.dll`
+ will be used to reference Cecil.
+* `$(JdkJvmPath)`: Full path name to the JVM native library to use for
+ tests which require a desktop JVM. By default this is probed from the
+ configured JDK.
+* `$(JavaCPath)`: Path to the `javac` command-line tool, by default set to `javac`.
+* `$(JarPath)`: Path to the `jar` command-line tool, by default set to `jar`.
+ * It may be desirable to override these on Windows, depending on your `PATH`.
+* `$(UtilityOutputFullPath)`: Directory to place various utilities such as
+ [`class-parse`](tools/class-parse), [`generator`](tools/generator),
+ and [`logcat-parse`](tools/logcat-parse). This value should be a full path.
+ By default this is `$(MSBuildThisFileDirectory)bin/$(Configuration)`.
+
+## **make**(1) variables
+
+The following **make**(1) variables may be specified:
+
+* `$(CONFIGURATION)`: The product configuration to build, and corresponds
+ to the `$(Configuration)` MSBuild property when running `$(MSBUILD)`.
+ Valid values are `Debug` and `Release`. Default value is `Debug`.
+* `$(RUNTIME)`: The managed runtime to use to execute utilities, tests.
+ Default value is `mono64` if present in `$PATH`, otherwise `mono`.
+* `$(TESTS)`: Which unit tests to execute. Useful in conjunction with the
+ `make run-tests` target:
+
+ make run-tests TESTS=bin/Debug/Java.Interop-Tests.dll
+
+* `$(V)`: If set to a non-empty string, adds `/v:diag` to `$(MSBUILD_FLAGS)`
+ invocations.
+* `$(MSBUILD)`: The MSBuild build tool to execute for builds.
+ Default value is `xbuild`.
+
diff --git a/external/Java.Interop/Documentation/EnumMappingFile.md b/external/Java.Interop/Documentation/EnumMappingFile.md
new file mode 100644
index 00000000000..0b92324bc71
--- /dev/null
+++ b/external/Java.Interop/Documentation/EnumMappingFile.md
@@ -0,0 +1,102 @@
+# Enumeration Mapping File Documentation
+
+## Background
+
+In order to help with binding enumification (the process of converting groups
+of Java constant int fields into C# enums), a file can be created that defines
+a map between the fields and the enums to be created.
+
+There is a CSV format and an XML format of this file. In practice, users are
+guided to the XML format via our [documentation][0] and templates. The CSV format
+is mainly used internally for `Mono.Android.dll`, as it converts thousands of
+constants into hundreds of enums.
+
+## CSV Format
+
+The basic format since the beginning of Xamarin contains up to 6 fields:
+
+* **API Level** - This is generally only used by `Mono.Android.dll` to denote
+ the Android level the constant was introduced in. For other uses this
+ is generally `0`.
+* **Enum Type** - C# namespace and type of the enum to create. For example:
+ `Android.Views.WindowProgress`.
+* **Enum Member** - C# name of the enum to create. For example:
+ `Start`
+* **Enum Value** - The value of the enum. For example: `0`.
+* **JNI Signature** - The JNI signature of the Java constant to convert. For example:
+ `android/view/Window.PROGRESS_START`.
+* **Flags** - If this field contains `flags` the enum will be created with the
+ `[Flags]` attribute. (Any member will `flags` will make the whole enum `[Flags]`.)
+
+Full example:
+```
+10,Android.Views.WindowProgress,Start,android/view/Window.PROGRESS_START,0,flags
+```
+
+---
+**NOTE**
+
+Our CSV files also allow comments using `//`. Lines beginning with this
+sequence are ignored.
+
+---
+
+### Transient Mode
+
+By default, Java constants referenced in this format are kept. However the
+file can contain a line like this at any point:
+```
+- ENTER TRANSIENT MODE -
+```
+
+Any v1 constants referenced *AFTER* this line will be removed from the bindings.
+(This will not affect v2 constants.)
+
+## CSV Format v2
+
+Over time we have found some limitations to the format, such as being able
+to specify if the Java constant field should be removed. Additionally, since the
+format only specifies constants that *SHOULD* be mapped, we cannot use this
+to track constants that we have examined and determined *SHOULD NOT* be mapped.
+This has led to various blacklists and tooling of varying success to prevent
+us from needing to continually re-audit those constants.
+
+There is now a "v2" version of defining constants. This is a line-level change
+and you can mix "v1" and "v2" lines in the same file for backwards compatibility,
+but for consistency it's probably better to stick to one style.
+
+A "v2" line contains up to 9 fields:
+
+* **Action** - The action to perform. This is what denotes a "v2" line, if the first
+ character is not one of the following it will be treated as "v1".
+ * `E` - Create a C# enum from a Java constant
+ * `A` - Create a C# enum not mapped to a Java constant
+ * `R` - Remove a Java constant but do not create a C# enum
+ * `I` - Explicitly ignore this Java constant
+ * `?` - Unknown, an explicit action has not been decided yet, will be ignored
+* **API Level** - This is generally only used by `Mono.Android.dll` to denote
+ the Android level the constant was introduced in. For other uses this
+ is generally `0`.
+* **JNI Signature** - The JNI signature of the Java constant to convert. For example:
+ `android/view/Window.PROGRESS_START`.
+* **Enum Value** - The value of the enum. For example: `0`.
+* **Enum Type** - C# namespace and type of the enum to create. For example:
+ `Android.Views.WindowProgress`.
+* **Enum Member** - C# name of the enum to create. For example:
+ `Start`
+* **Field Action** - Action to take on the Java constant. (This replaces Transient mode.)
+ * `remove` - Remove the Java constant
+ * `keep` - Keeps the Java constant
+* **Flags** - If this field contains `flags` the enum will be created with the
+ `[Flags]` attribute. (Any member will `flags` will make the whole enum `[Flags]`.)
+* **Deprecated Since** - This is generally only used by `Mono.Android.dll` to denote
+ the Android level the constant was deprecated in. Specifying "-1" will add an obsolete
+ message to the effect of: "This value was incorrectly added to the enumeration and is
+ not a valid value". Leave blank if constant is not deprecated.
+
+Full example:
+```
+E,10,android/view/Window.PROGRESS_START,0,Android.Views.WindowProgress,Start,remove,flags,30
+```
+
+[0]: https://docs.microsoft.com/en-us/xamarin/android/platform/binding-java-library/customizing-bindings/java-bindings-metadata#enumfieldsxml-and-enummethodsxml
diff --git a/external/Java.Interop/Documentation/JNI-Invocation-Overhead-Musings.md b/external/Java.Interop/Documentation/JNI-Invocation-Overhead-Musings.md
new file mode 100644
index 00000000000..4ac6d62dc35
--- /dev/null
+++ b/external/Java.Interop/Documentation/JNI-Invocation-Overhead-Musings.md
@@ -0,0 +1,163 @@
+# JNI Invocation Overhead Musings
+
+[tests/PerformanceTests/TimingTests.cs](tests/PerformanceTests/TimingTests.cs)
+contains various tests to investigate the overheads involved in using JNI to
+invoke Java methods. In particular, see the
+`Java.Interop.PerformanceTests.JniMethodInvocationOverheadTiming.MethodInvocationTiming()`
+tests, invokes a JNI method `count` times and attempts to "normalize" that to
+invoking an equivalent, non-inlined, C# method.
+
+**Update**: I believe the tests are wrong, but I don't know *how* they're
+wrong. (Leaving "misleading" statements in this file until I know what's
+actually going on.)
+
+The content below suggests that the JNI overhead is proportional with the
+number of JNI invocations, e.g. when `count` is 10, JNI invocations are ~5x
+that of an "equivalent" C# method invocation, while when `count` is 100000,
+JNI invocations are ~808x, which makes *no sense at all*, but that was the
+observed behavior.
+
+Further investigation suggests that this hypothesis is bunk, those numbers
+are bunk, something else is going on, and I still have no idea what's going on.
+
+That said, consider [commit c9db386c][c9db386c], which now starts printing
+the *average* invocation time in a nice, human-readable, format.
+When `count` is 100,000, the `static void i3` output is:
+
+[c9db386c]: https://github.com/xamarin/Java.Interop/commit/c9db386c5457ff6243b3e36d919ca8669f502192
+
+ Method Invoke: static void i3: JNI is 94x managed
+ C/JNI: 2.0 ms | average: 0.002 ms
+ JNI: 14.3707 ms; 7x C/JNI | average: 0.01437 ms
+ Managed: 0.1529 ms | average: 0.00015 ms
+ Pinvoke: 0.1269 ms; 1x managed | average: 0.00013 ms
+
+(Quick aside: odd that the above run says JNI is 94x managed, while below
+it's 808x managed! Numbers be *weird*.)
+
+Of interest here is the **C/JNI** line, which shows that the average
+invocation time of the `static void i3` method is 0.002ms.
+
+What the description below suggests is that this average time is proportional
+to `count`: when `count` is small, the C/JNI average time is smaller than
+the C/JNI average time when `count` is large.
+
+*This cannot be independently verified.*
+
+In point of fact, [I cannot reproduce this behavior][art-timing-test.zip].
+No matter what `count` value I choose, the average time for invoking
+`JNIEnv::CallStaticVoidMethod()` *is the same* (roughly): 0.001ms. (It differs
+from the above `static void i3` value, likely because it's a `static void`).
+
+[art-timing-test.zip]: https://files.xamarin.com/~jonp/tests/art-timing-test.zip
+
+For a given Java method signature, e.g. `static void m()`, invocation time is
+consistent on ART (Android M Preview 2, Nexus 5). It doesn't vary, certainly not
+with the `count` value.
+
+Instead, JNI overhead appears to be fairly consistent (for a given signature).
+At ~0.002ms per invocation, you can perform roughly 500,000 JNI method
+invocations per *second* from C#, which sounds good unless you need to
+manipulate raw Bitmap data...
+
+---
+
+[Commit c60f6093][c60f6093] observed that Android appeared to be much faster
+than the JVM at these tests. This observation appears to have been wrong.
+More interesting is that the "JNI method invocation overhead," defined as
+what this test is attempting to measure (which may be wrong!), varies
+based on the number of method invocations.
+
+[c60f6093]: https://github.com/xamarin/Java.Interop/commit/c60f6093
+
+For example, if we look at just the summary information of one test
+as we vary the value of `count`, the number of times we invoke the
+Java method via JNI or the C# method, we see that there is a nonlinear
+relationship between the count and the overhead:
+
+ count= 10: Method Invoke: static void i3: JNI is 5x managed
+ count= 100: Method Invoke: static void i3: JNI is 10x managed
+ count= 500: Method Invoke: static void i3: JNI is 22x managed
+ count= 1000: Method Invoke: static void i3: JNI is 63x managed
+ count= 10000: Method Invoke: static void i3: JNI is 474x managed
+ count=100000: Method Invoke: static void i3: JNI is 808x managed
+
+Particularly troubling is the *huge* jump between count=1000 and
+count=10000. Count=1000000 is provided for comparison with the JVM,
+which provides the following results:
+
+ count=1000000: Method Invoke: static void i3: JNI is 413x managed [JVM]
+
+We don't know why there's a jump, but this is in fact somewhat encouraging:
+if you're only calling methods in a one-off fashion -- as is frequently
+the case in Xamarin.Android -- then the overhead isn't actually that bad,
+on a per-method invoke basis. It appears to only get really bad when
+invoking the same method repetitively, *a lot*, which I believe shouldn't
+be *that* common a use case (outside of image manipulation?).
+
+### JNI and P/Invoke
+
+[Commit 9d2dfc5][9d2dfc5] observed that there's a fair bit of overhead
+associated with using `SafeHandle`s, in large part because `SafeHandle`s
+need to be [*thread safe*][cbrumme-SafeHandle] in order to prevent
+[handle recycling attacks][handle-recycle]. Xamarin.Android doesn't
+suffer from handle recycling attacks *only* because Mono's SGEN GC
+conservatively scans the stack, prolonging the lifetime of all temporaries
+found there. If/when Xamarin.Android moves to a precise GC for the stack,
+this may no longer be the case and handle recycling attacks -- along
+with possibly finalizing/`Dispose()`ing of instances
+*while they're still being used* -- can become "a thing".
+
+[9d2dfc5]: https://github.com/xamarin/Java.Interop/commit/9d2dfc5
+[cbrumme-SafeHandle]: http://blogs.msdn.com/b/cbrumme/archive/2004/02/20/77460.aspx
+[handle-recycle]: http://blogs.msdn.com/b/cbrumme/archive/2003/04/19/51365.aspx
+
+(...except that handle recycling attacks *can't* become "a thing". A working
+GC bridge precludes it, because collections must *always* be delayed until
+a Java-side collection has been completed, as the JVM may be keeping an
+instance alive. It is thus highly unlikely, even if a precise GC were used,
+that a Java bridged instance would be collected in this manner.)
+
+An idea that came to mind to reduce the overhead of `SafeHandle` use was to
+P/Invoke to a native library to perform the `JNIEnv` function pointer
+invocations instead of using `delegate` invocations alongside
+`Marshal.GetDelegateForFunctionPointer()`, as is currently the case.
+
+This was implemented in the [pinvoke-jnienv][pinvoke-jnienv] branch,
+in [commit 802842a3][802842a3].
+
+[pinvoke-jnienv]: https://github.com/xamarin/Java.Interop/commits/pinvoke-jnienv
+[802842a3]: https://github.com/xamarin/Java.Interop/commit/802842a361380812e290fe3585fea8c0a7a19b97
+
+The result: Using P/Invoke *increases* invocation overhead:
+
+ # "Full" Invocations: JNIEnv::CallObjectMethod() + JNIEnv::DeleteLocalRef() for 10000 iterations
+ Java.Interop Object.toString() Timing: 00:00:30.0774575; 3.00774575 ms/iteration -- ~386.391119190154x
+ Xamarin.Android Object.toString() Timing: 00:00:00.0778420; 0.0077842 ms/iteration
+ # JNIEnv::CallObjectMethod() for 500 iterations
+ Java.Interop Object.toString() Timing: 00:00:00.8041310; 1.608262 ms/CallVirtualObjectMethod() -- ~266.648207712969x
+ Xamarin.Android CallObjectMethod() Timing: 00:00:00.0030157; 0.0060314 ms/CallObjectMethod()
+ # JNIEnv::DeleteLocalRef() for 500 iterations
+ Java.Interop JniLocalReference.Dispose() Timing: 00:00:00.8979645; 1.795929 ms/Dispose() -- ~1661.05160932297x
+ Xamarin.Android DeleteLocalRef() Timing: 00:00:00.0005406; 0.0010812 ms/DeleteLocalRef()
+ ## Breaking down the above Object.toString() + JniLocalReference.Dispose() timings, the JNI calls:
+ # JNIEnv::CallObjectMethod: SafeHandle vs. IntPtr
+ Java.Interop safeCall() Timing: 00:00:00.0058775; 0.011755 ms/SafeHandle JNIEnv::CallObjectMethodA() -- ~2.14538618776464x
+ Java.Interop P/Invoke safeCall() Timing: 00:00:00.0069479; 0.0138958 ms/SafeHandle JNIEnv::CallObjectMethodA() -- ~2.53610016060739x
+ Java.Interop unsafeCall() Timing: 00:00:00.0027396; 0.0054792 ms/IntPtr JNIEnv::CallObjectMethodA()
+ # JNIEnv::DeleteLocalRef: SafeHandle vs. IntPtr
+ Java.Interop safeDel() Timing: 00:00:00.0006010; 0.001202 ms/SafeHandle JNIEnv::DeleteLocalRef() -- ~1.47412312975227x
+ Java.Interop P/Invoke safeDel() Timing: 00:00:00.0007480; 0.001496 ms/SafeHandle JNIEnv::DeleteLocalRef() -- ~1.83468236448369x
+ Java.Interop unsafeDel() Timing: 00:00:00.0004077; 0.0008154 ms/IntPtr JNIEnv::DeleteLocalRef
+
+In particular, note the `Java.Interop P/Invoke` lines:
+
+ Java.Interop P/Invoke safeCall() Timing: 00:00:00.0069479; 0.0138958 ms/SafeHandle JNIEnv::CallObjectMethodA() -- ~2.53610016060739x
+ Java.Interop P/Invoke safeDel() Timing: 00:00:00.0007480; 0.001496 ms/SafeHandle JNIEnv::DeleteLocalRef() -- ~1.83468236448369x
+
+Compare to the `SafeHandle`-using delegate-based invocations:
+
+ Java.Interop safeCall() Timing: 00:00:00.0058775; 0.011755 ms/SafeHandle JNIEnv::CallObjectMethodA() -- ~2.14538618776464x
+ Java.Interop safeDel() Timing: 00:00:00.0006010; 0.001202 ms/SafeHandle JNIEnv::DeleteLocalRef() -- ~1.47412312975227x
+
+Surprisingly, using delegates results in less overhead than using P/Invoke.
diff --git a/external/Java.Interop/Documentation/Motivation.md b/external/Java.Interop/Documentation/Motivation.md
new file mode 100644
index 00000000000..da2cc02b539
--- /dev/null
+++ b/external/Java.Interop/Documentation/Motivation.md
@@ -0,0 +1,29 @@
+# Motivation
+
+**Java.Interop** is a binding of the [Java Native Interface][jni] for use from
+managed languages such as C#, and an associated set of code generators to
+allow Java code to invoke managed code. It is *also* a brain-delusional
+[Second System Syndrome][sss] rebuild of the monodroid/Xamarin.Android core,
+intended to fix some of the shortcomings and design mistakes I've made over the years.
+
+[jni]: http://docs.oracle.com/javase/8/docs/technotes/guides/jni/spec/jniTOC.html
+[sss]: http://en.wikipedia.org/wiki/Second-system_effect
+
+In particular, it attempts to fix the following issues:
+
+* Split out the core invocation logic so it can be used without taking an
+ API-level constraint.
+* Make the assembly a reusable .NET library.
+* Support use of the lib on "desktop" Java VMs. This would allow more testing
+ without an Android device, could allow using Xamarin.Android Views to be shown
+ in the GUI designer, etc.
+* Improve type safety.
+* Improve consistency.
+
+In particular are the last two points: Xamarin.Android currently uses `IntPtr`s
+*everywhere*, and it's not at all obvious what they are (method IDs vs.
+local refs vs. global refs vs. ...). This culminates in `JNIEnv.FindClass()`,
+which returns a global reference while most other methods return a local ref.
+
+The `JNIEnv` API is also huge, unwieldy, and terrible.
+
diff --git a/external/Java.Interop/GitInfo.txt b/external/Java.Interop/GitInfo.txt
new file mode 100644
index 00000000000..2f52450b31d
--- /dev/null
+++ b/external/Java.Interop/GitInfo.txt
@@ -0,0 +1 @@
+10.0
diff --git a/external/Java.Interop/Java.Interop.code-workspace b/external/Java.Interop/Java.Interop.code-workspace
new file mode 100644
index 00000000000..7ad00c311c1
--- /dev/null
+++ b/external/Java.Interop/Java.Interop.code-workspace
@@ -0,0 +1,10 @@
+{
+ "folders": [
+ {
+ "path": "."
+ }
+ ],
+ "settings": {
+ "java.configuration.updateBuildConfiguration": "interactive"
+ }
+ }
\ No newline at end of file
diff --git a/external/Java.Interop/Java.Interop.sln b/external/Java.Interop/Java.Interop.sln
new file mode 100644
index 00000000000..4554dfb3a82
--- /dev/null
+++ b/external/Java.Interop/Java.Interop.sln
@@ -0,0 +1,296 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 16
+VisualStudioVersion = 16.0.29424.173
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tools", "Tools", "{C8F58966-94BF-407F-914A-8654F8B8AE3B}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "logcat-parse", "tools\logcat-parse\logcat-parse.csproj", "{7387E151-48E3-4885-B2CA-A74434A34045}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "class-parse", "tools\class-parse\class-parse.csproj", "{38C762AB-8FD1-44DE-9855-26AAE7129DC3}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "generator", "tools\generator\generator.csproj", "{D14A1B5C-2060-4930-92BE-F7190256C735}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Core", "Core", "{4C173212-371D-45D8-BA83-9226194F48DC}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Java.Interop", "src\Java.Interop\Java.Interop.csproj", "{94BD81F7-B06F-4295-9636-F8A3B6BDC762}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "java-interop", "src\java-interop\java-interop.csproj", "{BB0AB9F7-0979-41A7-B7A9-877260655F94}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Java.Interop.Tools.JavaSource", "src\Java.Interop.Tools.JavaSource\Java.Interop.Tools.JavaSource.csproj", "{5C0B3562-8DA0-4726-9762-75B9709ED6B7}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Desktop", "Desktop", "{0998E45F-8BCE-4791-A944-962CD54E2D80}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Xamarin.Android.Tools.Bytecode", "src\Xamarin.Android.Tools.Bytecode\Xamarin.Android.Tools.Bytecode.csproj", "{B17475BC-45A2-47A3-B8FC-62F3A0959EE0}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Xamarin.Android.Tools.AnnotationSupport", "src\Xamarin.Android.Tools.AnnotationSupport\Xamarin.Android.Tools.AnnotationSupport.csproj", "{07BC4495-1267-4B78-9EA6-B76FEEA2A64A}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Xamarin.Android.Tools.ApiXmlAdjuster", "src\Xamarin.Android.Tools.ApiXmlAdjuster\Xamarin.Android.Tools.ApiXmlAdjuster.csproj", "{1268EADF-8344-431C-81F6-FCB7CBC99F49}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Xamarin.Android.Tools.AnnotationSupport.Cecil", "src\Xamarin.Android.Tools.AnnotationSupport.Cecil\Xamarin.Android.Tools.AnnotationSupport.Cecil.csproj", "{41DFB021-F795-4EB6-8E53-0D069C0BED9F}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Desktop-Tests", "Desktop-Tests", "{271C9F30-F679-4793-942B-0D9527CB3E2F}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestJVM", "tests\TestJVM\TestJVM.csproj", "{A76309AB-98AC-4AE2-BA30-75481420C52F}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Java.Interop-Tests", "tests\Java.Interop-Tests\Java.Interop-Tests.csproj", "{04E28441-36FF-4964-ADD7-EFBB47CCE406}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "logcat-parse-Tests", "tests\logcat-parse-Tests\logcat-parse-Tests.csproj", "{DB05D566-0BA0-4935-868D-689E2F03688E}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Xamarin.Android.Tools.Bytecode-Tests", "tests\Xamarin.Android.Tools.Bytecode-Tests\Xamarin.Android.Tools.Bytecode-Tests.csproj", "{C9FA4492-DEB0-4932-A6B8-E2C4E0581692}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Xamarin.Android.Tools.ApiXmlAdjuster-Tests", "tests\Xamarin.Android.Tools.ApiXmlAdjuster-Tests\Xamarin.Android.Tools.ApiXmlAdjuster-Tests.csproj", "{891F2E04-5614-4A26-A78F-3778025ECF43}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "generator-Tests", "tests\generator-Tests\generator-Tests.csproj", "{4EEAB1A7-99C1-4302-9C18-01A7B481409B}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build-Tools", "Build-Tools", "{172B608B-E6F3-41CC-9949-203A76BA247C}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "jnienv-gen", "build-tools\jnienv-gen\jnienv-gen.csproj", "{6410DA0F-5E14-4FC0-9AEE-F4C542C96C7A}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Java.Interop.Tools.JavaCallableWrappers", "src\Java.Interop.Tools.JavaCallableWrappers\Java.Interop.Tools.JavaCallableWrappers.csproj", "{D18FCF91-8876-48A0-A693-2DC1E7D3D80A}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Java.Interop.Tools.Cecil", "src\Java.Interop.Tools.Cecil\Java.Interop.Tools.Cecil.csproj", "{D48EE8D0-0A0A-4493-AEF5-DAF5F8CF86AD}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Java.Interop.Tools.Diagnostics", "src\Java.Interop.Tools.Diagnostics\Java.Interop.Tools.Diagnostics.csproj", "{64CC4E44-CE3A-4319-BF3F-6CF8BD513870}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "jcw-gen", "tools\jcw-gen\jcw-gen.csproj", "{52C7D9B6-E8C8-47D0-9471-652D278D7D77}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Java.Interop.Tools.JavaCallableWrappers-Tests", "tests\Java.Interop.Tools.JavaCallableWrappers-Tests\Java.Interop.Tools.JavaCallableWrappers-Tests.csproj", "{58B564A1-570D-4DA2-B02D-25BDDB1A9F4F}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Xamarin.Android.Tools.AndroidSdk", "external\xamarin-android-tools\src\Xamarin.Android.Tools.AndroidSdk\Xamarin.Android.Tools.AndroidSdk.csproj", "{E34BCFA0-CAA4-412C-AA1C-75DB8D67D157}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Java.Interop.Tools.JavaSource-Tests", "tests\Java.Interop.Tools.JavaSource-Tests\Java.Interop.Tools.JavaSource-Tests.csproj", "{093B5E94-7FB7-499F-9C11-30944BAFEE25}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "param-name-importer", "tools\param-name-importer\param-name-importer.csproj", "{0E3AF6C1-7638-464D-9174-485D494499DC}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Java.Interop.Tools.Generator", "src\Java.Interop.Tools.Generator\Java.Interop.Tools.Generator.csproj", "{C2FD2F12-DE3B-4FB9-A0D3-FA3EF597DD04}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Java.Interop.Tools.Generator-Tests", "tests\Java.Interop.Tools.Generator-Tests\Java.Interop.Tools.Generator-Tests.csproj", "{7F4828AB-3908-458C-B09F-33C74A1368F9}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "java-source-utils", "tools\java-source-utils\java-source-utils.csproj", "{F46EDFA5-C52A-4F0C-B5A2-5BB67E0D8C74}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Xamarin.SourceWriter", "src\Xamarin.SourceWriter\Xamarin.SourceWriter.csproj", "{C5B732C8-7AF3-41D3-B903-AEDFC392E5BA}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Xamarin.SourceWriter-Tests", "tests\Xamarin.SourceWriter-Tests\Xamarin.SourceWriter-Tests.csproj", "{6CF94627-BA74-4336-88CD-7EDA20C8F292}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Java.Interop.Localization", "src\Java.Interop.Localization\Java.Interop.Localization.csproj", "{998D178B-F4C7-48B5-BDEE-44E2F869BB22}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NativeTiming", "tests\NativeTiming\NativeTiming.csproj", "{BF5A4019-F2FF-45AC-949D-EF7E8C94196B}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Java.Interop.Tools.JavaTypeSystem", "src\Java.Interop.Tools.JavaTypeSystem\Java.Interop.Tools.JavaTypeSystem.csproj", "{B173F53B-986C-4E0D-881C-063BBB116E1D}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Java.Interop.Tools.JavaTypeSystem-Tests", "tests\Java.Interop.Tools.JavaTypeSystem-Tests\Java.Interop.Tools.JavaTypeSystem-Tests.csproj", "{11942DE9-AEC2-4B95-87AB-CA707C37643D}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Java.Interop.Tools.Maven", "src\Java.Interop.Tools.Maven\Java.Interop.Tools.Maven.csproj", "{DA458F90-218B-4FE3-995F-AF4B27895FA2}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Java.Interop.Tools.Maven-Tests", "tests\Java.Interop.Tools.Maven-Tests\Java.Interop.Tools.Maven-Tests.csproj", "{6BC04C7F-949E-4F93-BF1F-E3B1DF0B888D}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{40B3CE2F-B8DE-45CD-A43A-0F1A89BDB803}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Java.Interop.Tools.TypeNameMappings", "src\Java.Interop.Tools.TypeNameMappings\Java.Interop.Tools.TypeNameMappings.csproj", "{C2AF6ACF-04F6-4B41-95EA-97A372C075F9}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {7387E151-48E3-4885-B2CA-A74434A34045}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {7387E151-48E3-4885-B2CA-A74434A34045}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {7387E151-48E3-4885-B2CA-A74434A34045}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {7387E151-48E3-4885-B2CA-A74434A34045}.Release|Any CPU.Build.0 = Release|Any CPU
+ {38C762AB-8FD1-44DE-9855-26AAE7129DC3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {38C762AB-8FD1-44DE-9855-26AAE7129DC3}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {38C762AB-8FD1-44DE-9855-26AAE7129DC3}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {38C762AB-8FD1-44DE-9855-26AAE7129DC3}.Release|Any CPU.Build.0 = Release|Any CPU
+ {D14A1B5C-2060-4930-92BE-F7190256C735}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {D14A1B5C-2060-4930-92BE-F7190256C735}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {D14A1B5C-2060-4930-92BE-F7190256C735}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {D14A1B5C-2060-4930-92BE-F7190256C735}.Release|Any CPU.Build.0 = Release|Any CPU
+ {94BD81F7-B06F-4295-9636-F8A3B6BDC762}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {94BD81F7-B06F-4295-9636-F8A3B6BDC762}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {94BD81F7-B06F-4295-9636-F8A3B6BDC762}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {94BD81F7-B06F-4295-9636-F8A3B6BDC762}.Release|Any CPU.Build.0 = Release|Any CPU
+ {BB0AB9F7-0979-41A7-B7A9-877260655F94}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {BB0AB9F7-0979-41A7-B7A9-877260655F94}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {BB0AB9F7-0979-41A7-B7A9-877260655F94}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {BB0AB9F7-0979-41A7-B7A9-877260655F94}.Release|Any CPU.Build.0 = Release|Any CPU
+ {5C0B3562-8DA0-4726-9762-75B9709ED6B7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {5C0B3562-8DA0-4726-9762-75B9709ED6B7}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {5C0B3562-8DA0-4726-9762-75B9709ED6B7}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {5C0B3562-8DA0-4726-9762-75B9709ED6B7}.Release|Any CPU.Build.0 = Release|Any CPU
+ {B17475BC-45A2-47A3-B8FC-62F3A0959EE0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {B17475BC-45A2-47A3-B8FC-62F3A0959EE0}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {B17475BC-45A2-47A3-B8FC-62F3A0959EE0}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {B17475BC-45A2-47A3-B8FC-62F3A0959EE0}.Release|Any CPU.Build.0 = Release|Any CPU
+ {07BC4495-1267-4B78-9EA6-B76FEEA2A64A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {07BC4495-1267-4B78-9EA6-B76FEEA2A64A}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {07BC4495-1267-4B78-9EA6-B76FEEA2A64A}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {07BC4495-1267-4B78-9EA6-B76FEEA2A64A}.Release|Any CPU.Build.0 = Release|Any CPU
+ {1268EADF-8344-431C-81F6-FCB7CBC99F49}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {1268EADF-8344-431C-81F6-FCB7CBC99F49}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {1268EADF-8344-431C-81F6-FCB7CBC99F49}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {1268EADF-8344-431C-81F6-FCB7CBC99F49}.Release|Any CPU.Build.0 = Release|Any CPU
+ {41DFB021-F795-4EB6-8E53-0D069C0BED9F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {41DFB021-F795-4EB6-8E53-0D069C0BED9F}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {41DFB021-F795-4EB6-8E53-0D069C0BED9F}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {41DFB021-F795-4EB6-8E53-0D069C0BED9F}.Release|Any CPU.Build.0 = Release|Any CPU
+ {A76309AB-98AC-4AE2-BA30-75481420C52F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {A76309AB-98AC-4AE2-BA30-75481420C52F}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {A76309AB-98AC-4AE2-BA30-75481420C52F}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {A76309AB-98AC-4AE2-BA30-75481420C52F}.Release|Any CPU.Build.0 = Release|Any CPU
+ {04E28441-36FF-4964-ADD7-EFBB47CCE406}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {04E28441-36FF-4964-ADD7-EFBB47CCE406}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {04E28441-36FF-4964-ADD7-EFBB47CCE406}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {04E28441-36FF-4964-ADD7-EFBB47CCE406}.Release|Any CPU.Build.0 = Release|Any CPU
+ {DB05D566-0BA0-4935-868D-689E2F03688E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {DB05D566-0BA0-4935-868D-689E2F03688E}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {DB05D566-0BA0-4935-868D-689E2F03688E}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {DB05D566-0BA0-4935-868D-689E2F03688E}.Release|Any CPU.Build.0 = Release|Any CPU
+ {C9FA4492-DEB0-4932-A6B8-E2C4E0581692}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {C9FA4492-DEB0-4932-A6B8-E2C4E0581692}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {C9FA4492-DEB0-4932-A6B8-E2C4E0581692}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {C9FA4492-DEB0-4932-A6B8-E2C4E0581692}.Release|Any CPU.Build.0 = Release|Any CPU
+ {891F2E04-5614-4A26-A78F-3778025ECF43}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {891F2E04-5614-4A26-A78F-3778025ECF43}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {891F2E04-5614-4A26-A78F-3778025ECF43}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {891F2E04-5614-4A26-A78F-3778025ECF43}.Release|Any CPU.Build.0 = Release|Any CPU
+ {4EEAB1A7-99C1-4302-9C18-01A7B481409B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {4EEAB1A7-99C1-4302-9C18-01A7B481409B}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {4EEAB1A7-99C1-4302-9C18-01A7B481409B}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {4EEAB1A7-99C1-4302-9C18-01A7B481409B}.Release|Any CPU.Build.0 = Release|Any CPU
+ {6410DA0F-5E14-4FC0-9AEE-F4C542C96C7A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {6410DA0F-5E14-4FC0-9AEE-F4C542C96C7A}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {6410DA0F-5E14-4FC0-9AEE-F4C542C96C7A}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {6410DA0F-5E14-4FC0-9AEE-F4C542C96C7A}.Release|Any CPU.Build.0 = Release|Any CPU
+ {D18FCF91-8876-48A0-A693-2DC1E7D3D80A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {D18FCF91-8876-48A0-A693-2DC1E7D3D80A}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {D18FCF91-8876-48A0-A693-2DC1E7D3D80A}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {D18FCF91-8876-48A0-A693-2DC1E7D3D80A}.Release|Any CPU.Build.0 = Release|Any CPU
+ {D48EE8D0-0A0A-4493-AEF5-DAF5F8CF86AD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {D48EE8D0-0A0A-4493-AEF5-DAF5F8CF86AD}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {D48EE8D0-0A0A-4493-AEF5-DAF5F8CF86AD}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {D48EE8D0-0A0A-4493-AEF5-DAF5F8CF86AD}.Release|Any CPU.Build.0 = Release|Any CPU
+ {64CC4E44-CE3A-4319-BF3F-6CF8BD513870}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {64CC4E44-CE3A-4319-BF3F-6CF8BD513870}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {64CC4E44-CE3A-4319-BF3F-6CF8BD513870}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {64CC4E44-CE3A-4319-BF3F-6CF8BD513870}.Release|Any CPU.Build.0 = Release|Any CPU
+ {52C7D9B6-E8C8-47D0-9471-652D278D7D77}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {52C7D9B6-E8C8-47D0-9471-652D278D7D77}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {52C7D9B6-E8C8-47D0-9471-652D278D7D77}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {52C7D9B6-E8C8-47D0-9471-652D278D7D77}.Release|Any CPU.Build.0 = Release|Any CPU
+ {58B564A1-570D-4DA2-B02D-25BDDB1A9F4F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {58B564A1-570D-4DA2-B02D-25BDDB1A9F4F}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {58B564A1-570D-4DA2-B02D-25BDDB1A9F4F}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {58B564A1-570D-4DA2-B02D-25BDDB1A9F4F}.Release|Any CPU.Build.0 = Release|Any CPU
+ {E34BCFA0-CAA4-412C-AA1C-75DB8D67D157}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {E34BCFA0-CAA4-412C-AA1C-75DB8D67D157}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {E34BCFA0-CAA4-412C-AA1C-75DB8D67D157}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {E34BCFA0-CAA4-412C-AA1C-75DB8D67D157}.Release|Any CPU.Build.0 = Release|Any CPU
+ {093B5E94-7FB7-499F-9C11-30944BAFEE25}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {093B5E94-7FB7-499F-9C11-30944BAFEE25}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {093B5E94-7FB7-499F-9C11-30944BAFEE25}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {093B5E94-7FB7-499F-9C11-30944BAFEE25}.Release|Any CPU.Build.0 = Release|Any CPU
+ {0E3AF6C1-7638-464D-9174-485D494499DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {0E3AF6C1-7638-464D-9174-485D494499DC}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {0E3AF6C1-7638-464D-9174-485D494499DC}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {0E3AF6C1-7638-464D-9174-485D494499DC}.Release|Any CPU.Build.0 = Release|Any CPU
+ {C2FD2F12-DE3B-4FB9-A0D3-FA3EF597DD04}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {C2FD2F12-DE3B-4FB9-A0D3-FA3EF597DD04}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {C2FD2F12-DE3B-4FB9-A0D3-FA3EF597DD04}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {C2FD2F12-DE3B-4FB9-A0D3-FA3EF597DD04}.Release|Any CPU.Build.0 = Release|Any CPU
+ {7F4828AB-3908-458C-B09F-33C74A1368F9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {7F4828AB-3908-458C-B09F-33C74A1368F9}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {7F4828AB-3908-458C-B09F-33C74A1368F9}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {7F4828AB-3908-458C-B09F-33C74A1368F9}.Release|Any CPU.Build.0 = Release|Any CPU
+ {F46EDFA5-C52A-4F0C-B5A2-5BB67E0D8C74}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {F46EDFA5-C52A-4F0C-B5A2-5BB67E0D8C74}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {F46EDFA5-C52A-4F0C-B5A2-5BB67E0D8C74}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {F46EDFA5-C52A-4F0C-B5A2-5BB67E0D8C74}.Release|Any CPU.Build.0 = Release|Any CPU
+ {C5B732C8-7AF3-41D3-B903-AEDFC392E5BA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {C5B732C8-7AF3-41D3-B903-AEDFC392E5BA}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {C5B732C8-7AF3-41D3-B903-AEDFC392E5BA}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {C5B732C8-7AF3-41D3-B903-AEDFC392E5BA}.Release|Any CPU.Build.0 = Release|Any CPU
+ {6CF94627-BA74-4336-88CD-7EDA20C8F292}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {6CF94627-BA74-4336-88CD-7EDA20C8F292}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {6CF94627-BA74-4336-88CD-7EDA20C8F292}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {6CF94627-BA74-4336-88CD-7EDA20C8F292}.Release|Any CPU.Build.0 = Release|Any CPU
+ {998D178B-F4C7-48B5-BDEE-44E2F869BB22}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {998D178B-F4C7-48B5-BDEE-44E2F869BB22}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {998D178B-F4C7-48B5-BDEE-44E2F869BB22}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {998D178B-F4C7-48B5-BDEE-44E2F869BB22}.Release|Any CPU.Build.0 = Release|Any CPU
+ {BF5A4019-F2FF-45AC-949D-EF7E8C94196B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {BF5A4019-F2FF-45AC-949D-EF7E8C94196B}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {BF5A4019-F2FF-45AC-949D-EF7E8C94196B}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {BF5A4019-F2FF-45AC-949D-EF7E8C94196B}.Release|Any CPU.Build.0 = Release|Any CPU
+ {B173F53B-986C-4E0D-881C-063BBB116E1D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {B173F53B-986C-4E0D-881C-063BBB116E1D}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {B173F53B-986C-4E0D-881C-063BBB116E1D}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {B173F53B-986C-4E0D-881C-063BBB116E1D}.Release|Any CPU.Build.0 = Release|Any CPU
+ {11942DE9-AEC2-4B95-87AB-CA707C37643D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {11942DE9-AEC2-4B95-87AB-CA707C37643D}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {11942DE9-AEC2-4B95-87AB-CA707C37643D}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {11942DE9-AEC2-4B95-87AB-CA707C37643D}.Release|Any CPU.Build.0 = Release|Any CPU
+ {DA458F90-218B-4FE3-995F-AF4B27895FA2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {DA458F90-218B-4FE3-995F-AF4B27895FA2}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {DA458F90-218B-4FE3-995F-AF4B27895FA2}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {DA458F90-218B-4FE3-995F-AF4B27895FA2}.Release|Any CPU.Build.0 = Release|Any CPU
+ {6BC04C7F-949E-4F93-BF1F-E3B1DF0B888D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {6BC04C7F-949E-4F93-BF1F-E3B1DF0B888D}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {6BC04C7F-949E-4F93-BF1F-E3B1DF0B888D}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {6BC04C7F-949E-4F93-BF1F-E3B1DF0B888D}.Release|Any CPU.Build.0 = Release|Any CPU
+ {C2AF6ACF-04F6-4B41-95EA-97A372C075F9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {C2AF6ACF-04F6-4B41-95EA-97A372C075F9}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {C2AF6ACF-04F6-4B41-95EA-97A372C075F9}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {C2AF6ACF-04F6-4B41-95EA-97A372C075F9}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(NestedProjects) = preSolution
+ {7387E151-48E3-4885-B2CA-A74434A34045} = {C8F58966-94BF-407F-914A-8654F8B8AE3B}
+ {38C762AB-8FD1-44DE-9855-26AAE7129DC3} = {C8F58966-94BF-407F-914A-8654F8B8AE3B}
+ {D14A1B5C-2060-4930-92BE-F7190256C735} = {C8F58966-94BF-407F-914A-8654F8B8AE3B}
+ {94BD81F7-B06F-4295-9636-F8A3B6BDC762} = {4C173212-371D-45D8-BA83-9226194F48DC}
+ {BB0AB9F7-0979-41A7-B7A9-877260655F94} = {4C173212-371D-45D8-BA83-9226194F48DC}
+ {5C0B3562-8DA0-4726-9762-75B9709ED6B7} = {0998E45F-8BCE-4791-A944-962CD54E2D80}
+ {B17475BC-45A2-47A3-B8FC-62F3A0959EE0} = {0998E45F-8BCE-4791-A944-962CD54E2D80}
+ {07BC4495-1267-4B78-9EA6-B76FEEA2A64A} = {0998E45F-8BCE-4791-A944-962CD54E2D80}
+ {1268EADF-8344-431C-81F6-FCB7CBC99F49} = {0998E45F-8BCE-4791-A944-962CD54E2D80}
+ {41DFB021-F795-4EB6-8E53-0D069C0BED9F} = {0998E45F-8BCE-4791-A944-962CD54E2D80}
+ {A76309AB-98AC-4AE2-BA30-75481420C52F} = {271C9F30-F679-4793-942B-0D9527CB3E2F}
+ {04E28441-36FF-4964-ADD7-EFBB47CCE406} = {271C9F30-F679-4793-942B-0D9527CB3E2F}
+ {DB05D566-0BA0-4935-868D-689E2F03688E} = {271C9F30-F679-4793-942B-0D9527CB3E2F}
+ {C9FA4492-DEB0-4932-A6B8-E2C4E0581692} = {271C9F30-F679-4793-942B-0D9527CB3E2F}
+ {891F2E04-5614-4A26-A78F-3778025ECF43} = {271C9F30-F679-4793-942B-0D9527CB3E2F}
+ {4EEAB1A7-99C1-4302-9C18-01A7B481409B} = {271C9F30-F679-4793-942B-0D9527CB3E2F}
+ {6410DA0F-5E14-4FC0-9AEE-F4C542C96C7A} = {172B608B-E6F3-41CC-9949-203A76BA247C}
+ {D18FCF91-8876-48A0-A693-2DC1E7D3D80A} = {0998E45F-8BCE-4791-A944-962CD54E2D80}
+ {D48EE8D0-0A0A-4493-AEF5-DAF5F8CF86AD} = {0998E45F-8BCE-4791-A944-962CD54E2D80}
+ {64CC4E44-CE3A-4319-BF3F-6CF8BD513870} = {0998E45F-8BCE-4791-A944-962CD54E2D80}
+ {52C7D9B6-E8C8-47D0-9471-652D278D7D77} = {C8F58966-94BF-407F-914A-8654F8B8AE3B}
+ {58B564A1-570D-4DA2-B02D-25BDDB1A9F4F} = {271C9F30-F679-4793-942B-0D9527CB3E2F}
+ {E34BCFA0-CAA4-412C-AA1C-75DB8D67D157} = {172B608B-E6F3-41CC-9949-203A76BA247C}
+ {093B5E94-7FB7-499F-9C11-30944BAFEE25} = {271C9F30-F679-4793-942B-0D9527CB3E2F}
+ {0E3AF6C1-7638-464D-9174-485D494499DC} = {C8F58966-94BF-407F-914A-8654F8B8AE3B}
+ {C2FD2F12-DE3B-4FB9-A0D3-FA3EF597DD04} = {0998E45F-8BCE-4791-A944-962CD54E2D80}
+ {7F4828AB-3908-458C-B09F-33C74A1368F9} = {271C9F30-F679-4793-942B-0D9527CB3E2F}
+ {F46EDFA5-C52A-4F0C-B5A2-5BB67E0D8C74} = {C8F58966-94BF-407F-914A-8654F8B8AE3B}
+ {C5B732C8-7AF3-41D3-B903-AEDFC392E5BA} = {0998E45F-8BCE-4791-A944-962CD54E2D80}
+ {6CF94627-BA74-4336-88CD-7EDA20C8F292} = {271C9F30-F679-4793-942B-0D9527CB3E2F}
+ {998D178B-F4C7-48B5-BDEE-44E2F869BB22} = {0998E45F-8BCE-4791-A944-962CD54E2D80}
+ {BF5A4019-F2FF-45AC-949D-EF7E8C94196B} = {271C9F30-F679-4793-942B-0D9527CB3E2F}
+ {B173F53B-986C-4E0D-881C-063BBB116E1D} = {0998E45F-8BCE-4791-A944-962CD54E2D80}
+ {11942DE9-AEC2-4B95-87AB-CA707C37643D} = {271C9F30-F679-4793-942B-0D9527CB3E2F}
+ {DA458F90-218B-4FE3-995F-AF4B27895FA2} = {0998E45F-8BCE-4791-A944-962CD54E2D80}
+ {6BC04C7F-949E-4F93-BF1F-E3B1DF0B888D} = {271C9F30-F679-4793-942B-0D9527CB3E2F}
+ {C2AF6ACF-04F6-4B41-95EA-97A372C075F9} = {40B3CE2F-B8DE-45CD-A43A-0F1A89BDB803}
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {29204E0C-382A-49A0-A814-AD7FBF9774A5}
+ EndGlobalSection
+ GlobalSection(SharedMSBuildProjectFiles) = preSolution
+ src\Java.Interop.NamingCustomAttributes\Java.Interop.NamingCustomAttributes.projitems*{58b564a1-570d-4da2-b02d-25bddb1a9f4f}*SharedItemsImports = 5
+ src\Java.Interop.NamingCustomAttributes\Java.Interop.NamingCustomAttributes.projitems*{d18fcf91-8876-48a0-a693-2dc1e7d3d80a}*SharedItemsImports = 5
+ EndGlobalSection
+EndGlobal
diff --git a/external/Java.Interop/LICENSE b/external/Java.Interop/LICENSE
new file mode 100644
index 00000000000..f0cafc60e52
--- /dev/null
+++ b/external/Java.Interop/LICENSE
@@ -0,0 +1,25 @@
+Xamarin SDK
+
+The MIT License (MIT)
+
+Copyright (c) .NET Foundation Contributors
+
+All rights reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/external/Java.Interop/Localize/LocProject.json b/external/Java.Interop/Localize/LocProject.json
new file mode 100644
index 00000000000..d77795d62d9
--- /dev/null
+++ b/external/Java.Interop/Localize/LocProject.json
@@ -0,0 +1,14 @@
+{
+ "Projects": [
+ {
+ "LanguageSet": "VS_Main_Languages",
+ "LocItems": [
+ {
+ "CopyOption": "LangIDOnName",
+ "SourceFile": ".\\src\\Java.Interop.Localization\\Resources.resx",
+ "OutputPath": ".\\src\\Java.Interop.Localization"
+ }
+ ]
+ }
+ ]
+}
diff --git a/external/Java.Interop/Localize/loc/cs/src/Java.Interop.Localization/Resources.resx.lcl b/external/Java.Interop/Localize/loc/cs/src/Java.Interop.Localization/Resources.resx.lcl
new file mode 100644
index 00000000000..29b3dc49952
--- /dev/null
+++ b/external/Java.Interop/Localize/loc/cs/src/Java.Interop.Localization/Resources.resx.lcl
@@ -0,0 +1,581 @@
+
+
+
+
+
+
+
+ -
+
+
-
+
+
-
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+ ': '{0}'.]]>
+
+ : {0}]]>
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+ ' elements found.]]>
+
+ .]]>
+
+
+
+
+ -
+
+ '.]]>
+
+ .]]>
+
+
+
+
+ -
+
+ ' child node: '<{0}>'.]]>
+
+ : <{0}>]]>
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/external/Java.Interop/Localize/loc/de/src/Java.Interop.Localization/Resources.resx.lcl b/external/Java.Interop/Localize/loc/de/src/Java.Interop.Localization/Resources.resx.lcl
new file mode 100644
index 00000000000..d86884dbf10
--- /dev/null
+++ b/external/Java.Interop/Localize/loc/de/src/Java.Interop.Localization/Resources.resx.lcl
@@ -0,0 +1,581 @@
+
+
+
+
+
+
+
+ -
+
+
-
+
+
-
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+ ': '{0}'.]]>
+
+ ': '{0}'.]]>
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+ ' elements found.]]>
+
+ ' Elemente gefunden.]]>
+
+
+
+
+ -
+
+ '.]]>
+
+ ".]]>
+
+
+
+
+ -
+
+ ' child node: '<{0}>'.]]>
+
+ ' untergeordneter Knoten: "<{0}>".]]>
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/external/Java.Interop/Localize/loc/es/src/Java.Interop.Localization/Resources.resx.lcl b/external/Java.Interop/Localize/loc/es/src/Java.Interop.Localization/Resources.resx.lcl
new file mode 100644
index 00000000000..9db115ee54e
--- /dev/null
+++ b/external/Java.Interop/Localize/loc/es/src/Java.Interop.Localization/Resources.resx.lcl
@@ -0,0 +1,581 @@
+
+
+
+
+
+
+
+ -
+
+
-
+
+
-
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+ ': '{0}'.]]>
+
+ ': "{0}".]]>
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+ ' elements found.]]>
+
+ '.]]>
+
+
+
+
+ -
+
+ '.]]>
+
+ ".]]>
+
+
+
+
+ -
+
+ ' child node: '<{0}>'.]]>
+
+ ": "<{0}>".]]>
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/external/Java.Interop/Localize/loc/fr/src/Java.Interop.Localization/Resources.resx.lcl b/external/Java.Interop/Localize/loc/fr/src/Java.Interop.Localization/Resources.resx.lcl
new file mode 100644
index 00000000000..8e5844e3c39
--- /dev/null
+++ b/external/Java.Interop/Localize/loc/fr/src/Java.Interop.Localization/Resources.resx.lcl
@@ -0,0 +1,581 @@
+
+
+
+
+
+
+
+ -
+
+
-
+
+
-
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+ ': '{0}'.]]>
+
+ ' : '{0}'.]]>
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+ ' elements found.]]>
+
+ ' trouvé.]]>
+
+
+
+
+ -
+
+ '.]]>
+
+ '.]]>
+
+
+
+
+ -
+
+ ' child node: '<{0}>'.]]>
+
+ ' inattendu : '<{0}>'.]]>
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/external/Java.Interop/Localize/loc/it/src/Java.Interop.Localization/Resources.resx.lcl b/external/Java.Interop/Localize/loc/it/src/Java.Interop.Localization/Resources.resx.lcl
new file mode 100644
index 00000000000..226fa88ba25
--- /dev/null
+++ b/external/Java.Interop/Localize/loc/it/src/Java.Interop.Localization/Resources.resx.lcl
@@ -0,0 +1,581 @@
+
+
+
+
+
+
+
+ -
+
+
-
+
+
-
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+ ': '{0}'.]]>
+
+ ': '{0}'.]]>
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+ ' elements found.]]>
+
+ '.]]>
+
+
+
+
+ -
+
+ '.]]>
+
+ '.]]>
+
+
+
+
+ -
+
+ ' child node: '<{0}>'.]]>
+
+ ' imprevisto: '<{0}>'.]]>
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/external/Java.Interop/Localize/loc/ja/src/Java.Interop.Localization/Resources.resx.lcl b/external/Java.Interop/Localize/loc/ja/src/Java.Interop.Localization/Resources.resx.lcl
new file mode 100644
index 00000000000..36fc4e6399c
--- /dev/null
+++ b/external/Java.Interop/Localize/loc/ja/src/Java.Interop.Localization/Resources.resx.lcl
@@ -0,0 +1,581 @@
+
+
+
+
+
+
+
+ -
+
+
-
+
+
-
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+ ': '{0}'.]]>
+
+ ' の予期しない子要素です: '{0}'。]]>
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+ ' elements found.]]>
+
+ ' 要素が見つかりません。]]>
+
+
+
+
+ -
+
+ '.]]>
+
+ '。]]>
+
+
+
+
+ -
+
+ ' child node: '<{0}>'.]]>
+
+ ' 子ノードです: '<{0}>'。]]>
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/external/Java.Interop/Localize/loc/ko/src/Java.Interop.Localization/Resources.resx.lcl b/external/Java.Interop/Localize/loc/ko/src/Java.Interop.Localization/Resources.resx.lcl
new file mode 100644
index 00000000000..d31cb952561
--- /dev/null
+++ b/external/Java.Interop/Localize/loc/ko/src/Java.Interop.Localization/Resources.resx.lcl
@@ -0,0 +1,581 @@
+
+
+
+
+
+
+
+ -
+
+
-
+
+
-
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+ ': '{0}'.]]>
+
+ '의 예기치 않은 하위 요소: '{0}'.]]>
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+ ' elements found.]]>
+
+ ' 요소를 찾을 수 없습니다.]]>
+
+
+
+
+ -
+
+ '.]]>
+
+ '.]]>
+
+
+
+
+ -
+
+ ' child node: '<{0}>'.]]>
+
+ ' 하위 노드: '<{0}>'.]]>
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/external/Java.Interop/Localize/loc/pl/src/Java.Interop.Localization/Resources.resx.lcl b/external/Java.Interop/Localize/loc/pl/src/Java.Interop.Localization/Resources.resx.lcl
new file mode 100644
index 00000000000..4165e406cd9
--- /dev/null
+++ b/external/Java.Interop/Localize/loc/pl/src/Java.Interop.Localization/Resources.resx.lcl
@@ -0,0 +1,581 @@
+
+
+
+
+
+
+
+ -
+
+
-
+
+
-
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+ ': '{0}'.]]>
+
+ ”: „{0}”.]]>
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+ ' elements found.]]>
+
+ ”.]]>
+
+
+
+
+ -
+
+ '.]]>
+
+ ”.]]>
+
+
+
+
+ -
+
+ ' child node: '<{0}>'.]]>
+
+ ”: „<{0}>”.]]>
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/external/Java.Interop/Localize/loc/pt-BR/src/Java.Interop.Localization/Resources.resx.lcl b/external/Java.Interop/Localize/loc/pt-BR/src/Java.Interop.Localization/Resources.resx.lcl
new file mode 100644
index 00000000000..be4c640aa56
--- /dev/null
+++ b/external/Java.Interop/Localize/loc/pt-BR/src/Java.Interop.Localization/Resources.resx.lcl
@@ -0,0 +1,581 @@
+
+
+
+
+
+
+
+ -
+
+
-
+
+
-
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+ ': '{0}'.]]>
+
+ ': '{0}'.]]>
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+ ' elements found.]]>
+
+ ' foi encontrados.]]>
+
+
+
+
+ -
+
+ '.]]>
+
+ '.]]>
+
+
+
+
+ -
+
+ ' child node: '<{0}>'.]]>
+
+ ' inesperado: '<{0}>'.]]>
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/external/Java.Interop/Localize/loc/ru/src/Java.Interop.Localization/Resources.resx.lcl b/external/Java.Interop/Localize/loc/ru/src/Java.Interop.Localization/Resources.resx.lcl
new file mode 100644
index 00000000000..540069cf08f
--- /dev/null
+++ b/external/Java.Interop/Localize/loc/ru/src/Java.Interop.Localization/Resources.resx.lcl
@@ -0,0 +1,581 @@
+
+
+
+
+
+
+
+ -
+
+
-
+
+
-
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+ ': '{0}'.]]>
+
+ ": "{0}".]]>
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+ ' elements found.]]>
+
+ " не найдены.]]>
+
+
+
+
+ -
+
+ '.]]>
+
+ ".]]>
+
+
+
+
+ -
+
+ ' child node: '<{0}>'.]]>
+
+ ": "<{0}>".]]>
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/external/Java.Interop/Localize/loc/tr/src/Java.Interop.Localization/Resources.resx.lcl b/external/Java.Interop/Localize/loc/tr/src/Java.Interop.Localization/Resources.resx.lcl
new file mode 100644
index 00000000000..fe734fbb846
--- /dev/null
+++ b/external/Java.Interop/Localize/loc/tr/src/Java.Interop.Localization/Resources.resx.lcl
@@ -0,0 +1,581 @@
+
+
+
+
+
+
+
+ -
+
+
-
+
+
-
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+ ': '{0}'.]]>
+
+ ' alt öğesi: '{0}'.]]>
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+ ' elements found.]]>
+
+ ' öğeleri bulunamadı.]]>
+
+
+
+
+ -
+
+ '.]]>
+
+ '.]]>
+
+
+
+
+ -
+
+ ' child node: '<{0}>'.]]>
+
+ ' alt düğümü: '<{0}>'.]]>
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/external/Java.Interop/Localize/loc/zh-Hans/src/Java.Interop.Localization/Resources.resx.lcl b/external/Java.Interop/Localize/loc/zh-Hans/src/Java.Interop.Localization/Resources.resx.lcl
new file mode 100644
index 00000000000..32ac0e20d5d
--- /dev/null
+++ b/external/Java.Interop/Localize/loc/zh-Hans/src/Java.Interop.Localization/Resources.resx.lcl
@@ -0,0 +1,581 @@
+
+
+
+
+
+
+
+ -
+
+
-
+
+
-
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+ ': '{0}'.]]>
+
+ ”的意外子元素:“{0}”。]]>
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+ ' elements found.]]>
+
+ ”元素。]]>
+
+
+
+
+ -
+
+ '.]]>
+
+ ”。]]>
+
+
+
+
+ -
+
+ ' child node: '<{0}>'.]]>
+
+ ”子节点:“<{0}>”。]]>
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/external/Java.Interop/Localize/loc/zh-Hant/src/Java.Interop.Localization/Resources.resx.lcl b/external/Java.Interop/Localize/loc/zh-Hant/src/Java.Interop.Localization/Resources.resx.lcl
new file mode 100644
index 00000000000..e43717bf5aa
--- /dev/null
+++ b/external/Java.Interop/Localize/loc/zh-Hant/src/Java.Interop.Localization/Resources.resx.lcl
@@ -0,0 +1,581 @@
+
+
+
+
+
+
+
+ -
+
+
-
+
+
-
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+ ': '{0}'.]]>
+
+ ' 子項目: '{0}'。]]>
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+ ' elements found.]]>
+
+ ' 元素。]]>
+
+
+
+
+ -
+
+ '.]]>
+
+ '。]]>
+
+
+
+
+ -
+
+ ' child node: '<{0}>'.]]>
+
+ ' 子節點: '<{0}>'。]]>
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/external/Java.Interop/Makefile b/external/Java.Interop/Makefile
new file mode 100644
index 00000000000..d8ede4a321f
--- /dev/null
+++ b/external/Java.Interop/Makefile
@@ -0,0 +1,145 @@
+OS ?= $(shell uname)
+
+V ?= 0
+CONFIGURATION = Debug
+
+ifeq ($(OS),Darwin)
+NATIVE_EXT = .dylib
+DLLMAP_OS_NAME = osx
+endif
+ifeq ($(OS),Linux)
+NATIVE_EXT = .so
+DLLMAP_OS_NAME = linux
+endif
+
+PREPARE_EXTERNAL_FILES = \
+ external/xamarin-android-tools/src/Xamarin.Android.Tools.AndroidSdk/Xamarin.Android.Tools.AndroidSdk.csproj
+
+DEPENDENCIES =
+
+NET_SUFFIX = -net10.0
+TEST_OUTPUT = bin/Test$(CONFIGURATION)$(NET_SUFFIX)
+
+TESTS =
+
+NET_TESTS = \
+ $(TEST_OUTPUT)/Java.Interop-Tests.dll \
+ $(TEST_OUTPUT)/Java.Interop.Tools.JavaCallableWrappers-Tests.dll \
+ $(TEST_OUTPUT)/Java.Interop.Tools.JavaSource-Tests.dll \
+ $(TEST_OUTPUT)/Java.Interop.Tools.Maven-Tests.dll \
+ $(TEST_OUTPUT)/Java.Interop.Tools.JavaTypeSystem-Tests.dll \
+ $(TEST_OUTPUT)/Java.Interop.Tools.Generator-Tests.dll \
+ $(TEST_OUTPUT)/Xamarin.Android.Tools.ApiXmlAdjuster-Tests.dll \
+ $(TEST_OUTPUT)/Xamarin.Android.Tools.Bytecode-Tests.dll \
+ $(TEST_OUTPUT)/Xamarin.SourceWriter-Tests.dll \
+ $(TEST_OUTPUT)/generator-Tests.dll \
+ $(TEST_OUTPUT)/logcat-parse-Tests.dll
+
+PTESTS =
+
+all: $(DEPENDENCIES) $(TESTS) $(NET_TESTS)
+
+bin/ilverify:
+ -mkdir bin
+ dotnet tool install --tool-path bin dotnet-ilverify
+
+run-all-tests:
+ r=0; \
+ $(MAKE) run-tests || r=1 ; \
+ $(MAKE) run-net-tests || r=1 ; \
+ $(MAKE) run-ptests || r=1 ; \
+ $(MAKE) run-java-source-utils-tests || r=1 ; \
+ exit $$r;
+
+include build-tools/scripts/msbuild.mk
+
+prepare:: $(BUILD_PROPS)
+
+prepare::
+ $(MSBUILD) $(MSBUILD_FLAGS) -target:Prepare
+ $(MSBUILD) $(MSBUILD_FLAGS) -target:Restore
+
+clean:
+ -$(MSBUILD) $(MSBUILD_FLAGS) /t:Clean
+ -rm -Rf bin/$(CONFIGURATION) bin/Build$(CONFIGURATION) bin/Test$(CONFIGURATION)
+
+include build-tools/scripts/mono.mk
+-include bin/Build$(CONFIGURATION)/mono.mk
+-include bin/Build$(CONFIGURATION)/JdkInfo.mk
+
+NATIVE_TIMING_LIB = libNativeTiming$(NATIVE_EXT)
+
+bin/Test$(CONFIGURATION)/$(NATIVE_TIMING_LIB): tests/NativeTiming/timing.c $(wildcard $(JI_JDK_INCLUDE_PATHS)/jni.h)
+ mkdir -p `dirname "$@"`
+ gcc -g -shared -m64 -fPIC -o $@ $< $(JI_JDK_INCLUDE_PATHS:%=-I%)
+
+define TestAssemblyTemplate
+$(TEST_OUTPUT)/$(1)-Tests.dll: tests/$(1)-Tests/$(1)-Tests.csproj
+ $$(MSBUILD) $$(MSBUILD_FLAGS)
+ touch $$@
+endef
+
+$(eval $(call TestAssemblyTemplate,Java.Interop))
+$(eval $(call TestAssemblyTemplate,Java.Interop.Tools.JavaCallableWrappers))
+$(eval $(call TestAssemblyTemplate,Java.Interop.Tools.JavaSource))
+$(eval $(call TestAssemblyTemplate,Java.Interop.Tools.Maven))
+$(eval $(call TestAssemblyTemplate,Java.Interop.Tools.JavaTypeSystem))
+$(eval $(call TestAssemblyTemplate,Java.Interop.Tools.Generator))
+$(eval $(call TestAssemblyTemplate,Xamarin.Android.Tools.ApiXmlAdjuster))
+$(eval $(call TestAssemblyTemplate,Xamarin.Android.Tools.Bytecode))
+$(eval $(call TestAssemblyTemplate,Xamarin.SourceWriter))
+$(eval $(call TestAssemblyTemplate,generator))
+$(eval $(call TestAssemblyTemplate,logcat-parse))
+
+bin/$(CONFIGURATION)/Java.Interop.dll: $(wildcard src/Java.Interop/*/*.cs) src/Java.Interop/Java.Interop.csproj
+ $(MSBUILD) $(if $(V),/v:diag,) /p:Configuration=$(CONFIGURATION) $(if $(SNK),"/p:AssemblyOriginatorKeyFile=$(SNK)",)
+
+CSHARP_REFS = \
+ bin/$(CONFIGURATION)/Java.Interop.dll \
+ bin/$(CONFIGURATION)/Java.Interop.Export.dll \
+ $(PTESTS) \
+ $(TESTS)
+
+shell:
+ MONO_TRACE_LISTENER=Console.Out \
+ MONO_OPTIONS=--debug=casts csharp $(patsubst %,-r:%,$(CSHARP_REFS))
+
+# $(call RUN_TEST,filename,log-lref?)
+define RUN_TEST
+ $(MSBUILD) $(MSBUILD_FLAGS) build-tools/scripts/RunNUnitTests.targets /p:TestAssembly=$(1) || r=1;
+endef
+
+run-tests: $(TESTS)
+ r=0; \
+ $(foreach t,$(TESTS), $(call RUN_TEST,$(t),1)) \
+ exit $$r;
+
+run-net-tests: $(NET_TESTS)
+ r=0; \
+ $(foreach t,$(NET_TESTS), dotnet test $(t) || r=1;) \
+ exit $$r;
+
+run-ptests: $(PTESTS)
+ r=0; \
+ $(foreach t,$(PTESTS), $(call RUN_TEST,$(t))) \
+ exit $$r;
+
+run-java-source-utils-tests:
+ $(MSBUILD) $(MSBUILD_FLAGS) tools/java-source-utils/java-source-utils.csproj /t:RunTests
+
+bin/Test$(CONFIGURATION)/generator.exe: bin/$(CONFIGURATION)/generator.exe
+ cp $<* `dirname "$@"`
+
+update-test-generator-nunit:
+ -$(MAKE) run-tests TESTS=bin/Test$(CONFIGURATION)/generator-Tests.dll
+ for f in `find tests/generator-Tests/expected -name \*.cs` ; do \
+ source=`echo $$f | sed 's#^tests/generator-Tests/expected#bin/Test$(CONFIGURATION)/out#'` ; \
+ if [ -f "$$source" ]; then \
+ cp -f "$$source" "$$f" ; \
+ fi; \
+ done
+ for source in `find bin/Test$(CONFIGURATION)/out.ji -type f` ; do \
+ f=`echo $$source | sed 's#^bin/Test$(CONFIGURATION)/out.ji#tests/generator-Tests/expected.ji#'` ; \
+ mkdir -p `dirname $$f`; \
+ cp -f "$$source" "$$f" ; \
+ done
diff --git a/external/Java.Interop/NuGet.Config b/external/Java.Interop/NuGet.Config
new file mode 100644
index 00000000000..7d88f5852e5
--- /dev/null
+++ b/external/Java.Interop/NuGet.Config
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/external/Java.Interop/README.md b/external/Java.Interop/README.md
new file mode 100644
index 00000000000..c8137a6edab
--- /dev/null
+++ b/external/Java.Interop/README.md
@@ -0,0 +1,59 @@
+# Java.Interop
+
+**Java.Interop** is a binding of the [Java Native Interface][jni] for use from
+managed languages such as C#, and an associated set of code generators to
+allow Java code to invoke managed code.
+
+This allows one to bridge code running on .NET's CLR and code running on a Java VM.
+
+Note this does not mean that one can run Java code on .NET, or vice-versa.
+
+**Java.Interop** currently does not ship independently. It is shipped as part of Microsoft's
+[.NET for Android][android] product, available via Visual Studio or .NET 6+. However, it is designed
+to be fully independent of Android and should be usable by other Java implementations.
+For other uses, please compile and distribute from source.
+
+Some additional context for this project is documented in the [Motivation][motivation]
+and [Architecture][architecture] pages.
+
+[jni]: http://docs.oracle.com/javase/8/docs/technotes/guides/jni/spec/jniTOC.html
+[motivation]: /Documentation/Motivation.md
+[architecture]: /Documentation/Architecture.md
+[android]: https://github.com/dotnet/android
+
+## Building
+
+- The `main` branch is configured to build with .NET 10, available [here][net-10].
+- The [`release/6.0.3xx`][net-6] branch is configured to build with .NET 6.
+
+`Java.Interop.sln` must first run some "preparatory" tasks before it can be built:
+
+```console
+dotnet build -t:Prepare
+```
+
+Once `Java.Interop.sln` has been prepared, it can be built in Visual Studio 2022 or with `dotnet`:
+
+```
+dotnet build
+```
+
+[net-10]: https://dotnet.microsoft.com/en-us/download/dotnet/10.0
+[net-6]: https://github.com/dotnet/java-interop/tree/release/6.0.3xx
+
+Additional build options are documented [here][build-configuration].
+
+[build-configuration]: /Documentation/BuildConfiguration.md
+
+## Feedback and Contributing
+
+This project welcomes issues and PRs.
+
+ - File an issue in [GitHub Issues](https://github.com/dotnet/android/issues/new/choose).
+ - Discuss development and design on [Discord](https://aka.ms/dotnet-discord). [](https://aka.ms/dotnet-discord)
+ - Coding style is outlined in [Coding Guidelines](http://www.mono-project.com/community/contributing/coding-guidelines/).
+
+## License
+
+Copyright (c) .NET Foundation Contributors. All rights reserved.
+Licensed under the [MIT](LICENSE) License.
diff --git a/external/Java.Interop/SECURITY.md b/external/Java.Interop/SECURITY.md
new file mode 100644
index 00000000000..b973bca92e6
--- /dev/null
+++ b/external/Java.Interop/SECURITY.md
@@ -0,0 +1,15 @@
+# Security Policy
+
+Java.Interop is supported as a component of Xamarin.Android.
+
+## Supported Versions
+
+The Xamarin.Android support policy, including supported versions, can be found at the [Xamarin Support Policy](https://dotnet.microsoft.com/platform/support/policy/xamarin).
+
+## Reporting a Vulnerability
+
+Security issues and bugs should be reported privately to the Microsoft Security Response Center (MSRC), either by emailing secure@microsoft.com or via the portal at https://msrc.microsoft.com.
+You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your
+original message. Further information, including the MSRC PGP key, can be found in the [MSRC Report an Issue FAQ](https://www.microsoft.com/en-us/msrc/faqs-report-an-issue).
+
+Please do not open issues for anything you think might have a security implication.
diff --git a/external/Java.Interop/TargetFrameworkDependentValues.props b/external/Java.Interop/TargetFrameworkDependentValues.props
new file mode 100644
index 00000000000..ae7eef09c1c
--- /dev/null
+++ b/external/Java.Interop/TargetFrameworkDependentValues.props
@@ -0,0 +1,41 @@
+
+
+
+
+ True
+
+
+
+ $(BaseIntermediateOutputPath)\$(Configuration)-$(DotNetTargetFramework.ToLowerInvariant())\
+ $(MSBuildThisFileDirectory)bin\Build$(Configuration)\
+ $(MSBuildThisFileDirectory)bin\Build$(Configuration)-$(DotNetTargetFramework.ToLowerInvariant())\
+ $(MSBuildThisFileDirectory)bin\$(Configuration)-$(DotNetTargetFramework.ToLowerInvariant())\
+ $(MSBuildThisFileDirectory)bin\Test$(Configuration)-$(DotNetTargetFramework.ToLowerInvariant())\
+ $(UtilityOutputFullPathCoreApps)
+ $(ToolOutputFullPath)
+ <_XamarinAndroidCecilPath Condition=" '$(CecilSourceDirectory)' != '' And Exists('$(UtilityOutputFullPathCoreApps)Xamarin.Android.Cecil.dll') ">$(UtilityOutputFullPathCoreApps)Xamarin.Android.Cecil.dll
+ Major
+ $(JINetToolVersion)
+ $(JINetCoreLibVersion)
+
+
+
+ mono
+ <_JNIEnvGenPath>$(BuildToolOutputFullPath)jnienv-gen.dll
+ <_RunJNIEnvGen>$(DotnetToolPath) "$(_JNIEnvGenPath)"
+
+
+
+ AllEnabledByDefault
+ $(WarningsAsErrors);CA1307;CA1309;CA1310
+
+
+
+ $(NoWarn);CA1307;CA1309;CA1310
+
+
+
+ $(JIUtilityVersion)
+
+
+
diff --git a/external/Java.Interop/ThirdPartyNotices.txt b/external/Java.Interop/ThirdPartyNotices.txt
new file mode 100644
index 00000000000..c8e46bb80eb
--- /dev/null
+++ b/external/Java.Interop/ThirdPartyNotices.txt
@@ -0,0 +1,219 @@
+java.interop uses third-party libraries or other resources that may be
+distributed under licenses different than the java.interop software.
+
+In the event that we accidentally failed to list a required notice, please
+bring it to our attention. Post an issue or email us:
+
+ dotnet@microsoft.com
+
+The attached notices are provided for information only.
+
+1. JetBrains/kotlin (https://github.com/JetBrains/kotlin/)
+
+%% JetBrains/kotlin NOTICES AND INFORMATION BEGIN HERE
+======================================================
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright 2000-2019 JetBrains s.r.o. and Kotlin Programming Language contributors.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+======================================================
+
+END OF JetBrains/kotlin NOTICES AND INFORMATION
diff --git a/external/Java.Interop/before.Java.Interop.sln.targets b/external/Java.Interop/before.Java.Interop.sln.targets
new file mode 100644
index 00000000000..6a0c004173e
--- /dev/null
+++ b/external/Java.Interop/before.Java.Interop.sln.targets
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/external/Java.Interop/build-tools/Java.Interop.BootstrapTasks/Java.Interop.BootstrapTasks.csproj b/external/Java.Interop/build-tools/Java.Interop.BootstrapTasks/Java.Interop.BootstrapTasks.csproj
new file mode 100644
index 00000000000..f8cd822d43f
--- /dev/null
+++ b/external/Java.Interop/build-tools/Java.Interop.BootstrapTasks/Java.Interop.BootstrapTasks.csproj
@@ -0,0 +1,32 @@
+
+
+
+ netstandard2.0
+ false
+
+
+
+
+
+ $(BuildToolOutputFullPathNoTF)
+ main
+ false
+
+
+
+
+
+
+
+
+
+
+
+ {E34BCFA0-CAA4-412C-AA1C-75DB8D67D157}
+ Xamarin.Android.Tools.AndroidSdk
+
+
+
+
+
+
diff --git a/external/Java.Interop/build-tools/Java.Interop.BootstrapTasks/Java.Interop.BootstrapTasks.sln b/external/Java.Interop/build-tools/Java.Interop.BootstrapTasks/Java.Interop.BootstrapTasks.sln
new file mode 100644
index 00000000000..272f06ea536
--- /dev/null
+++ b/external/Java.Interop/build-tools/Java.Interop.BootstrapTasks/Java.Interop.BootstrapTasks.sln
@@ -0,0 +1,31 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 17
+VisualStudioVersion = 17.1.32104.313
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Java.Interop.BootstrapTasks", "Java.Interop.BootstrapTasks.csproj", "{47C54705-71BA-455D-9F72-780487DE861C}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Xamarin.Android.Tools.AndroidSdk", "..\..\external\xamarin-android-tools\src\Xamarin.Android.Tools.AndroidSdk\Xamarin.Android.Tools.AndroidSdk.csproj", "{2F8744CF-C265-440A-B976-DEC021324A3E}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {47C54705-71BA-455D-9F72-780487DE861C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {47C54705-71BA-455D-9F72-780487DE861C}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {47C54705-71BA-455D-9F72-780487DE861C}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {47C54705-71BA-455D-9F72-780487DE861C}.Release|Any CPU.Build.0 = Release|Any CPU
+ {2F8744CF-C265-440A-B976-DEC021324A3E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {2F8744CF-C265-440A-B976-DEC021324A3E}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {2F8744CF-C265-440A-B976-DEC021324A3E}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {2F8744CF-C265-440A-B976-DEC021324A3E}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {8C64DB4C-E064-43CA-B1AB-100760FEF870}
+ EndGlobalSection
+EndGlobal
diff --git a/external/Java.Interop/build-tools/Java.Interop.BootstrapTasks/Java.Interop.BootstrapTasks.targets b/external/Java.Interop/build-tools/Java.Interop.BootstrapTasks/Java.Interop.BootstrapTasks.targets
new file mode 100644
index 00000000000..54db188c77e
--- /dev/null
+++ b/external/Java.Interop/build-tools/Java.Interop.BootstrapTasks/Java.Interop.BootstrapTasks.targets
@@ -0,0 +1,59 @@
+
+
+
+
+ <_Path Include="PkgNUnit_ConsoleRunner" Destination="$(PkgNUnit_ConsoleRunner)" />
+
+
+ <_PackagePathsLine Include="<Project>" />
+ <_PackagePathsLine Include=" <PropertyGroup>" />
+ <_PackagePathsLine Include="@(_Path->' <%(Identity) Condition=" %27%24(%(Identity))%27 == %27%27 ">%(Destination)</%(Identity)>', '
+')" />
+ <_PackagePathsLine Include=" </PropertyGroup>" />
+ <_PackagePathsLine Include="</Project>" />
+
+
+
+
+
+
+
+ <_NetToolVersion>$(GitBaseVersionMajor).$(GitBaseVersionMinor).$(GitBaseVersionPatch).$(GitCommits)
+ <_OldToolVersion>0.2.$(GitBaseVersionPatch).$(GitCommits)
+ <_NetCoreLibVersion>$(GitBaseVersionMajor).$(GitBaseVersionMinor).0.0
+ <_OldCoreLibVersion>0.1.0.0
+ <_FileVersion>$(GitBaseVersionMajor).$(GitBaseVersionMinor).$(GitBaseVersionPatch).$(GitCommits)
+
+
+ <_VersionsLine Include="<Project>" />
+ <_VersionsLine Include=" <PropertyGroup>" />
+ <_VersionsLine Include=" <FileVersion>$(_FileVersion)</FileVersion>" />
+ <_VersionsLine Include=" <JINetToolVersion>$(_NetToolVersion)</JINetToolVersion>" />
+ <_VersionsLine Include=" <JIOldToolVersion>$(_OldToolVersion)</JIOldToolVersion>" />
+ <_VersionsLine Include=" <JINetCoreLibVersion>$(_NetCoreLibVersion)</JINetCoreLibVersion>" />
+ <_VersionsLine Include=" <JIOldCoreLibVersion>$(_OldCoreLibVersion)</JIOldCoreLibVersion>" />
+ <_VersionsLine Include=" <JIBuildBranch>$(GitBranch)</JIBuildBranch>" />
+ <_VersionsLine Include=" <JIBuildCommit>$(GitCommit)</JIBuildCommit>" />
+ <_VersionsLine Include=" </PropertyGroup>" />
+ <_VersionsLine Include="</Project>" />
+
+
+
+
+
+
diff --git a/external/Java.Interop/build-tools/Java.Interop.BootstrapTasks/Java.Interop.BootstrapTasks/DownloadUri.cs b/external/Java.Interop/build-tools/Java.Interop.BootstrapTasks/Java.Interop.BootstrapTasks/DownloadUri.cs
new file mode 100644
index 00000000000..da65dc003c2
--- /dev/null
+++ b/external/Java.Interop/build-tools/Java.Interop.BootstrapTasks/Java.Interop.BootstrapTasks/DownloadUri.cs
@@ -0,0 +1,84 @@
+using System;
+using System.IO;
+using System.Net.Http;
+using System.Threading.Tasks;
+
+using Microsoft.Build.Framework;
+using Microsoft.Build.Utilities;
+
+using TTask = System.Threading.Tasks.Task;
+using MTask = Microsoft.Build.Utilities.Task;
+
+namespace Java.Interop.BootstrapTasks {
+
+ public class DownloadUri : MTask
+ {
+ public DownloadUri ()
+ {
+ }
+
+ [Required]
+ public string[] SourceUris { get; set; }
+
+ [Required]
+ public ITaskItem[] DestinationFiles { get; set; }
+
+ public override bool Execute ()
+ {
+ Log.LogMessage (MessageImportance.Low, "DownloadUri:");
+ Log.LogMessage (MessageImportance.Low, " SourceUris:");
+ foreach (var uri in SourceUris) {
+ Log.LogMessage (MessageImportance.Low, " {0}", uri);
+ }
+ Log.LogMessage (MessageImportance.Low, " DestinationFiles:");
+ foreach (var dest in DestinationFiles) {
+ Log.LogMessage (MessageImportance.Low, " {0}", dest.ItemSpec);
+ }
+
+ if (SourceUris.Length != DestinationFiles.Length) {
+ Log.LogError ("SourceUris.Length must equal DestinationFiles.Length.");
+ return false;
+ }
+
+ var tasks = new TTask [SourceUris.Length];
+ var handler = new HttpClientHandler {
+ CheckCertificateRevocationList = true,
+ };
+ using (var client = new HttpClient (handler)) {
+ client.Timeout = TimeSpan.FromHours (3);
+ for (int i = 0; i < SourceUris.Length; ++i) {
+ tasks [i] = DownloadFile (client, SourceUris [i], DestinationFiles [i].ItemSpec);
+ }
+ TTask.WaitAll (tasks);
+ }
+
+ return !Log.HasLoggedErrors;
+ }
+
+ async TTask DownloadFile (HttpClient client, string uri, string destinationFile)
+ {
+ if (File.Exists (destinationFile)) {
+ Log.LogMessage (MessageImportance.Normal, $"Skipping uri '{uri}' as destination file already exists '{destinationFile}'.");
+ return;
+ }
+ var dp = Path.GetDirectoryName (destinationFile);
+ var dn = Path.GetFileName (destinationFile);
+ var tempPath = Path.Combine (dp, "." + dn + ".download");
+ Directory.CreateDirectory(dp);
+
+ Log.LogMessage (MessageImportance.Normal, $"Downloading `{uri}` to `{tempPath}`.");
+ try {
+ using (var s = await client.GetStreamAsync (uri))
+ using (var o = File.OpenWrite (tempPath)) {
+ await s.CopyToAsync (o);
+ }
+ Log.LogMessage (MessageImportance.Low, $"mv '{tempPath}' '{destinationFile}'.");
+ File.Move (tempPath, destinationFile);
+ }
+ catch (Exception e) {
+ Log.LogError ("Unable to download URL `{0}` to `{1}`: {2}", uri, destinationFile, e.Message);
+ Log.LogErrorFromException (e);
+ }
+ }
+ }
+}
diff --git a/external/Java.Interop/build-tools/Java.Interop.BootstrapTasks/Java.Interop.BootstrapTasks/JdkInfo.cs b/external/Java.Interop/build-tools/Java.Interop.BootstrapTasks/Java.Interop.BootstrapTasks/JdkInfo.cs
new file mode 100644
index 00000000000..994084afb7b
--- /dev/null
+++ b/external/Java.Interop/build-tools/Java.Interop.BootstrapTasks/Java.Interop.BootstrapTasks/JdkInfo.cs
@@ -0,0 +1,194 @@
+using Microsoft.Build.Framework;
+using Microsoft.Build.Utilities;
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.IO;
+using System.Linq;
+using System.Runtime.InteropServices;
+using System.Text;
+using System.Text.RegularExpressions;
+using System.Xml.Linq;
+
+using Xamarin.Android.Tools;
+
+using XATInfo = Xamarin.Android.Tools.JdkInfo;
+
+namespace Java.Interop.BootstrapTasks
+{
+ public class JdkInfo : Task
+ {
+ public string JdksRoot { get; set; }
+
+ public string PropertyNameModifier { get; set; } = "";
+ public string MinimumJdkVersion { get; set; }
+ public string MaximumJdkVersion { get; set; }
+
+ public string DotnetToolPath { get; set; }
+
+ static Regex VersionExtractor = new Regex (@"(?[\d]+(\.\d+)+)", RegexOptions.Compiled);
+
+ [Required]
+ public ITaskItem PropertyFile { get; set; }
+
+ public ITaskItem MakeFragmentFile { get; set; }
+
+ [Output]
+ public string JavaHomePath { get; set; }
+
+ public override bool Execute ()
+ {
+ var minVersion = GetVersion (MinimumJdkVersion);
+ var maxVersion = GetVersion (MaximumJdkVersion);
+
+ var explicitJdks = GetJdkRoots ();
+ var defaultJdks = XATInfo.GetKnownSystemJdkInfos (CreateLogger ())
+ .Where (j => minVersion != null ? j.Version >= minVersion : true)
+ .Where (j => maxVersion != null ? j.Version <= maxVersion : true)
+ .Where (j => j.IncludePath.Any ());
+ var jdk = explicitJdks.Concat (defaultJdks)
+ .Where (j => JdkRunsOnHost (j))
+ .FirstOrDefault ();
+
+ if (jdk == null) {
+ Log.LogError ("Could not determine JAVA_HOME location. Please set JdksRoot or export the JAVA_HOME environment variable.");
+ return false;
+ }
+
+ var rtJarPaths = new[]{
+ Path.Combine (Path.GetDirectoryName (jdk.JavacPath), "..", "jre", "lib", "rt.jar"),
+ };
+ var rtJarPath = rtJarPaths.FirstOrDefault (p => File.Exists (p));
+
+ JavaHomePath = jdk.HomePath;
+
+ Directory.CreateDirectory (Path.GetDirectoryName (PropertyFile.ItemSpec));
+ WritePropertyFile (jdk, rtJarPath);
+
+ if (MakeFragmentFile != null) {
+ Directory.CreateDirectory (Path.GetDirectoryName (MakeFragmentFile.ItemSpec));
+ WriteMakeFragmentFile (jdk, rtJarPath);
+ }
+
+ return !Log.HasLoggedErrors;
+ }
+
+ static bool JdkRunsOnHost (XATInfo jdk)
+ {
+ var cputype = RuntimeInformation.ProcessArchitecture;
+ if (jdk.ReleaseProperties.TryGetValue ("OS_ARCH", out var arch)) {
+ return (cputype, arch) switch {
+ (Architecture.Arm64, "aarch64") => true,
+ (Architecture.X64, "x86_64") => true,
+ _ => false,
+ };
+ }
+ return true;
+ }
+
+ XATInfo[] GetJdkRoots ()
+ {
+ XATInfo jdk = null;
+ try {
+ if (!string.IsNullOrEmpty (JdksRoot))
+ jdk = new XATInfo (JdksRoot);
+ } catch (Exception e) {
+ Log.LogWarning ($"Could not get information about JdksRoot path `{JdksRoot}`: {e.Message}");
+ Log.LogMessage (MessageImportance.Low, e.ToString ());
+ }
+ return jdk == null
+ ? Array.Empty()
+ : new[] { jdk };
+ }
+
+ Version GetVersion (string value)
+ {
+ if (string.IsNullOrEmpty (value))
+ return null;
+ if (!value.Contains (".")) {
+ value += ".0";
+ }
+ Version v;
+ if (Version.TryParse (value, out v))
+ return v;
+ return null;
+ }
+
+ Action CreateLogger ()
+ {
+ Action logger = (level, value) => {
+ switch (level) {
+ case TraceLevel.Error:
+ Log.LogError ("{0}", value);
+ break;
+ case TraceLevel.Warning:
+ Log.LogWarning ("{0}", value);
+ break;
+ default:
+ Log.LogMessage (MessageImportance.Low, "{0}", value);
+ break;
+ }
+ };
+ return logger;
+ }
+
+ void WritePropertyFile (XATInfo jdk, string rtJarPath)
+ {
+ var jarPath = jdk.JarPath;
+ var javacPath = jdk.JavacPath;
+ var javaPath = jdk.JavaPath;
+ var jdkJvmPath = jdk.JdkJvmPath;
+ var includes = jdk.IncludePath;
+
+ var msbuild = XNamespace.Get ("http://schemas.microsoft.com/developer/msbuild/2003");
+ var jdkJvmP = $"JdkJvm{PropertyNameModifier}Path";
+ var project = new XElement (msbuild + "Project",
+ new XElement (msbuild + "Choose",
+ new XElement (msbuild + "When", new XAttribute ("Condition", $" '$({jdkJvmP})' == '' "),
+ new XElement (msbuild + "PropertyGroup",
+ new XElement (msbuild + jdkJvmP, jdkJvmPath)),
+ new XElement (msbuild + "ItemGroup",
+ includes.Select (i => new XElement (msbuild + $"Jdk{PropertyNameModifier}IncludePath", new XAttribute ("Include", i)))))),
+ new XElement (msbuild + "PropertyGroup",
+ CreateProperty (msbuild, $"JavaApi{PropertyNameModifier}DefineConstants",
+ string.Join (";", Enumerable.Range (11, jdk.Version.Major-11+1).Select (v => $"JAVA_API_{v}"))),
+ CreateProperty (msbuild, $"Java{PropertyNameModifier}MajorVersion", jdk.Version.Major.ToString ()),
+ CreateProperty (msbuild, $"Java{PropertyNameModifier}SdkDirectory", JavaHomePath),
+ CreateProperty (msbuild, $"Java{PropertyNameModifier}Path", javaPath),
+ CreateProperty (msbuild, $"JavaC{PropertyNameModifier}Path", javacPath),
+ CreateProperty (msbuild, $"Jar{PropertyNameModifier}Path", jarPath),
+ CreateProperty (msbuild, $"Dotnet{PropertyNameModifier}ToolPath", DotnetToolPath),
+ CreateProperty (msbuild, $"Jre{PropertyNameModifier}RtJarPath", rtJarPath)));
+ project.Save (PropertyFile.ItemSpec);
+ }
+
+ XElement CreateProperty (XNamespace msbuild, string propertyName, string propertyValue)
+ {
+ if (string.IsNullOrEmpty (propertyValue)) {
+ return null;
+ }
+
+ return new XElement (msbuild + propertyName,
+ new XAttribute ("Condition", $" '$({propertyName})' == '' "),
+ propertyValue);
+ }
+
+ void WriteMakeFragmentFile (XATInfo jdk, string rtJarPath)
+ {
+ var jarPath = jdk.JarPath;
+ var javacPath = jdk.JavacPath;
+ var javaPath = jdk.JavaPath;
+ var jdkJvmPath = jdk.JdkJvmPath;
+ var includes = jdk.IncludePath;
+
+ using (var o = new StreamWriter (MakeFragmentFile.ItemSpec)) {
+ o.WriteLine ($"export JI_JAR_PATH := {jarPath}");
+ o.WriteLine ($"export JI_JAVA_PATH := {javaPath}");
+ o.WriteLine ($"export JI_JAVAC_PATH := {javacPath}");
+ o.WriteLine ($"export JI_JDK_INCLUDE_PATHS := {string.Join (" ", includes)}");
+ o.WriteLine ($"export JI_JVM_PATH := {jdkJvmPath}");
+ o.WriteLine ($"export JI_RT_JAR_PATH := {rtJarPath}");
+ }
+ }
+ }
+}
diff --git a/external/Java.Interop/build-tools/Java.Interop.BootstrapTasks/Java.Interop.BootstrapTasks/OS.cs b/external/Java.Interop/build-tools/Java.Interop.BootstrapTasks/Java.Interop.BootstrapTasks/OS.cs
new file mode 100644
index 00000000000..4e9d11a4fa1
--- /dev/null
+++ b/external/Java.Interop/build-tools/Java.Interop.BootstrapTasks/Java.Interop.BootstrapTasks/OS.cs
@@ -0,0 +1,10 @@
+using System;
+using System.IO;
+
+namespace Java.Interop.BootstrapTasks {
+ class OS {
+ public static readonly bool IsWindows = Path.DirectorySeparatorChar == '\\';
+ public static readonly bool IsMacOS = !IsWindows && Directory.Exists ("/Applications");
+ public static readonly bool IsLinux = !IsWindows && !IsMacOS;
+ }
+}
diff --git a/external/Java.Interop/build-tools/Java.Interop.BootstrapTasks/Java.Interop.BootstrapTasks/ParseAndroidResources.cs b/external/Java.Interop/build-tools/Java.Interop.BootstrapTasks/Java.Interop.BootstrapTasks/ParseAndroidResources.cs
new file mode 100644
index 00000000000..5b69a69c673
--- /dev/null
+++ b/external/Java.Interop/build-tools/Java.Interop.BootstrapTasks/Java.Interop.BootstrapTasks/ParseAndroidResources.cs
@@ -0,0 +1,66 @@
+using Microsoft.Build.Framework;
+using Microsoft.Build.Utilities;
+using System;
+using System.Linq;
+using System.IO;
+using System.Collections.Generic;
+
+
+namespace Java.Interop.BootstrapTasks
+{
+ public class ParseAndroidResources : Task
+ {
+ public ITaskItem AndroidResourceFile { get; set; }
+ public ITaskItem OutputFile { get; set; }
+ public string DeclaringNamespaceName { get; set; }
+ public string DeclaringClassName { get; set; }
+
+ public override bool Execute ()
+ {
+ using (var o = File.CreateText (OutputFile.ItemSpec)) {
+ o.WriteLine ($"namespace {DeclaringNamespaceName};");
+ o.WriteLine ();
+ o.WriteLine ($"partial class {DeclaringClassName} {{");
+ var resources = ParseAndroidResourceFile (AndroidResourceFile.ItemSpec);
+ foreach (var declType in resources.Keys.OrderBy (x => x)) {
+ o.WriteLine ($"\tpublic static class @{declType} {{");
+ var decls = resources [declType];
+ foreach (var decl in decls.Keys.OrderBy (x => x)) {
+ o.WriteLine ($"\t\tpublic const int {decl} = {decls [decl]};");
+ }
+ o.WriteLine ("\t}");
+ }
+ o.WriteLine ("}");
+ o.WriteLine ();
+ }
+
+ return !Log.HasLoggedErrors;
+ }
+
+ Dictionary> ParseAndroidResourceFile (string file)
+ {
+ var resources = new Dictionary> ();
+ using (var reader = File.OpenText (file)) {
+ string line;
+ while ((line = reader.ReadLine ()) != null) {
+ if (line.StartsWith ("#"))
+ continue;
+ var items = line.Split (' ');
+ if (items.Length != 4)
+ continue;
+ var type = items [0];
+ if (string.Compare (type, "int", StringComparison.Ordinal) != 0)
+ continue;
+ var decl = items [1];
+ var name = items [2];
+ var value = items [3];
+ if (!resources.TryGetValue (decl, out var declResources))
+ resources.Add (decl, declResources = new Dictionary());
+ declResources.Add (name, value);
+ }
+ }
+
+ return resources;
+ }
+ }
+}
diff --git a/external/Java.Interop/build-tools/Java.Interop.BootstrapTasks/Java.Interop.BootstrapTasks/ReplaceFileContents.cs b/external/Java.Interop/build-tools/Java.Interop.BootstrapTasks/Java.Interop.BootstrapTasks/ReplaceFileContents.cs
new file mode 100644
index 00000000000..be5832170ae
--- /dev/null
+++ b/external/Java.Interop/build-tools/Java.Interop.BootstrapTasks/Java.Interop.BootstrapTasks/ReplaceFileContents.cs
@@ -0,0 +1,27 @@
+using Microsoft.Build.Framework;
+using Microsoft.Build.Utilities;
+using System;
+using System.IO;
+using System.Collections.Generic;
+
+
+namespace Java.Interop.BootstrapTasks
+{
+ public class ReplaceFileContents : Task
+ {
+ public ITaskItem TemplateFile { get; set; }
+ public ITaskItem OutputFile { get; set; }
+
+ public ITaskItem [] Replacements { get; set; }
+ public override bool Execute ()
+ {
+ string text = File.ReadAllText (TemplateFile.ItemSpec);
+ foreach (var replacement in Replacements)
+ {
+ text = text.Replace (replacement.ItemSpec, replacement.GetMetadata ("Replacement"));
+ }
+ File.WriteAllText (OutputFile.ItemSpec, text);
+ return !Log.HasLoggedErrors;
+ }
+ }
+}
diff --git a/external/Java.Interop/build-tools/Java.Interop.BootstrapTasks/Java.Interop.BootstrapTasks/SetEnvironmentVariable.cs b/external/Java.Interop/build-tools/Java.Interop.BootstrapTasks/Java.Interop.BootstrapTasks/SetEnvironmentVariable.cs
new file mode 100644
index 00000000000..f31036d6e76
--- /dev/null
+++ b/external/Java.Interop/build-tools/Java.Interop.BootstrapTasks/Java.Interop.BootstrapTasks/SetEnvironmentVariable.cs
@@ -0,0 +1,28 @@
+using System;
+
+using Microsoft.Build.Framework;
+using Microsoft.Build.Utilities;
+
+namespace Java.Interop.BootstrapTasks
+{
+ public class SetEnvironmentVariable : Task
+ {
+ [Required]
+ public string Name { get; set; }
+
+ [Required]
+ public string Value { get; set; }
+
+ public override bool Execute ()
+ {
+ Log.LogMessage (MessageImportance.Low, $"Task {nameof (SetEnvironmentVariable)}");
+ Log.LogMessage (MessageImportance.Low, $" {nameof (Name)}: {Name}");
+ Log.LogMessage (MessageImportance.Low, $" {nameof (Value)}: {Value}");
+
+ Environment.SetEnvironmentVariable (Name, Value);
+
+ return !Log.HasLoggedErrors;
+ }
+ }
+}
+
diff --git a/external/Java.Interop/build-tools/Java.Interop.Sdk/Sdk/Sdk.props b/external/Java.Interop/build-tools/Java.Interop.Sdk/Sdk/Sdk.props
new file mode 100644
index 00000000000..8ca46be020b
--- /dev/null
+++ b/external/Java.Interop/build-tools/Java.Interop.Sdk/Sdk/Sdk.props
@@ -0,0 +1,6 @@
+
+
+ ;
+ :
+
+
diff --git a/external/Java.Interop/build-tools/Java.Interop.Sdk/Sdk/Sdk.targets b/external/Java.Interop/build-tools/Java.Interop.Sdk/Sdk/Sdk.targets
new file mode 100644
index 00000000000..466fd6bd5b2
--- /dev/null
+++ b/external/Java.Interop/build-tools/Java.Interop.Sdk/Sdk/Sdk.targets
@@ -0,0 +1,229 @@
+
+
+
+
+ True
+
+
+ True
+
+
+
+
+ $(AssemblyName).jar
+
+
+
+
+ _BuildJavaCompileForManagedBinding;
+ _GenerateApiDescription;
+ _GenerateManagedBinding;
+ _CleanupManagedBinding;
+
+
+ _JavaCreateJcws;
+ _JavaCreateOutputJar;
+
+
+
+
+
+
+
+
+
+
+ <_GeneratorPath>$(UtilityOutputFullPath)generator.dll
+ <_JavaIntermediateDir>$(IntermediateOutputPath)_ji\
+ <_JavaManagedBindingInput>$(_JavaIntermediateDir)o.jar
+ <_JavaManagedBindingDir>$(_JavaIntermediateDir)mcw\
+ <_JavaJcwClassesDir>$(_JavaIntermediateDir)classes\
+ <_JavaJcwSourcesDir>$(_JavaIntermediateDir)java\
+ <_JavaOutputJarPath>$(_JavaIntermediateDir)$(JavaOutputJarName)
+
+
+
+
+
+
+
+
+ <_JavaCompileForBindingInputs
+ Condition=" '%(JavaCompile.Bind)' == 'True' "
+ Include="@(JavaCompile)"
+ />
+
+
+
+
+
+ <_JavacRefs Include="$(ToolOutputFullPath)java-interop.jar" />
+ <_JavacRefs Include="@(JavaReference)" />
+ <_JavacRefsWithForwardSlash Include="@(_JavacRefs->Replace('%5c', '/'))" />
+
+
+
+
+
+ <_ClassesDir>$(_JavaIntermediateDir)\bound-classes
+ <_ResponseFile>$(_JavaIntermediateDir)r.txt
+ <_Classpath>@(_JavacRefsWithForwardSlash, '$(JavaPathSeparator)')
+
+
+
+ <_Response Include="-classpath" />
+ <_Response Include=""$(_Classpath)"" />
+ <_Response Include="@(_JavaCompileForBindingInputs->Replace('%5c', '/'))" />
+
+
+
+
+
+
+
+
+
+
+
+ <_ClassParseInputs
+ Condition=" Exists($(_JavaManagedBindingInput))"
+ Include="$(_JavaManagedBindingInput)"
+ />
+ <_ClassParseInputs
+ Condition=" '%(JavaReference.Bind)' == 'True' "
+ Include="@(JavaReference)"
+ />
+
+
+
+
+
+
+ <_ClassParse>"$(UtilityOutputFullPath)class-parse.dll"
+ <_Inputs>@(_ClassParseInputs, ' ')
+ <_Output>"-o=$(_JavaManagedBindingDir)api.xml"
+
+
+
+
+
+
+
+ "$(_GeneratorPath)"
+ <_GenFlags>--public --global
+ <_Out>-o "$(_JavaManagedBindingDir)."
+ <_Codegen>--codegen-target=JavaInterop1
+ <_Assembly>"--assembly=$(AssemblyName)"
+ <_TypeMap>--type-map-report=$(_JavaManagedBindingDir)type-mapping.txt
+ <_Api>$(_JavaManagedBindingDir)api.xml
+ <_Dirs>"--enumdir=$(_JavaManagedBindingDir)."
+ <_FullIntermediateOutputPath>$([System.IO.Path]::GetFullPath('$(_JavaManagedBindingDir)'))
+ <_LangFeatures>--lang-features=nullable-reference-types,default-interface-methods,nested-interface-types,interface-constants
+
+
+
+ <_RefAsmDir Include="@(ReferencePathWithRefAssemblies->'%(RootDir)%(Directory).'->Distinct())" />
+ <_Lib Include="@(_RefAsmDir->'-L "%(Identity)"')" />
+
+
+
+
+
+
+
+
+
+
+ $(DefineConstants);$([System.String]::Copy('$(_GeneratedDefineConstants)').Replace ('%24(DefineConstants);', ''))
+
+
+
+
+
+
+
+
+
+
+ <_RefAsmDirs Include="@(ReferencePathWithRefAssemblies->'%(RootDir)%(Directory).'->Distinct())" />
+
+
+ <_JcwGen>"$(UtilityOutputFullPath)/jcw-gen.dll"
+ <_Target>--codegen-target JavaInterop1
+ <_Output>-o "$(_JavaJcwSourcesDir)."
+ <_Libpath>@(_RefAsmDirs->'-L "%(Identity)"', ' ')
+
+
+
+
+
+
+
+ <_JavaGeneratedJcwSource Include="$(_JavaJcwSourcesDir)**\*.java" />
+
+
+
+
+
+
+
+ <_ResponseFile>$(_JavaIntermediateDir)r.txt
+ <_Classpath>@(_JavacRefsWithForwardSlash, '$(JavaPathSeparator)')
+
+
+ <_Source Include="@(JavaCompile->Replace('%5c', '/'))" />
+ <_Source Include="@(_JavaGeneratedJcwSource->Replace('%5c', '/'))" />
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/external/Java.Interop/build-tools/automation/templates/core-build.yaml b/external/Java.Interop/build-tools/automation/templates/core-build.yaml
new file mode 100644
index 00000000000..eae7d6a3101
--- /dev/null
+++ b/external/Java.Interop/build-tools/automation/templates/core-build.yaml
@@ -0,0 +1,25 @@
+parameters:
+ condition: succeeded()
+
+steps:
+- task: DotNetCoreCLI@2
+ displayName: Prepare Solution
+ inputs:
+ projects: external/Java.Interop/Java.Interop.sln
+ arguments: '-c $(Build.Configuration) -target:Prepare'
+ workingDirectory: external/Java.Interop
+
+- task: DotNetCoreCLI@2
+ displayName: Shut down existing build server
+ inputs:
+ command: custom
+ custom: build-server
+ arguments: shutdown
+ workingDirectory: external/Java.Interop
+
+- task: DotNetCoreCLI@2
+ displayName: Build Solution
+ inputs:
+ projects: external/Java.Interop/Java.Interop.sln
+ arguments: '-c $(Build.Configuration)'
+ workingDirectory: external/Java.Interop
diff --git a/external/Java.Interop/build-tools/automation/templates/core-tests.yaml b/external/Java.Interop/build-tools/automation/templates/core-tests.yaml
new file mode 100644
index 00000000000..55057be5ea6
--- /dev/null
+++ b/external/Java.Interop/build-tools/automation/templates/core-tests.yaml
@@ -0,0 +1,94 @@
+parameters:
+ condition: succeeded()
+ runNativeTests: false
+ platformName:
+ nativeAotRid:
+
+steps:
+- template: run-dotnet-test.yaml
+ parameters:
+ testRunTitle: generator (${{ parameters.platformName }})
+ testAssemblyName: generator-Tests
+
+- template: run-dotnet-test.yaml
+ parameters:
+ testRunTitle: Java.Interop.Tools.JavaCallableWrappers (${{ parameters.platformName }})
+ testAssemblyName: Java.Interop.Tools.JavaCallableWrappers-Tests
+
+- template: run-dotnet-test.yaml
+ parameters:
+ testRunTitle: logcat-parse (${{ parameters.platformName }})
+ testAssemblyName: logcat-parse-Tests
+
+- template: run-dotnet-test.yaml
+ parameters:
+ testRunTitle: Xamarin.Android.Tools.ApiXmlAdjuster (${{ parameters.platformName }})
+ testAssemblyName: Xamarin.Android.Tools.ApiXmlAdjuster-Tests
+
+- template: run-dotnet-test.yaml
+ parameters:
+ testRunTitle: Xamarin.Android.Tools.JavaTypeSystem (${{ parameters.platformName }})
+ testAssemblyName: Java.Interop.Tools.JavaTypeSystem-Tests
+
+- template: run-dotnet-test.yaml
+ parameters:
+ testRunTitle: Xamarin.Android.Tools.Bytecode (${{ parameters.platformName }})
+ testAssemblyName: Xamarin.Android.Tools.Bytecode-Tests
+
+- template: run-dotnet-test.yaml
+ parameters:
+ testRunTitle: Java.Interop.Tools.Generator (${{ parameters.platformName }})
+ testAssemblyName: Java.Interop.Tools.Generator-Tests
+
+- template: run-dotnet-test.yaml
+ parameters:
+ testRunTitle: Java.Interop.Tools.JavaSource (${{ parameters.platformName }})
+ testAssemblyName: Java.Interop.Tools.JavaSource-Tests
+
+- template: run-dotnet-test.yaml
+ parameters:
+ testRunTitle: Xamarin.SourceWriter (${{ parameters.platformName }})
+ testAssemblyName: Xamarin.SourceWriter-Tests
+
+- template: run-dotnet-test.yaml
+ parameters:
+ testRunTitle: Java.Interop.Tools.Maven (${{ parameters.platformName }})
+ testAssemblyName: Java.Interop.Tools.Maven-Tests
+
+- template: run-dotnet-test.yaml
+ parameters:
+ testRunTitle: Java.Interop ($(DotNetTargetFramework) - ${{ parameters.platformName }})
+ testAssemblyName: Java.Interop-Tests
+ condition: or(eq('${{ parameters.runNativeDotnetTests }}', 'true'), eq('${{ parameters.runNativeTests }}', 'true'))
+ retryCount: 1
+
+- task: DotNetCoreCLI@2
+ displayName: 'Tests: java-source-utils'
+ inputs:
+ command: build
+ arguments: -c $(Build.Configuration) tools/java-source-utils/java-source-utils.csproj -t:RunTests
+ workingDirectory: external/Java.Interop
+ continueOnError: true
+
+- powershell: >
+ dotnet publish -c $(Build.Configuration) -r ${{ parameters.nativeAotRid }}
+ samples/Hello-NativeAOTFromJNI/Hello-NativeAOTFromJNI.csproj
+ displayName: 'Tests: publish Hello-NativeAOTFromJNI'
+ workingDirectory: external/Java.Interop
+ continueOnError: true
+
+- powershell: >
+ dotnet build -c $(Build.Configuration) -r ${{ parameters.nativeAotRid }}
+ -t:RunJavaSample
+ samples/Hello-NativeAOTFromJNI/Hello-NativeAOTFromJNI.csproj
+ displayName: 'Tests: run Hello-NativeAOTFromJNI'
+ workingDirectory: external/Java.Interop
+ continueOnError: true
+
+- task: PublishTestResults@2
+ displayName: Publish JUnit Test Results
+ inputs:
+ testResultsFormat: JUnit
+ testResultsFiles: 'external/Java.Interop/tools/java-source-utils/build/test-results/**/TEST-*.xml'
+ testRunTitle: java-source-utils (${{ parameters.platformName }})
+ continueOnError: true
diff --git a/external/Java.Interop/build-tools/automation/templates/fail-on-dirty-tree.yaml b/external/Java.Interop/build-tools/automation/templates/fail-on-dirty-tree.yaml
new file mode 100644
index 00000000000..38b4dbc202f
--- /dev/null
+++ b/external/Java.Interop/build-tools/automation/templates/fail-on-dirty-tree.yaml
@@ -0,0 +1,22 @@
+# Ensure the build did not produce any modified checked in files
+
+parameters:
+ condition: succeeded()
+
+steps:
+- powershell: |
+ # Run this to log the output for the user
+ git status
+
+ # Run this to error the build if untracked files
+ $process= git status --porcelain --untracked-files=no
+
+ if ($process)
+ {
+ Write-Host "##vso[task.logissue type=error]git tree has modified tracked files."
+ Write-Host "##vso[task.complete result=Failed;]"
+ }
+
+ git diff
+ displayName: Ensure no modified committed files
+ condition: ${{ parameters.condition }}
diff --git a/external/Java.Interop/build-tools/automation/templates/fail-on-issue.yaml b/external/Java.Interop/build-tools/automation/templates/fail-on-issue.yaml
new file mode 100644
index 00000000000..ad3f176f9ed
--- /dev/null
+++ b/external/Java.Interop/build-tools/automation/templates/fail-on-issue.yaml
@@ -0,0 +1,10 @@
+parameters:
+ condition: succeeded()
+
+steps:
+- powershell: |
+ Write-Host "Current job status is: $env:AGENT_JOBSTATUS"
+ if ($env:AGENT_JOBSTATUS -eq "SucceededWithIssues") {
+ Write-Host "##vso[task.complete result=Failed;]DONE"
+ }
+ displayName: fail if any issues occurred
diff --git a/external/Java.Interop/build-tools/automation/templates/install-dependencies.yaml b/external/Java.Interop/build-tools/automation/templates/install-dependencies.yaml
new file mode 100644
index 00000000000..7ead0e5a6c7
--- /dev/null
+++ b/external/Java.Interop/build-tools/automation/templates/install-dependencies.yaml
@@ -0,0 +1,8 @@
+parameters:
+ condition: succeeded()
+
+steps:
+- task: UseDotNet@2
+ displayName: Use .NET $(DotNetCoreVersion)
+ inputs:
+ version: $(DotNetCoreVersion)
diff --git a/external/Java.Interop/build-tools/automation/templates/run-dotnet-test.yaml b/external/Java.Interop/build-tools/automation/templates/run-dotnet-test.yaml
new file mode 100644
index 00000000000..8163d9105b6
--- /dev/null
+++ b/external/Java.Interop/build-tools/automation/templates/run-dotnet-test.yaml
@@ -0,0 +1,28 @@
+parameters:
+ testRunTitle:
+ testAssemblyName:
+ trxSuffix: ''
+ condition: succeededOrFailed()
+ retryCount: 0
+ extraArguments: ''
+
+steps:
+- task: DotNetCoreCLI@2
+ displayName: 'Tests: ${{ parameters.testRunTitle }}'
+ condition: ${{ parameters.condition }}
+ inputs:
+ command: test
+ publishTestResults: false
+ arguments: --logger "trx;LogFileName=${{ parameters.testAssemblyName }}${{ parameters.trxSuffix }}.trx" --results-directory $(Agent.TempDirectory) ${{ parameters.extraArguments }} bin/Test$(Build.Configuration)$(NetCoreTargetFrameworkPathSuffix)/${{ parameters.testAssemblyName }}.dll
+ workingDirectory: external/Java.Interop
+ continueOnError: true
+ retryCountOnTaskFailure: ${{ parameters.retryCount }}
+
+- task: PublishTestResults@2
+ displayName: 'Publish: ${{ parameters.testRunTitle }}'
+ condition: ${{ parameters.condition }}
+ inputs:
+ testResultsFormat: VSTest
+ testResultsFiles: '$(Agent.TempDirectory)/${{ parameters.testAssemblyName }}${{ parameters.trxSuffix }}.trx'
+ testRunTitle: ${{ parameters.testRunTitle }}
+ continueOnError: true
diff --git a/external/Java.Interop/build-tools/gradle/gradle/wrapper/gradle-wrapper.jar b/external/Java.Interop/build-tools/gradle/gradle/wrapper/gradle-wrapper.jar
new file mode 100644
index 00000000000..87b738cbd05
Binary files /dev/null and b/external/Java.Interop/build-tools/gradle/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/external/Java.Interop/build-tools/gradle/gradle/wrapper/gradle-wrapper.properties b/external/Java.Interop/build-tools/gradle/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 00000000000..d6e308a6378
--- /dev/null
+++ b/external/Java.Interop/build-tools/gradle/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,5 @@
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-bin.zip
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
diff --git a/external/Java.Interop/build-tools/gradle/gradlew b/external/Java.Interop/build-tools/gradle/gradlew
new file mode 100755
index 00000000000..af6708ff229
--- /dev/null
+++ b/external/Java.Interop/build-tools/gradle/gradlew
@@ -0,0 +1,172 @@
+#!/usr/bin/env sh
+
+##############################################################################
+##
+## Gradle start up script for UN*X
+##
+##############################################################################
+
+# Attempt to set APP_HOME
+# Resolve links: $0 may be a link
+PRG="$0"
+# Need this for relative symlinks.
+while [ -h "$PRG" ] ; do
+ ls=`ls -ld "$PRG"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '/.*' > /dev/null; then
+ PRG="$link"
+ else
+ PRG=`dirname "$PRG"`"/$link"
+ fi
+done
+SAVED="`pwd`"
+cd "`dirname \"$PRG\"`/" >/dev/null
+APP_HOME="`pwd -P`"
+cd "$SAVED" >/dev/null
+
+APP_NAME="Gradle"
+APP_BASE_NAME=`basename "$0"`
+
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS='"-Xmx64m"'
+
+# Use the maximum available, or set MAX_FD != -1 to use that value.
+MAX_FD="maximum"
+
+warn () {
+ echo "$*"
+}
+
+die () {
+ echo
+ echo "$*"
+ echo
+ exit 1
+}
+
+# OS specific support (must be 'true' or 'false').
+cygwin=false
+msys=false
+darwin=false
+nonstop=false
+case "`uname`" in
+ CYGWIN* )
+ cygwin=true
+ ;;
+ Darwin* )
+ darwin=true
+ ;;
+ MINGW* )
+ msys=true
+ ;;
+ NONSTOP* )
+ nonstop=true
+ ;;
+esac
+
+CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
+
+# Determine the Java command to use to start the JVM.
+if [ -n "$JAVA_HOME" ] ; then
+ if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+ # IBM's JDK on AIX uses strange locations for the executables
+ JAVACMD="$JAVA_HOME/jre/sh/java"
+ else
+ JAVACMD="$JAVA_HOME/bin/java"
+ fi
+ if [ ! -x "$JAVACMD" ] ; then
+ die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+ fi
+else
+ JAVACMD="java"
+ which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+fi
+
+# Increase the maximum file descriptors if we can.
+if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
+ MAX_FD_LIMIT=`ulimit -H -n`
+ if [ $? -eq 0 ] ; then
+ if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
+ MAX_FD="$MAX_FD_LIMIT"
+ fi
+ ulimit -n $MAX_FD
+ if [ $? -ne 0 ] ; then
+ warn "Could not set maximum file descriptor limit: $MAX_FD"
+ fi
+ else
+ warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
+ fi
+fi
+
+# For Darwin, add options to specify how the application appears in the dock
+if $darwin; then
+ GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
+fi
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin ; then
+ APP_HOME=`cygpath --path --mixed "$APP_HOME"`
+ CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
+ JAVACMD=`cygpath --unix "$JAVACMD"`
+
+ # We build the pattern for arguments to be converted via cygpath
+ ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
+ SEP=""
+ for dir in $ROOTDIRSRAW ; do
+ ROOTDIRS="$ROOTDIRS$SEP$dir"
+ SEP="|"
+ done
+ OURCYGPATTERN="(^($ROOTDIRS))"
+ # Add a user-defined pattern to the cygpath arguments
+ if [ "$GRADLE_CYGPATTERN" != "" ] ; then
+ OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
+ fi
+ # Now convert the arguments - kludge to limit ourselves to /bin/sh
+ i=0
+ for arg in "$@" ; do
+ CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
+ CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
+
+ if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
+ eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
+ else
+ eval `echo args$i`="\"$arg\""
+ fi
+ i=$((i+1))
+ done
+ case $i in
+ (0) set -- ;;
+ (1) set -- "$args0" ;;
+ (2) set -- "$args0" "$args1" ;;
+ (3) set -- "$args0" "$args1" "$args2" ;;
+ (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
+ (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
+ (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
+ (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
+ (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
+ (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
+ esac
+fi
+
+# Escape application args
+save () {
+ for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
+ echo " "
+}
+APP_ARGS=$(save "$@")
+
+# Collect all arguments for the java command, following the shell quoting and substitution rules
+eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
+
+# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
+if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
+ cd "$(dirname "$0")"
+fi
+
+exec "$JAVACMD" "$@"
diff --git a/external/Java.Interop/build-tools/gradle/gradlew.bat b/external/Java.Interop/build-tools/gradle/gradlew.bat
new file mode 100644
index 00000000000..6d57edc706c
--- /dev/null
+++ b/external/Java.Interop/build-tools/gradle/gradlew.bat
@@ -0,0 +1,84 @@
+@if "%DEBUG%" == "" @echo off
+@rem ##########################################################################
+@rem
+@rem Gradle startup script for Windows
+@rem
+@rem ##########################################################################
+
+@rem Set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" setlocal
+
+set DIRNAME=%~dp0
+if "%DIRNAME%" == "" set DIRNAME=.
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
+
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+set DEFAULT_JVM_OPTS="-Xmx64m"
+
+@rem Find java.exe
+if defined JAVA_HOME goto findJavaFromJavaHome
+
+set JAVA_EXE=java.exe
+%JAVA_EXE% -version >NUL 2>&1
+if "%ERRORLEVEL%" == "0" goto init
+
+echo.
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:findJavaFromJavaHome
+set JAVA_HOME=%JAVA_HOME:"=%
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
+
+if exist "%JAVA_EXE%" goto init
+
+echo.
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:init
+@rem Get command-line arguments, handling Windows variants
+
+if not "%OS%" == "Windows_NT" goto win9xME_args
+
+:win9xME_args
+@rem Slurp the command line arguments.
+set CMD_LINE_ARGS=
+set _SKIP=2
+
+:win9xME_args_slurp
+if "x%~1" == "x" goto execute
+
+set CMD_LINE_ARGS=%*
+
+:execute
+@rem Setup the command line
+
+set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
+
+@rem Execute Gradle
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
+
+:end
+@rem End local scope for the variables with windows NT shell
+if "%ERRORLEVEL%"=="0" goto mainEnd
+
+:fail
+rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
+rem the _cmd.exe /c_ return code!
+if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
+exit /b 1
+
+:mainEnd
+if "%OS%"=="Windows_NT" endlocal
+
+:omega
diff --git a/external/Java.Interop/build-tools/jnienv-gen/Generator.cs b/external/Java.Interop/build-tools/jnienv-gen/Generator.cs
new file mode 100644
index 00000000000..55263908be8
--- /dev/null
+++ b/external/Java.Interop/build-tools/jnienv-gen/Generator.cs
@@ -0,0 +1,1392 @@
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Text;
+
+namespace Xamarin.Java.Interop
+{
+ static class StringCoda {
+ public static string FixupType (this string t)
+ {
+ return t.Replace ("*", "Ptr").Replace ("[]", "Array").Replace (" ", "");
+ }
+ }
+
+ partial class Generator
+ {
+ static string jnienv_g_c;
+ static string jnienv_g_h;
+ static string jnienv_g_cs;
+
+ public static int Main (string [] args)
+ {
+ jnienv_g_c = "JniEnvironment.g.c";
+ jnienv_g_h = "JniEnvironment.g.h";
+ jnienv_g_cs = "JniEnvironment.g.cs";
+ if (args.Length > 0)
+ jnienv_g_cs = args [0];
+ if (args.Length > 1) {
+ jnienv_g_c = args [1];
+ if (jnienv_g_c != "-") {
+ jnienv_g_h = Path.Combine (Path.GetDirectoryName (jnienv_g_c), $"{Path.GetFileNameWithoutExtension(jnienv_g_c)}-api.h");
+ } else {
+ jnienv_g_h = "-";
+ }
+ }
+ if (args.Length > 2) {
+ jnienv_g_h = args [2];
+ }
+
+ try {
+ using (TextWriter w = new StringWriter ()) {
+ w.NewLine = Environment.NewLine;
+ GenerateFile (w);
+ string content = w.ToString ();
+ if (jnienv_g_cs == "-")
+ Console.WriteLine (content);
+ else
+ File.WriteAllText (jnienv_g_cs, content);
+ }
+ using (TextWriter sw = new StringWriter ()) {
+ using (TextWriter hw = new StringWriter ()) {
+ sw.NewLine = Environment.NewLine;
+ GenerateNativeLibSource (sw, hw, jnienv_g_h);
+ string sourceContent = sw.ToString ();
+ string headerContent = hw.ToString ();
+ if (jnienv_g_c == "-" || jnienv_g_cs == "-") {
+ Console.WriteLine (headerContent);
+ Console.WriteLine ();
+ Console.WriteLine (sourceContent);
+ } else {
+ File.WriteAllText (jnienv_g_h, headerContent);
+ File.WriteAllText (jnienv_g_c, sourceContent);
+ }
+ }}
+ return 0;
+ } catch (Exception ex) {
+ Console.WriteLine (ex);
+ return 1;
+ }
+ }
+
+ static string Escape (string value)
+ {
+ switch (value) {
+ case "object":
+ case "string":
+ case "ref":
+ return "@" + value;
+ default: return value;
+ }
+ }
+
+ static void GenerateFile (TextWriter o)
+ {
+ o.WriteLine ("// Generated file; DO NOT EDIT!");
+ o.WriteLine ("//");
+ o.WriteLine ("// To make changes, edit monodroid/tools/jnienv-gen-interop and rerun");
+ o.WriteLine ("#nullable enable");
+ o.WriteLine ();
+ o.WriteLine ("#if !FEATURE_JNIENVIRONMENT_JI_INTPTRS && !FEATURE_JNIENVIRONMENT_JI_PINVOKES && !FEATURE_JNIENVIRONMENT_XA_INTPTRS && !FEATURE_JNIENVIRONMENT_JI_FUNCTION_POINTERS");
+ o.WriteLine ("#define FEATURE_JNIENVIRONMENT_JI_PINVOKES");
+ o.WriteLine ("#endif // !FEATURE_JNIENVIRONMENT_JI_INTPTRS && !FEATURE_JNIENVIRONMENT_JI_PINVOKES && !FEATURE_JNIENVIRONMENT_XA_INTPTRS && !FEATURE_JNIENVIRONMENT_JI_FUNCTION_POINTERS");
+ o.WriteLine ();
+ o.WriteLine ("#if FEATURE_JNIENVIRONMENT_JI_INTPTRS && (FEATURE_JNIENVIRONMENT_JI_PINVOKES || FEATURE_JNIENVIRONMENT_XA_INTPTRS || FEATURE_JNIENVIRONMENT_JI_FUNCTION_POINTERS)");
+ o.WriteLine ("#define _NAMESPACE_PER_HANDLE");
+ o.WriteLine ("#endif // FEATURE_JNIENVIRONMENT_JI_INTPTRS && (FEATURE_JNIENVIRONMENT_JI_PINVOKES || FEATURE_JNIENVIRONMENT_XA_INTPTRS || FEATURE_JNIENVIRONMENT_JI_FUNCTION_POINTERS)");
+ o.WriteLine ("#if FEATURE_JNIENVIRONMENT_JI_PINVOKES && (FEATURE_JNIENVIRONMENT_XA_INTPTRS || FEATURE_JNIENVIRONMENT_JI_FUNCTION_POINTERS)");
+ o.WriteLine ("#define _NAMESPACE_PER_HANDLE");
+ o.WriteLine ("#endif // FEATURE_JNIENVIRONMENT_JI_PINVOKES && (FEATURE_JNIENVIRONMENT_XA_INTPTRS || FEATURE_JNIENVIRONMENT_JI_FUNCTION_POINTERS)");
+ o.WriteLine ("#if FEATURE_JNIENVIRONMENT_XA_INTPTRS && FEATURE_JNIENVIRONMENT_JI_FUNCTION_POINTERS");
+ o.WriteLine ("#define _NAMESPACE_PER_HANDLE");
+ o.WriteLine ("#endif // FEATURE_JNIENVIRONMENT_XA_INTPTRS && FEATURE_JNIENVIRONMENT_JI_FUNCTION_POINTERS");
+ o.WriteLine ();
+ o.WriteLine ("using System;");
+ o.WriteLine ("using System.Linq;");
+ o.WriteLine ("using System.Runtime.ExceptionServices;");
+ o.WriteLine ("using System.Runtime.InteropServices;");
+ o.WriteLine ("using System.Threading;");
+ o.WriteLine ();
+ o.WriteLine ("using Java.Interop;");
+ o.WriteLine ();
+ o.WriteLine ("using JNIEnvPtr = System.IntPtr;");
+ o.WriteLine ();
+ o.WriteLine ("#if FEATURE_JNIENVIRONMENT_JI_INTPTRS || FEATURE_JNIENVIRONMENT_JI_PINVOKES || FEATURE_JNIENVIRONMENT_JI_FUNCTION_POINTERS");
+ o.WriteLine ("\tusing jinstanceFieldID = System.IntPtr;");
+ o.WriteLine ("\tusing jstaticFieldID = System.IntPtr;");
+ o.WriteLine ("\tusing jinstanceMethodID = System.IntPtr;");
+ o.WriteLine ("\tusing jstaticMethodID = System.IntPtr;");
+ o.WriteLine ("\tusing jobject = System.IntPtr;");
+ o.WriteLine ("#endif // FEATURE_JNIENVIRONMENT_JI_INTPTRS || FEATURE_JNIENVIRONMENT_JI_PINVOKES || FEATURE_JNIENVIRONMENT_JI_FUNCTION_POINTERS");
+ o.WriteLine ();
+ o.WriteLine ("namespace Java.Interop {");
+ GenerateJniNativeInterface (o);
+ o.WriteLine ("}");
+ WriteSection (o, HandleStyle.JIIntPtr, "FEATURE_JNIENVIRONMENT_JI_INTPTRS", "Java.Interop.JIIntPtrs");
+ WriteSection (o, HandleStyle.JIIntPtrPinvokeWithErrors, "FEATURE_JNIENVIRONMENT_JI_PINVOKES", "Java.Interop.JIPinvokes");
+ WriteSection (o, HandleStyle.XAIntPtr, "FEATURE_JNIENVIRONMENT_XA_INTPTRS", "Java.Interop.XAIntPtrs");
+ WriteSection (o, HandleStyle.JIFunctionPtrWithErrors, "FEATURE_JNIENVIRONMENT_JI_FUNCTION_POINTERS", "Java.Interop.JIFunctionPointers");
+ }
+
+ static void WriteSection (TextWriter o, HandleStyle style, string define, string specificNamespace)
+ {
+ o.WriteLine ("#if {0}", define);
+ o.WriteLine ("namespace");
+ o.WriteLine ("#if _NAMESPACE_PER_HANDLE");
+ o.WriteLine ("\t{0}", specificNamespace);
+ o.WriteLine ("#else");
+ o.WriteLine ("\tJava.Interop");
+ o.WriteLine ("#endif");
+ o.WriteLine ("{");
+ o.WriteLine ();
+ if (style != HandleStyle.JIIntPtrPinvokeWithErrors && style != HandleStyle.JIFunctionPtrWithErrors) {
+ GenerateDelegates (o, style);
+ o.WriteLine ();
+ }
+ GenerateTypes (o, style);
+ o.WriteLine ();
+ switch (style) {
+ case HandleStyle.JIIntPtr:
+ case HandleStyle.XAIntPtr:
+ GenerateJniNativeInterfaceInvoker (o, style);
+ break;
+ }
+ o.WriteLine ("}");
+ o.WriteLine ("#endif // {0}", define);
+ }
+
+ static void GenerateDelegates (TextWriter o, HandleStyle style)
+ {
+ created_delegates = new HashSet ();
+ foreach (var e in JNIEnvEntries) {
+ CreateDelegate (o, e, style);
+ }
+ }
+
+ static void GenerateJniNativeInterface (TextWriter o)
+ {
+ o.WriteLine ("#pragma warning disable 0649 // Field is assigned to, and will always have its default value `null`; ignore as it'll be set in native code.");
+ o.WriteLine ("#pragma warning disable 0169 // Field never used; ignore since these fields make the structure have the right layout.");
+ o.WriteLine ();
+
+ o.WriteLine ("#if FEATURE_JNIENVIRONMENT_JI_INTPTRS || FEATURE_JNIENVIRONMENT_XA_INTPTRS");
+ o.WriteLine ("\t[StructLayout (LayoutKind.Sequential)]");
+ o.WriteLine ("\tpartial struct JniNativeInterfaceStruct {");
+ o.WriteLine ();
+
+ int maxName = JNIEnvEntries.Max (e => e.Name.Length);
+
+ for (int i = 0; i < 4; i++)
+ o.WriteLine ("\t\tprivate IntPtr reserved{0}; // void*", i);
+
+ foreach (var e in JNIEnvEntries) {
+ o.WriteLine ("\t\tpublic IntPtr {0};{1} // {2}", e.Name, new string (' ', maxName - e.Name.Length), e.Prototype);
+ }
+ o.WriteLine ("\t}");
+ o.WriteLine ("#endif // FEATURE_JNIENVIRONMENT_JI_INTPTRS || FEATURE_JNIENVIRONMENT_XA_INTPTRS");
+ o.WriteLine ();
+
+ o.WriteLine ("#if FEATURE_JNIENVIRONMENT_JI_FUNCTION_POINTERS");
+ o.WriteLine ("\t[StructLayout (LayoutKind.Sequential)]");
+ o.WriteLine ("\tunsafe partial struct JNIEnv {");
+
+ for (int i = 0; i < 4; i++)
+ o.WriteLine ("\t\tprivate IntPtr reserved{0}; // void*", i);
+
+ foreach (var e in JNIEnvEntries) {
+ if (e.Parameters.Length > 0 &&
+ "va_list" == e.Parameters [e.Parameters.Length-1].Type.GetManagedType (HandleStyle.JIFunctionPtrWithErrors, isReturn: false, isPinvoke: true)) {
+ o.WriteLine ("\t\tpublic IntPtr {0};{1} // {2}", e.Name, new string (' ', maxName - e.Name.Length), e.Prototype);
+ continue;
+ }
+ o.Write ("\t\tpublic delegate* unmanaged {e.Name};");
+ }
+ o.WriteLine ("\t}");
+ o.WriteLine ("#endif // FEATURE_JNIENVIRONMENT_JI_FUNCTION_POINTERS");
+
+ o.WriteLine ();
+ o.WriteLine ("#pragma warning restore 0169");
+ o.WriteLine ("#pragma warning restore 0649");
+ }
+
+ static string Initialize (JniFunction e, string prefix, string delegateType)
+ {
+ return string.Format ("{0}{1} = ({2}) Marshal.GetDelegateForFunctionPointer (env.{1}, typeof ({2}));",
+ prefix, e.Name, delegateType);
+ }
+
+ static void GenerateJniNativeInterfaceInvoker (TextWriter o, HandleStyle style)
+ {
+ o.WriteLine ("\tpartial class JniEnvironmentInvoker {");
+ o.WriteLine ();
+ o.WriteLine ("\t\tinternal JniNativeInterfaceStruct env;");
+ o.WriteLine ();
+ o.WriteLine ("\t\tpublic unsafe JniEnvironmentInvoker (JniNativeInterfaceStruct* p)");
+ o.WriteLine ("\t\t{");
+ o.WriteLine ("\t\t\tenv = *p;");
+
+ foreach (var e in JNIEnvEntries) {
+ if (!e.Prebind)
+ continue;
+ var d = e.GetDelegateTypeName (style);
+ if (e.GetDelegateTypeName (style) == null)
+ continue;
+ o.WriteLine ("\t\t\t{0}", Initialize (e, "", d));
+ }
+
+ o.WriteLine ("\t\t}");
+ o.WriteLine ();
+
+ foreach (var e in JNIEnvEntries) {
+ var d = e.GetDelegateTypeName (style);
+ if (d == null)
+ continue;
+ o.WriteLine ();
+ if (e.Prebind)
+ o.WriteLine ("\t\tpublic readonly {0} {1};{2}", d, e.Name, Environment.NewLine);
+ else {
+ o.WriteLine ("\t\t{0}? _{1};", d, e.Name);
+ o.WriteLine ("\t\tpublic {0} {1} {{", d, e.Name);
+ o.WriteLine ("\t\t\tget {");
+ o.WriteLine ("\t\t\t\tif (_{0} == null){2}\t\t\t\t\t{1}", e.Name, Initialize (e, "_", d), Environment.NewLine);
+ o.WriteLine ("\t\t\t\treturn _{0};{1}\t\t\t}}", e.Name, Environment.NewLine);
+ o.WriteLine ("\t\t}");
+ }
+ }
+
+ o.WriteLine ("\t}");
+ }
+
+
+ static HashSet created_delegates = new HashSet ();
+
+ static void CreateDelegate (TextWriter o, JniFunction entry, HandleStyle style)
+ {
+ StringBuilder builder = new StringBuilder ();
+ bool has_char_array = false;
+
+ string name = entry.GetDelegateTypeName (style);
+ if (name == null)
+ return;
+
+ builder.AppendFormat ("\tunsafe delegate {0} {1} ({2} env", entry.GetMarshalReturnType (style), name, GetJniEnvironmentPointerType (style));
+ for (int i = 0; i < entry.Parameters.Length; i++) {
+ if (i >= 0) {
+ builder.Append (", ");
+ builder.AppendFormat ("{0} {1}",
+ entry.Parameters [i].Type.GetMarshalType (style, isReturn: false, isPinvoke: true),
+ Escape (entry.Parameters [i].Name));
+ }
+
+ var ptype = entry.Parameters [i].Type.GetManagedType (style, isReturn: false, isPinvoke: true);
+ if (ptype == "va_list")
+ return;
+ if (ptype == "char[]")
+ has_char_array = true;
+ }
+ builder.Append (");");
+
+ if (created_delegates.Contains (name))
+ return;
+
+ created_delegates.Add (name);
+ if (entry.Name == "NewString" || has_char_array)
+ o.WriteLine ("\t[UnmanagedFunctionPointerAttribute (CallingConvention.Cdecl, CharSet=CharSet.Unicode)]");
+ o.WriteLine (builder.ToString ());
+ }
+
+ static string GetJniEnvironmentPointerType (HandleStyle style)
+ {
+ return "JNIEnvPtr";
+ }
+
+ static void GenerateTypes (TextWriter o, HandleStyle style)
+ {
+ if (style == HandleStyle.JIIntPtrPinvokeWithErrors) {
+ GenerateNativeMethods (o, style);
+ }
+ if (style == HandleStyle.JIFunctionPtrWithErrors) {
+ GenerateJniNativeMethods (o, style);
+ }
+
+ var visibilities = new Dictionary {
+ { ArrayOperationsCategory, "public" },
+ { ClassesCategory, "public" },
+ { ExceptionsCategory, "public" },
+ { InstanceFieldsCategory, "public" },
+ { InstanceMethodsCategory, "public" },
+ { MonitorOperationsCategory, "public" },
+ { NIOSupportCategory, "public" },
+ { ObjectOperationsCategory, "public" },
+ { ReferencesCatgeory, "public" },
+ { StaticFieldsCategory, "public" },
+ { StaticMethodsCategory, "public" },
+ { StringOperationsCategory, "public" },
+ };
+ o.WriteLine ("\tpartial class JniEnvironment {");
+ foreach (var t in JNIEnvEntries
+ .Select (e => e.DeclaringType ?? "JniEnvironment")
+ .Distinct ()
+ .OrderBy (t => t)) {
+ string visibility;
+ if (!visibilities.TryGetValue (t, out visibility))
+ visibility = "internal";
+ GenerateJniEnv (o, t, visibility, style);
+ }
+ o.WriteLine ("\t}");
+ }
+
+ static void GenerateNativeMethods (TextWriter o, HandleStyle style)
+ {
+ o.WriteLine ("\tstatic partial class NativeMethods {");
+ o.WriteLine ();
+ o.WriteLine ("\t\tconst string JavaInteropLib = \"java-interop\";");
+ foreach (var entry in JNIEnvEntries) {
+ if (entry.Parameters == null)
+ continue;
+ if (entry.IsPrivate || entry.CustomWrapper)
+ continue;
+
+ o.WriteLine ();
+ o.WriteLine ("\t\t[DllImport (JavaInteropLib, CallingConvention=CallingConvention.Cdecl, CharSet=CharSet.Ansi)]");
+ o.WriteLine ("\t\tinternal static extern unsafe {0} {1} (IntPtr jnienv{2}{3}{4});",
+ entry.ReturnType.GetMarshalType (style, isReturn: true, isPinvoke: true),
+ GetPinvokeName (entry.Name),
+ entry.Throws ? ", out IntPtr thrown" : "",
+ entry.Parameters.Length != 0 ? ", " : "",
+ string.Join (", ", entry.Parameters.Select (p => string.Format ("{0} {1}", p.Type.GetMarshalType (style, isReturn: false, isPinvoke: true), Escape (p.Name)))));
+ }
+ o.WriteLine ("\t}");
+ o.WriteLine ();
+ }
+
+ static void GenerateJniNativeMethods (TextWriter o, HandleStyle style)
+ {
+ o.WriteLine ("\tstatic partial class JniNativeMethods {");
+ o.WriteLine ();
+ foreach (var entry in JNIEnvEntries) {
+ if (entry.Parameters == null)
+ continue;
+ if (entry.IsPrivate || entry.CustomWrapper)
+ continue;
+
+ var returnType = entry.ReturnType.GetMarshalType (HandleStyle.JIFunctionPtrWithErrors, isReturn: true, isPinvoke: true);
+
+ o.WriteLine ();
+ o.WriteLine ("\t\t[System.Runtime.CompilerServices.MethodImpl (System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]");
+ o.Write ("\t\tinternal static unsafe ");
+ o.Write (entry.ReturnType.GetMarshalType (HandleStyle.JIFunctionPtrWithErrors, isReturn: true, isPinvoke: true));
+ o.Write ($" {entry.Name} (IntPtr env");
+ foreach (var p in entry.Parameters) {
+ o.Write (", ");
+ o.Write (p.Type.GetMarshalType (HandleStyle.JIFunctionPtrWithErrors, isReturn: false, isPinvoke: true));
+ o.Write ($" {Escape (p.Name)}");
+ }
+ o.WriteLine (")");
+ o.WriteLine ("\t\t{");
+ o.Write ("\t\t\t");
+ if (returnType != "void") {
+ o.Write ("return ");
+ }
+ o.Write ($"(*((JNIEnv**)env))->{entry.Name} (env");
+ foreach (var p in entry.Parameters) {
+ o.Write (", ");
+ o.Write (Escape (p.Name));
+ }
+ o.WriteLine (");");
+ o.WriteLine ("\t\t}");
+ }
+ o.WriteLine ("\t}");
+ o.WriteLine ();
+ }
+
+ static string GetPinvokeName (string name)
+ {
+ var sb = new StringBuilder ("java_interop_jnienv_".Length + name.Length * 2);
+ sb.Append ("java_interop_jnienv");
+ var uc = false;
+ foreach (var c in name) {
+ if (!uc && char.IsUpper (c)) {
+ sb.Append ("_");
+ uc = true;
+ } else {
+ uc = false;
+ }
+ sb.Append (char.ToLower (c));
+ }
+ return sb.ToString ();
+ }
+
+ static void GenerateJniEnv (TextWriter o, string type, string visibility, HandleStyle style)
+ {
+ o.WriteLine ();
+
+ o.WriteLine ("\t{0} static partial class {1} {{", visibility, type);
+ foreach (JniFunction entry in JNIEnvEntries) {
+ if ((entry.DeclaringType ?? "JniEnvironment") != type)
+ continue;
+ if (entry.Parameters == null)
+ continue;
+ if (entry.IsPrivate || entry.CustomWrapper)
+ continue;
+
+ o.WriteLine ();
+ o.Write ("\t\t{2} static unsafe {0} {1} (", entry.GetManagedReturnType (style), entry.ApiName, entry.Visibility);
+ switch (entry.ApiName) {
+ default:
+ bool is_void = entry.ReturnType.JniType == "void";
+ for (int i = 0; i < entry.Parameters.Length; i++) {
+ if (i > 0)
+ o.Write (", ");
+ o.Write ("{0} {1}", entry.Parameters [i].Type.GetManagedType (style, isReturn: false), Escape (entry.Parameters [i].Name));
+ }
+ o.WriteLine (")");
+ o.WriteLine ("\t\t{");
+ NullCheckParameters (o, entry.Parameters, style);
+ PrepareParameters (o, entry.Parameters, style);
+ if (style == HandleStyle.JIIntPtrPinvokeWithErrors) {
+ if (entry.Throws)
+ o.WriteLine ("\t\t\tIntPtr thrown;");
+ } else if (style == HandleStyle.JIFunctionPtrWithErrors) {
+ o.WriteLine ($"\t\t\tIntPtr __env = JniEnvironment.EnvironmentPointer;");
+ } else {
+ o.WriteLine ("\t\t\tvar __info = JniEnvironment.CurrentInfo;");
+ }
+ o.Write ("\t\t\t");
+ if (!is_void)
+ o.Write ("var tmp = ");
+ if (style == HandleStyle.JIIntPtrPinvokeWithErrors) {
+ o.Write ("NativeMethods.{0} (JniEnvironment.EnvironmentPointer{1}",
+ GetPinvokeName (entry.Name),
+ entry.Throws ? ", out thrown" : "");
+ } else if (style == HandleStyle.JIFunctionPtrWithErrors) {
+ o.Write ($"JniNativeMethods.{entry.Name} (__env");
+ } else {
+ o.Write ("__info.Invoker.{0} (__info.EnvironmentPointer", entry.Name);
+ }
+ for (int i = 0; i < entry.Parameters.Length; i++) {
+ var p = entry.Parameters [i];
+ o.Write (", ");
+ var needOut = p.Type.GetManagedType (style, isReturn: false).StartsWith ("out ", StringComparison.Ordinal);
+ if (needOut && style == HandleStyle.JIFunctionPtrWithErrors) {
+ o.Write ("&");
+ } else if (needOut) {
+ o.Write ("out ");
+ }
+ o.Write (p.Type.GetManagedToMarshalExpression (style, Escape (entry.Parameters [i].Name)));
+ }
+ o.WriteLine (");");
+ if (style == HandleStyle.JIFunctionPtrWithErrors && entry.Throws) {
+ o.WriteLine ("\t\t\tIntPtr thrown = JniNativeMethods.ExceptionOccurred (__env);");
+ }
+ CleanupParameters (o, entry.Parameters, style);
+ RaiseException (o, entry, style);
+ if (is_void) {
+ } else {
+ foreach (var line in entry.ReturnType.GetHandleCreationLogStatements (style, entry.Name, "tmp"))
+ o.WriteLine ("\t\t\t{0}", line);
+ foreach (var line in entry.ReturnType.GetMarshalToManagedStatements (style, "tmp", entry))
+ o.WriteLine ("\t\t\t{0}", line);
+ }
+ break;
+ }
+
+ o.WriteLine ("\t\t}");
+ }
+ o.WriteLine ("\t}");
+ }
+
+ static void NullCheckParameters (TextWriter o, ParamInfo[] ps, HandleStyle style)
+ {
+ bool haveChecks = false;
+ for (int i = 0; i < ps.Length; i++) {
+ var p = ps [i];
+ if (p.CanBeNull)
+ continue;
+ var pn = Escape (p.Name);
+ foreach (var line in p.Type.VerifyParameter (style, pn)) {
+ haveChecks = true;
+ o.WriteLine ("\t\t\t{0}", line);
+ }
+ }
+ if (haveChecks)
+ o.WriteLine ();
+ }
+
+ static void PrepareParameters (TextWriter o, ParamInfo[] ps, HandleStyle style)
+ {
+ bool haveChecks = false;
+ foreach (var e in ps) {
+ foreach (var s in e.Type.GetManagedToMarshalPrepareStatements (style, Escape (e.Name))) {
+ haveChecks = true;
+ o.WriteLine ($"\t\t\t{s}");
+ }
+ }
+ if (haveChecks)
+ o.WriteLine ();
+ }
+
+ static void CleanupParameters (TextWriter o, ParamInfo[] ps, HandleStyle style)
+ {
+ foreach (var e in ps) {
+ foreach (var s in e.Type.GetManagedToMarshalCleanupStatements (style, Escape (e.Name))) {
+ o.WriteLine ($"\t\t\t{s}");
+ }
+ }
+ }
+
+ static void RaiseException (TextWriter o, JniFunction entry, HandleStyle style)
+ {
+ if (!entry.Throws)
+ return;
+
+ o.WriteLine ();
+ o.WriteLine ("\t\t\tException? __e = JniEnvironment.GetExceptionForLastThrowable ({0});",
+ (style == HandleStyle.JIIntPtrPinvokeWithErrors || style == HandleStyle.JIFunctionPtrWithErrors)
+ ? "thrown"
+ : "");
+ o.WriteLine ("\t\t\tif (__e != null)");
+ o.WriteLine ("\t\t\t\tExceptionDispatchInfo.Capture (__e).Throw ();");
+ o.WriteLine ();
+ }
+
+ static void WriteNativeFileHeader (TextWriter o)
+ {
+ o.WriteLine ("/*");
+ o.WriteLine (" * Generated file; DO NOT EDIT!");
+ o.WriteLine (" *");
+ o.WriteLine (" * To make changes, edit Java.Interop/build-tools/jnienv-gen and rerun");
+ o.WriteLine (" */");
+ o.WriteLine ();
+ }
+
+ static void GenerateNativeLibSource (TextWriter source, TextWriter header, string headerName)
+ {
+ WriteNativeFileHeader (source);
+ WriteNativeFileHeader (header);
+
+ header.WriteLine ("#if !defined (__JAVA_INTEROP_NATIVE_H)");
+ header.WriteLine ("#define __JAVA_INTEROP_NATIVE_H");
+ header.WriteLine ();
+ header.WriteLine ("#include ");
+ header.WriteLine ();
+ header.WriteLine ("typedef jmethodID jstaticmethodID;");
+ header.WriteLine ("typedef jfieldID jstaticfieldID;");
+ header.WriteLine ("typedef jobject jglobal;");
+ header.WriteLine ();
+ header.WriteLine ("#if !defined(JI_NO_VISIBILITY)");
+ header.WriteLine ("\t/* VS 2010 and later have stdint.h */");
+ header.WriteLine ("\t#if defined(_MSC_VER)");
+ header.WriteLine ();
+ header.WriteLine ("\t\t#define JI_API_EXPORT __declspec(dllexport)");
+ header.WriteLine ("\t\t#define JI_API_IMPORT __declspec(dllimport)");
+ header.WriteLine ();
+ header.WriteLine ("\t#else /* defined(_MSC_VER */");
+ header.WriteLine ();
+ header.WriteLine ("\t\t#define JI_API_EXPORT __attribute__ ((visibility (\"default\")))");
+ header.WriteLine ("\t\t#define JI_API_IMPORT");
+ header.WriteLine ();
+ header.WriteLine ("\t#endif /* !defined(_MSC_VER) */");
+ header.WriteLine ();
+ header.WriteLine ("\t#if defined(JI_DLL_EXPORT)");
+ header.WriteLine ("\t\t#define JI_API JI_API_EXPORT");
+ header.WriteLine ("\t#elif defined(JI_DLL_IMPORT)");
+ header.WriteLine ("\t\t#define JI_API JI_API_IMPORT");
+ header.WriteLine ("\t#else /* !defined(JI_DLL_IMPORT) && !defined(JI_API_IMPORT) */");
+ header.WriteLine ("\t\t#define JI_API");
+ header.WriteLine ("\t#endif /* JI_DLL_EXPORT... */");
+ header.WriteLine ("#else // JI_NO_VISIBILITY");
+ header.WriteLine ("\t#define JI_API");
+ header.WriteLine ("#endif // JI_NO_VISIBILITY");
+ header.WriteLine ();
+
+ if (headerName != "-") {
+ source.WriteLine ($"#include \"{Path.GetFileName(headerName)}\"");
+ }
+
+ foreach (JniFunction entry in JNIEnvEntries) {
+ if (entry.IsPrivate || entry.CustomWrapper)
+ continue;
+
+ header.WriteLine (
+ "JI_API {0} {1} (JNIEnv *env{2}{3}{4});",
+ entry.ReturnType.JniType,
+ GetPinvokeName (entry.Name),
+ entry.Throws ? ", jthrowable *_thrown" : "",
+ entry.Parameters.Length != 0 ? ", " : "",
+ string.Join (", ", entry.Parameters.Select (p => string.Format ("{0} {1}", p.Type.JniType, p.Name)))
+ );
+
+ source.WriteLine ();
+ source.WriteLine ("JI_API {0}", entry.ReturnType.JniType);
+ source.WriteLine ("{0} (JNIEnv *env{1}{2}{3})",
+ GetPinvokeName (entry.Name),
+ entry.Throws ? ", jthrowable *_thrown" : "",
+ entry.Parameters.Length != 0 ? ", " : "",
+ string.Join (", ", entry.Parameters.Select (p => string.Format ("{0} {1}", p.Type.JniType, p.Name))));
+ source.WriteLine ("{");
+ bool isVoid = entry.ReturnType.JniType == "void";
+ if (entry.Throws)
+ source.WriteLine ("\t*_thrown = 0;");
+ source.Write ("\t");
+ if (!isVoid)
+ source.Write ("{0} _r_ = ", entry.ReturnType.JniType);
+ source.WriteLine ("(*env)->{0} (env{1}{2});",
+ entry.Name,
+ entry.Parameters.Length != 0 ? ", " : "",
+ string.Join (", ", entry.Parameters.Select (p => p.Name)));
+ if (entry.Throws)
+ source.WriteLine ("\t*_thrown = (*env)->ExceptionOccurred (env);");
+ if (!isVoid)
+ source.WriteLine ("\treturn _r_;");
+ source.WriteLine ("}");
+ }
+
+ header.WriteLine ();
+ header.WriteLine ("#endif // __JAVA_INTEROP_NATIVE_H");
+ }
+ }
+
+ class JniFunction {
+
+ public string DeclaringType;
+
+ // The java name
+ public string Name;
+
+ // The name of the property/method we will generate. Defaults to the (java) name.
+ private string api_name;
+ public string ApiName
+ {
+ get { return api_name ?? Name; }
+ set { api_name = value; }
+ }
+
+ // The C prototype that we are binding (for diagnostic purposes)
+ public string Prototype;
+
+ public TypeInfo ReturnType;
+ public ParamInfo [] Parameters;
+
+ // If true, then we initialize the binding on the static ctor, we dont lazy-define it
+ public bool Prebind = false;
+
+ // If there is a custom wrapper in JNIEnv (so an automatic one shouldn't be generated)
+ public bool CustomWrapper = false;
+
+ // If the JNI function can throw an exception (ExceptionOccurred needs to be invoked)
+ public bool Throws;
+
+ private string visibility;
+ public string Visibility {
+ get {
+ if (visibility == null)
+ return "public";
+ return visibility;
+ }
+ set {
+ visibility = value;
+ }
+ }
+
+ public bool IsPublic { get { return Visibility == "public"; } }
+ public bool IsPrivate { get { return visibility == "private"; } }
+
+ public string GetManagedReturnType (HandleStyle style)
+ {
+ if (ReturnType == null)
+ return "void";
+ return ReturnType.GetManagedType (style, isReturn:true);
+ }
+
+ public string GetMarshalReturnType (HandleStyle style)
+ {
+ if (ReturnType == null)
+ return "void";
+ return ReturnType.GetMarshalType (style, isReturn:true);
+ }
+
+ public string GetDelegateTypeName (HandleStyle style)
+ {
+ StringBuilder name = new StringBuilder ();
+
+ if (ReturnType == null || ReturnType.JniType == "void")
+ name.Append ("JniAction_");
+ else
+ name.Append ("JniFunc_");
+ name.Append ("JNIEnvPtr");
+ for (int i = 0; i < Parameters.Length; i++) {
+ var pt = Parameters [i].Type.GetMarshalType (style, isReturn: false);
+ if (pt == "va_list")
+ return null;
+
+ name.AppendFormat ("_").Append (pt.FixupType ());
+ }
+
+ string rt = GetMarshalReturnType (style);
+ if (rt != "void")
+ name.Append ("_").Append (rt.FixupType ());
+
+ return name.ToString ();
+ }
+ }
+
+ abstract class TypeInfo
+ {
+ static readonly Dictionary types = new Dictionary () {
+ { "jvalue*", new BuiltinTypeInfo ("jvalue*", "JniArgumentValue*") },
+ { "jbyte", new BuiltinTypeInfo ("jbyte", "sbyte") },
+ { "jchar", new BuiltinTypeInfo ("jchar", "char") },
+ { "jchar*", new BuiltinTypeInfo ("jchar*", "char*") },
+ { "jshort", new BuiltinTypeInfo ("jshort", "short") },
+ { "jsize", new BuiltinTypeInfo ("jsize", "int") },
+ { "jint", new BuiltinTypeInfo ("jint", "int") },
+ { "jlong", new BuiltinTypeInfo ("jlong", "long") },
+ { "jfloat", new BuiltinTypeInfo ("jfloat", "float") },
+ { "jdouble", new BuiltinTypeInfo ("jdouble", "double") },
+ { "jboolean", new BooleanTypeInfo ("jboolean") },
+ { "void*", new BuiltinTypeInfo ("void*", "IntPtr") },
+ { "const jchar*", new StringTypeInfo ("const jchar*") },
+ { "const char*", new StringTypeInfo ("const char*") },
+ { "const JNINativeMethod*", new BuiltinTypeInfo ("const JNINativeMethod*", "JniNativeMethodRegistration []") },
+ { "jobjectRefType", new BuiltinTypeInfo ("jobjectRefType", "JniObjectReferenceType") },
+ { "jfieldID", new InstanceFieldTypeInfo ("jfieldID") },
+ { "jstaticfieldID", new StaticFieldTypeInfo ("jstaticfieldID") },
+ { "jmethodID", new InstanceMethodTypeInfo ("jmethodID") },
+ { "jstaticmethodID", new StaticMethodTypeInfo ("jstaticmethodID") },
+ { "jstring", new LocalReferenceTypeInfo ("jstring") },
+ { "jarray", new LocalReferenceTypeInfo ("jarray") },
+ { "jobject", new LocalReferenceTypeInfo ("jobject") },
+ { "jthrowable", new LocalReferenceTypeInfo ("jthrowable") },
+ { "jclass", new LocalReferenceTypeInfo ("jclass") },
+ { "jweak", new WeakGlobalReferenceTypeInfo ("jweak") },
+ { "jglobal", new GlobalReferenceTypeInfo ("jglobal") },
+ { "JavaVM**", new JavaVMPointerTypeInfo ("JavaVM**") },
+ { "JniReleaseArrayElementsMode", new JniReleaseArrayElementsModeTypeInfo () },
+ };
+
+ static readonly Dictionary pointerMapping = new Dictionary {
+ { "jboolean*", "bool*" },
+ { "jbyte*", "sbyte*" },
+ { "jchar*", "char*" },
+ { "jdouble*", "double*" },
+ { "jfloat*", "float*" },
+ { "jint*", "int*" },
+ { "jlong*", "long*" },
+ { "jshort*", "short*" },
+ };
+
+ public static TypeInfo Create (string type, string managedType = null)
+ {
+ if (managedType != null)
+ return new BuiltinTypeInfo (type, managedType);
+ TypeInfo t;
+ if (types.TryGetValue (type, out t))
+ return t;
+ if (type.EndsWith ("Array", StringComparison.Ordinal))
+ return new ArrayTypeInfo (type);
+ string p;
+ if (pointerMapping.TryGetValue (type, out p))
+ return new BuiltinTypeInfo (type, p);
+ if (type.EndsWith ("*", StringComparison.Ordinal))
+ return new BuiltinTypeInfo (type, "IntPtr");
+ return new BuiltinTypeInfo (type, type);
+ }
+
+ public static implicit operator TypeInfo (string jniType)
+ {
+ return Create (jniType);
+ }
+
+ public readonly string JniType;
+
+ protected TypeInfo (string jniType)
+ {
+ JniType = jniType;
+ }
+
+ public abstract string GetMarshalType (HandleStyle style, bool isReturn, bool isPinvoke = false);
+ public abstract string GetManagedType (HandleStyle style, bool isReturn, bool isPinvoke = false);
+
+ public virtual string[] GetHandleCreationLogStatements (HandleStyle style, string method, string variable)
+ {
+ return new string [0];
+ }
+
+ public virtual string GetManagedToMarshalExpression (HandleStyle style, string variable)
+ {
+ return variable;
+ }
+
+ public virtual string[] GetMarshalToManagedStatements (HandleStyle style, string variable, JniFunction entry)
+ {
+ return new[] {
+ string.Format ("return {0};", variable),
+ };
+ }
+
+ public virtual string[] VerifyParameter (HandleStyle style, string variable)
+ {
+ return new string [0];
+ }
+
+ public virtual string[] GetManagedToMarshalPrepareStatements (HandleStyle style, string variable) => Array.Empty ();
+ public virtual string[] GetManagedToMarshalCleanupStatements (HandleStyle style, string variable) => Array.Empty ();
+ }
+
+ class BuiltinTypeInfo : TypeInfo {
+
+ ///
+ /// NOTE: .NET framework can't marshal this
+ ///
+ const string JniArgumentValue = "JniArgumentValue*";
+ string managed;
+
+ public BuiltinTypeInfo (string jni, string managed)
+ : base (jni)
+ {
+ this.managed = managed;
+ }
+
+ public override string GetMarshalType (HandleStyle style, bool isReturn, bool isPinvoke)
+ {
+ if (isPinvoke && managed == JniArgumentValue) {
+ return "IntPtr";
+ }
+ return managed;
+ }
+
+ public override string GetManagedType (HandleStyle style, bool isReturn, bool isPinvoke)
+ {
+ if (isPinvoke && managed == JniArgumentValue) {
+ return "IntPtr";
+ }
+ return managed;
+ }
+
+ public override string GetManagedToMarshalExpression (HandleStyle style, string variable)
+ {
+ var value = base.GetManagedToMarshalExpression (style, variable);
+ if (managed == JniArgumentValue) {
+ value = "(IntPtr) " + value;
+ }
+ return value;
+ }
+
+ public override string[] VerifyParameter (HandleStyle style, string variable)
+ {
+ if (managed != "IntPtr")
+ return new string [0];
+ var variableName = variable.StartsWith ("@", StringComparison.Ordinal)
+ ? variable.Substring (1)
+ : variable;
+ return new[] {
+ string.Format ("if ({0} == IntPtr.Zero)", variable),
+ string.Format ("\tthrow new ArgumentException (\"'{0}' must not be IntPtr.Zero.\", \"{0}\");", variableName),
+ };
+ }
+ }
+
+ class BooleanTypeInfo : TypeInfo {
+
+ public BooleanTypeInfo (string jni)
+ : base (jni)
+ {
+ }
+
+ public override string GetMarshalType (HandleStyle style, bool isReturn, bool isPinvoke)
+ {
+ return "byte";
+ }
+
+ public override string GetManagedType (HandleStyle style, bool isReturn, bool isPinvoke)
+ {
+ return "bool";
+ }
+
+ public override string[] GetMarshalToManagedStatements (HandleStyle style, string variable, JniFunction entry)
+ {
+ return new string[] {
+ string.Format ("return ({0} != 0) ? true : false;", variable),
+ };
+ }
+
+ public override string GetManagedToMarshalExpression (HandleStyle style, string variable)
+ {
+ return string.Format ("({0} ? (byte) 1 : (byte) 0)", variable);
+ }
+ }
+
+ class StringTypeInfo : TypeInfo {
+
+ public StringTypeInfo (string jni)
+ : base (jni)
+ {
+ }
+
+ public override string GetMarshalType (HandleStyle style, bool isReturn, bool isPinvoke)
+ {
+ if (style == HandleStyle.JIFunctionPtrWithErrors && isPinvoke) {
+ return "IntPtr";
+ }
+ return "string";
+ }
+
+ public override string GetManagedType (HandleStyle style, bool isReturn, bool isPinvoke)
+ {
+ return "string";
+ }
+
+ public override string GetManagedToMarshalExpression (HandleStyle style, string variable)
+ {
+ switch (style) {
+ case HandleStyle.JIFunctionPtrWithErrors:
+ return $"_{variable}_ptr";
+ default:
+ return variable;
+ }
+ }
+
+ public override string[] GetMarshalToManagedStatements (HandleStyle style, string variable, JniFunction entry)
+ {
+ switch (style) {
+ case HandleStyle.XAIntPtr:
+ return new [] {
+ string.Format ("JniEnvironment.LogCreateLocalRef ({0});", variable),
+ string.Format ("return {0};", variable),
+ };
+ case HandleStyle.JIIntPtr:
+ case HandleStyle.JIIntPtrPinvokeWithErrors:
+ case HandleStyle.JIFunctionPtrWithErrors:
+ return new [] {
+ string.Format ("JniEnvironment.LogCreateLocalRef ({0});", variable),
+ string.Format ("return new JniObjectReference ({0}, JniObjectReferenceType.Local);", variable),
+ };
+ }
+ return null;
+ }
+
+ public override string[] VerifyParameter (HandleStyle style, string variable)
+ {
+ var variableName = variable.StartsWith ("@", StringComparison.Ordinal)
+ ? variable.Substring (1)
+ : variable;
+ return new[] {
+ string.Format ("if ({0} == null)", variable),
+ string.Format ("\tthrow new ArgumentNullException (\"{0}\");", variableName),
+ };
+ }
+
+ public override string[] GetManagedToMarshalPrepareStatements (HandleStyle style, string variable)
+ {
+ switch (style) {
+ case HandleStyle.JIFunctionPtrWithErrors:
+ return new[]{
+ $"var _{variable}_ptr = Marshal.StringToCoTaskMemUTF8 ({variable});",
+ };
+ default:
+ return base.GetManagedToMarshalPrepareStatements (style, variable);
+ }
+ }
+
+ public override string[] GetManagedToMarshalCleanupStatements (HandleStyle style, string variable)
+ {
+ switch (style) {
+ case HandleStyle.JIFunctionPtrWithErrors:
+ return new[]{
+ $"Marshal.ZeroFreeCoTaskMemUTF8 (_{variable}_ptr);",
+ };
+ default:
+ return base.GetManagedToMarshalCleanupStatements (style, variable);
+ }
+ }
+ }
+
+ class JniReleaseArrayElementsModeTypeInfo : TypeInfo {
+
+ public JniReleaseArrayElementsModeTypeInfo ()
+ : base ("jint")
+ {
+ }
+
+ public override string GetMarshalType (HandleStyle style, bool isReturn, bool isPinvoke)
+ {
+ return "int";
+ }
+
+ public override string GetManagedType (HandleStyle style, bool isReturn, bool isPinvoke)
+ {
+ return "JniReleaseArrayElementsMode";
+ }
+
+ public override string[] GetMarshalToManagedStatements (HandleStyle style, string variable, JniFunction entry)
+ {
+ return new string[] {
+ string.Format ("return (JniReleaseArrayElementsMode) {0};", variable),
+ };
+ }
+
+ public override string GetManagedToMarshalExpression (HandleStyle style, string variable)
+ {
+ return string.Format ("((int) {0})", variable);
+ }
+ }
+
+ class ArrayTypeInfo : LocalReferenceTypeInfo {
+
+ public ArrayTypeInfo (string jni)
+ : base (jni)
+ {
+ }
+ }
+
+ class IdTypeInfo : TypeInfo {
+
+ string type;
+
+ public IdTypeInfo (string jni, string type)
+ : base (jni)
+ {
+ this.type = type;
+ }
+
+ public override string GetMarshalType (HandleStyle style, bool isReturn, bool isPinvoke)
+ {
+ return "IntPtr";
+ }
+
+ public override string GetManagedType (HandleStyle style, bool isReturn, bool isPinvoke)
+ {
+ switch (style) {
+ case HandleStyle.JIIntPtr:
+ case HandleStyle.JIIntPtrPinvokeWithErrors:
+ case HandleStyle.JIFunctionPtrWithErrors:
+ return type;
+ case HandleStyle.XAIntPtr:
+ return "IntPtr";
+ }
+ return "TODO_" + style;;
+ }
+
+ public override string GetManagedToMarshalExpression (HandleStyle style, string variable)
+ {
+ switch (style) {
+ case HandleStyle.JIIntPtr:
+ case HandleStyle.JIIntPtrPinvokeWithErrors:
+ case HandleStyle.JIFunctionPtrWithErrors:
+ return string.Format ("{0}.ID", variable);
+ }
+ return variable;
+ }
+
+ public override string[] VerifyParameter (HandleStyle style, string variable)
+ {
+ var variableName = variable.StartsWith ("@", StringComparison.Ordinal)
+ ? variable.Substring (1)
+ : variable;
+ switch (style) {
+ case HandleStyle.JIIntPtr:
+ case HandleStyle.JIIntPtrPinvokeWithErrors:
+ case HandleStyle.JIFunctionPtrWithErrors:
+ return new [] {
+ string.Format ("if ({0} == null)", variable),
+ string.Format ("\tthrow new ArgumentNullException (\"{0}\");", variableName),
+ string.Format ("if (!{0}.IsValid)", variable),
+ string.Format ("\tthrow new ArgumentException (\"Handle value is not valid.\", \"{0}\");", variableName),
+ string.Format ("System.Diagnostics.Debug.Assert ({0}{1}.IsStatic);", IsStatic ? "" : "!", variableName),
+ };
+ case HandleStyle.XAIntPtr:
+ return new[] {
+ string.Format ("if ({0} == IntPtr.Zero)", variable),
+ string.Format ("\tthrow new ArgumentException (\"Handle value cannot be null.\", \"{0}\");", variableName),
+ };
+ }
+ return new string [0];
+ }
+
+ public override string[] GetMarshalToManagedStatements (HandleStyle style, string variable, JniFunction entry)
+ {
+ switch (style) {
+ case HandleStyle.JIIntPtr:
+ case HandleStyle.JIIntPtrPinvokeWithErrors:
+ case HandleStyle.JIFunctionPtrWithErrors:
+ return new[] {
+ string.Format ("if ({0} == IntPtr.Zero)", variable),
+ string.Format ($"\tthrow new InvalidOperationException (\"Should not be reached; `{entry.Name}` should have thrown!\");"),
+ string.Format ("return new {0} ({1}, {2}, {3}, isStatic: {4});", type, entry.Parameters [1].Name, entry.Parameters [2].Name, variable, IsStatic ? "true" : "false"),
+ };
+ case HandleStyle.XAIntPtr:
+ return new[]{
+ string.Format ("return {0};", variable),
+ };
+ }
+ return new string [0];
+ }
+
+ protected virtual bool IsStatic {
+ get {return false;}
+ }
+ }
+
+ class InstanceFieldTypeInfo : IdTypeInfo {
+
+ public InstanceFieldTypeInfo (string jni)
+ : base (jni, "JniFieldInfo")
+ {
+ }
+ }
+
+ class InstanceMethodTypeInfo : IdTypeInfo {
+
+ public InstanceMethodTypeInfo (string jni)
+ : base (jni, "JniMethodInfo")
+ {
+ }
+ }
+
+ class StaticFieldTypeInfo : IdTypeInfo {
+
+ public StaticFieldTypeInfo (string jni)
+ : base (jni, "JniFieldInfo")
+ {
+ }
+
+ protected override bool IsStatic {
+ get {return true;}
+ }
+ }
+
+ class StaticMethodTypeInfo : IdTypeInfo {
+
+ public StaticMethodTypeInfo (string jni)
+ : base (jni, "JniMethodInfo")
+ {
+ }
+
+ protected override bool IsStatic {
+ get {return true;}
+ }
+ }
+
+ abstract class ObjectReferenceTypeInfo : TypeInfo {
+
+ string refType;
+
+ public ObjectReferenceTypeInfo (string jni, string refType)
+ : base (jni)
+ {
+ this.refType = refType;
+ }
+
+ public override string GetMarshalType (HandleStyle style, bool isReturn, bool isPinvoke)
+ {
+ switch (style) {
+ case HandleStyle.JIIntPtr:
+ case HandleStyle.JIIntPtrPinvokeWithErrors:
+ case HandleStyle.JIFunctionPtrWithErrors:
+ case HandleStyle.XAIntPtr:
+ return "jobject";
+ }
+ return null;
+ }
+
+ public override string GetManagedType (HandleStyle style, bool isReturn, bool isPinvoke)
+ {
+ switch (style) {
+ case HandleStyle.JIIntPtr:
+ case HandleStyle.JIIntPtrPinvokeWithErrors:
+ case HandleStyle.JIFunctionPtrWithErrors:
+ return "JniObjectReference";
+ case HandleStyle.XAIntPtr:
+ return "IntPtr";
+ }
+ return "TODO";
+ }
+
+ public override string GetManagedToMarshalExpression (HandleStyle style, string variable)
+ {
+ switch (style) {
+ case HandleStyle.JIIntPtr:
+ case HandleStyle.JIIntPtrPinvokeWithErrors:
+ case HandleStyle.JIFunctionPtrWithErrors:
+ return string.Format ("{0}.Handle", variable);
+ case HandleStyle.XAIntPtr:
+ return variable;
+ }
+ return null;
+ }
+
+ public override string[] GetMarshalToManagedStatements (HandleStyle style, string variable, JniFunction entry)
+ {
+ switch (style) {
+ case HandleStyle.JIIntPtr:
+ case HandleStyle.JIIntPtrPinvokeWithErrors:
+ case HandleStyle.JIFunctionPtrWithErrors:
+ return new [] {
+ string.Format ("return new JniObjectReference ({0}, {1});", variable, refType),
+ };
+ case HandleStyle.XAIntPtr:
+ return new[] {
+ string.Format ("return {0};", variable),
+ };
+ }
+ return new string [0];
+ }
+
+ public override string[] VerifyParameter (HandleStyle style, string variable)
+ {
+ var variableName = variable.StartsWith ("@", StringComparison.Ordinal)
+ ? variable.Substring (1)
+ : variable;
+ switch (style) {
+ case HandleStyle.JIIntPtr:
+ case HandleStyle.JIIntPtrPinvokeWithErrors:
+ case HandleStyle.JIFunctionPtrWithErrors:
+ return new [] {
+ string.Format ("if (!{0}.IsValid)", variable),
+ string.Format ("\tthrow new ArgumentException (\"Handle must be valid.\", \"{0}\");", variableName),
+ };
+ case HandleStyle.XAIntPtr:
+ return new [] {
+ string.Format ("if ({0} == IntPtr.Zero)", variable),
+ string.Format ("\tthrow new ArgumentException (\"`{0}` must not be IntPtr.Zero.\", \"{0}\");", variableName),
+ };
+ }
+ return new string [0];
+ }
+ }
+
+ class LocalReferenceTypeInfo : ObjectReferenceTypeInfo {
+
+ public LocalReferenceTypeInfo (string jni)
+ : base (jni, "JniObjectReferenceType.Local")
+ {
+ }
+
+ public override string[] GetHandleCreationLogStatements (HandleStyle style, string method, string variable)
+ {
+ if (method == "NewLocalRef" || method == "ExceptionOccurred")
+ return base.GetHandleCreationLogStatements (style, method, variable);
+ return new[] {
+ string.Format ("JniEnvironment.LogCreateLocalRef ({0});", variable),
+ };
+ }
+ }
+
+ class WeakGlobalReferenceTypeInfo : ObjectReferenceTypeInfo {
+
+ public WeakGlobalReferenceTypeInfo (string jni)
+ : base (jni, "JniObjectReferenceType.WeakGlobal")
+ {
+ }
+ }
+
+ class GlobalReferenceTypeInfo : ObjectReferenceTypeInfo {
+
+ public GlobalReferenceTypeInfo (string jni)
+ : base (jni, "JniObjectReferenceType.Global")
+ {
+ }
+ }
+
+ class JavaVMPointerTypeInfo : TypeInfo {
+
+ public JavaVMPointerTypeInfo (string jni)
+ : base (jni)
+ {
+ }
+
+ public override string GetMarshalType (HandleStyle style, bool isReturn, bool isPinvoke)
+ {
+ if (style == HandleStyle.JIFunctionPtrWithErrors && isPinvoke) {
+ return "IntPtr*";
+ }
+ return "out IntPtr";
+ }
+
+ public override string GetManagedType (HandleStyle style, bool isReturn, bool isPinvoke)
+ {
+ return "out IntPtr";
+ }
+
+ public override string GetManagedToMarshalExpression (HandleStyle style, string variable)
+ {
+ switch (style) {
+ case HandleStyle.JIFunctionPtrWithErrors:
+ return $"_{variable}_ptr";
+ default:
+ return variable;
+ }
+ }
+
+ public override string[] GetManagedToMarshalPrepareStatements (HandleStyle style, string variable)
+ {
+ switch (style) {
+ case HandleStyle.JIFunctionPtrWithErrors:
+ return new[]{
+ $"IntPtr _{variable}_ptr = IntPtr.Zero;",
+ };
+ default:
+ return base.GetManagedToMarshalPrepareStatements (style, variable);
+ }
+ }
+
+ public override string[] GetManagedToMarshalCleanupStatements (HandleStyle style, string variable)
+ {
+ switch (style) {
+ case HandleStyle.JIFunctionPtrWithErrors:
+ return new[]{
+ $"{variable} = _{variable}_ptr;",
+ };
+ default:
+ return base.GetManagedToMarshalCleanupStatements (style, variable);
+ }
+ }
+ }
+
+ class ParamInfo
+ {
+ public TypeInfo Type;
+ public string Name;
+ public bool IsParamArray;
+ public bool CanBeNull;
+
+ public ParamInfo (TypeInfo Type, string Name, bool IsParamArray)
+ {
+ this.Type = Type;
+ this.Name = Name;
+ this.IsParamArray = IsParamArray;
+ }
+
+ public ParamInfo (TypeInfo Type, string Name = null, Modifier m = 0)
+ {
+ this.Type = Type;
+ this.Name = Name;
+ IsParamArray = (m & Modifier.Params) != 0;
+ CanBeNull = (m & Modifier.CanBeNull) != 0;
+ }
+ }
+
+ [Flags]
+ enum Modifier {
+ None = 0,
+ Params = 1,
+ CanBeNull = 2,
+ }
+
+ enum HandleStyle {
+ JIIntPtr,
+ JIIntPtrPinvokeWithErrors,
+ XAIntPtr,
+ JIFunctionPtrWithErrors,
+ }
+}
diff --git a/external/Java.Interop/build-tools/jnienv-gen/Generator.g.cs b/external/Java.Interop/build-tools/jnienv-gen/Generator.g.cs
new file mode 100644
index 00000000000..b2fbe1311a6
--- /dev/null
+++ b/external/Java.Interop/build-tools/jnienv-gen/Generator.g.cs
@@ -0,0 +1,2038 @@
+namespace Xamarin.Java.Interop
+{
+ partial class Generator
+ {
+ const string VersionsCategory = "Versions";
+ const string ClassesCategory = "Types";
+ const string ExceptionsCategory = "Exceptions";
+ const string ReferencesCatgeory = "References";
+ const string ObjectOperationsCategory = "Object";
+ const string InstanceFieldsCategory = "InstanceFields";
+ const string StaticFieldsCategory = "StaticFields";
+ const string InstanceMethodsCategory = "InstanceMethods";
+ const string StaticMethodsCategory = "StaticMethods";
+ const string StringOperationsCategory = "Strings";
+ const string ArrayOperationsCategory = "Arrays";
+ const string NativeMethodsCategory = "Types";
+ const string MonitorOperationsCategory = "Monitors";
+ const string NIOSupportCategory = "IO";
+ const string ReflectionSupportCategory = "Reflection";
+ const string JavaVMCategory = "References";
+
+ static readonly JniFunction[] JNIEnvEntries = new JniFunction[]{
+ new JniFunction {
+ DeclaringType = VersionsCategory,
+ Name = "GetVersion",
+ Visibility = "internal",
+ Prototype = "jint (*GetVersion)(JNIEnv*);",
+ ReturnType = "jint",
+ Parameters = new ParamInfo [] {},
+ },
+ new JniFunction {
+ DeclaringType = ClassesCategory,
+ Name = "DefineClass",
+ Visibility = "public",
+ Throws = true,
+ Prototype = "jclass (*DefineClass)(JNIEnv*, const char, jobject, const jbyte*, jsize);",
+ ReturnType = "jclass",
+ Parameters = new ParamInfo [] {new ParamInfo ("const char*", "name"), new ParamInfo ("jobject", "loader"), new ParamInfo ("const jbyte*", "buffer"), new ParamInfo ("jsize", "bufferLength")},
+ },
+ new JniFunction {
+ DeclaringType = ClassesCategory,
+ Name = "FindClass",
+ Visibility = "internal",
+ ApiName = "_FindClass",
+ Throws = true,
+ Prototype = "jclass (*FindClass)(JNIEnv*, const char*);",
+ ReturnType = "jclass",
+ Parameters = new ParamInfo [] {new ParamInfo ("const char*", "classname")},
+ },
+ new JniFunction {
+ DeclaringType = ReflectionSupportCategory,
+ Name = "FromReflectedMethod",
+ Visibility = "private",
+ Prototype = "jmethodID (*FromReflectedMethod)(JNIEnv*, jobject);",
+ ReturnType = "jmethodID",
+ Parameters = new ParamInfo [] {new ParamInfo ("jobject", "method")},
+ },
+ new JniFunction {
+ DeclaringType = ReflectionSupportCategory,
+ Name = "FromReflectedField",
+ Visibility = "private",
+ Prototype = "jfieldID (*FromReflectedField)(JNIEnv*, jobject);",
+ ReturnType = "jfieldID",
+ Parameters = new ParamInfo [] {new ParamInfo ("jobject", "field")},
+ },
+ new JniFunction {
+ DeclaringType = ReflectionSupportCategory,
+ Name = "ToReflectedMethod",
+ Visibility = "public",
+ Throws = true,
+ Prototype = "jobject (*ToReflectedMethod)(JNIEnv*, jclass, jmethodID, jboolean);",
+ ReturnType = "jobject",
+ Parameters = new ParamInfo [] {new ParamInfo ("jclass", "type"), new ParamInfo ("jmethodID", "method"), new ParamInfo ("jboolean", "isStatic")},
+ },
+ new JniFunction {
+ DeclaringType = ClassesCategory,
+ Name = "GetSuperclass",
+ Visibility = "public",
+ Prototype = "jclass (*GetSuperclass)(JNIEnv*, jclass);",
+ ReturnType = "jclass",
+ Parameters = new ParamInfo [] {new ParamInfo ("jclass", "type")},
+ },
+ new JniFunction {
+ DeclaringType = ClassesCategory,
+ Name = "IsAssignableFrom",
+ Visibility = "public",
+ Prototype = "jboolean (*IsAssignableFrom)(JNIEnv*, jclass, jclass);",
+ ReturnType = "jboolean",
+ Parameters = new ParamInfo [] {new ParamInfo ("jclass", "class1"), new ParamInfo ("jclass", "class2")},
+ },
+ new JniFunction {
+ DeclaringType = ReflectionSupportCategory,
+ Name = "ToReflectedField",
+ Visibility = "public",
+ Throws = true,
+ Prototype = "jobject (*ToReflectedField)(JNIEnv*, jclass, jfieldID, jboolean);",
+ ReturnType = "jobject",
+ Parameters = new ParamInfo [] {new ParamInfo ("jclass", "type"), new ParamInfo ("jfieldID", "field"), new ParamInfo ("jboolean", "isStatic")},
+ },
+ new JniFunction {
+ DeclaringType = ExceptionsCategory,
+ Name = "Throw",
+ // CustomWrapper = true,
+ ApiName = "_Throw",
+ Visibility = "internal",
+ // Throws = true,
+ Prototype = "jint (*Throw)(JNIEnv*, jthrowable);",
+ ReturnType = "jint",
+ Parameters = new ParamInfo [] {new ParamInfo ("jthrowable", "toThrow")},
+ },
+ new JniFunction {
+ DeclaringType = ExceptionsCategory,
+ Name = "ThrowNew",
+ ApiName = "_ThrowNew",
+ // CustomWrapper = true,
+ Visibility = "internal",
+ // Throws = true,
+ Prototype = "jint (*ThrowNew)(JNIEnv*, jclass, const char*);",
+ ReturnType = "jint",
+ Parameters = new ParamInfo [] {new ParamInfo ("jclass", "type"), new ParamInfo ("const char*", "message")},
+ },
+ new JniFunction {
+ DeclaringType = ExceptionsCategory,
+ Name = "ExceptionOccurred",
+ Visibility = "public",
+ Prototype = "jthrowable (*ExceptionOccurred)(JNIEnv*);",
+ ReturnType = "jthrowable",
+ Parameters = new ParamInfo [] {},
+ },
+ new JniFunction {
+ DeclaringType = ExceptionsCategory,
+ Name = "ExceptionDescribe",
+ Visibility = "public",
+ Prototype = "void (*ExceptionDescribe)(JNIEnv*);",
+ ReturnType = "void",
+ Parameters = new ParamInfo [] {},
+ },
+ new JniFunction {
+ DeclaringType = ExceptionsCategory,
+ Name = "ExceptionClear",
+ Visibility = "public",
+ Prototype = "void (*ExceptionClear)(JNIEnv*);",
+ ReturnType = "void",
+ Parameters = new ParamInfo [] {},
+ },
+ new JniFunction {
+ DeclaringType = ExceptionsCategory,
+ Name = "FatalError",
+ Visibility = "public",
+ Prototype = "void (*FatalError)(JNIEnv*, const char*);",
+ ReturnType = "void",
+ Parameters = new ParamInfo [] {new ParamInfo ("const char*", "message")},
+ },
+ new JniFunction {
+ DeclaringType = ReferencesCatgeory,
+ Name = "PushLocalFrame",
+ ApiName = "_PushLocalFrame",
+ // CustomWrapper = true,
+ Visibility = "internal",
+ Prototype = "jint (*PushLocalFrame)(JNIEnv*, jint);",
+ ReturnType = "jint",
+ Parameters = new ParamInfo [] {new ParamInfo ("jint", "capacity")},
+ },
+ new JniFunction {
+ DeclaringType = ReferencesCatgeory,
+ Name = "PopLocalFrame",
+ Visibility = "public",
+ Prototype = "jobject (*PopLocalFrame)(JNIEnv*, jobject);",
+ ReturnType = "jobject",
+ Parameters = new ParamInfo [] {new ParamInfo ("jobject", "result", Modifier.CanBeNull)},
+ },
+ new JniFunction {
+ DeclaringType = ReferencesCatgeory,
+ Name = "NewGlobalRef",
+ Visibility = "internal",
+ // Prebind = true,
+ Prototype = "jobject (*NewGlobalRef)(JNIEnv*, jobject);",
+ ReturnType = "jglobal",
+ Parameters = new ParamInfo [] {new ParamInfo ("jobject", "instance", Modifier.CanBeNull)},
+ },
+ new JniFunction {
+ DeclaringType = ReferencesCatgeory,
+ Name = "DeleteGlobalRef",
+ Visibility = "internal",
+ Prototype = "void (*DeleteGlobalRef)(JNIEnv*, jobject);",
+ ReturnType = "void",
+ Parameters = new ParamInfo [] {new ParamInfo (TypeInfo.Create ("jobject", "IntPtr"), "instance", Modifier.CanBeNull)},
+ },
+ new JniFunction {
+ DeclaringType = ReferencesCatgeory,
+ Name = "DeleteLocalRef",
+ Visibility = "internal",
+ // Prebind = true,
+ Prototype = "void (*DeleteLocalRef)(JNIEnv*, jobject);",
+ ReturnType = "void",
+ Parameters = new ParamInfo [] {new ParamInfo (TypeInfo.Create ("jobject", "IntPtr"), "instance", Modifier.CanBeNull)},
+ },
+ new JniFunction {
+ DeclaringType = ClassesCategory,
+ Name = "IsSameObject",
+ Visibility = "public",
+ Prototype = "jboolean (*IsSameObject)(JNIEnv*, jobject, jobject);",
+ ReturnType = "jboolean",
+ Parameters = new ParamInfo [] {new ParamInfo ("jobject", "object1", Modifier.CanBeNull), new ParamInfo ("jobject", "object2", Modifier.CanBeNull)},
+ },
+ new JniFunction {
+ DeclaringType = ReferencesCatgeory,
+ Name = "NewLocalRef",
+ Visibility = "internal",
+ Prototype = "jobject (*NewLocalRef)(JNIEnv*, jobject);",
+ ReturnType = "jobject",
+ Parameters = new ParamInfo [] {new ParamInfo ("jobject", "instance", Modifier.CanBeNull)},
+ },
+ new JniFunction {
+ DeclaringType = ReferencesCatgeory,
+ Name = "EnsureLocalCapacity",
+ ApiName = "_EnsureLocalCapacity",
+ // CustomWrapper = true,
+ Visibility = "internal",
+ Prototype = "jint (*EnsureLocalCapacity)(JNIEnv*, jint);",
+ ReturnType = "jint",
+ Parameters = new ParamInfo [] {new ParamInfo ("jint", "capacity")},
+ },
+ new JniFunction {
+ DeclaringType = ObjectOperationsCategory,
+ Name = "AllocObject",
+ Visibility = "public",
+ Throws = true,
+ Prototype = "jobject (*AllocObject)(JNIEnv*, jclass);",
+ ReturnType = "jobject",
+ Parameters = new ParamInfo [] {new ParamInfo ("jclass", "type")},
+ },
+ new JniFunction {
+ DeclaringType = ObjectOperationsCategory,
+ Name = "NewObject",
+ ApiName = "_NewObject",
+ Visibility = "internal",
+ Throws = true,
+ Prototype = "jobject (*NewObject)(JNIEnv*, jclass, jmethodID, ...);",
+ ReturnType = "jobject",
+ Parameters = new ParamInfo [] {new ParamInfo ("jclass", "type"), new ParamInfo ("jmethodID", "method")},
+ },
+ new JniFunction {
+ DeclaringType = ObjectOperationsCategory,
+ Name = "NewObjectV",
+ Visibility = "private",
+ Throws = true,
+ Prototype = "jobject (*NewObjectV)(JNIEnv*, jclass, jmethodID, va_list);",
+ ReturnType = "jobject",
+ Parameters = new ParamInfo [] {new ParamInfo ("jclass", "type"), new ParamInfo ("jmethodID", "method"), new ParamInfo ("va_list", "args")},
+ },
+ new JniFunction {
+ DeclaringType = ObjectOperationsCategory,
+ Name = "NewObjectA",
+ ApiName = "_NewObject",
+ Visibility = "internal",
+ Throws = true,
+ Prototype = "jobject (*NewObjectA)(JNIEnv*, jclass, jmethodID, jvalue*);",
+ ReturnType = "jobject",
+ Parameters = new ParamInfo [] {new ParamInfo ("jclass", "type"), new ParamInfo ("jmethodID", "method"), new ParamInfo ("jvalue*", "args", true)},
+ },
+ new JniFunction {
+ DeclaringType = ClassesCategory,
+ Name = "GetObjectClass",
+ Visibility = "public",
+ Prototype = "jclass (*GetObjectClass)(JNIEnv*, jobject);",
+ ReturnType = "jclass",
+ Parameters = new ParamInfo [] {new ParamInfo ("jobject", "instance")},
+ },
+ new JniFunction {
+ DeclaringType = ClassesCategory,
+ Name = "IsInstanceOf",
+ Visibility = "public",
+ Prototype = "jboolean (*IsInstanceOf)(JNIEnv*, jobject, jclass);",
+ ReturnType = "jboolean",
+ Parameters = new ParamInfo [] {new ParamInfo ("jobject", "instance"), new ParamInfo ("jclass", "type")},
+ },
+ new JniFunction {
+ DeclaringType = InstanceMethodsCategory,
+ Name = "GetMethodID",
+ Visibility = "public",
+ Throws = true,
+ Prototype = "jmethodID (*GetMethodID)(JNIEnv*, jclass, const char*, const char*);",
+ ReturnType = "jmethodID",
+ Parameters = new ParamInfo [] {new ParamInfo ("jclass", "type"), new ParamInfo ("const char*", "name"), new ParamInfo ("const char*", "signature")},
+ },
+ new JniFunction {
+ DeclaringType = InstanceMethodsCategory,
+ Name = "CallObjectMethod",
+ Visibility = "public",
+ Throws = true,
+ Prototype = "jobject (*CallObjectMethod)(JNIEnv*, jobject, jmethodID, ...);",
+ ReturnType = "jobject",
+ Parameters = new ParamInfo [] {new ParamInfo ("jobject", "instance"), new ParamInfo ("jmethodID", "method")},
+ },
+ new JniFunction {
+ DeclaringType = InstanceMethodsCategory,
+ Name = "CallObjectMethodV",
+ Visibility = "private",
+ Throws = true,
+ Prototype = "jobject (*CallObjectMethodV)(JNIEnv*, jobject, jmethodID, va_list);",
+ ReturnType = "jobject",
+ Parameters = new ParamInfo [] {new ParamInfo ("jobject", "instance"), new ParamInfo ("jmethodID", "method"), new ParamInfo ("va_list", "args")},
+ },
+ new JniFunction {
+ DeclaringType = InstanceMethodsCategory,
+ Name = "CallObjectMethodA",
+ ApiName = "CallObjectMethod",
+ Throws = true,
+ Visibility = "public",
+ Prototype = "jobject (*CallObjectMethodA)(JNIEnv*, jobject, jmethodID, jvalue*);",
+ ReturnType = "jobject",
+ Parameters = new ParamInfo [] {new ParamInfo ("jobject", "instance"), new ParamInfo ("jmethodID", "method"), new ParamInfo ("jvalue*", "args", true)},
+ },
+ new JniFunction {
+ DeclaringType = InstanceMethodsCategory,
+ Name = "CallBooleanMethod",
+ Visibility = "public",
+ Throws = true,
+ Prototype = "jboolean (*CallBooleanMethod)(JNIEnv*, jobject, jmethodID, ...);",
+ ReturnType = "jboolean",
+ Parameters = new ParamInfo [] {new ParamInfo ("jobject", "instance"), new ParamInfo ("jmethodID", "method")},
+ },
+ new JniFunction {
+ DeclaringType = InstanceMethodsCategory,
+ Name = "CallBooleanMethodV",
+ Visibility = "private",
+ Throws = true,
+ Prototype = "jboolean (*CallBooleanMethodV)(JNIEnv*, jobject, jmethodID, va_list);",
+ ReturnType = "jboolean",
+ Parameters = new ParamInfo [] {new ParamInfo ("jobject", "instance"), new ParamInfo ("jmethodID", "method"), new ParamInfo ("va_list", "args")},
+ },
+ new JniFunction {
+ DeclaringType = InstanceMethodsCategory,
+ Name = "CallBooleanMethodA",
+ ApiName = "CallBooleanMethod",
+ Visibility = "public",
+ Throws = true,
+ Prototype = "jboolean (*CallBooleanMethodA)(JNIEnv*, jobject, jmethodID, jvalue*);",
+ ReturnType = "jboolean",
+ Parameters = new ParamInfo [] {new ParamInfo ("jobject", "instance"), new ParamInfo ("jmethodID", "method"), new ParamInfo ("jvalue*", "args", true)},
+ },
+ new JniFunction {
+ DeclaringType = InstanceMethodsCategory,
+ Name = "CallByteMethod",
+ Visibility = "public",
+ Throws = true,
+ Prototype = "jbyte (*CallByteMethod)(JNIEnv*, jobject, jmethodID, ...);",
+ ReturnType = "jbyte",
+ Parameters = new ParamInfo [] {new ParamInfo ("jobject", "instance"), new ParamInfo ("jmethodID", "method")},
+ },
+ new JniFunction {
+ DeclaringType = InstanceMethodsCategory,
+ Name = "CallByteMethodV",
+ Visibility = "private",
+ Throws = true,
+ Prototype = "jbyte (*CallByteMethodV)(JNIEnv*, jobject, jmethodID, va_list);",
+ ReturnType = "jbyte",
+ Parameters = new ParamInfo [] {new ParamInfo ("jobject", "instance"), new ParamInfo ("jmethodID", "method"), new ParamInfo ("va_list", "args", true)},
+ },
+ new JniFunction {
+ DeclaringType = InstanceMethodsCategory,
+ Name = "CallByteMethodA",
+ ApiName = "CallByteMethod",
+ Visibility = "public",
+ Throws = true,
+ Prototype = "jbyte (*CallByteMethodA)(JNIEnv*, jobject, jmethodID, jvalue*);",
+ ReturnType = "jbyte",
+ Parameters = new ParamInfo [] {new ParamInfo ("jobject", "instance"), new ParamInfo ("jmethodID", "method"), new ParamInfo ("jvalue*", "args", true)},
+ },
+ new JniFunction {
+ DeclaringType = InstanceMethodsCategory,
+ Name = "CallCharMethod",
+ Visibility = "public",
+ Throws = true,
+ Prototype = "jchar (*CallCharMethod)(JNIEnv*, jobject, jmethodID, ...);",
+ ReturnType = "jchar",
+ Parameters = new ParamInfo [] {new ParamInfo ("jobject", "instance"), new ParamInfo ("jmethodID", "method")},
+ },
+ new JniFunction {
+ DeclaringType = InstanceMethodsCategory,
+ Name = "CallCharMethodV",
+ Visibility = "private",
+ Throws = true,
+ Prototype = "jchar (*CallCharMethodV)(JNIEnv*, jobject, jmethodID, va_list);",
+ ReturnType = "jchar",
+ Parameters = new ParamInfo [] {new ParamInfo ("jobject", "instance"), new ParamInfo ("jmethodID", "method"), new ParamInfo ("va_list", "args")},
+ },
+ new JniFunction {
+ DeclaringType = InstanceMethodsCategory,
+ Name = "CallCharMethodA",
+ ApiName = "CallCharMethod",
+ Visibility = "public",
+ Throws = true,
+ Prototype = "jchar (*CallCharMethodA)(JNIEnv*, jobject, jmethodID, jvalue*);",
+ ReturnType = "jchar",
+ Parameters = new ParamInfo [] {new ParamInfo ("jobject", "instance"), new ParamInfo ("jmethodID", "method"), new ParamInfo ("jvalue*", "args", true)},
+ },
+ new JniFunction {
+ DeclaringType = InstanceMethodsCategory,
+ Name = "CallShortMethod",
+ Visibility = "public",
+ Throws = true,
+ Prototype = "jshort (*CallShortMethod)(JNIEnv*, jobject, jmethodID, ...);",
+ ReturnType = "jshort",
+ Parameters = new ParamInfo [] {new ParamInfo ("jobject", "instance"), new ParamInfo ("jmethodID", "method")},
+ },
+ new JniFunction {
+ DeclaringType = InstanceMethodsCategory,
+ Name = "CallShortMethodV",
+ Visibility = "private",
+ Throws = true,
+ Prototype = "jshort (*CallShortMethodV)(JNIEnv*, jobject, jmethodID, va_list);",
+ ReturnType = "jshort",
+ Parameters = new ParamInfo [] {new ParamInfo ("jobject", "instance"), new ParamInfo ("jmethodID", "method"), new ParamInfo ("va_list", "args")},
+ },
+ new JniFunction {
+ DeclaringType = InstanceMethodsCategory,
+ Name = "CallShortMethodA",
+ ApiName = "CallShortMethod",
+ Visibility = "public",
+ Throws = true,
+ Prototype = "jshort (*CallShortMethodA)(JNIEnv*, jobject, jmethodID, jvalue*);",
+ ReturnType = "jshort",
+ Parameters = new ParamInfo [] {new ParamInfo ("jobject", "instance"), new ParamInfo ("jmethodID", "method"), new ParamInfo ("jvalue*", "args", true)},
+ },
+ new JniFunction {
+ DeclaringType = InstanceMethodsCategory,
+ Name = "CallIntMethod",
+ Visibility = "public",
+ Throws = true,
+ Prototype = "jint (*CallIntMethod)(JNIEnv*, jobject, jmethodID, ...);",
+ ReturnType = "jint",
+ Parameters = new ParamInfo [] {new ParamInfo ("jobject", "instance"), new ParamInfo ("jmethodID", "method")},
+ },
+ new JniFunction {
+ DeclaringType = InstanceMethodsCategory,
+ Name = "CallIntMethodV",
+ Visibility = "private",
+ Throws = true,
+ Prototype = "jint (*CallIntMethodV)(JNIEnv*, jobject, jmethodID, va_list);",
+ ReturnType = "jint",
+ Parameters = new ParamInfo [] {new ParamInfo ("jobject", "instance"), new ParamInfo ("jmethodID", "method"), new ParamInfo ("va_list", "args")},
+ },
+ new JniFunction {
+ DeclaringType = InstanceMethodsCategory,
+ Name = "CallIntMethodA",
+ ApiName = "CallIntMethod",
+ Visibility = "public",
+ Throws = true,
+ Prototype = "jint (*CallIntMethodA)(JNIEnv*, jobject, jmethodID, jvalue*);",
+ ReturnType = "jint",
+ Parameters = new ParamInfo [] {new ParamInfo ("jobject", "instance"), new ParamInfo ("jmethodID", "method"), new ParamInfo ("jvalue*", "args", true)},
+ },
+ new JniFunction {
+ DeclaringType = InstanceMethodsCategory,
+ Name = "CallLongMethod",
+ Visibility = "public",
+ Throws = true,
+ Prototype = "jlong (*CallLongMethod)(JNIEnv*, jobject, jmethodID, ...);",
+ ReturnType = "jlong",
+ Parameters = new ParamInfo [] {new ParamInfo ("jobject", "instance"), new ParamInfo ("jmethodID", "method")},
+ },
+ new JniFunction {
+ DeclaringType = InstanceMethodsCategory,
+ Name = "CallLongMethodV",
+ Visibility = "private",
+ Throws = true,
+ Prototype = "jlong (*CallLongMethodV)(JNIEnv*, jobject, jmethodID, va_list);",
+ ReturnType = "jlong",
+ Parameters = new ParamInfo [] {new ParamInfo ("jobject", "instance"), new ParamInfo ("jmethodID", "method"), new ParamInfo ("va_list", "args")},
+ },
+ new JniFunction {
+ DeclaringType = InstanceMethodsCategory,
+ Name = "CallLongMethodA",
+ ApiName = "CallLongMethod",
+ Visibility = "public",
+ Throws = true,
+ Prototype = "jlong (*CallLongMethodA)(JNIEnv*, jobject, jmethodID, jvalue*);",
+ ReturnType = "jlong",
+ Parameters = new ParamInfo [] {new ParamInfo ("jobject", "instance"), new ParamInfo ("jmethodID", "method"), new ParamInfo ("jvalue*", "args", true)},
+ },
+ new JniFunction {
+ DeclaringType = InstanceMethodsCategory,
+ Name = "CallFloatMethod",
+ Visibility = "public",
+ Throws = true,
+ Prototype = "jfloat (*CallFloatMethod)(JNIEnv*, jobject, jmethodID, ...);",
+ ReturnType = "jfloat",
+ Parameters = new ParamInfo [] {new ParamInfo ("jobject", "instance"), new ParamInfo ("jmethodID", "method")},
+ },
+ new JniFunction {
+ DeclaringType = InstanceMethodsCategory,
+ Name = "CallFloatMethodV",
+ Visibility = "private",
+ Throws = true,
+ Prototype = "jfloat (*CallFloatMethodV)(JNIEnv*, jobject, jmethodID, va_list);",
+ ReturnType = "jfloat",
+ Parameters = new ParamInfo [] {new ParamInfo ("jobject", "instance"), new ParamInfo ("jmethodID", "method"), new ParamInfo ("va_list", "args")},
+ },
+ new JniFunction {
+ DeclaringType = InstanceMethodsCategory,
+ Name = "CallFloatMethodA",
+ ApiName = "CallFloatMethod",
+ Visibility = "public",
+ Throws = true,
+ Prototype = "jfloat (*CallFloatMethodA)(JNIEnv*, jobject, jmethodID, jvalue*);",
+ ReturnType = "jfloat",
+ Parameters = new ParamInfo [] {new ParamInfo ("jobject", "instance"), new ParamInfo ("jmethodID", "method"), new ParamInfo ("jvalue*", "args", true)},
+ },
+ new JniFunction {
+ DeclaringType = InstanceMethodsCategory,
+ Name = "CallDoubleMethod",
+ Visibility = "public",
+ Throws = true,
+ Prototype = "jdouble (*CallDoubleMethod)(JNIEnv*, jobject, jmethodID, ...);",
+ ReturnType = "jdouble",
+ Parameters = new ParamInfo [] {new ParamInfo ("jobject", "instance"), new ParamInfo ("jmethodID", "method")},
+ },
+ new JniFunction {
+ DeclaringType = InstanceMethodsCategory,
+ Name = "CallDoubleMethodV",
+ Visibility = "private",
+ Throws = true,
+ Prototype = "jdouble (*CallDoubleMethodV)(JNIEnv*, jobject, jmethodID, va_list);",
+ ReturnType = "jdouble",
+ Parameters = new ParamInfo [] {new ParamInfo ("jobject", "instance"), new ParamInfo ("jmethodID", "method"), new ParamInfo ("va_list", "args")},
+ },
+ new JniFunction {
+ DeclaringType = InstanceMethodsCategory,
+ Name = "CallDoubleMethodA",
+ ApiName = "CallDoubleMethod",
+ Visibility = "public",
+ Throws = true,
+ Prototype = "jdouble (*CallDoubleMethodA)(JNIEnv*, jobject, jmethodID, jvalue*);",
+ ReturnType = "jdouble",
+ Parameters = new ParamInfo [] {new ParamInfo ("jobject", "instance"), new ParamInfo ("jmethodID", "method"), new ParamInfo ("jvalue*", "args", true)},
+ },
+ new JniFunction {
+ DeclaringType = InstanceMethodsCategory,
+ Name = "CallVoidMethod",
+ Visibility = "public",
+ Throws = true,
+ Prototype = "void (*CallVoidMethod)(JNIEnv*, jobject, jmethodID, ...);",
+ ReturnType = "void",
+ Parameters = new ParamInfo [] {new ParamInfo ("jobject", "instance"), new ParamInfo ("jmethodID", "method")},
+ },
+ new JniFunction {
+ DeclaringType = InstanceMethodsCategory,
+ Name = "CallVoidMethodV",
+ Visibility = "private",
+ Throws = true,
+ Prototype = "void (*CallVoidMethodV)(JNIEnv*, jobject, jmethodID, va_list);",
+ ReturnType = "void",
+ Parameters = new ParamInfo [] {new ParamInfo ("jobject", "instance"), new ParamInfo ("jmethodID", "method"), new ParamInfo ("va_list", "args")},
+ },
+ new JniFunction {
+ DeclaringType = InstanceMethodsCategory,
+ Name = "CallVoidMethodA",
+ ApiName = "CallVoidMethod",
+ Visibility = "public",
+ Throws = true,
+ Prototype = "void (*CallVoidMethodA)(JNIEnv*, jobject, jmethodID, jvalue*);",
+ ReturnType = "void",
+ Parameters = new ParamInfo [] {new ParamInfo ("jobject", "instance"), new ParamInfo ("jmethodID", "method"), new ParamInfo ("jvalue*", "args", true)},
+ },
+ new JniFunction {
+ DeclaringType = InstanceMethodsCategory,
+ Name = "CallNonvirtualObjectMethod",
+ Visibility = "public",
+ Throws = true,
+ Prototype = "jobject (*CallNonvirtualObjectMethod)(JNIEnv*, jobject, jclass, jmethodID, ...);",
+ ReturnType = "jobject",
+ Parameters = new ParamInfo [] {new ParamInfo ("jobject", "instance"), new ParamInfo ("jclass", "type"), new ParamInfo ("jmethodID", "method")},
+ },
+ new JniFunction {
+ DeclaringType = InstanceMethodsCategory,
+ Name = "CallNonvirtualObjectMethodV",
+ Visibility = "private",
+ Throws = true,
+ Prototype = "jobject (*CallNonvirtualObjectMethodV)(JNIEnv*, jobject, jclass, jmethodID, va_list);",
+ ReturnType ="jobject",
+ Parameters = new ParamInfo [] {new ParamInfo ("jobject", "instance"), new ParamInfo ("jclass", "type"), new ParamInfo ("jmethodID", "method"), new ParamInfo ("va_list", "args")},
+ },
+ new JniFunction {
+ DeclaringType = InstanceMethodsCategory,
+ Name = "CallNonvirtualObjectMethodA",
+ ApiName = "CallNonvirtualObjectMethod",
+ Visibility = "public",
+ Throws = true,
+ Prototype = "jobject (*CallNonvirtualObjectMethodA)(JNIEnv*, jobject, jclass, jmethodID, jvalue*);",
+ ReturnType = "jobject",
+ Parameters = new ParamInfo [] {new ParamInfo ("jobject", "instance"), new ParamInfo ("jclass", "type"), new ParamInfo ("jmethodID", "method"), new ParamInfo ("jvalue*", "args", true)},
+ },
+ new JniFunction {
+ DeclaringType = InstanceMethodsCategory,
+ Name = "CallNonvirtualBooleanMethod",
+ Visibility = "public",
+ Throws = true,
+ Prototype = "jboolean (*CallNonvirtualBooleanMethod)(JNIEnv*, jobject, jclass, jmethodID, ...);",
+ ReturnType = "jboolean",
+ Parameters = new ParamInfo [] {new ParamInfo ("jobject", "instance"), new ParamInfo ("jclass", "type"), new ParamInfo ("jmethodID", "method")},
+ },
+ new JniFunction {
+ DeclaringType = InstanceMethodsCategory,
+ Name = "CallNonvirtualBooleanMethodV",
+ Visibility = "private",
+ Throws = true,
+ Prototype = "jboolean (*CallNonvirtualBooleanMethodV)(JNIEnv*, jobject, jclass, jmethodID, va_list);",
+ ReturnType = "jboolean",
+ Parameters = new ParamInfo [] {new ParamInfo ("jobject", "instance"), new ParamInfo ("jclass", "type"), new ParamInfo ("jmethodID", "method"), new ParamInfo ("va_list", "args")},
+ },
+ new JniFunction {
+ DeclaringType = InstanceMethodsCategory,
+ Name = "CallNonvirtualBooleanMethodA",
+ ApiName = "CallNonvirtualBooleanMethod",
+ Visibility = "public",
+ Throws = true,
+ Prototype = "jboolean (*CallNonvirtualBooleanMethodA)(JNIEnv*, jobject, jclass, jmethodID, jvalue*);",
+ ReturnType = "jboolean",
+ Parameters = new ParamInfo [] {new ParamInfo ("jobject", "instance"), new ParamInfo ("jclass", "type"), new ParamInfo ("jmethodID", "method"), new ParamInfo ("jvalue*", "args", true)},
+ },
+ new JniFunction {
+ DeclaringType = InstanceMethodsCategory,
+ Name = "CallNonvirtualByteMethod",
+ Visibility = "public",
+ Throws = true,
+ Prototype = "jbyte (*CallNonvirtualByteMethod)(JNIEnv*, jobject, jclass, jmethodID, ...);",
+ ReturnType = "jbyte",
+ Parameters = new ParamInfo [] {new ParamInfo ("jobject", "instance"), new ParamInfo ("jclass", "type"), new ParamInfo ("jmethodID", "method")},
+ },
+ new JniFunction {
+ DeclaringType = InstanceMethodsCategory,
+ Name = "CallNonvirtualByteMethodV",
+ Visibility = "private",
+ Throws = true,
+ Prototype = "jbyte (*CallNonvirtualByteMethodV)(JNIEnv*, jobject, jclass, jmethodID, va_list);",
+ ReturnType = "jbyte",
+ Parameters = new ParamInfo [] {new ParamInfo ("jobject", "instance"), new ParamInfo ("jclass", "type"), new ParamInfo ("jmethodID", "method"), new ParamInfo ("va_list", "args")},
+ },
+ new JniFunction {
+ DeclaringType = InstanceMethodsCategory,
+ Name = "CallNonvirtualByteMethodA",
+ ApiName = "CallNonvirtualByteMethod",
+ Visibility = "public",
+ Throws = true,
+ Prototype = "jbyte (*CallNonvirtualByteMethodA)(JNIEnv*, jobject, jclass, jmethodID, jvalue*);",
+ ReturnType = "jbyte",
+ Parameters = new ParamInfo [] {new ParamInfo ("jobject", "instance"), new ParamInfo ("jclass", "type"), new ParamInfo ("jmethodID", "method"), new ParamInfo ("jvalue*", "args", true)},
+ },
+ new JniFunction {
+ DeclaringType = InstanceMethodsCategory,
+ Name = "CallNonvirtualCharMethod",
+ Visibility = "public",
+ Throws = true,
+ Prototype = "jchar (*CallNonvirtualCharMethod)(JNIEnv*, jobject, jclass, jmethodID, ...);",
+ ReturnType = "jchar",
+ Parameters = new ParamInfo [] {new ParamInfo ("jobject", "instance"), new ParamInfo ("jclass", "type"), new ParamInfo ("jmethodID", "method")},
+ },
+ new JniFunction {
+ DeclaringType = InstanceMethodsCategory,
+ Name = "CallNonvirtualCharMethodV",
+ Visibility = "private",
+ Throws = true,
+ Prototype = "jchar (*CallNonvirtualCharMethodV)(JNIEnv*, jobject, jclass, jmethodID, va_list);",
+ ReturnType = "jchar",
+ Parameters = new ParamInfo [] {new ParamInfo ("jobject", "obj"), new ParamInfo ("jclass", "type"), new ParamInfo ("jmethodID", "method"), new ParamInfo ("va_list", "args")},
+ },
+ new JniFunction {
+ DeclaringType = InstanceMethodsCategory,
+ Name = "CallNonvirtualCharMethodA",
+ ApiName = "CallNonvirtualCharMethod",
+ Visibility = "public",
+ Throws = true,
+ Prototype = "jchar (*CallNonvirtualCharMethodA)(JNIEnv*, jobject, jclass, jmethodID, jvalue*);",
+ ReturnType = "jchar",
+ Parameters = new ParamInfo [] {new ParamInfo ("jobject", "instance"), new ParamInfo ("jclass", "type"), new ParamInfo ("jmethodID", "method"), new ParamInfo ("jvalue*", "args", true)},
+ },
+ new JniFunction {
+ DeclaringType = InstanceMethodsCategory,
+ Name = "CallNonvirtualShortMethod",
+ Visibility = "public",
+ Throws = true,
+ Prototype = "jshort (*CallNonvirtualShortMethod)(JNIEnv*, jobject, jclass, jmethodID, ...);",
+ ReturnType = "jshort",
+ Parameters = new ParamInfo [] {new ParamInfo ("jobject", "instance"), new ParamInfo ("jclass", "type"), new ParamInfo ("jmethodID", "method")},
+ },
+ new JniFunction {
+ DeclaringType = InstanceMethodsCategory,
+ Name = "CallNonvirtualShortMethodV",
+ Visibility = "private",
+ Throws = true,
+ Prototype = "jshort (*CallNonvirtualShortMethodV)(JNIEnv*, jobject, jclass, jmethodID, va_list);",
+ ReturnType = "jshort",
+ Parameters = new ParamInfo [] {new ParamInfo ("jobject", "obj"), new ParamInfo ("jclass", "type"), new ParamInfo ("jmethodID", "method"), new ParamInfo ("va_list", "args")},
+ },
+ new JniFunction {
+ DeclaringType = InstanceMethodsCategory,
+ Name = "CallNonvirtualShortMethodA",
+ ApiName = "CallNonvirtualShortMethod",
+ Visibility = "public",
+ Throws = true,
+ Prototype = "jshort (*CallNonvirtualShortMethodA)(JNIEnv*, jobject, jclass, jmethodID, jvalue*);",
+ ReturnType = "jshort",
+ Parameters = new ParamInfo [] {new ParamInfo ("jobject", "instance"), new ParamInfo ("jclass", "type"), new ParamInfo ("jmethodID", "method"), new ParamInfo ("jvalue*", "args", true)},
+ },
+ new JniFunction {
+ DeclaringType = InstanceMethodsCategory,
+ Name = "CallNonvirtualIntMethod",
+ Visibility = "public",
+ Throws = true,
+ Prototype = "jint (*CallNonvirtualIntMethod)(JNIEnv*, jobject, jclass, jmethodID, ...);",
+ ReturnType = "jint",
+ Parameters = new ParamInfo [] {new ParamInfo ("jobject", "instance"), new ParamInfo ("jclass", "type"), new ParamInfo ("jmethodID", "method")},
+ },
+ new JniFunction {
+ DeclaringType = InstanceMethodsCategory,
+ Name = "CallNonvirtualIntMethodV",
+ Visibility = "private",
+ Throws = true,
+ Prototype = "jint (*CallNonvirtualIntMethodV)(JNIEnv*, jobject, jclass, jmethodID, va_list);",
+ ReturnType = "jint",
+ Parameters = new ParamInfo [] {new ParamInfo ("jobject", "obj"), new ParamInfo ("jclass", "type"), new ParamInfo ("jmethodID", "method"), new ParamInfo ("va_list", "args")},
+ },
+ new JniFunction {
+ DeclaringType = InstanceMethodsCategory,
+ Name = "CallNonvirtualIntMethodA",
+ ApiName = "CallNonvirtualIntMethod",
+ Visibility = "public",
+ Throws = true,
+ Prototype = "jint (*CallNonvirtualIntMethodA)(JNIEnv*, jobject, jclass, jmethodID, jvalue*);",
+ ReturnType = "jint",
+ Parameters = new ParamInfo [] {new ParamInfo ("jobject", "instance"), new ParamInfo ("jclass", "type"), new ParamInfo ("jmethodID", "method"), new ParamInfo ("jvalue*", "args", true)},
+ },
+ new JniFunction {
+ DeclaringType = InstanceMethodsCategory,
+ Name = "CallNonvirtualLongMethod",
+ Visibility = "public",
+ Throws = true,
+ Prototype = "jlong (*CallNonvirtualLongMethod)(JNIEnv*, jobject, jclass, jmethodID, ...);",
+ ReturnType = "jlong",
+ Parameters = new ParamInfo [] {new ParamInfo ("jobject", "instance"), new ParamInfo ("jclass", "type"), new ParamInfo ("jmethodID", "method")},
+ },
+ new JniFunction {
+ DeclaringType = InstanceMethodsCategory,
+ Name = "CallNonvirtualLongMethodV",
+ Visibility = "private",
+ Throws = true,
+ Prototype = "jlong (*CallNonvirtualLongMethodV)(JNIEnv*, jobject, jclass, jmethodID, va_list);",
+ ReturnType = "jlong",
+ Parameters = new ParamInfo [] {new ParamInfo ("jobject", "instance"), new ParamInfo ("jclass", "type"), new ParamInfo ("jmethodID", "method"), new ParamInfo ("va_list", "args")},
+ },
+ new JniFunction {
+ DeclaringType = InstanceMethodsCategory,
+ Name = "CallNonvirtualLongMethodA",
+ ApiName = "CallNonvirtualLongMethod",
+ Throws = true,
+ Visibility = "public",
+ Prototype = "jlong (*CallNonvirtualLongMethodA)(JNIEnv*, jobject, jclass, jmethodID, jvalue*);",
+ ReturnType = "jlong",
+ Parameters = new ParamInfo [] {new ParamInfo ("jobject", "instance"), new ParamInfo ("jclass", "type"), new ParamInfo ("jmethodID", "method"), new ParamInfo ("jvalue*", "args", true)},
+ },
+ new JniFunction {
+ DeclaringType = InstanceMethodsCategory,
+ Name = "CallNonvirtualFloatMethod",
+ Visibility = "public",
+ Throws = true,
+ Prototype = "jfloat (*CallNonvirtualFloatMethod)(JNIEnv*, jobject, jclass, jmethodID, ...);",
+ ReturnType = "jfloat",
+ Parameters = new ParamInfo [] {new ParamInfo ("jobject", "instance"), new ParamInfo ("jclass", "type"), new ParamInfo ("jmethodID", "method")},
+ },
+ new JniFunction {
+ DeclaringType = InstanceMethodsCategory,
+ Name = "CallNonvirtualFloatMethodV",
+ Visibility = "private",
+ Throws = true,
+ Prototype = "jfloat (*CallNonvirtualFloatMethodV)(JNIEnv*, jobject, jclass, jmethodID, va_list);",
+ ReturnType = "jfloat",
+ Parameters = new ParamInfo [] {new ParamInfo ("jobject", "instance"), new ParamInfo ("jclass", "type"), new ParamInfo ("jmethodID", "method"), new ParamInfo ("va_list", "args")},
+ },
+ new JniFunction {
+ DeclaringType = InstanceMethodsCategory,
+ Name = "CallNonvirtualFloatMethodA",
+ ApiName = "CallNonvirtualFloatMethod",
+ Visibility = "public",
+ Throws = true,
+ Prototype = "jfloat (*CallNonvirtualFloatMethodA)(JNIEnv*, jobject, jclass, jmethodID, jvalue*);",
+ ReturnType = "jfloat",
+ Parameters = new ParamInfo [] {new ParamInfo ("jobject", "instance"), new ParamInfo ("jclass", "type"), new ParamInfo ("jmethodID", "method"), new ParamInfo ("jvalue*", "args", true)},
+ },
+ new JniFunction {
+ DeclaringType = InstanceMethodsCategory,
+ Name = "CallNonvirtualDoubleMethod",
+ Visibility = "public",
+ Throws = true,
+ Prototype = "jdouble (*CallNonvirtualDoubleMethod)(JNIEnv*, jobject, jclass, jmethodID, ...);",
+ ReturnType = "jdouble",
+ Parameters = new ParamInfo [] {new ParamInfo ("jobject", "instance"), new ParamInfo ("jclass", "type"), new ParamInfo ("jmethodID", "method")},
+ },
+ new JniFunction {
+ DeclaringType = InstanceMethodsCategory,
+ Name = "CallNonvirtualDoubleMethodV",
+ Visibility = "private",
+ Throws = true,
+ Prototype = "jdouble (*CallNonvirtualDoubleMethodV)(JNIEnv*, jobject, jclass, jmethodID, va_list);",
+ ReturnType = "jdouble",
+ Parameters = new ParamInfo [] {new ParamInfo ("jobject", "instance"), new ParamInfo ("jclass", "type"), new ParamInfo ("jmethodID", "method"), new ParamInfo ("va_list", "args")},
+ },
+ new JniFunction {
+ DeclaringType = InstanceMethodsCategory,
+ Name = "CallNonvirtualDoubleMethodA",
+ ApiName = "CallNonvirtualDoubleMethod",
+ Visibility = "public",
+ Throws = true,
+ Prototype = "jdouble (*CallNonvirtualDoubleMethodA)(JNIEnv*, jobject, jclass, jmethodID, jvalue*);",
+ ReturnType = "jdouble",
+ Parameters = new ParamInfo [] {new ParamInfo ("jobject", "instance"), new ParamInfo ("jclass", "type"), new ParamInfo ("jmethodID", "method"), new ParamInfo ("jvalue*", "args", true)},
+ },
+ new JniFunction {
+ DeclaringType = InstanceMethodsCategory,
+ Name = "CallNonvirtualVoidMethod",
+ Visibility = "public",
+ Throws = true,
+ Prototype = "void (*CallNonvirtualVoidMethod)(JNIEnv*, jobject, jclass, jmethodID, ...);",
+ ReturnType = "void",
+ Parameters = new ParamInfo [] {new ParamInfo ("jobject", "instance"), new ParamInfo ("jclass", "type"), new ParamInfo ("jmethodID", "method")},
+ },
+ new JniFunction {
+ DeclaringType = InstanceMethodsCategory,
+ Name = "CallNonvirtualVoidMethodV",
+ Visibility = "private",
+ Throws = true,
+ Prototype = "void (*CallNonvirtualVoidMethodV)(JNIEnv*, jobject, jclass, jmethodID, va_list);",
+ ReturnType = "void",
+ Parameters = new ParamInfo [] {new ParamInfo ("jobject", "instance"), new ParamInfo ("jclass", "type"), new ParamInfo ("jmethodID", "method"), new ParamInfo ("va_list", "args")},
+ },
+ new JniFunction {
+ DeclaringType = InstanceMethodsCategory,
+ Name = "CallNonvirtualVoidMethodA",
+ ApiName = "CallNonvirtualVoidMethod",
+ Visibility = "public",
+ Throws = true,
+ Prototype = "void (*CallNonvirtualVoidMethodA)(JNIEnv*, jobject, jclass, jmethodID, jvalue*);",
+ ReturnType = "void",
+ Parameters = new ParamInfo [] {new ParamInfo ("jobject", "instance"), new ParamInfo ("jclass", "type"), new ParamInfo ("jmethodID", "method"), new ParamInfo ("jvalue*", "args", true)},
+ },
+ new JniFunction {
+ DeclaringType = InstanceFieldsCategory,
+ Name = "GetFieldID",
+ Visibility = "public",
+ Throws = true,
+ Prototype = "jfieldID (*GetFieldID)(JNIEnv*, jclass, const char*, const char*);",
+ ReturnType = "jfieldID",
+ Parameters = new ParamInfo [] {new ParamInfo ("jclass", "type"), new ParamInfo ("const char*", "name"), new ParamInfo ("const char*", "signature")},
+ },
+ new JniFunction {
+ DeclaringType = InstanceFieldsCategory,
+ Name = "GetObjectField",
+ Visibility = "public",
+ Prototype = "jobject (*GetObjectField)(JNIEnv*, jobject, jfieldID);",
+ ReturnType = "jobject",
+ Parameters = new ParamInfo [] {new ParamInfo ("jobject", "instance"), new ParamInfo ("jfieldID", "field")},
+ },
+ new JniFunction {
+ DeclaringType = InstanceFieldsCategory,
+ Name = "GetBooleanField",
+ Visibility = "public",
+ Prototype = "jboolean (*GetBooleanField)(JNIEnv*, jobject, jfieldID);",
+ ReturnType = "jboolean",
+ Parameters = new ParamInfo [] {new ParamInfo ("jobject", "instance"), new ParamInfo ("jfieldID", "field")},
+ },
+ new JniFunction {
+ DeclaringType = InstanceFieldsCategory,
+ Name = "GetByteField",
+ Visibility = "public",
+ Prototype = "jbyte (*GetByteField)(JNIEnv*, jobject, jfieldID);",
+ ReturnType = "jbyte",
+ Parameters = new ParamInfo [] {new ParamInfo ("jobject", "instance"), new ParamInfo ("jfieldID", "field")},
+ },
+ new JniFunction {
+ DeclaringType = InstanceFieldsCategory,
+ Name = "GetCharField",
+ Visibility = "public",
+ Prototype = "jchar (*GetCharField)(JNIEnv*, jobject, jfieldID);",
+ ReturnType = "jchar",
+ Parameters = new ParamInfo [] {new ParamInfo ("jobject", "instance"), new ParamInfo ("jfieldID", "field")},
+ },
+ new JniFunction {
+ DeclaringType = InstanceFieldsCategory,
+ Name = "GetShortField",
+ Visibility = "public",
+ Prototype = "jshort (*GetShortField)(JNIEnv*, jobject, jfieldID);",
+ ReturnType = "jshort",
+ Parameters = new ParamInfo [] {new ParamInfo ("jobject", "instance"), new ParamInfo ("jfieldID", "field")},
+ },
+ new JniFunction {
+ DeclaringType = InstanceFieldsCategory,
+ Name = "GetIntField",
+ Visibility = "public",
+ Prototype = "jint (*GetIntField)(JNIEnv*, jobject, jfieldID);",
+ ReturnType = "jint",
+ Parameters = new ParamInfo [] {new ParamInfo ("jobject", "instance"), new ParamInfo ("jfieldID", "field")},
+ },
+ new JniFunction {
+ DeclaringType = InstanceFieldsCategory,
+ Name = "GetLongField",
+ Visibility = "public",
+ Prototype = "jlong (*GetLongField)(JNIEnv*, jobject, jfieldID);",
+ ReturnType = "jlong",
+ Parameters = new ParamInfo [] {new ParamInfo ("jobject", "instance"), new ParamInfo ("jfieldID", "field")},
+ },
+ new JniFunction {
+ DeclaringType = InstanceFieldsCategory,
+ Name = "GetFloatField",
+ Visibility = "public",
+ Prototype = "jfloat (*GetFloatField)(JNIEnv*, jobject, jfieldID);",
+ ReturnType = "jfloat",
+ Parameters = new ParamInfo [] {new ParamInfo ("jobject", "instance"), new ParamInfo ("jfieldID", "field")},
+ },
+ new JniFunction {
+ DeclaringType = InstanceFieldsCategory,
+ Name = "GetDoubleField",
+ Visibility = "public",
+ Prototype = "jdouble (*GetDoubleField)(JNIEnv*, jobject, jfieldID);",
+ ReturnType = "jdouble",
+ Parameters = new ParamInfo [] {new ParamInfo ("jobject", "instance"), new ParamInfo ("jfieldID", "field")},
+ },
+ new JniFunction {
+ DeclaringType = InstanceFieldsCategory,
+ Name = "SetObjectField",
+ Visibility = "public",
+ Prototype = "void (*SetObjectField)(JNIEnv*, jobject, jfieldID, jobject);",
+ ReturnType = "void",
+ Parameters = new ParamInfo [] {new ParamInfo ("jobject", "instance"), new ParamInfo ("jfieldID", "field"), new ParamInfo ("jobject", "value", Modifier.CanBeNull)},
+ },
+ new JniFunction {
+ DeclaringType = InstanceFieldsCategory,
+ Name = "SetBooleanField",
+ Visibility = "public",
+ Prototype = "void (*SetBooleanField)(JNIEnv*, jobject, jfieldID, jboolean);",
+ ReturnType = "void",
+ Parameters = new ParamInfo [] {new ParamInfo ("jobject", "instance"), new ParamInfo ("jfieldID", "field"), new ParamInfo ("jboolean", "value", Modifier.CanBeNull)},
+ },
+ new JniFunction {
+ DeclaringType = InstanceFieldsCategory,
+ Name = "SetByteField",
+ Visibility = "public",
+ Prototype = "void (*SetByteField)(JNIEnv*, jobject, jfieldID, jbyte);",
+ ReturnType = "void",
+ Parameters = new ParamInfo [] {new ParamInfo ("jobject", "instance"), new ParamInfo ("jfieldID", "field"), new ParamInfo ("jbyte", "value", Modifier.CanBeNull)},
+ },
+ new JniFunction {
+ DeclaringType = InstanceFieldsCategory,
+ Name = "SetCharField",
+ Visibility = "public",
+ Prototype = "void (*SetCharField)(JNIEnv*, jobject, jfieldID, jchar);",
+ ReturnType = "void",
+ Parameters = new ParamInfo [] {new ParamInfo ("jobject", "instance"), new ParamInfo ("jfieldID", "field"), new ParamInfo ("jchar", "value", Modifier.CanBeNull)},
+ },
+ new JniFunction {
+ DeclaringType = InstanceFieldsCategory,
+ Name = "SetShortField",
+ Visibility = "public",
+ Prototype = "void (*SetShortField)(JNIEnv*, jobject, jfieldID, jshort);",
+ ReturnType = "void",
+ Parameters = new ParamInfo [] {new ParamInfo ("jobject", "instance"), new ParamInfo ("jfieldID", "field"), new ParamInfo ("jshort", "value", Modifier.CanBeNull)},
+ },
+ new JniFunction {
+ DeclaringType = InstanceFieldsCategory,
+ Name = "SetIntField",
+ Visibility = "public",
+ Prototype = "void (*SetIntField)(JNIEnv*, jobject, jfieldID, jint);",
+ ReturnType = "void",
+ Parameters = new ParamInfo [] {new ParamInfo ("jobject", "instance"), new ParamInfo ("jfieldID", "field"), new ParamInfo ("jint", "value", Modifier.CanBeNull)},
+ },
+ new JniFunction {
+ DeclaringType = InstanceFieldsCategory,
+ Name = "SetLongField",
+ Visibility = "public",
+ Prototype = "void (*SetLongField)(JNIEnv*, jobject, jfieldID, jlong);",
+ ReturnType = "void",
+ Parameters = new ParamInfo [] {new ParamInfo ("jobject", "instance"), new ParamInfo ("jfieldID", "field"), new ParamInfo ("jlong", "value", Modifier.CanBeNull)},
+ },
+ new JniFunction {
+ DeclaringType = InstanceFieldsCategory,
+ Name = "SetFloatField",
+ Visibility = "public",
+ Prototype = "void (*SetFloatField)(JNIEnv*, jobject, jfieldID, jfloat);",
+ ReturnType = "void",
+ Parameters = new ParamInfo [] {new ParamInfo ("jobject", "instance"), new ParamInfo ("jfieldID", "field"), new ParamInfo ("jfloat", "value", Modifier.CanBeNull)},
+ },
+ new JniFunction {
+ DeclaringType = InstanceFieldsCategory,
+ Name = "SetDoubleField",
+ Visibility = "public",
+ Prototype = "void (*SetDoubleField)(JNIEnv*, jobject, jfieldID, jdouble);",
+ ReturnType = "void",
+ Parameters = new ParamInfo [] {new ParamInfo ("jobject", "instance"), new ParamInfo ("jfieldID", "field"), new ParamInfo ("jdouble", "value", Modifier.CanBeNull)},
+ },
+ new JniFunction {
+ DeclaringType = StaticMethodsCategory,
+ Name = "GetStaticMethodID",
+ Visibility = "public",
+ Throws = true,
+ Prototype = "jmethodID (*GetStaticMethodID)(JNIEnv*, jclass, const char*, const char*);",
+ ReturnType = "jstaticmethodID",
+ Parameters = new ParamInfo [] {new ParamInfo ("jclass", "type"), new ParamInfo ("const char*", "name"), new ParamInfo ("const char*", "signature")},
+ },
+ new JniFunction {
+ DeclaringType = StaticMethodsCategory,
+ Name = "CallStaticObjectMethod",
+ Visibility = "public",
+ Throws = true,
+ Prototype = "jobject (*CallStaticObjectMethod)(JNIEnv*, jclass, jmethodID, ...);",
+ ReturnType = "jobject",
+ Parameters = new ParamInfo [] {new ParamInfo ("jclass", "type"), new ParamInfo ("jstaticmethodID", "method")},
+ },
+ new JniFunction {
+ DeclaringType = StaticMethodsCategory,
+ Name = "CallStaticObjectMethodV",
+ Visibility = "private",
+ Throws = true,
+ Prototype = "jobject (*CallStaticObjectMethodV)(JNIEnv*, jclass, jmethodID, va_list);",
+ ReturnType = "jobject",
+ Parameters = new ParamInfo [] {new ParamInfo ("jclass", "type"), new ParamInfo ("jstaticmethodID", "method"), new ParamInfo ("va_list", "args", true)},
+ },
+ new JniFunction {
+ DeclaringType = StaticMethodsCategory,
+ Name = "CallStaticObjectMethodA",
+ ApiName = "CallStaticObjectMethod",
+ Visibility = "public",
+ Throws = true,
+ Prototype = "jobject (*CallStaticObjectMethodA)(JNIEnv*, jclass, jmethodID, jvalue*);",
+ ReturnType = "jobject",
+ Parameters = new ParamInfo [] {new ParamInfo ("jclass", "type"), new ParamInfo ("jstaticmethodID", "method"), new ParamInfo ("jvalue*", "args", true)},
+ },
+ new JniFunction {
+ DeclaringType = StaticMethodsCategory,
+ Name = "CallStaticBooleanMethod",
+ Visibility = "public",
+ Throws = true,
+ Prototype = "jboolean (*CallStaticBooleanMethod)(JNIEnv*, jclass, jmethodID, ...);",
+ ReturnType = "jboolean",
+ Parameters = new ParamInfo [] {new ParamInfo ("jclass", "type"), new ParamInfo ("jstaticmethodID", "method")},
+ },
+ new JniFunction {
+ DeclaringType = StaticMethodsCategory,
+ Name = "CallStaticBooleanMethodV",
+ Visibility = "private",
+ Throws = true,
+ Prototype = "jboolean (*CallStaticBooleanMethodV)(JNIEnv*, jclass, jmethodID, va_list);",
+ ReturnType = "jboolean",
+ Parameters = new ParamInfo [] {new ParamInfo ("jclass", "type"), new ParamInfo ("jstaticmethodID", "method"), new ParamInfo ("va_list", "args")},
+ },
+ new JniFunction {
+ DeclaringType = StaticMethodsCategory,
+ Name = "CallStaticBooleanMethodA",
+ ApiName = "CallStaticBooleanMethod",
+ Visibility = "public",
+ Throws = true,
+ Prototype = "jboolean (*CallStaticBooleanMethodA)(JNIEnv*, jclass, jmethodID, jvalue*);",
+ ReturnType = "jboolean",
+ Parameters = new ParamInfo [] {new ParamInfo ("jclass", "type"), new ParamInfo ("jstaticmethodID", "method"), new ParamInfo ("jvalue*", "args", true)},
+ },
+ new JniFunction {
+ DeclaringType = StaticMethodsCategory,
+ Name = "CallStaticByteMethod",
+ Visibility = "public",
+ Throws = true,
+ Prototype = "jbyte (*CallStaticByteMethod)(JNIEnv*, jclass, jmethodID, ...);",
+ ReturnType = "jbyte",
+ Parameters = new ParamInfo [] {new ParamInfo ("jclass", "type"), new ParamInfo ("jstaticmethodID", "method")},
+ },
+ new JniFunction {
+ DeclaringType = StaticMethodsCategory,
+ Name = "CallStaticByteMethodV",
+ Visibility = "private",
+ Throws = true,
+ Prototype = "jbyte (*CallStaticByteMethodV)(JNIEnv*, jclass, jmethodID, va_list);",
+ ReturnType = "jbyte",
+ Parameters = new ParamInfo [] {new ParamInfo ("jclass", "type"), new ParamInfo ("jstaticmethodID", "method"), new ParamInfo ("va_list", "args")},
+ },
+ new JniFunction {
+ DeclaringType = StaticMethodsCategory,
+ Name = "CallStaticByteMethodA",
+ ApiName = "CallStaticByteMethod",
+ Throws = true,
+ Visibility = "public",
+ Prototype = "jbyte (*CallStaticByteMethodA)(JNIEnv*, jclass, jmethodID, jvalue*);",
+ ReturnType = "jbyte",
+ Parameters = new ParamInfo [] {new ParamInfo ("jclass", "type"), new ParamInfo ("jstaticmethodID", "method"), new ParamInfo ("jvalue*", "args", true)},
+ },
+ new JniFunction {
+ DeclaringType = StaticMethodsCategory,
+ Name = "CallStaticCharMethod",
+ Visibility = "public",
+ Throws = true,
+ Prototype = "jchar (*CallStaticCharMethod)(JNIEnv*, jclass, jmethodID, ...);",
+ ReturnType = "jchar",
+ Parameters = new ParamInfo [] {new ParamInfo ("jclass", "type"), new ParamInfo ("jstaticmethodID", "method")},
+ },
+ new JniFunction {
+ DeclaringType = StaticMethodsCategory,
+ Name = "CallStaticCharMethodV",
+ Visibility = "private",
+ Throws = true,
+ Prototype = "jchar (*CallStaticCharMethodV)(JNIEnv*, jclass, jmethodID, va_list);",
+ ReturnType = "jchar",
+ Parameters = new ParamInfo [] {new ParamInfo ("jclass", "type"), new ParamInfo ("jstaticmethodID", "method"), new ParamInfo ("va_list", "args")},
+ },
+ new JniFunction {
+ DeclaringType = StaticMethodsCategory,
+ Name = "CallStaticCharMethodA",
+ ApiName = "CallStaticCharMethod",
+ Visibility = "public",
+ Throws = true,
+ Prototype = "jchar (*CallStaticCharMethodA)(JNIEnv*, jclass, jmethodID, jvalue*);",
+ ReturnType = "jchar",
+ Parameters = new ParamInfo [] {new ParamInfo ("jclass", "type"), new ParamInfo ("jstaticmethodID", "method"), new ParamInfo ("jvalue*", "args", true)},
+ },
+ new JniFunction {
+ DeclaringType = StaticMethodsCategory,
+ Name = "CallStaticShortMethod",
+ Visibility = "public",
+ Throws = true,
+ Prototype = "jshort (*CallStaticShortMethod)(JNIEnv*, jclass, jmethodID, ...);",
+ ReturnType = "jshort",
+ Parameters = new ParamInfo [] {new ParamInfo ("jclass", "type"), new ParamInfo ("jstaticmethodID", "method")},
+ },
+ new JniFunction {
+ DeclaringType = StaticMethodsCategory,
+ Name = "CallStaticShortMethodV",
+ Visibility = "private",
+ Throws = true,
+ Prototype = "jshort (*CallStaticShortMethodV)(JNIEnv*, jclass, jmethodID, va_list);",
+ ReturnType = "jshort",
+ Parameters = new ParamInfo [] {new ParamInfo ("jclass", "type"), new ParamInfo ("jstaticmethodID", "method"), new ParamInfo ("va_list", "args")},
+ },
+ new JniFunction {
+ DeclaringType = StaticMethodsCategory,
+ Name = "CallStaticShortMethodA",
+ ApiName = "CallStaticShortMethod",
+ Visibility = "public",
+ Throws = true,
+ Prototype = "jshort (*CallStaticShortMethodA)(JNIEnv*, jclass, jmethodID, jvalue*);",
+ ReturnType = "jshort",
+ Parameters = new ParamInfo [] {new ParamInfo ("jclass", "type"), new ParamInfo ("jstaticmethodID", "method"), new ParamInfo ("jvalue*", "args", true)},
+ },
+ new JniFunction {
+ DeclaringType = StaticMethodsCategory,
+ Name = "CallStaticIntMethod",
+ Visibility = "public",
+ Throws = true,
+ Prototype = "jint (*CallStaticIntMethod)(JNIEnv*, jclass, jmethodID, ...);",
+ ReturnType = "jint",
+ Parameters = new ParamInfo [] {new ParamInfo ("jclass", "type"), new ParamInfo ("jstaticmethodID", "method")},
+ },
+ new JniFunction {
+ DeclaringType = StaticMethodsCategory,
+ Name = "CallStaticIntMethodV",
+ Visibility = "private",
+ Throws = true,
+ Prototype = "jint (*CallStaticIntMethodV)(JNIEnv*, jclass, jmethodID, va_list);",
+ ReturnType = "jint",
+ Parameters = new ParamInfo [] {new ParamInfo ("jclass", "type"), new ParamInfo ("jstaticmethodID", "method"), new ParamInfo ("va_list", "args")},
+ },
+ new JniFunction {
+ DeclaringType = StaticMethodsCategory,
+ Name = "CallStaticIntMethodA",
+ ApiName = "CallStaticIntMethod",
+ Visibility = "public",
+ Throws = true,
+ Prototype = "jint (*CallStaticIntMethodA)(JNIEnv*, jclass, jmethodID, jvalue*);",
+ ReturnType = "jint",
+ Parameters = new ParamInfo [] {new ParamInfo ("jclass", "type"), new ParamInfo ("jstaticmethodID", "method"), new ParamInfo ("jvalue*", "args", true)},
+ },
+ new JniFunction {
+ DeclaringType = StaticMethodsCategory,
+ Name = "CallStaticLongMethod",
+ Visibility = "public",
+ Throws = true,
+ Prototype = "jlong (*CallStaticLongMethod)(JNIEnv*, jclass, jmethodID, ...);",
+ ReturnType = "jlong",
+ Parameters = new ParamInfo [] {new ParamInfo ("jclass", "type"), new ParamInfo ("jstaticmethodID", "method")},
+ },
+ new JniFunction {
+ DeclaringType = StaticMethodsCategory,
+ Name = "CallStaticLongMethodV",
+ Visibility = "private",
+ Throws = true,
+ Prototype = "jlong (*CallStaticLongMethodV)(JNIEnv*, jclass, jmethodID, va_list);",
+ ReturnType = "jlong",
+ Parameters = new ParamInfo [] {new ParamInfo ("jclass", "type"), new ParamInfo ("jstaticmethodID", "method"), new ParamInfo ("va_list", "args")},
+ },
+ new JniFunction {
+ DeclaringType = StaticMethodsCategory,
+ Name = "CallStaticLongMethodA",
+ ApiName = "CallStaticLongMethod",
+ Visibility = "public",
+ Throws = true,
+ Prototype = "jlong (*CallStaticLongMethodA)(JNIEnv*, jclass, jmethodID, jvalue*);",
+ ReturnType = "jlong",
+ Parameters = new ParamInfo [] {new ParamInfo ("jclass", "type"), new ParamInfo ("jstaticmethodID", "method"), new ParamInfo ("jvalue*", "args", true)},
+ },
+ new JniFunction {
+ DeclaringType = StaticMethodsCategory,
+ Name = "CallStaticFloatMethod",
+ Visibility = "public",
+ Throws = true,
+ Prototype = "jfloat (*CallStaticFloatMethod)(JNIEnv*, jclass, jmethodID, ...);",
+ ReturnType = "jfloat",
+ Parameters = new ParamInfo [] {new ParamInfo ("jclass", "type"), new ParamInfo ("jstaticmethodID", "method")},
+ },
+ new JniFunction {
+ DeclaringType = StaticMethodsCategory,
+ Name = "CallStaticFloatMethodV",
+ Visibility = "private",
+ Throws = true,
+ Prototype = "jfloat (*CallStaticFloatMethodV)(JNIEnv*, jclass, jmethodID, va_list);",
+ ReturnType = "jfloat",
+ Parameters = new ParamInfo [] {new ParamInfo ("jclass", "type"), new ParamInfo ("jstaticmethodID", "method"), new ParamInfo ("va_list", "args")},
+ },
+ new JniFunction {
+ DeclaringType = StaticMethodsCategory,
+ Name = "CallStaticFloatMethodA",
+ ApiName = "CallStaticFloatMethod",
+ Visibility = "public",
+ Throws = true,
+ Prototype = "jfloat (*CallStaticFloatMethodA)(JNIEnv*, jclass, jmethodID, jvalue*);",
+ ReturnType = "jfloat",
+ Parameters = new ParamInfo [] {new ParamInfo ("jclass", "type"), new ParamInfo ("jstaticmethodID", "method"), new ParamInfo ("jvalue*", "args", true)},
+ },
+ new JniFunction {
+ DeclaringType = StaticMethodsCategory,
+ Name = "CallStaticDoubleMethod",
+ Visibility = "public",
+ Throws = true,
+ Prototype = "jdouble (*CallStaticDoubleMethod)(JNIEnv*, jclass, jmethodID, ...);",
+ ReturnType = "jdouble",
+ Parameters = new ParamInfo [] {new ParamInfo ("jclass", "type"), new ParamInfo ("jstaticmethodID", "method")},
+ },
+ new JniFunction {
+ DeclaringType = StaticMethodsCategory,
+ Name = "CallStaticDoubleMethodV",
+ Visibility = "private",
+ Throws = true,
+ Prototype = "jdouble (*CallStaticDoubleMethodV)(JNIEnv*, jclass, jmethodID, va_list);",
+ ReturnType = "jdouble",
+ Parameters = new ParamInfo [] {new ParamInfo ("jclass", "type"), new ParamInfo ("jstaticmethodID", "method"), new ParamInfo ("va_list", "args")},
+ },
+ new JniFunction {
+ DeclaringType = StaticMethodsCategory,
+ Name = "CallStaticDoubleMethodA",
+ ApiName = "CallStaticDoubleMethod",
+ Visibility = "public",
+ Throws = true,
+ Prototype = "jdouble (*CallStaticDoubleMethodA)(JNIEnv*, jclass, jmethodID, jvalue*);",
+ ReturnType = "jdouble",
+ Parameters = new ParamInfo [] {new ParamInfo ("jclass", "type"), new ParamInfo ("jstaticmethodID", "method"), new ParamInfo ("jvalue*", "args", true)},
+ },
+ new JniFunction {
+ DeclaringType = StaticMethodsCategory,
+ Name = "CallStaticVoidMethod",
+ Visibility = "public",
+ Throws = true,
+ Prototype = "void (*CallStaticVoidMethod)(JNIEnv*, jclass, jmethodID, ...);",
+ ReturnType = "void",
+ Parameters = new ParamInfo [] {new ParamInfo ("jclass", "type"), new ParamInfo ("jstaticmethodID", "method")},
+ },
+ new JniFunction {
+ DeclaringType = StaticMethodsCategory,
+ Name = "CallStaticVoidMethodV",
+ Visibility = "private",
+ Throws = true,
+ Prototype = "void (*CallStaticVoidMethodV)(JNIEnv*, jclass, jmethodID, va_list);",
+ ReturnType = "void",
+ Parameters = new ParamInfo [] {new ParamInfo ("jclass", "type"), new ParamInfo ("jstaticmethodID", "method"), new ParamInfo ("va_list", "args")},
+ },
+ new JniFunction {
+ DeclaringType = StaticMethodsCategory,
+ Name = "CallStaticVoidMethodA",
+ ApiName = "CallStaticVoidMethod",
+ Visibility = "public",
+ Throws = true,
+ Prototype = "void (*CallStaticVoidMethodA)(JNIEnv*, jclass, jmethodID, jvalue*);",
+ ReturnType = "void",
+ Parameters = new ParamInfo [] {new ParamInfo ("jclass", "type"), new ParamInfo ("jstaticmethodID", "method"), new ParamInfo ("jvalue*", "args", true)},
+ },
+ new JniFunction {
+ DeclaringType = StaticFieldsCategory,
+ Name = "GetStaticFieldID",
+ Visibility = "public",
+ Throws = true,
+ Prototype = "jstaticfieldID (*GetStaticFieldID)(JNIEnv*, jclass, const char*, const char*);",
+ ReturnType = "jstaticfieldID",
+ Parameters = new ParamInfo [] {new ParamInfo ("jclass", "type"), new ParamInfo ("const char*", "name"), new ParamInfo ("const char*", "signature")},
+ },
+ new JniFunction {
+ DeclaringType = StaticFieldsCategory,
+ Name = "GetStaticObjectField",
+ Visibility = "public",
+ Prototype = "jobject (*GetStaticObjectField)(JNIEnv*, jclass, jfieldID);",
+ ReturnType = "jobject",
+ Parameters = new ParamInfo [] {new ParamInfo ("jclass", "type"), new ParamInfo ("jstaticfieldID", "field")},
+ },
+ new JniFunction {
+ DeclaringType = StaticFieldsCategory,
+ Name = "GetStaticBooleanField",
+ Visibility = "public",
+ Prototype = "jboolean (*GetStaticBooleanField)(JNIEnv*, jclass, jfieldID);",
+ ReturnType = "jboolean",
+ Parameters = new ParamInfo [] {new ParamInfo ("jclass", "type"), new ParamInfo ("jstaticfieldID", "field")},
+ },
+ new JniFunction {
+ DeclaringType = StaticFieldsCategory,
+ Name = "GetStaticByteField",
+ Visibility = "public",
+ Prototype = "jbyte (*GetStaticByteField)(JNIEnv*, jclass, jfieldID);",
+ ReturnType = "jbyte",
+ Parameters = new ParamInfo [] {new ParamInfo ("jclass", "type"), new ParamInfo ("jstaticfieldID", "field")},
+ },
+ new JniFunction {
+ DeclaringType = StaticFieldsCategory,
+ Name = "GetStaticCharField",
+ Visibility = "public",
+ Prototype = "jchar (*GetStaticCharField)(JNIEnv*, jclass, jfieldID);",
+ ReturnType = "jchar",
+ Parameters = new ParamInfo [] {new ParamInfo ("jclass", "type"), new ParamInfo ("jstaticfieldID", "field")},
+ },
+ new JniFunction {
+ DeclaringType = StaticFieldsCategory,
+ Name = "GetStaticShortField",
+ Visibility = "public",
+ Prototype = "jshort (*GetStaticShortField)(JNIEnv*, jclass, jfieldID);",
+ ReturnType = "jshort",
+ Parameters = new ParamInfo [] {new ParamInfo ("jclass", "type"), new ParamInfo ("jstaticfieldID", "field")},
+ },
+ new JniFunction {
+ DeclaringType = StaticFieldsCategory,
+ Name = "GetStaticIntField",
+ Visibility = "public",
+ Prototype = "jint (*GetStaticIntField)(JNIEnv*, jclass, jfieldID);",
+ ReturnType = "jint",
+ Parameters = new ParamInfo [] {new ParamInfo ("jclass", "type"), new ParamInfo ("jstaticfieldID", "field")},
+ },
+ new JniFunction {
+ DeclaringType = StaticFieldsCategory,
+ Name = "GetStaticLongField",
+ Visibility = "public",
+ Prototype = "jlong (*GetStaticLongField)(JNIEnv*, jclass, jfieldID);",
+ ReturnType = "jlong",
+ Parameters = new ParamInfo [] {new ParamInfo ("jclass", "type"), new ParamInfo ("jstaticfieldID", "field")},
+ },
+ new JniFunction {
+ DeclaringType = StaticFieldsCategory,
+ Name = "GetStaticFloatField",
+ Visibility = "public",
+ Prototype = "jfloat (*GetStaticFloatField)(JNIEnv*, jclass, jfieldID);",
+ ReturnType = "jfloat",
+ Parameters = new ParamInfo [] {new ParamInfo ("jclass", "type"), new ParamInfo ("jstaticfieldID", "field")},
+ },
+ new JniFunction {
+ DeclaringType = StaticFieldsCategory,
+ Name = "GetStaticDoubleField",
+ Visibility = "public",
+ Prototype = "jdouble (*GetStaticDoubleField)(JNIEnv*, jclass, jfieldID);",
+ ReturnType = "jdouble",
+ Parameters = new ParamInfo [] {new ParamInfo ("jclass", "type"), new ParamInfo ("jstaticfieldID", "field")},
+ },
+ new JniFunction {
+ DeclaringType = StaticFieldsCategory,
+ Name = "SetStaticObjectField",
+ Visibility = "public",
+ Prototype = "void (*SetStaticObjectField)(JNIEnv*, jclass, jfieldID, jobject);",
+ ReturnType = "void",
+ Parameters = new ParamInfo [] {new ParamInfo ("jclass", "type"), new ParamInfo ("jstaticfieldID", "field"), new ParamInfo ("jobject", "value", Modifier.CanBeNull)},
+ },
+ new JniFunction {
+ DeclaringType = StaticFieldsCategory,
+ Name = "SetStaticBooleanField",
+ Visibility = "public",
+ Prototype = "void (*SetStaticBooleanField)(JNIEnv*, jclass, jfieldID, jboolean);",
+ ReturnType = "void",
+ Parameters = new ParamInfo [] {new ParamInfo ("jclass", "type"), new ParamInfo ("jstaticfieldID", "field"), new ParamInfo ("jboolean", "value", Modifier.CanBeNull)},
+ },
+ new JniFunction {
+ DeclaringType = StaticFieldsCategory,
+ Name = "SetStaticByteField",
+ Visibility = "public",
+ Prototype = "void (*SetStaticByteField)(JNIEnv*, jclass, jfieldID, jbyte);",
+ ReturnType = "void",
+ Parameters = new ParamInfo [] {new ParamInfo ("jclass", "type"), new ParamInfo ("jstaticfieldID", "field"), new ParamInfo ("jbyte", "value", Modifier.CanBeNull)},
+ },
+ new JniFunction {
+ DeclaringType = StaticFieldsCategory,
+ Name = "SetStaticCharField",
+ Visibility = "public",
+ Prototype = "void (*SetStaticCharField)(JNIEnv*, jclass, jfieldID, jchar);",
+ ReturnType = "void",
+ Parameters = new ParamInfo [] {new ParamInfo ("jclass", "type"), new ParamInfo ("jstaticfieldID", "field"), new ParamInfo ("jchar", "value", Modifier.CanBeNull)},
+ },
+ new JniFunction {
+ DeclaringType = StaticFieldsCategory,
+ Name = "SetStaticShortField",
+ Visibility = "public",
+ Prototype = "void (*SetStaticShortField)(JNIEnv*, jclass, jfieldID, jshort);",
+ ReturnType = "void",
+ Parameters = new ParamInfo [] {new ParamInfo ("jclass", "type"), new ParamInfo ("jstaticfieldID", "field"), new ParamInfo ("jshort", "value", Modifier.CanBeNull)},
+ },
+ new JniFunction {
+ DeclaringType = StaticFieldsCategory,
+ Name = "SetStaticIntField",
+ Visibility = "public",
+ Prototype = "void (*SetStaticIntField)(JNIEnv*, jclass, jfieldID, jint);",
+ ReturnType = "void",
+ Parameters = new ParamInfo [] {new ParamInfo ("jclass", "type"), new ParamInfo ("jstaticfieldID", "field"), new ParamInfo ("jint", "value", Modifier.CanBeNull)},
+ },
+ new JniFunction {
+ DeclaringType = StaticFieldsCategory,
+ Name = "SetStaticLongField",
+ Visibility = "public",
+ Prototype = "void (*SetStaticLongField)(JNIEnv*, jclass, jfieldID, jlong);",
+ ReturnType = "void",
+ Parameters = new ParamInfo [] {new ParamInfo ("jclass", "type"), new ParamInfo ("jstaticfieldID", "field"), new ParamInfo ("jlong", "value", Modifier.CanBeNull)},
+ },
+ new JniFunction {
+ DeclaringType = StaticFieldsCategory,
+ Name = "SetStaticFloatField",
+ Visibility = "public",
+ Prototype = "void (*SetStaticFloatField)(JNIEnv*, jclass, jfieldID, jfloat);",
+ ReturnType = "void",
+ Parameters = new ParamInfo [] {new ParamInfo ("jclass", "type"), new ParamInfo ("jstaticfieldID", "field"), new ParamInfo ("jfloat", "value", Modifier.CanBeNull)},
+ },
+ new JniFunction {
+ DeclaringType = StaticFieldsCategory,
+ Name = "SetStaticDoubleField",
+ Visibility = "public",
+ Prototype = "void (*SetStaticDoubleField)(JNIEnv*, jclass, jfieldID, jdouble);",
+ ReturnType = "void",
+ Parameters = new ParamInfo [] {new ParamInfo ("jclass", "type"), new ParamInfo ("jstaticfieldID", "field"), new ParamInfo ("jdouble", "value", Modifier.CanBeNull)},
+ },
+ new JniFunction {
+ DeclaringType = StringOperationsCategory,
+ Name = "NewString",
+ // CustomWrapper = true,
+ Visibility = "public",
+ Throws = true,
+ Prototype = "jstring (*NewString)(JNIEnv*, const jchar*, jsize);",
+ ReturnType = "jstring",
+ Parameters = new ParamInfo [] {new ParamInfo ("jchar*", "unicodeChars"), new ParamInfo ("jsize", "length")},
+ },
+ new JniFunction {
+ DeclaringType = StringOperationsCategory,
+ Name = "GetStringLength",
+ Visibility = "public",
+ Prototype = "jsize (*GetStringLength)(JNIEnv*, jstring);",
+ ReturnType = "jsize",
+ Parameters = new ParamInfo [] {new ParamInfo ("jstring", "stringInstance")},
+ },
+ new JniFunction {
+ DeclaringType = StringOperationsCategory,
+ Name = "GetStringChars",
+ Visibility = "public",
+ Prototype = "const jchar* (*GetStringChars)(JNIEnv*, jstring, jboolean*);",
+ ReturnType = TypeInfo.Create ("const jchar*", "char*"),
+ Parameters = new ParamInfo [] {new ParamInfo ("jstring", "stringInstance"), new ParamInfo (TypeInfo.Create ("jboolean*", "bool*"), "isCopy", Modifier.CanBeNull)},
+ },
+ new JniFunction {
+ DeclaringType = StringOperationsCategory,
+ Name = "ReleaseStringChars",
+ Visibility = "public",
+ Prototype = "void (*ReleaseStringChars)(JNIEnv*, jstring, const jchar*);",
+ ReturnType = "void",
+ Parameters = new ParamInfo [] {new ParamInfo ("jstring", "stringInstance"), new ParamInfo ("jchar*", "chars")},
+ },
+ new JniFunction {
+ DeclaringType = StringOperationsCategory,
+ Name = "NewStringUTF",
+ Visibility = "private",
+ Throws = true,
+ Prototype = "jstring (*NewStringUTF)(JNIEnv*, const char*);",
+ ReturnType = "jstring",
+ Parameters = new ParamInfo [] {new ParamInfo ("const char*", "bytes")},
+ },
+ new JniFunction {
+ DeclaringType = StringOperationsCategory,
+ Name = "GetStringUTFLength",
+ Visibility = "private",
+ Prototype = "jsize (*GetStringUTFLength)(JNIEnv*, jstring);",
+ ReturnType = "jsize",
+ Parameters = new ParamInfo [] {new ParamInfo ("jstring", "stringInstance")},
+ },
+ new JniFunction {
+ DeclaringType = StringOperationsCategory,
+ Name = "GetStringUTFChars",
+ Visibility = "private",
+ Prototype = "const char* (*GetStringUTFChars)(JNIEnv*, jstring, jboolean*);",
+ ReturnType = "const char*",
+ Parameters = new ParamInfo [] {new ParamInfo ("jstring", "stringInstance"), new ParamInfo (TypeInfo.Create ("jboolean*", "bool*"), "isCopy", Modifier.CanBeNull)},
+ },
+ new JniFunction {
+ DeclaringType = StringOperationsCategory,
+ Name = "ReleaseStringUTFChars",
+ Visibility = "private",
+ Prototype = "void (*ReleaseStringUTFChars)(JNIEnv*, jstring, const char*);",
+ ReturnType = "void",
+ Parameters = new ParamInfo [] {new ParamInfo ("jstring", "stringInstance"), new ParamInfo ("const char*", "utf")},
+ },
+ new JniFunction {
+ DeclaringType = ArrayOperationsCategory,
+ Name = "GetArrayLength",
+ // CustomWrapper = true,
+ Visibility = "public",
+ Prototype = "jsize (*GetArrayLength)(JNIEnv*, jarray);",
+ ReturnType = "jsize",
+ Parameters = new ParamInfo [] {new ParamInfo ("jarray", "array")},
+ },
+ new JniFunction {
+ DeclaringType = ArrayOperationsCategory,
+ Name = "NewObjectArray",
+ // ApiName = "NewArray",
+ // CustomWrapper = true,
+ Visibility = "public",
+ Throws = true,
+ Prototype = "jobjectArray (*NewObjectArray)(JNIEnv*, jsize, jclass, jobject);",
+ ReturnType = "jobjectArray",
+ Parameters = new ParamInfo [] {new ParamInfo ("jsize", "length"), new ParamInfo ("jclass", "elementClass"), new ParamInfo ("jobject", "initialElement", Modifier.CanBeNull)},
+ },
+ new JniFunction {
+ DeclaringType = ArrayOperationsCategory,
+ Name = "GetObjectArrayElement",
+ Visibility = "public",
+ Throws = true,
+ Prototype = "jobject (*GetObjectArrayElement)(JNIEnv*, jobjectArray, jsize);",
+ ReturnType = "jobject",
+ Parameters = new ParamInfo [] {new ParamInfo ("jobjectArray", "array"), new ParamInfo ("jsize", "index")},
+ },
+ new JniFunction {
+ DeclaringType = ArrayOperationsCategory,
+ Name = "SetObjectArrayElement",
+ Visibility = "public",
+ Throws = true,
+ Prototype = "void (*SetObjectArrayElement)(JNIEnv*, jobjectArray, jsize, jobject);",
+ ReturnType = "void",
+ Parameters = new ParamInfo [] {new ParamInfo ("jobjectArray", "array"), new ParamInfo ("jsize", "index"), new ParamInfo ("jobject", "value", Modifier.CanBeNull)},
+ },
+ new JniFunction {
+ DeclaringType = ArrayOperationsCategory,
+ Name = "NewBooleanArray",
+ Visibility = "public",
+ Prototype = "jbooleanArray (*NewBooleanArray)(JNIEnv*, jsize);",
+ ReturnType = "jbooleanArray",
+ Parameters = new ParamInfo [] {new ParamInfo ("jsize", "length")},
+ },
+ new JniFunction {
+ DeclaringType = ArrayOperationsCategory,
+ Name = "NewByteArray",
+ Visibility = "public",
+ Prototype = "jbyteArray (*NewByteArray)(JNIEnv*, jsize);",
+ ReturnType = "jbyteArray",
+ Parameters = new ParamInfo [] {new ParamInfo ("jsize", "length")},
+ },
+ new JniFunction {
+ DeclaringType = ArrayOperationsCategory,
+ Name = "NewCharArray",
+ Visibility = "public",
+ Prototype = "jcharArray (*NewCharArray)(JNIEnv*, jsize);",
+ ReturnType = "jcharArray",
+ Parameters = new ParamInfo [] {new ParamInfo ("jsize", "length")},
+ },
+ new JniFunction {
+ DeclaringType = ArrayOperationsCategory,
+ Name = "NewShortArray",
+ Visibility = "public",
+ Prototype = "jshortArray (*NewShortArray)(JNIEnv*, jsize);",
+ ReturnType = "jshortArray",
+ Parameters = new ParamInfo [] {new ParamInfo ("jsize", "length")},
+ },
+ new JniFunction {
+ DeclaringType = ArrayOperationsCategory,
+ Name = "NewIntArray",
+ Visibility = "public",
+ Prototype = "jintArray (*NewIntArray)(JNIEnv*, jsize);",
+ ReturnType = "jintArray",
+ Parameters = new ParamInfo [] {new ParamInfo ("jsize", "length")},
+ },
+ new JniFunction {
+ DeclaringType = ArrayOperationsCategory,
+ Name = "NewLongArray",
+ Visibility = "public",
+ Prototype = "jlongArray (*NewLongArray)(JNIEnv*, jsize);",
+ ReturnType = "jlongArray",
+ Parameters = new ParamInfo [] {new ParamInfo ("jsize", "length")},
+ },
+ new JniFunction {
+ DeclaringType = ArrayOperationsCategory,
+ Name = "NewFloatArray",
+ Visibility = "public",
+ Prototype = "jfloatArray (*NewFloatArray)(JNIEnv*, jsize);",
+ ReturnType = "jfloatArray",
+ Parameters = new ParamInfo [] {new ParamInfo ("jsize", "length")},
+ },
+ new JniFunction {
+ DeclaringType = ArrayOperationsCategory,
+ Name = "NewDoubleArray",
+ Visibility = "public",
+ Prototype = "jdoubleArray (*NewDoubleArray)(JNIEnv*, jsize);",
+ ReturnType = "jdoubleArray",
+ Parameters = new ParamInfo [] {new ParamInfo ("jsize", "length")},
+ },
+ new JniFunction {
+ DeclaringType = ArrayOperationsCategory,
+ Name = "GetBooleanArrayElements",
+ Visibility = "public",
+ Prototype = "jboolean* (*GetBooleanArrayElements)(JNIEnv*, jbooleanArray, jboolean*);",
+ ReturnType = "jboolean*",
+ Parameters = new ParamInfo [] {new ParamInfo ("jbooleanArray", "array"), new ParamInfo (TypeInfo.Create ("jboolean*", "bool*"), "isCopy", Modifier.CanBeNull)},
+ },
+ new JniFunction {
+ DeclaringType = ArrayOperationsCategory,
+ Name = "GetByteArrayElements",
+ Visibility = "public",
+ Prototype = "jbyte* (*GetByteArrayElements)(JNIEnv*, jbyteArray, jboolean*);",
+ ReturnType = "jbyte*",
+ Parameters = new ParamInfo [] {new ParamInfo ("jbyteArray", "array"), new ParamInfo (TypeInfo.Create ("jboolean*", "bool*"), "isCopy", Modifier.CanBeNull)},
+ },
+ new JniFunction {
+ DeclaringType = ArrayOperationsCategory,
+ Name = "GetCharArrayElements",
+ Visibility = "public",
+ Prototype = "jchar* (*GetCharArrayElements)(JNIEnv*, jcharArray, jboolean*);",
+ ReturnType = "jchar*",
+ Parameters = new ParamInfo [] {new ParamInfo ("jcharArray", "array"), new ParamInfo (TypeInfo.Create ("jboolean*", "bool*"), "isCopy", Modifier.CanBeNull)},
+ },
+ new JniFunction {
+ DeclaringType = ArrayOperationsCategory,
+ Name = "GetShortArrayElements",
+ Visibility = "public",
+ Prototype = "jshort* (*GetShortArrayElements)(JNIEnv*, jshortArray, jboolean*);",
+ ReturnType = "jshort*",
+ Parameters = new ParamInfo [] {new ParamInfo ("jshortArray", "array"), new ParamInfo (TypeInfo.Create ("jboolean*", "bool*"), "isCopy", Modifier.CanBeNull)},
+ },
+ new JniFunction {
+ DeclaringType = ArrayOperationsCategory,
+ Name = "GetIntArrayElements",
+ Visibility = "public",
+ Prototype = "jint* (*GetIntArrayElements)(JNIEnv*, jintArray, jboolean*);",
+ ReturnType = "jint*",
+ Parameters = new ParamInfo [] {new ParamInfo ("jintArray", "array"), new ParamInfo (TypeInfo.Create ("jboolean*", "bool*"), "isCopy", Modifier.CanBeNull)},
+ },
+ new JniFunction {
+ DeclaringType = ArrayOperationsCategory,
+ Name = "GetLongArrayElements",
+ Visibility = "public",
+ Prototype = "jlong* (*GetLongArrayElements)(JNIEnv*, jlongArray, jboolean*);",
+ ReturnType = "jlong*",
+ Parameters = new ParamInfo [] {new ParamInfo ("jlongArray", "array"), new ParamInfo (TypeInfo.Create ("jboolean*", "bool*"), "isCopy", Modifier.CanBeNull)},
+ },
+ new JniFunction {
+ DeclaringType = ArrayOperationsCategory,
+ Name = "GetFloatArrayElements",
+ Visibility = "public",
+ Prototype = "jfloat* (*GetFloatArrayElements)(JNIEnv*, jfloatArray, jboolean*);",
+ ReturnType = "jfloat*",
+ Parameters = new ParamInfo [] {new ParamInfo ("jfloatArray", "array"), new ParamInfo (TypeInfo.Create ("jboolean*", "bool*"), "isCopy", Modifier.CanBeNull)},
+ },
+ new JniFunction {
+ DeclaringType = ArrayOperationsCategory,
+ Name = "GetDoubleArrayElements",
+ Visibility = "public",
+ Prototype = "jdouble* (*GetDoubleArrayElements)(JNIEnv*, jdoubleArray, jboolean*);",
+ ReturnType = "jdouble*",
+ Parameters = new ParamInfo [] {new ParamInfo ("jdoubleArray", "array"), new ParamInfo (TypeInfo.Create ("jboolean*", "bool*"), "isCopy", Modifier.CanBeNull)},
+ },
+ new JniFunction {
+ DeclaringType = ArrayOperationsCategory,
+ Name = "ReleaseBooleanArrayElements",
+ Visibility = "public",
+ Prototype = "void (*ReleaseBooleanArrayElements)(JNIEnv*, jbooleanArray, jboolean*, jint);",
+ ReturnType = "void",
+ Parameters = new ParamInfo [] {new ParamInfo ("jbooleanArray", "array"), new ParamInfo ("jboolean*", "elements"), new ParamInfo ("JniReleaseArrayElementsMode", "mode")},
+ },
+ new JniFunction {
+ DeclaringType = ArrayOperationsCategory,
+ Name = "ReleaseByteArrayElements",
+ Visibility = "public",
+ Prototype = "void (*ReleaseByteArrayElements)(JNIEnv*, jbyteArray, jbyte*, jint);",
+ ReturnType = "void",
+ Parameters = new ParamInfo [] {new ParamInfo ("jbyteArray", "array"), new ParamInfo ("jbyte*", "elements"), new ParamInfo ("JniReleaseArrayElementsMode", "mode")},
+ },
+ new JniFunction {
+ DeclaringType = ArrayOperationsCategory,
+ Name = "ReleaseCharArrayElements",
+ Visibility = "public",
+ Prototype = "void (*ReleaseCharArrayElements)(JNIEnv*, jcharArray, jchar*, jint);",
+ ReturnType = "void",
+ Parameters = new ParamInfo [] {new ParamInfo ("jcharArray", "array"), new ParamInfo ("jchar*", "elements"), new ParamInfo ("JniReleaseArrayElementsMode", "mode")},
+ },
+ new JniFunction {
+ DeclaringType = ArrayOperationsCategory,
+ Name = "ReleaseShortArrayElements",
+ Visibility = "public",
+ Prototype = "void (*ReleaseShortArrayElements)(JNIEnv*, jshortArray, jshort*, jint);",
+ ReturnType = "void",
+ Parameters = new ParamInfo [] {new ParamInfo ("jshortArray", "array"), new ParamInfo ("jshort*", "elements"), new ParamInfo ("JniReleaseArrayElementsMode", "mode")},
+ },
+ new JniFunction {
+ DeclaringType = ArrayOperationsCategory,
+ Name = "ReleaseIntArrayElements",
+ Visibility = "public",
+ Prototype = "void (*ReleaseIntArrayElements)(JNIEnv*, jintArray, jint*, jint);",
+ ReturnType = "void",
+ Parameters = new ParamInfo [] {new ParamInfo ("jintArray", "array"), new ParamInfo ("jint*", "elements"), new ParamInfo ("JniReleaseArrayElementsMode", "mode")},
+ },
+ new JniFunction {
+ DeclaringType = ArrayOperationsCategory,
+ Name = "ReleaseLongArrayElements",
+ Visibility = "public",
+ Prototype = "void (*ReleaseLongArrayElements)(JNIEnv*, jlongArray, jlong*, jint);",
+ ReturnType = "void",
+ Parameters = new ParamInfo [] {new ParamInfo ("jlongArray", "array"), new ParamInfo ("jlong*", "elements"), new ParamInfo ("JniReleaseArrayElementsMode", "mode")},
+ },
+ new JniFunction {
+ DeclaringType = ArrayOperationsCategory,
+ Name = "ReleaseFloatArrayElements",
+ Visibility = "public",
+ Prototype = "void (*ReleaseFloatArrayElements)(JNIEnv*, jfloatArray, jfloat*, jint);",
+ ReturnType = "void",
+ Parameters = new ParamInfo [] {new ParamInfo ("jfloatArray", "array"), new ParamInfo ("jfloat*", "elements"), new ParamInfo ("JniReleaseArrayElementsMode", "mode")},
+ },
+ new JniFunction {
+ DeclaringType = ArrayOperationsCategory,
+ Name = "ReleaseDoubleArrayElements",
+ Visibility = "public",
+ Prototype = "void (*ReleaseDoubleArrayElements)(JNIEnv*, jdoubleArray, jdouble*, jint);",
+ ReturnType = "void",
+ Parameters = new ParamInfo [] {new ParamInfo ("jdoubleArray", "array"), new ParamInfo ("jdouble*", "elements"), new ParamInfo ("JniReleaseArrayElementsMode", "mode")},
+ },
+ new JniFunction {
+ DeclaringType = ArrayOperationsCategory,
+ Name = "GetBooleanArrayRegion",
+ Visibility = "public",
+ Throws = true,
+ Prototype = "void (*GetBooleanArrayRegion)(JNIEnv*, jbooleanArray, jsize, jsize, jboolean*);",
+ ReturnType = "void",
+ Parameters = new ParamInfo [] {new ParamInfo ("jbooleanArray", "array"), new ParamInfo ("jsize", "start"), new ParamInfo ("jsize", "length"), new ParamInfo ("jboolean*", "buffer")},
+ },
+ new JniFunction {
+ DeclaringType = ArrayOperationsCategory,
+ Name = "GetByteArrayRegion",
+ Visibility = "public",
+ Throws = true,
+ Prototype = "void (*GetByteArrayRegion)(JNIEnv*, jbyteArray, jsize, jsize, jbyte*);",
+ ReturnType = "void",
+ Parameters = new ParamInfo [] {new ParamInfo ("jbyteArray", "array"), new ParamInfo ("jsize", "start"), new ParamInfo ("jsize", "length"), new ParamInfo ("jbyte*", "buffer")},
+ },
+ new JniFunction {
+ DeclaringType = ArrayOperationsCategory,
+ Name = "GetCharArrayRegion",
+ Visibility = "public",
+ Throws = true,
+ Prototype = "void (*GetCharArrayRegion)(JNIEnv*, jcharArray, jsize, jsize, jchar*);",
+ ReturnType = "void",
+ Parameters = new ParamInfo [] {new ParamInfo ("jcharArray", "array"), new ParamInfo ("jsize", "start"), new ParamInfo ("jsize", "length"), new ParamInfo ("jchar*", "buffer")},
+ },
+ new JniFunction {
+ DeclaringType = ArrayOperationsCategory,
+ Name = "GetShortArrayRegion",
+ Visibility = "public",
+ Throws = true,
+ Prototype = "void (*GetShortArrayRegion)(JNIEnv*, jshortArray, jsize, jsize, jshort*);",
+ ReturnType = "void",
+ Parameters = new ParamInfo [] {new ParamInfo ("jshortArray", "array"), new ParamInfo ("jsize", "start"), new ParamInfo ("jsize", "length"), new ParamInfo ("jshort*", "buffer")},
+ },
+ new JniFunction {
+ DeclaringType = ArrayOperationsCategory,
+ Name = "GetIntArrayRegion",
+ Visibility = "public",
+ Throws = true,
+ Prototype = "void (*GetIntArrayRegion)(JNIEnv*, jintArray, jsize, jsize, jint*);",
+ ReturnType = "void",
+ Parameters = new ParamInfo [] {new ParamInfo ("jintArray", "array"), new ParamInfo ("jsize", "start"), new ParamInfo ("jsize", "length"), new ParamInfo ("jint*", "buffer")},
+ },
+ new JniFunction {
+ DeclaringType = ArrayOperationsCategory,
+ Name = "GetLongArrayRegion",
+ Visibility = "public",
+ Throws = true,
+ Prototype = "void (*GetLongArrayRegion)(JNIEnv*, jlongArray, jsize, jsize, jlong*);",
+ ReturnType = "void",
+ Parameters = new ParamInfo [] {new ParamInfo ("jlongArray", "array"), new ParamInfo ("jsize", "start"), new ParamInfo ("jsize", "length"), new ParamInfo ("jlong*", "buffer")},
+ },
+ new JniFunction {
+ DeclaringType = ArrayOperationsCategory,
+ Name = "GetFloatArrayRegion",
+ Visibility = "public",
+ Throws = true,
+ Prototype = "void (*GetFloatArrayRegion)(JNIEnv*, jfloatArray, jsize, jsize, jfloat*);",
+ ReturnType = "void",
+ Parameters = new ParamInfo [] {new ParamInfo ("jlongArray", "array"), new ParamInfo ("jsize", "start"), new ParamInfo ("jsize", "length"), new ParamInfo ("jfloat*", "buffer")},
+ },
+ new JniFunction {
+ DeclaringType = ArrayOperationsCategory,
+ Name = "GetDoubleArrayRegion",
+ Visibility = "public",
+ Throws = true,
+ Prototype = "void (*GetDoubleArrayRegion)(JNIEnv*, jdoubleArray, jsize, jsize, jdouble*);",
+ ReturnType = "void",
+ Parameters = new ParamInfo [] {new ParamInfo ("jdoubleArray", "array"), new ParamInfo ("jsize", "start"), new ParamInfo ("jsize", "length"), new ParamInfo ("jdouble*", "buffer")},
+ },
+ new JniFunction {
+ DeclaringType = ArrayOperationsCategory,
+ Name = "SetBooleanArrayRegion",
+ Visibility = "public",
+ Throws = true,
+ Prototype = "void (*SetBooleanArrayRegion)(JNIEnv*, jbooleanArray, jsize, jsize, const jboolean*);",
+ ReturnType = "void",
+ Parameters = new ParamInfo [] {new ParamInfo ("jbooleanArray", "array"), new ParamInfo ("jsize", "start"), new ParamInfo ("jsize", "length"), new ParamInfo ("jboolean*", "buffer")},
+ },
+ new JniFunction {
+ DeclaringType = ArrayOperationsCategory,
+ Name = "SetByteArrayRegion",
+ Visibility = "public",
+ Throws = true,
+ Prototype = "void (*SetByteArrayRegion)(JNIEnv*, jbyteArray, jsize, jsize, const jbyte*);",
+ ReturnType = "void",
+ Parameters = new ParamInfo [] {new ParamInfo ("jbyteArray", "array"), new ParamInfo ("jsize", "start"), new ParamInfo ("jsize", "length"), new ParamInfo ("jbyte*", "buffer")},
+ },
+ new JniFunction {
+ DeclaringType = ArrayOperationsCategory,
+ Name = "SetCharArrayRegion",
+ Visibility = "public",
+ Throws = true,
+ Prototype = "void (*SetCharArrayRegion)(JNIEnv*, jcharArray, jsize, jsize, const jchar*);",
+ ReturnType = "void",
+ Parameters = new ParamInfo [] {new ParamInfo ("jcharArray", "array"), new ParamInfo ("jsize", "start"), new ParamInfo ("jsize", "length"), new ParamInfo (TypeInfo.Create ("const jchar*", "char*"), "buffer")},
+ },
+ new JniFunction {
+ DeclaringType = ArrayOperationsCategory,
+ Name = "SetShortArrayRegion",
+ Visibility = "public",
+ Throws = true,
+ Prototype = "void (*SetShortArrayRegion)(JNIEnv*, jshortArray, jsize, jsize, const jshort*);",
+ ReturnType = "void",
+ Parameters = new ParamInfo [] {new ParamInfo ("jshortArray", "array"), new ParamInfo ("jsize", "start"), new ParamInfo ("jsize", "length"), new ParamInfo ("jshort*", "buffer")},
+ },
+ new JniFunction {
+ DeclaringType = ArrayOperationsCategory,
+ Name = "SetIntArrayRegion",
+ Visibility = "public",
+ Throws = true,
+ Prototype = "void (*SetIntArrayRegion)(JNIEnv*, jintArray, jsize, jsize, const jint*);",
+ ReturnType = "void",
+ Parameters = new ParamInfo [] {new ParamInfo ("jintArray", "array"), new ParamInfo ("jsize", "start"), new ParamInfo ("jsize", "length"), new ParamInfo ("jint*", "buffer")},
+ },
+ new JniFunction {
+ DeclaringType = ArrayOperationsCategory,
+ Name = "SetLongArrayRegion",
+ Visibility = "public",
+ Throws = true,
+ Prototype = "void (*SetLongArrayRegion)(JNIEnv*, jlongArray, jsize, jsize, const jlong*);",
+ ReturnType = "void",
+ Parameters = new ParamInfo [] {new ParamInfo ("jlongArray", "array"), new ParamInfo ("jsize", "start"), new ParamInfo ("jsize", "length"), new ParamInfo ("jlong*", "buffer")},
+ },
+ new JniFunction {
+ DeclaringType = ArrayOperationsCategory,
+ Name = "SetFloatArrayRegion",
+ Visibility = "public",
+ Throws = true,
+ Prototype = "void (*SetFloatArrayRegion)(JNIEnv*, jfloatArray, jsize, jsize, const jfloat*);",
+ ReturnType = "void",
+ Parameters = new ParamInfo [] {new ParamInfo ("jfloatArray", "array"), new ParamInfo ("jsize", "start"), new ParamInfo ("jsize", "length"), new ParamInfo ("jfloat*", "buffer")},
+ },
+ new JniFunction {
+ DeclaringType = ArrayOperationsCategory,
+ Name = "SetDoubleArrayRegion",
+ Visibility = "public",
+ Throws = true,
+ Prototype = "void (*SetDoubleArrayRegion)(JNIEnv*, jdoubleArray, jsize, jsize, const jdouble*);",
+ ReturnType = "void",
+ Parameters = new ParamInfo [] {new ParamInfo ("jdoubleArray", "array"), new ParamInfo ("jsize", "start"), new ParamInfo ("jsize", "length"), new ParamInfo ("jdouble*", "buffer")},
+ },
+ new JniFunction {
+ DeclaringType = ClassesCategory,
+ Name = "RegisterNatives",
+ ApiName = "_RegisterNatives",
+ Visibility = "internal",
+ // Prebind = true,
+ Throws = true,
+ Prototype = "jint (*RegisterNatives)(JNIEnv*, jclass, const JNINativeMethod*, jint);",
+ ReturnType = "jint",
+ Parameters = new ParamInfo [] {new ParamInfo ("jclass", "type"), new ParamInfo ("const JNINativeMethod*", "methods"), new ParamInfo ("jint", "numMethods")},
+ },
+ new JniFunction {
+ DeclaringType = ClassesCategory,
+ Name = "UnregisterNatives",
+ ApiName = "_UnregisterNatives",
+ Visibility = "internal",
+ Prototype = "jint (*UnregisterNatives)(JNIEnv*, jclass);",
+ ReturnType = "jint",
+ Parameters = new ParamInfo [] {new ParamInfo ("jclass", "type")},
+ },
+ new JniFunction {
+ DeclaringType = MonitorOperationsCategory,
+ Name = "MonitorEnter",
+ ApiName = "_MonitorEnter",
+ Visibility = "internal",
+ Prototype = "jint (*MonitorEnter)(JNIEnv*, jobject);",
+ ReturnType = "jint",
+ Parameters = new ParamInfo [] {new ParamInfo ("jobject", "instance")},
+ },
+ new JniFunction {
+ DeclaringType = MonitorOperationsCategory,
+ Name = "MonitorExit",
+ ApiName = "_MonitorExit",
+ Visibility = "internal",
+ Prototype = "jint (*MonitorExit)(JNIEnv*, jobject);",
+ ReturnType = "jint",
+ Parameters = new ParamInfo [] {new ParamInfo ("jobject", "instance")},
+ },
+ new JniFunction {
+ DeclaringType = ReferencesCatgeory,
+ Name = "GetJavaVM",
+ ApiName = "_GetJavaVM",
+ Visibility = "internal",
+ // Prebind = true,
+ Prototype = "jint (*GetJavaVM)(JNIEnv*, JavaVM**);",
+ ReturnType = "jint",
+ Parameters = new ParamInfo [] {new ParamInfo ("JavaVM**", "vm")},
+ },
+ new JniFunction {
+ DeclaringType = StringOperationsCategory,
+ Name = "GetStringRegion",
+ Visibility = "private",
+ Prototype = "void (*GetStringRegion)(JNIEnv*, jstring, jsize, jsize, jchar*);",
+ ReturnType = "void",
+ Parameters = new ParamInfo [] {new ParamInfo ("jstring", "stringInstance"), new ParamInfo ("jsize", "start"), new ParamInfo ("jsize", "length"), new ParamInfo ("jchar*", "buffer")},
+ },
+ new JniFunction {
+ DeclaringType = StringOperationsCategory,
+ Name = "GetStringUTFRegion",
+ Visibility = "private",
+ Prototype = "void (*GetStringUTFRegion)(JNIEnv*, jstring, jsize, jsize, char*);",
+ ReturnType = "void",
+ Parameters = new ParamInfo [] {new ParamInfo ("jstring", "stringInstance"), new ParamInfo ("jsize", "start"), new ParamInfo ("jsize", "length"), new ParamInfo ("char*", "buffer")},
+ },
+ new JniFunction {
+ DeclaringType = ArrayOperationsCategory,
+ Name = "GetPrimitiveArrayCritical",
+ Visibility = "public",
+ Prototype = "void* (*GetPrimitiveArrayCritical)(JNIEnv*, jarray, jboolean*);",
+ ReturnType = "void*",
+ Parameters = new ParamInfo [] {new ParamInfo ("jarray", "array"), new ParamInfo (TypeInfo.Create ("jboolean*", "bool*"), "isCopy", Modifier.CanBeNull)},
+ },
+ new JniFunction {
+ DeclaringType = ArrayOperationsCategory,
+ Name = "ReleasePrimitiveArrayCritical",
+ Visibility = "public",
+ Prototype = "void (*ReleasePrimitiveArrayCritical)(JNIEnv*, jarray, void*, jint);",
+ ReturnType = "void",
+ Parameters = new ParamInfo [] {new ParamInfo ("jarray", "array"), new ParamInfo ("void*", "carray"), new ParamInfo ("JniReleaseArrayElementsMode", "mode")},
+ },
+ new JniFunction {
+ DeclaringType = StringOperationsCategory,
+ Name = "GetStringCritical",
+ Visibility = "private",
+ Prototype = "const jchar* (*GetStringCritical)(JNIEnv*, jstring, jboolean*);",
+ ReturnType = "const jchar*",
+ Parameters = new ParamInfo [] {new ParamInfo ("jstring", "stringInstance"), new ParamInfo (TypeInfo.Create ("jboolean*", "bool*"), "isCopy", Modifier.CanBeNull)},
+ },
+ new JniFunction {
+ DeclaringType = StringOperationsCategory,
+ Name = "ReleaseStringCritical",
+ Visibility = "private",
+ Prototype = "void (*ReleaseStringCritical)(JNIEnv*, jstring, const jchar*);",
+ ReturnType = "void",
+ Parameters = new ParamInfo [] {new ParamInfo ("jstring", "stringInstance"), new ParamInfo ("const jchar*", "carray")},
+ },
+ new JniFunction {
+ DeclaringType = ReferencesCatgeory,
+ Name = "NewWeakGlobalRef",
+ Visibility = "internal",
+ Prototype = "jweak (*NewWeakGlobalRef)(JNIEnv*, jobject);",
+ ReturnType = "jweak",
+ Parameters = new ParamInfo [] {new ParamInfo ("jobject", "instance", Modifier.CanBeNull)},
+ },
+ new JniFunction {
+ DeclaringType = ReferencesCatgeory,
+ Name = "DeleteWeakGlobalRef",
+ Visibility = "internal",
+ Prototype = "void (*DeleteWeakGlobalRef)(JNIEnv*, jweak);",
+ ReturnType = "void",
+ Parameters = new ParamInfo [] {new ParamInfo (TypeInfo.Create ("jobject", "IntPtr"), "instance", Modifier.CanBeNull)},
+ },
+ new JniFunction {
+ DeclaringType = ExceptionsCategory,
+ Name = "ExceptionCheck",
+ Visibility = "public",
+ Prototype = "jboolean (*ExceptionCheck)(JNIEnv*);",
+ ReturnType = "jboolean",
+ Parameters = new ParamInfo [] {},
+ },
+ new JniFunction {
+ DeclaringType = NIOSupportCategory,
+ Name = "NewDirectByteBuffer",
+ Visibility = "public",
+ Throws = true,
+ Prototype = "jobject (*NewDirectByteBuffer)(JNIEnv*, void*, jlong);",
+ ReturnType = "jobject",
+ Parameters = new ParamInfo [] {new ParamInfo ("void*", "address"), new ParamInfo ("jlong", "capacity")},
+ },
+ new JniFunction {
+ DeclaringType = NIOSupportCategory,
+ Name = "GetDirectBufferAddress",
+ Visibility = "public",
+ Prototype = "void* (*GetDirectBufferAddress)(JNIEnv*, jobject);",
+ ReturnType = "void*",
+ Parameters = new ParamInfo [] {new ParamInfo ("jobject", "buffer")},
+ },
+ new JniFunction {
+ DeclaringType = NIOSupportCategory,
+ Name = "GetDirectBufferCapacity",
+ Visibility = "public",
+ Prototype = "jlong (*GetDirectBufferCapacity)(JNIEnv*, jobject);",
+ ReturnType = "jlong",
+ Parameters = new ParamInfo [] {new ParamInfo ("jobject", "buffer")},
+ },
+ new JniFunction {
+ DeclaringType = ReferencesCatgeory,
+ Name = "GetObjectRefType",
+ Visibility = "internal",
+ Prototype = "jobjectRefType (*GetObjectRefType)(JNIEnv*, jobject);",
+ ReturnType = "jobjectRefType",
+ Parameters = new ParamInfo [] {new ParamInfo ("jobject", "instance")},
+ },
+ };
+ }
+}
diff --git a/external/Java.Interop/build-tools/jnienv-gen/jnienv-gen.csproj b/external/Java.Interop/build-tools/jnienv-gen/jnienv-gen.csproj
new file mode 100644
index 00000000000..eaa1211466a
--- /dev/null
+++ b/external/Java.Interop/build-tools/jnienv-gen/jnienv-gen.csproj
@@ -0,0 +1,16 @@
+
+
+
+ Exe
+ $(DotNetTargetFramework)
+ false
+
+
+
+
+
+ $(BaseIntermediateOutputPath)$(Configuration)\$(TargetFramework.ToLowerInvariant())\
+ $(BuildToolOutputFullPath)
+
+
+
diff --git a/external/Java.Interop/build-tools/scripts/AssemblyInfo.g.cs.in b/external/Java.Interop/build-tools/scripts/AssemblyInfo.g.cs.in
new file mode 100644
index 00000000000..6e8832914f5
--- /dev/null
+++ b/external/Java.Interop/build-tools/scripts/AssemblyInfo.g.cs.in
@@ -0,0 +1,23 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.42000
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+using System;
+using System.Reflection;
+
+[assembly: System.Reflection.AssemblyCompanyAttribute("Microsoft Corporation")]
+[assembly: System.Reflection.AssemblyConfigurationAttribute("@CONFIGURATION@")]
+[assembly: System.Reflection.AssemblyCopyrightAttribute("Microsoft Corporation")]
+[assembly: System.Reflection.AssemblyFileVersionAttribute("@VERSION@")]
+[assembly: System.Reflection.AssemblyInformationalVersionAttribute("@INFORMATIONALVERSION@")]
+[assembly: System.Reflection.AssemblyProductAttribute("@PRODUCT@")]
+[assembly: System.Reflection.AssemblyTitleAttribute("@TITLE@")]
+[assembly: System.Reflection.AssemblyVersionAttribute("@VERSION@")]
+
+// Generated by the MSBuild WriteCodeFragment class.
\ No newline at end of file
diff --git a/external/Java.Interop/build-tools/scripts/NativeToolchain.targets b/external/Java.Interop/build-tools/scripts/NativeToolchain.targets
new file mode 100644
index 00000000000..5632946a5c7
--- /dev/null
+++ b/external/Java.Interop/build-tools/scripts/NativeToolchain.targets
@@ -0,0 +1,26 @@
+
+
+
+ <_VSInstallDir Condition=" '$(VsInstallRoot)' != '' ">$(VsInstallRoot)
+ <_VSInstallDir Condition=" '$(_VSInstallDir)' == '' And '$(VsInstallDir)' != '' ">$(VsInstallDir)
+ <_VcvarsallPath Condition=" '$(_VSInstallDir)' != '' ">$(_VSInstallDir)\VC\Auxiliary\Build\vcvarsall.bat
+
+
+
+ True
+
+
+
+ True
+
+
+
+
+ call "$(_VcvarsallPath)"
+
+
+ -G "NMake Makefiles"
+ -G "Unix Makefiles"
+
+
+
diff --git a/external/Java.Interop/build-tools/scripts/Prepare.targets b/external/Java.Interop/build-tools/scripts/Prepare.targets
new file mode 100644
index 00000000000..4488ec51c5a
--- /dev/null
+++ b/external/Java.Interop/build-tools/scripts/Prepare.targets
@@ -0,0 +1,31 @@
+
+
+
+ Debug
+
+
+
+
+
+
+
+ <_MaxJdk>$(MaxJdkVersion)
+ <_MaxJdk Condition=" '$(_MaxJdk)' == '' ">$(JI_MAX_JDK)
+ $(JAVA_HOME_17_X64)
+ $(JAVA_HOME_11_X64)
+
+
+
+
+
+
diff --git a/external/Java.Interop/build-tools/scripts/RunCmake.proj b/external/Java.Interop/build-tools/scripts/RunCmake.proj
new file mode 100644
index 00000000000..5ea67f6b5c6
--- /dev/null
+++ b/external/Java.Interop/build-tools/scripts/RunCmake.proj
@@ -0,0 +1,73 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ <_Prepare>$(PrepareNativeToolchain)
+ <_Prepare Condition=" '$(_Prepare)' != '' And !$(_Prepare.Trim().EndsWith('&&')) ">$(_Prepare) &&
+ <_SourceDir>$(CmakeSourceDir.Replace('%5c', '/'))
+ <_BuildDir>$(CmakeBuildDir.Replace('%5c', '/'))
+ <_ExtraArgs>$(CmakeExtraArgs.Replace('%5c', '/'))
+
+
+
+ <_CmakeStatus>$(MSBuildLastTaskResult)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/external/Java.Interop/build-tools/scripts/RunNUnitTests.targets b/external/Java.Interop/build-tools/scripts/RunNUnitTests.targets
new file mode 100644
index 00000000000..2ece387e038
--- /dev/null
+++ b/external/Java.Interop/build-tools/scripts/RunNUnitTests.targets
@@ -0,0 +1,42 @@
+
+
+
+
+ Debug
+ <_TopDir>$(MSBuildThisFileDirectory)..\..
+ <_Runtime Condition=" '$(RUNTIME)' != '' ">$(RUNTIME)
+ <_Runtime Condition=" '$(RUNTIME)' == '' And '$(OS)' != 'Windows_NT' ">mono --debug
+ <_NUnit>$(_Runtime) $(PkgNUnit_ConsoleRunner)/tools/nunit3-console.exe
+ <_Run Condition=" '$(RUN)' != '' ">--run="$(RUN)"
+
+
+
+
+ <_TestAssembly Include="$(_TopDir)\bin\Test$(Configuration)\*-*Tests.dll" Condition=" '$(TestAssembly)' == '' " />
+ <_TestAssembly Include="$(TestAssembly)" Condition=" '$(TestAssembly)' != '' " />
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/external/Java.Interop/build-tools/scripts/VersionInfo.targets b/external/Java.Interop/build-tools/scripts/VersionInfo.targets
new file mode 100644
index 00000000000..c86a53c5f54
--- /dev/null
+++ b/external/Java.Interop/build-tools/scripts/VersionInfo.targets
@@ -0,0 +1,11 @@
+
+
+
+
+
+ $(Version) git-rev-head:$(JIBuildCommit) git-branch:$(JIBuildBranch)
+
+
+
+
\ No newline at end of file
diff --git a/external/Java.Interop/build-tools/scripts/cecil.projitems b/external/Java.Interop/build-tools/scripts/cecil.projitems
new file mode 100644
index 00000000000..9dc9cac2b62
--- /dev/null
+++ b/external/Java.Interop/build-tools/scripts/cecil.projitems
@@ -0,0 +1,12 @@
+
+
+
+ <_XamarinAndroidCecilVersion Condition=" '$(_XamarinAndroidCecilVersion)' == '' ">0.11.6
+
+
+
+
+
+
+
+
diff --git a/external/Java.Interop/build-tools/scripts/mono.mk b/external/Java.Interop/build-tools/scripts/mono.mk
new file mode 100644
index 00000000000..06d92795400
--- /dev/null
+++ b/external/Java.Interop/build-tools/scripts/mono.mk
@@ -0,0 +1,40 @@
+#
+# Mono Path Probing
+#
+# Inputs:
+#
+# $(OS): Optional; **uname**(1) value of the host operating system
+# $(CONFIGURATION): Build configuration name, e.g. Debug or Release
+# $(V): Output verbosity. If != 0, then `MONO_OPTIONS` is exported with --debug.
+#
+# Outputs:
+#
+# bin/Build$(CONFIGURATION)/MonoInfo.props:
+# MSBuild property file which contains:
+# * `$(MonoFrameworkPath)`: `$(JI_MONO_FRAMEWORK_PATH)` value.
+# * `$(MonoLibs)`: `$(JI_MONO_LIBS)` value.
+# * `@(MonoIncludePath)`: `$(JI_MONO_INCLUDE_PATHS)` values.
+# $(JI_MONO_LIB_PATH):
+# Base path to the mono instalation, it can be used to access base class
+# assemblies in $(JI_MONO_LIB_PATH)/mono//
+# $(JI_MONO_FRAMEWORK_PATH):
+# Path to the `libmonosgen-2.0.1.dylib` file to link against.
+# $(JI_MONO_INCLUDE_PATHS):
+# One or more space separated paths containing Mono headers to pass as
+# -Ipath values to the compiler.
+# It DOES NOT contain the -I itself; use $(JI_MONO_INCLUDE_PATHS:%=-I%) for that.
+# $(JI_MONO_LIBS)
+# C compiler linker arguments to link against `$(JI_MONO_FRAMEWORK_PATH)`.
+# $(RUNTIME):
+# The **mono**(1) program to use to execute managed code.
+
+OS ?= $(shell uname)
+RUNTIME := $(shell if [ -f "`which mono64`" ] ; then echo mono64 ; else echo mono; fi) --debug=casts
+
+ifneq ($(V),0)
+MONO_OPTIONS += --debug
+endif # $(V) != 0
+
+ifneq ($(MONO_OPTIONS),)
+export MONO_OPTIONS
+endif # $(MONO_OPTIONS) != ''
diff --git a/external/Java.Interop/build-tools/scripts/msbuild.mk b/external/Java.Interop/build-tools/scripts/msbuild.mk
new file mode 100644
index 00000000000..5819b01ed98
--- /dev/null
+++ b/external/Java.Interop/build-tools/scripts/msbuild.mk
@@ -0,0 +1,29 @@
+#
+# MSBuild Abstraction.
+#
+# Makefile targets which need to invoke MSBuild should use `$(MSBUILD)`,
+# not some specific MSBuild program such as `xbuild` or `msbuild`.
+#
+# Typical use will also include `$(MSBUILD_FLAGS)`, which provides the
+# Configuration and logging verbosity, as per $(CONFIGURATION) and $(V):
+#
+# $(MSBUILD) $(MSBUILD_FLAGS) path/to/Project.csproj
+#
+# Inputs:
+#
+# $(CONFIGURATION): Build configuration name, e.g. Debug or Release
+# $(MSBUILD): The MSBuild program to use.
+# $(MSBUILD_ARGS): Extra arguments to pass to $(MSBUILD); embedded into $(MSBUILD_FLAGS)
+# $(V): Build verbosity
+#
+# Outputs:
+#
+# $(MSBUILD): The MSBuild program to use. Defaults to `xbuild` unless overridden.
+# $(MSBUILD_FLAGS): Additional MSBuild flags; contains $(CONFIGURATION), $(V), $(MSBUILD_ARGS).
+
+MSBUILD = msbuild
+MSBUILD_FLAGS = /p:Configuration=$(CONFIGURATION) $(MSBUILD_ARGS)
+
+ifneq ($(V),0)
+MSBUILD_FLAGS += /v:d
+endif # $(V) != 0
diff --git a/external/Java.Interop/build-tools/trim-analyzers/trim-analyzers.props b/external/Java.Interop/build-tools/trim-analyzers/trim-analyzers.props
new file mode 100644
index 00000000000..a61c10aa797
--- /dev/null
+++ b/external/Java.Interop/build-tools/trim-analyzers/trim-analyzers.props
@@ -0,0 +1,55 @@
+
+
+
+
+ true
+ true
+ true
+
+ true
+
+
+ $(WarningsAsErrors);
+ IL2000;IL2001;IL2002;IL2003;IL2004;
+ IL2005;IL2006;IL2007;IL2008;IL2009;
+ IL2010;IL2011;IL2012;IL2013;IL2014;
+ IL2015;IL2016;IL2017;IL2018;IL2019;
+ IL2020;IL2021;IL2022;IL2023;IL2024;
+ IL2025;IL2026;IL2027;IL2028;IL2029;
+ IL2030;IL2031;IL2032;IL2033;IL2034;
+ IL2035;IL2036;IL2037;IL2038;IL2039;
+ IL2040;IL2041;IL2042;IL2043;IL2044;
+ IL2045;IL2046;IL2047;IL2048;IL2049;
+ IL2050;IL2051;IL2052;IL2053;IL2054;
+ IL2055;IL2056;IL2057;IL2058;IL2059;
+ IL2060;IL2061;IL2062;IL2063;IL2064;
+ IL2065;IL2066;IL2067;IL2068;IL2069;
+ IL2070;IL2071;IL2072;IL2073;IL2074;
+ IL2075;IL2076;IL2077;IL2078;IL2079;
+ IL2080;IL2081;IL2082;IL2083;IL2084;
+ IL2085;IL2086;IL2087;IL2088;IL2089;
+ IL2090;IL2091;IL2092;IL2093;IL2094;
+ IL2095;IL2096;IL2097;IL2098;IL2099;
+ IL2100;IL2101;IL2102;IL2103;IL2104;
+ IL2105;IL2106;IL2107;IL2108;IL2109;
+ IL2110;IL2111;IL2112;IL2113;IL2114;
+ IL2115;IL2116;IL2117;IL2118;IL2119;
+ IL2120;IL2121;IL2122;IL2123;IL2124;
+ IL2125;IL2126;IL2127;IL2128;IL2129;
+
+
+ true
+
+
+ $(WarningsAsErrors);
+ IL3050;IL3051;IL3052;IL3053;IL3054;IL3055;IL3056;
+
+
+
\ No newline at end of file
diff --git a/external/Java.Interop/external/xamarin-android-tools b/external/Java.Interop/external/xamarin-android-tools
new file mode 160000
index 00000000000..bcce35f51c6
--- /dev/null
+++ b/external/Java.Interop/external/xamarin-android-tools
@@ -0,0 +1 @@
+Subproject commit bcce35f51c67671ca4846fc8ea0dbe140ea9542a
diff --git a/external/Java.Interop/external/xamarin-android-tools.override.props b/external/Java.Interop/external/xamarin-android-tools.override.props
new file mode 100644
index 00000000000..d80257cce5c
--- /dev/null
+++ b/external/Java.Interop/external/xamarin-android-tools.override.props
@@ -0,0 +1,6 @@
+
+
+
+ true
+
+
diff --git a/external/Java.Interop/global.json b/external/Java.Interop/global.json
new file mode 100644
index 00000000000..e8f86e8d7c5
--- /dev/null
+++ b/external/Java.Interop/global.json
@@ -0,0 +1,8 @@
+{
+ "sdk": {
+ "allowPrerelease": true
+ },
+ "msbuild-sdks": {
+ "Microsoft.Build.NoTargets": "3.7.134"
+ }
+}
\ No newline at end of file
diff --git a/external/Java.Interop/product.snk b/external/Java.Interop/product.snk
new file mode 100644
index 00000000000..8c04e53be9d
Binary files /dev/null and b/external/Java.Interop/product.snk differ
diff --git a/external/Java.Interop/samples/Hello-NativeAOTFromJNI/App.cs b/external/Java.Interop/samples/Hello-NativeAOTFromJNI/App.cs
new file mode 100644
index 00000000000..f7d0307d266
--- /dev/null
+++ b/external/Java.Interop/samples/Hello-NativeAOTFromJNI/App.cs
@@ -0,0 +1,30 @@
+using System.Runtime.InteropServices;
+
+using Java.Interop;
+
+namespace Hello_NativeAOTFromJNI;
+
+static class App {
+
+ [UnmanagedCallersOnly (EntryPoint="Java_net_dot_jni_hello_App_sayHello")]
+ static IntPtr sayHello (IntPtr jnienv, IntPtr klass)
+ {
+ var envp = new JniTransition (jnienv);
+ try {
+ const string message = "Hello from .NET NativeAOT!";
+ Console.WriteLine (message);
+ var h = JniEnvironment.Strings.NewString (message);
+ var r = JniEnvironment.References.NewReturnToJniRef (h);
+ JniObjectReference.Dispose (ref h);
+ return r;
+ }
+ catch (Exception e) {
+ Console.Error.WriteLine ($"Error in App.sayHello(): {e}");
+ envp.SetPendingException (e);
+ }
+ finally {
+ envp.Dispose ();
+ }
+ return IntPtr.Zero;
+ }
+}
diff --git a/external/Java.Interop/samples/Hello-NativeAOTFromJNI/Hello-NativeAOTFromJNI.csproj b/external/Java.Interop/samples/Hello-NativeAOTFromJNI/Hello-NativeAOTFromJNI.csproj
new file mode 100644
index 00000000000..a428cc4eb52
--- /dev/null
+++ b/external/Java.Interop/samples/Hello-NativeAOTFromJNI/Hello-NativeAOTFromJNI.csproj
@@ -0,0 +1,63 @@
+
+
+
+ $(DotNetTargetFramework)
+
+
+
+
+
+ Hello_NativeAOTFromJNI
+ enable
+ enable
+ true
+ true
+ Shared
+
+ AnyCPU
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/external/Java.Interop/samples/Hello-NativeAOTFromJNI/Hello-NativeAOTFromJNI.targets b/external/Java.Interop/samples/Hello-NativeAOTFromJNI/Hello-NativeAOTFromJNI.targets
new file mode 100644
index 00000000000..1a62aef04b8
--- /dev/null
+++ b/external/Java.Interop/samples/Hello-NativeAOTFromJNI/Hello-NativeAOTFromJNI.targets
@@ -0,0 +1,55 @@
+
+
+
+
+
+ <_Source Include="@(HelloNativeAOTFromJNIJar->Replace('%5c', '/'))" />
+
+
+
+ <_JavacOpt Include="$(_JavacSourceOptions)" />
+ <_JavacOpt Include="-d "$(IntermediateOutputPath)h-classes" " />
+ <_JavacOpt Include="-classpath "$(OutputPath)java-interop.jar" " />
+ <_JavacOpt Include=""@$(IntermediateOutputPath)_java_sources.txt"" />
+ <_JavacOpt Include="-h "$(IntermediateOutputPath)h-classes" " />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <_Classpath Include="hello-from-java.jar" />
+ <_Classpath Include="java-interop.jar" />
+
+
+ <_CPSep Condition=" '$(OS)' == 'Windows_NT' ">;
+ <_CPSep Condition=" '$(_CPSep)' == '' ">:
+ <_CP>@(_Classpath, '$(_CPSep)')
+
+
+
+
+
diff --git a/external/Java.Interop/samples/Hello-NativeAOTFromJNI/JavaInteropRuntime.cs b/external/Java.Interop/samples/Hello-NativeAOTFromJNI/JavaInteropRuntime.cs
new file mode 100644
index 00000000000..f34730d76f5
--- /dev/null
+++ b/external/Java.Interop/samples/Hello-NativeAOTFromJNI/JavaInteropRuntime.cs
@@ -0,0 +1,174 @@
+using System.Diagnostics;
+using System.Diagnostics.CodeAnalysis;
+using System.Reflection;
+using System.Runtime.InteropServices;
+
+using Java.Interop;
+
+namespace Hello_NativeAOTFromJNI;
+
+static class JavaInteropRuntime
+{
+ static JniRuntime? runtime;
+
+ [UnmanagedCallersOnly (EntryPoint="JNI_OnLoad")]
+ static int JNI_OnLoad (IntPtr vm, IntPtr reserved)
+ {
+ return (int) JniVersion.v1_6;
+ }
+
+ [UnmanagedCallersOnly (EntryPoint="JNI_OnUnload")]
+ static void JNI_OnUnload (IntPtr vm, IntPtr reserved)
+ {
+ runtime?.Dispose ();
+ runtime = null;
+ }
+
+ [UnmanagedCallersOnly (EntryPoint="Java_net_dot_jni_hello_JavaInteropRuntime_init")]
+ static void init (IntPtr jnienv, IntPtr klass)
+ {
+ if (runtime != null)
+ return;
+
+ try {
+ runtime = new ExistingJniRuntime (jnienv);
+ }
+ catch (Exception e) {
+ Console.Error.WriteLine ($"JavaInteropRuntime.init: error: {e}");
+ }
+ }
+
+ sealed class ExistingJniRuntime : JniRuntime {
+
+ public ExistingJniRuntime (IntPtr jnienv)
+ : base (new CreationOptions {
+ EnvironmentPointer = jnienv,
+ TypeManager = new JniRuntime.JniTypeManager (),
+ ObjectReferenceManager = new ObjectReferenceManager (),
+ ValueManager = new ValueManager (),
+ })
+ {
+ }
+
+ public override string? GetCurrentManagedThreadName ()
+ {
+ return Thread.CurrentThread.Name;
+ }
+
+ public override string GetCurrentManagedThreadStackTrace (int skipFrames, bool fNeedFileInfo)
+ {
+ return new StackTrace (skipFrames, fNeedFileInfo).ToString ();
+ }
+ }
+
+ sealed class ObjectReferenceManager : JniRuntime.JniObjectReferenceManager {
+ public override int GlobalReferenceCount => 0;
+
+ public override int WeakGlobalReferenceCount => 0;
+ }
+
+ sealed class ValueManager : JniRuntime.JniValueManager {
+ public override void WaitForGCBridgeProcessing ()
+ {
+ }
+
+ public override void CollectPeers ()
+ {
+ }
+
+ public override void AddPeer (IJavaPeerable value)
+ {
+ }
+
+ public override void RemovePeer (IJavaPeerable value)
+ {
+ }
+
+ public override void FinalizePeer (IJavaPeerable value)
+ {
+ }
+
+ public override List GetSurfacedPeers ()
+ {
+ return new List ();
+ }
+
+ public override IJavaPeerable? PeekPeer (JniObjectReference reference)
+ {
+ return null;
+ }
+
+ public override void ActivatePeer (
+ JniObjectReference reference,
+ Type type,
+ ConstructorInfo cinfo,
+ object?[]? argumentValues)
+ {
+ throw new NotSupportedException ();
+ }
+
+ protected override void ConstructPeerCore (IJavaPeerable peer, ref JniObjectReference reference, JniObjectReferenceOptions options)
+ {
+ throw new NotSupportedException ();
+ }
+
+ public override IJavaPeerable? CreatePeer (
+ ref JniObjectReference reference,
+ JniObjectReferenceOptions transfer,
+ [DynamicallyAccessedMembers (DynamicallyAccessedMemberTypes.PublicConstructors | DynamicallyAccessedMemberTypes.NonPublicConstructors)] Type? targetType)
+ {
+ throw new NotSupportedException ();
+ }
+
+ [return: MaybeNull]
+ protected override T CreateValueCore<[DynamicallyAccessedMembers (DynamicallyAccessedMemberTypes.PublicConstructors | DynamicallyAccessedMemberTypes.NonPublicConstructors)] T> (
+ ref JniObjectReference reference,
+ JniObjectReferenceOptions options,
+ [DynamicallyAccessedMembers (DynamicallyAccessedMemberTypes.PublicConstructors | DynamicallyAccessedMemberTypes.NonPublicConstructors)] Type? targetType = null)
+ {
+ throw new NotSupportedException ();
+ }
+
+ protected override object? CreateValueCore (
+ ref JniObjectReference reference,
+ JniObjectReferenceOptions options,
+ [DynamicallyAccessedMembers (DynamicallyAccessedMemberTypes.PublicConstructors | DynamicallyAccessedMemberTypes.NonPublicConstructors)] Type? targetType = null)
+ {
+ throw new NotSupportedException ();
+ }
+
+ [return: MaybeNull]
+ protected override T GetValueCore<[DynamicallyAccessedMembers (DynamicallyAccessedMemberTypes.PublicConstructors | DynamicallyAccessedMemberTypes.NonPublicConstructors)] T> (
+ ref JniObjectReference reference,
+ JniObjectReferenceOptions options,
+ [DynamicallyAccessedMembers (DynamicallyAccessedMemberTypes.PublicConstructors | DynamicallyAccessedMemberTypes.NonPublicConstructors)] Type? targetType = null)
+ {
+ throw new NotSupportedException ();
+ }
+
+ protected override object? GetValueCore (
+ ref JniObjectReference reference,
+ JniObjectReferenceOptions options,
+ [DynamicallyAccessedMembers (DynamicallyAccessedMemberTypes.PublicConstructors | DynamicallyAccessedMemberTypes.NonPublicConstructors)] Type? targetType = null)
+ {
+ throw new NotSupportedException ();
+ }
+
+ protected override JniValueMarshaler GetValueMarshalerCore (Type type)
+ {
+ throw new NotSupportedException ();
+ }
+
+ protected override JniValueMarshaler GetValueMarshalerCore ()
+ {
+ throw new NotSupportedException ();
+ }
+
+ protected override JniObjectReference CreateLocalObjectReferenceArgumentCore (
+ Type type,
+ object? value)
+ {
+ throw new NotSupportedException ();
+ }
+ }
+}
diff --git a/external/Java.Interop/samples/Hello-NativeAOTFromJNI/java/net/dot/jni/hello/App.java b/external/Java.Interop/samples/Hello-NativeAOTFromJNI/java/net/dot/jni/hello/App.java
new file mode 100644
index 00000000000..9b6aef7a00c
--- /dev/null
+++ b/external/Java.Interop/samples/Hello-NativeAOTFromJNI/java/net/dot/jni/hello/App.java
@@ -0,0 +1,13 @@
+package net.dot.jni.hello;
+
+class App {
+
+ public static void main(String[] args) {
+ System.out.println("Hello from Java!");
+ JavaInteropRuntime.init();
+ String s = sayHello();
+ System.out.println("String returned to Java: " + s);
+ }
+
+ static native String sayHello();
+}
diff --git a/external/Java.Interop/samples/Hello-NativeAOTFromJNI/java/net/dot/jni/hello/JavaInteropRuntime.java b/external/Java.Interop/samples/Hello-NativeAOTFromJNI/java/net/dot/jni/hello/JavaInteropRuntime.java
new file mode 100644
index 00000000000..aa7f1b0d703
--- /dev/null
+++ b/external/Java.Interop/samples/Hello-NativeAOTFromJNI/java/net/dot/jni/hello/JavaInteropRuntime.java
@@ -0,0 +1,12 @@
+package net.dot.jni.hello;
+
+public class JavaInteropRuntime {
+ static {
+ System.loadLibrary("Hello-NativeAOTFromJNI");
+ }
+
+ private JavaInteropRuntime() {
+ }
+
+ public static native void init();
+}
diff --git a/external/Java.Interop/src/Java.Interop.Localization/Java.Interop.Localization.csproj b/external/Java.Interop/src/Java.Interop.Localization/Java.Interop.Localization.csproj
new file mode 100644
index 00000000000..c9c30921cfe
--- /dev/null
+++ b/external/Java.Interop/src/Java.Interop.Localization/Java.Interop.Localization.csproj
@@ -0,0 +1,32 @@
+
+
+
+ netstandard2.0
+ enable
+ en
+ true
+ ..\..\product.snk
+
+
+
+
+
+
+ True
+ True
+ Resources.resx
+
+
+
+
+
+ PublicResXFileCodeGenerator
+ Resources.Designer.cs
+
+
+
+
+
+
+
+
diff --git a/external/Java.Interop/src/Java.Interop.Localization/Resources.Designer.cs b/external/Java.Interop/src/Java.Interop.Localization/Resources.Designer.cs
new file mode 100644
index 00000000000..12164c404f9
--- /dev/null
+++ b/external/Java.Interop/src/Java.Interop.Localization/Resources.Designer.cs
@@ -0,0 +1,630 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.42000
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace Java.Interop.Localization {
+ using System;
+
+
+ ///
+ /// A strongly-typed resource class, for looking up localized strings, etc.
+ ///
+ // This class was auto-generated by the StronglyTypedResourceBuilder
+ // class via a tool like ResGen or Visual Studio.
+ // To add or remove a member, edit your .ResX file then rerun ResGen
+ // with the /str option, or rebuild your VS project.
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ public class Resources {
+
+ private static global::System.Resources.ResourceManager resourceMan;
+
+ private static global::System.Globalization.CultureInfo resourceCulture;
+
+ [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+ internal Resources() {
+ }
+
+ ///
+ /// Returns the cached ResourceManager instance used by this class.
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ public static global::System.Resources.ResourceManager ResourceManager {
+ get {
+ if (object.ReferenceEquals(resourceMan, null)) {
+ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Java.Interop.Localization.Resources", typeof(Resources).Assembly);
+ resourceMan = temp;
+ }
+ return resourceMan;
+ }
+ }
+
+ ///
+ /// Overrides the current thread's CurrentUICulture property for all
+ /// resource lookups using this strongly typed resource class.
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ public static global::System.Globalization.CultureInfo Culture {
+ get {
+ return resourceCulture;
+ }
+ set {
+ resourceCulture = value;
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Error while loading assembly: '{0}'..
+ ///
+ public static string CecilResolver_XA0009 {
+ get {
+ return ResourceManager.GetString("CecilResolver_XA0009", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Failed to remove old constants: {0}..
+ ///
+ public static string Generator_BG4000 {
+ get {
+ return ResourceManager.GetString("Generator_BG4000", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Failed to process enum mapping. Text line: {0}..
+ ///
+ public static string Generator_BG4100 {
+ get {
+ return ResourceManager.GetString("Generator_BG4100", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Error during processing metadata fixup: {0}..
+ ///
+ public static string Generator_BG4200 {
+ get {
+ return ResourceManager.GetString("Generator_BG4200", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Invalid XPath specification: {0}..
+ ///
+ public static string Generator_BG4300 {
+ get {
+ return ResourceManager.GetString("Generator_BG4300", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Target attribute name is not specified for path: {0}..
+ ///
+ public static string Generator_BG4307 {
+ get {
+ return ResourceManager.GetString("Generator_BG4307", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Unexpected 'global::' specification. This error happens if 'global::' is specified in the Metadata.xml transform file, for example..
+ ///
+ public static string Generator_BG4400 {
+ get {
+ return ResourceManager.GetString("Generator_BG4400", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Unexpected class child {0}..
+ ///
+ public static string Generator_BG8101 {
+ get {
+ return ResourceManager.GetString("Generator_BG8101", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Class '{0}' has unknown base type '{1}'..
+ ///
+ public static string Generator_BG8102 {
+ get {
+ return ResourceManager.GetString("Generator_BG8102", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Class '{0}' has invalid base type '{1}'..
+ ///
+ public static string Generator_BG8103 {
+ get {
+ return ResourceManager.GetString("Generator_BG8103", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Failed to parse assembly '{0}': {1}..
+ ///
+ public static string Generator_BG8200 {
+ get {
+ return ResourceManager.GetString("Generator_BG8200", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to For constructor '{0}', could not find enclosing type '{1}'..
+ ///
+ public static string Generator_BG8300 {
+ get {
+ return ResourceManager.GetString("Generator_BG8300", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Unexpected field type `{0}` ({1})..
+ ///
+ public static string Generator_BG8400 {
+ get {
+ return ResourceManager.GetString("Generator_BG8400", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Skipping '{0}.{1}' due to a duplicate method name. (Java type: '{2}').
+ ///
+ public static string Generator_BG8401_Method {
+ get {
+ return ResourceManager.GetString("Generator_BG8401_Method", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Skipping '{0}.{1}' due to a duplicate nested type name. (Java type: '{2}').
+ ///
+ public static string Generator_BG8401_NestedType {
+ get {
+ return ResourceManager.GetString("Generator_BG8401_NestedType", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Skipping '{0}.{1}' due to a duplicate field or property name. (Java type: '{2}').
+ ///
+ public static string Generator_BG8401_Property {
+ get {
+ return ResourceManager.GetString("Generator_BG8401_Property", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Skipping '{0}.{1}' due to a duplicate field. (Java type: '{2}').
+ ///
+ public static string Generator_BG8402 {
+ get {
+ return ResourceManager.GetString("Generator_BG8402", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Type '{0}' has a type name which matches the enclosing namespace name. See https://aka.ms/BG8403 for more information..
+ ///
+ public static string Generator_BG8403 {
+ get {
+ return ResourceManager.GetString("Generator_BG8403", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Unexpected child element of '<interface>': '{0}'..
+ ///
+ public static string Generator_BG8500 {
+ get {
+ return ResourceManager.GetString("Generator_BG8500", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to No event name provided in '{0}.{1}'..
+ ///
+ public static string Generator_BG8501 {
+ get {
+ return ResourceManager.GetString("Generator_BG8501", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Invalidating '{0}' and all its nested types because some of its interfaces were invalid..
+ ///
+ public static string Generator_BG8502 {
+ get {
+ return ResourceManager.GetString("Generator_BG8502", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Invalidating '{0}' and all its nested types because some of its methods were invalid..
+ ///
+ public static string Generator_BG8503 {
+ get {
+ return ResourceManager.GetString("Generator_BG8503", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Event name for '{0}.{1}' is invalid. A valid 'eventName' or 'argsType' can be assigned by adding a rule to the Metadata.xml transforms file..
+ ///
+ public static string Generator_BG8504 {
+ get {
+ return ResourceManager.GetString("Generator_BG8504", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Event property name for '{0}.{1}' is invalid. A valid 'eventName' or 'argsType' can be assigned by adding a rule to the Metadata.xml transforms file..
+ ///
+ public static string Generator_BG8506 {
+ get {
+ return ResourceManager.GetString("Generator_BG8506", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Invalid XML file '{0}': {1}..
+ ///
+ public static string Generator_BG8600 {
+ get {
+ return ResourceManager.GetString("Generator_BG8600", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to No '<package>' elements found..
+ ///
+ public static string Generator_BG8601 {
+ get {
+ return ResourceManager.GetString("Generator_BG8601", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Unexpected root child node: '<{0}>'..
+ ///
+ public static string Generator_BG8602 {
+ get {
+ return ResourceManager.GetString("Generator_BG8602", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Unexpected '<package>' child node: '<{0}>'..
+ ///
+ public static string Generator_BG8603 {
+ get {
+ return ResourceManager.GetString("Generator_BG8603", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Could not find top ancestor type '{0}' for nested type '{1}'..
+ ///
+ public static string Generator_BG8604 {
+ get {
+ return ResourceManager.GetString("Generator_BG8604", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to The Java type '{0}' could not be found (are you missing a Java reference jar/aar or a Java binding library NuGet?).
+ ///
+ public static string Generator_BG8605 {
+ get {
+ return ResourceManager.GetString("Generator_BG8605", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Some types or members could not be bound because referenced Java types could not be found. See the 'java-resolution-report.log' file for details..
+ ///
+ public static string Generator_BG8606 {
+ get {
+ return ResourceManager.GetString("Generator_BG8606", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Unknown return type '{0}' for member '{1}'..
+ ///
+ public static string Generator_BG8700 {
+ get {
+ return ResourceManager.GetString("Generator_BG8700", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Invalid return type '{0}' for member '{1}'..
+ ///
+ public static string Generator_BG8701 {
+ get {
+ return ResourceManager.GetString("Generator_BG8701", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Unknown parameter type '{0}' for member '{1}'..
+ ///
+ public static string Generator_BG8800 {
+ get {
+ return ResourceManager.GetString("Generator_BG8800", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Invalid parameter type '{0}' for member '{1}'..
+ ///
+ public static string Generator_BG8801 {
+ get {
+ return ResourceManager.GetString("Generator_BG8801", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Metadata.xml element '{0}' matched no nodes..
+ ///
+ public static string Generator_BG8A00 {
+ get {
+ return ResourceManager.GetString("Generator_BG8A00", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Invalid namespace transform '{0}'.
+ ///
+ public static string Generator_BG8A07 {
+ get {
+ return ResourceManager.GetString("Generator_BG8A07", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Metadata.xml element '{0}' is missing the 'path' attribute..
+ ///
+ public static string Generator_BG8A08 {
+ get {
+ return ResourceManager.GetString("Generator_BG8A08", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Unknown generic argument constraint type '{0}' for member '{1}'..
+ ///
+ public static string Generator_BG8B00 {
+ get {
+ return ResourceManager.GetString("Generator_BG8B00", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Could not find base interface '{1}' for type '{0}'..
+ ///
+ public static string Generator_BG8C00 {
+ get {
+ return ResourceManager.GetString("Generator_BG8C00", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to For type '{0}', base interface '{1}' is invalid..
+ ///
+ public static string Generator_BG8C01 {
+ get {
+ return ResourceManager.GetString("Generator_BG8C01", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to For type '{0}', the Kotlin name-mangled method '{1}' (originally '{2}') has multiple hash-suffixed siblings that erase to the same C# signature. Only the first will be emitted; remove the duplicate via Metadata.xml to suppress this warning..
+ ///
+ public static string Generator_BG8C02 {
+ get {
+ return ResourceManager.GetString("Generator_BG8C02", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Cannot generate Java wrapper for type '{0}'. Only 'class' types are supported..
+ ///
+ public static string JavaCallableWrappers_XA4200 {
+ get {
+ return ResourceManager.GetString("JavaCallableWrappers_XA4200", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Cannot determine JNI name for type '{0}'..
+ ///
+ public static string JavaCallableWrappers_XA4201 {
+ get {
+ return ResourceManager.GetString("JavaCallableWrappers_XA4201", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to The 'Name' property must be a fully qualified type like 'com.example.MyClass' and no package was found for '{0}'..
+ ///
+ public static string JavaCallableWrappers_XA4203 {
+ get {
+ return ResourceManager.GetString("JavaCallableWrappers_XA4203", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Unable to resolve interface type '{0}'. Are you missing an assembly reference?.
+ ///
+ public static string JavaCallableWrappers_XA4204 {
+ get {
+ return ResourceManager.GetString("JavaCallableWrappers_XA4204", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to [ExportField] can only be used on methods with 0 parameters..
+ ///
+ public static string JavaCallableWrappers_XA4205 {
+ get {
+ return ResourceManager.GetString("JavaCallableWrappers_XA4205", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to [Export] cannot be used on a generic type..
+ ///
+ public static string JavaCallableWrappers_XA4206 {
+ get {
+ return ResourceManager.GetString("JavaCallableWrappers_XA4206", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to [ExportField] cannot be used on a generic type..
+ ///
+ public static string JavaCallableWrappers_XA4207 {
+ get {
+ return ResourceManager.GetString("JavaCallableWrappers_XA4207", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to [ExportField] cannot be used on a method returning 'void'..
+ ///
+ public static string JavaCallableWrappers_XA4208 {
+ get {
+ return ResourceManager.GetString("JavaCallableWrappers_XA4208", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Cannot override Kotlin-generated method '{0}' because it is not a valid Java method name. This method can only be overridden from Kotlin..
+ ///
+ public static string JavaCallableWrappers_XA4217 {
+ get {
+ return ResourceManager.GetString("JavaCallableWrappers_XA4217", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Unable to preload reference '{0}'..
+ ///
+ public static string JniMarshalMethodGen_JM4001 {
+ get {
+ return ResourceManager.GetString("JniMarshalMethodGen_JM4001", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Please specify at least one ASSEMBLY to process..
+ ///
+ public static string JniMarshalMethodGen_JM4002 {
+ get {
+ return ResourceManager.GetString("JniMarshalMethodGen_JM4002", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Unable to create Java VM{0}{1}.
+ ///
+ public static string JniMarshalMethodGen_JM4003 {
+ get {
+ return ResourceManager.GetString("JniMarshalMethodGen_JM4003", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Unable to read profile file '{0}'.{1}{2}.
+ ///
+ public static string JniMarshalMethodGen_JM4004 {
+ get {
+ return ResourceManager.GetString("JniMarshalMethodGen_JM4004", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Path '{0}' does not exist..
+ ///
+ public static string JniMarshalMethodGen_JM4005 {
+ get {
+ return ResourceManager.GetString("JniMarshalMethodGen_JM4005", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Unable to process assembly '{0}'{1}{2}{1}{3}.
+ ///
+ public static string JniMarshalMethodGen_JM4006 {
+ get {
+ return ResourceManager.GetString("JniMarshalMethodGen_JM4006", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Couln't find interface {0}.
+ ///
+ public static string JniMarshalMethodGen_JM8001 {
+ get {
+ return ResourceManager.GetString("JniMarshalMethodGen_JM8001", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Caught an exception while loading types. The types that cannot be loaded will not be processed. Make sure that any additional assembly references required for those types are provided using the -r option. Exception:{0}{1}.
+ ///
+ public static string JniMarshalMethodGen_JM8003 {
+ get {
+ return ResourceManager.GetString("JniMarshalMethodGen_JM8003", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Unable to find type '{0}'. The type will not be processed. Make sure the directories for all referenced assemblies are provided with the -L option..
+ ///
+ public static string JniMarshalMethodGen_JM8004 {
+ get {
+ return ResourceManager.GetString("JniMarshalMethodGen_JM8004", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Marshal methods type '{0}' already exists. Skipped generation of marshal methods in assembly '{1}'. Use -f to force regeneration when desired..
+ ///
+ public static string JniMarshalMethodGen_JM8005 {
+ get {
+ return ResourceManager.GetString("JniMarshalMethodGen_JM8005", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Unable to find definition of method '{0}' in assembly metadata. It will not be processed. Make sure the directories for all referenced assemblies are provided with the -L option..
+ ///
+ public static string JniMarshalMethodGen_JM8006 {
+ get {
+ return ResourceManager.GetString("JniMarshalMethodGen_JM8006", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Unable to find the System.Console.WriteLine() method. Disabling debug injection. To enable debug injection, ensure the directory containing mscorlib is provided with the -L option..
+ ///
+ public static string JniMarshalMethodGen_JM8007 {
+ get {
+ return ResourceManager.GetString("JniMarshalMethodGen_JM8007", resourceCulture);
+ }
+ }
+ }
+}
diff --git a/external/Java.Interop/src/Java.Interop.Localization/Resources.cs.resx b/external/Java.Interop/src/Java.Interop.Localization/Resources.cs.resx
new file mode 100644
index 00000000000..add2298cef4
--- /dev/null
+++ b/external/Java.Interop/src/Java.Interop.Localization/Resources.cs.resx
@@ -0,0 +1,402 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ Chyba při načítání sestavení:{0}
+ {0} - File name
+
+
+ Nepodařilo se odebrat staré konstanty: {0}.
+ {0} - The list of constants that could not be removed.
+In this message, the term "constants" refers to class or interface members that have constant values.
+
+
+ Zpracování mapování výčtu se nezdařilo. Textový řádek: {0}.
+ {0} - The line that could not be processed.
+
+
+ Chyba při zpracování opravy metadat: {0}
+ {0} - The error encountered.
+
+
+ Neplatná specifikace XPath: {0}
+ {0} - The invalid XPath line.
+
+
+ Pro cestu {0} není zadán název cílového atributu: {0}.
+ {0} - The invalid XPath line.
+
+
+ Neočekávaná specifikace global::. K této chybě dochází například v případě, že je v transformačním souboru Metadata.xml zadána hodnota global::.
+ The following are literal names and should not be translated: global::, Metadata.xml.
+
+
+ Neočekávaný podřízený {0} třídy.
+ {0} - The unexpected child class.
+
+
+ Třída {0} má neznámý základní typ {1}.
+ {0}, {1} - .NET types.
+
+
+ Třída {0} má neplatný základní typ {1}.
+ {0}, {1} - .NET types.
+
+
+ Nepovedlo se parsovat sestavení {0} : {1}.
+ {0} - Error .NET assembly.
+{1} - The error encountered.
+
+
+ Pro konstruktor{0} nebylo možné najít nadřazený typ {1}.
+ {0} - .NET constructor method.
+{1} - .NET type.
+
+
+ Neočekávaný typ pole {0}({1}).
+ {0} - .NET type.
+{1} - .NET field signature.
+
+
+ Přeskakuje se {0}.{1} z důvodu duplicitního názvu metody. (Typ Javy:{2})
+ {0} - .NET type.
+{1} - .NET field name.
+{2} - Java type.
+
+
+ Přeskakuje se {0}.{1} z důvodu duplicitního názvu vnořeného typu. (Typ Javy:{2})
+ {0} - .NET type.
+{1} - .NET field name.
+{2} - Java type.
+
+
+ Přeskakuje se {0}.{1} z důvodu duplicitního názvu pole nebo vlastnosti. (Typ Javy:{2})
+ {0} - .NET type.
+{1} - .NET field name.
+{2} - Java type.
+
+
+ Přeskakuje se {0}.{1} kvůli duplicitnímu poli. (Typ Javy:{2})
+ {0} - .NET type.
+{1} - .NET field name.
+{2} - Java type.
+
+
+ Typ {0} má název typu, který odpovídá názvu nadřazeného oboru názvů. Další informace najdete v https://aka.ms/BG8403.
+ {0} - Java type.
+
+
+ Neočekávaný podřízený element <interface>: {0}
+ {0} - XML element name.
+<interface> should not be translated.
+
+
+ Není zadaný žádný název události v {0}.{1}.
+ {0} - .NET type name
+{1} - .NET member.
+
+
+ Probíhá zneplatnění {0} a všech jeho vnořených typů, protože některá z jeho rozhraní byla neplatná.
+ {0} - .NET type name.
+
+
+ Probíhá zneplatnění {0} a všech jeho vnořených typů, protože některé z jeho metod byly neplatné.
+ {0} - .NET type name.
+
+
+ Název události pro {0}.{1} je neplatný. Platnou hodnotu eventName nebo argsType lze přiřadit přidáním pravidla do souboru transformací Metadata.xml.
+ {0} - .NET type name
+{1} - .NET member.
+The following terms should not be translated: eventName, argsType, Metadata.xml.
+
+
+ Název vlastnosti události pro {0}.{1} je neplatný. Platnou hodnotu eventName nebo argsType lze přiřadit přidáním pravidla do souboru transformací Metadata.xml.
+ {0} - .NET type name
+{1} - .NET member.
+The following terms should not be translated: eventName, argsType, Metadata.xml.
+
+
+ Neplatný soubor XML{0}: {1}.
+ {0} - File name
+{1} - The error encountered.
+
+
+ Nebyly nalezeny žádné elementy <package>.
+ The following terms should not be translated: <package>.
+
+
+ Neočekávaný kořenový podřízený uzel: <{0}>.
+ {0} - XML element name.
+
+
+ Neočekávaný podřízený uzel <package>: <{0}>
+ {0} - XML element name.
+The following terms should not be translated: <package>.
+
+
+ Nelze najít horní nadřazený typ {0} pro vnořený typ {1}.
+ {0}, {1} - .NET types.
+
+
+ Typ Javy{0}se nepovedlo najít (nechybí NuGet java reference jar/aar nebo java binding library?)
+ {0} - Java type.
+
+
+ Některé typy nebo členy nelze vázat, protože odkazované typy Java nebyly nalezeny. Podrobnosti najdete v souboru java-resolution-report.log.
+ The following terms should not be translated: java-resolution-report.log
+
+
+ Neznámý návratový typ {0} pro člena {1}.
+ {0} - Java type.
+{1} - .NET member.
+
+
+ Neplatný návratový typ {0} pro člena {1}.
+ {0} - Java type.
+{1} - .NET member.
+
+
+ Neznámý typ parametru {0} pro člena {1}.
+ {0} - Java type.
+{1} - .NET member.
+
+
+ Neplatný typ parametru {0} pro člen {1}.
+ {0} - Java type.
+{1} - .NET member.
+
+
+ Element Metadata.xml {0} neodpovídá žádným uzlům.
+ {0} - XML transform. (example: '<remove-node path="/api/package[@name='javax.sql']"')
+The following terms should not be translated: Metadata.xml.
+
+
+ Neplatná transformace oboru názvů {0}
+ {0} - XML transform. (example: '<ns-replace source="example" replacement="Example" />')
+
+
+ V elementu {0} souboru Metadata.xml chybí atribut path.
+ {0} - XML transform. (example: '<remove-node path="/api/package[@name='javax.sql']"')
+The following terms should not be translated: Metadata.xml, path.
+
+
+ Neznámý typ omezení obecného argumentu {0} pro člena {1}.
+ {0} - .NET type name
+{1} - .NET member.
+
+
+ Nelze najít základní rozhraní {1} pro typ {0}.
+ {0}, {1} - .NET types.
+
+
+ Pro typ {0} je základní rozhraní {1} neplatné.
+ {0}, {1} - .NET types.
+
+
+ Pro typ{0} nelze vygenerovat obálku Javy. Jsou podporovány pouze typy class.
+ {0} - Java type.
+The following terms should not be translated:
+class.
+
+
+ Nelze určit název JNI pro typ {0}.
+ {0} - Java type.
+The following terms should not be translated: JNI.
+
+
+ Vlastnost Name musí být plně kvalifikovaný typ, například com.example.MyClass, a pro {0}nebyl nalezen žádný balíček.
+ {0} - Java type.
+The following terms should not be translated:
+Name, com.example.MyClass.
+
+
+ Nelze přeložit typ rozhraní {0}. Nechybí vám odkaz na sestavení?
+ {0} - Java interface.
+
+
+ [ExportField] lze použít pouze u metod s 0 parametry.
+ The following terms should not be translated: [ExportField].
+
+
+ [Export] nelze použít u obecného typu.
+ The following terms should not be translated: [Export].
+
+
+ [ExportField] nelze použít u obecného typu.
+ The following terms should not be translated: [ExportField].
+
+
+ [ExportField] se nedá použít u metody, která vrací void.
+ The following terms should not be translated: [ExportField], void.
+
+
+ Metodu '{0}' vygenerovanou metodou Kotlin nelze přepsat, protože se nejedná o platný název metody Java. Tuto metodu lze přepsat pouze přes Kotlin.
+ {0} - Kotlin method name.
+
+
+ Odkaz {0} nelze předem načíst {0}.
+ {0} - assembly path
+
+
+ Zadejte alespoň jedno SESTAVENÍ, které se má zpracovat.
+ The following terms should not be translated or have any capitalization changes: ASSEMBLY. This is a special case for this particular message. In most messages, "assembly" would be translated.
+
+
+ Nepovedlo se vytvořit{0}{1}virtuálního počítače Java
+ {0} - newline, {1} - exception
+
+
+ Nelze přečíst soubor profilu {0}.{1}{2}
+ {0} - path, {1} - newline, {2} - exception. In this message, the term "profile" refers to a customized list of types to process.
+
+
+ Cesta {0} neexistuje.
+ {0} - path
+
+
+ Sestavení{0}{1}{2}{1}{3} nelze zpracovat.
+ {0} - assembly, {1} - newline, {2} - exception message, {3} exception
+
+
+ Nepovedlo se najít rozhraní {0}.-
+ {0} - interface name
+
+
+ Při načítání typů byla zachycena výjimka. Typy, které nelze načíst, nebudou zpracovány. Ujistěte se, že všechny další odkazy na sestavení vyžadované pro tyto typy jsou k dispozici pomocí možnosti -r. Výjimka:{0}{1}
+ {0} - newline, {1} - exception. The following terms should not be translated: -r
+
+
+ Nelze najít typ {0}. Typ nebude zpracován. Ujistěte se, že adresáře pro všechna odkazovaná sestavení jsou k dispozici s parametrem -L.
+ {0} - type
+The following terms should not be translated: -L
+
+
+ Typ metody zařazování{0}již existuje. Bylo přeskočeno generování zařazování metod v sestavení{1}. Pokud chcete vynutit opakované generování, použijte -f.použití.
+ {0} - type, {1} - assembly name. The following terms should not be translated: -f. In this message, the term "marshal methods" refers to methods that allow interaction between the managed methods and Java methods, similar to the methods of the .NET System.Runtime.InteropServices.Marshal class.
+
+
+ Nelze najít definici metody {0} v metadatech sestavení. Nebude zpracována. Ujistěte se, že adresáře pro všechna odkazovaná sestavení jsou k dispozici s parametrem -L.
+ {0} - method
+The following terms should not be translated: -L
+
+
+ Nelze najít metodu System.Console.WriteLine(). Zakazuje se injektáž ladění. Pokud chcete povolit injektáž ladění, ujistěte se, že adresář obsahující knihovnu mscorlib je k dispozici s parametrem -L.
+ The following terms should not be translated: -L
+
+
\ No newline at end of file
diff --git a/external/Java.Interop/src/Java.Interop.Localization/Resources.de.resx b/external/Java.Interop/src/Java.Interop.Localization/Resources.de.resx
new file mode 100644
index 00000000000..66123814c59
--- /dev/null
+++ b/external/Java.Interop/src/Java.Interop.Localization/Resources.de.resx
@@ -0,0 +1,402 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ Fehler beim Laden der Assembly: „{0}“.
+ {0} - File name
+
+
+ Fehler beim Entfernen alter Konstanten: {0}.
+ {0} - The list of constants that could not be removed.
+In this message, the term "constants" refers to class or interface members that have constant values.
+
+
+ Fehler beim Verarbeiten der Enumerationszuordnung. Textzeile: {0}.
+ {0} - The line that could not be processed.
+
+
+ Fehler beim Verarbeiten der Metadatenkorrektur: {0}.
+ {0} - The error encountered.
+
+
+ Ungültige XPath-Spezifikation: {0}.
+ {0} - The invalid XPath line.
+
+
+ Für den Pfad wurde kein Zielattributname angegeben: {0}.
+ {0} - The invalid XPath line.
+
+
+ Unerwartete global::-Spezifikation. Dieser Fehler tritt auf, wenn z. B. "global::" in der Metadata.xml Transformationsdatei angegeben ist.
+ The following are literal names and should not be translated: global::, Metadata.xml.
+
+
+ Unerwartetes untergeordnetes Klassenelement {0}.
+ {0} - The unexpected child class.
+
+
+ Die Klasse '{0}' hat einen unbekannten Basistyp '{1}'.
+ {0}, {1} - .NET types.
+
+
+ Die Klasse '{0}' weist einen ungültigen Basistyp '{1}' auf.
+ {0}, {1} - .NET types.
+
+
+ Fehler beim Analysieren der assembly-'{0}': {1}.
+ {0} - Error .NET assembly.
+{1} - The error encountered.
+
+
+ Für den Konstruktor '{0}' konnte der einschließende Typ '{1}' nicht gefunden werden.
+ {0} - .NET constructor method.
+{1} - .NET type.
+
+
+ Unerwarteter Feldtyp "{0}" ({1}).
+ {0} - .NET type.
+{1} - .NET field signature.
+
+
+ "{0}.{1}" wird aufgrund eines doppelten Methodennamens übersprungen. (Java-Typ: '{2}')
+ {0} - .NET type.
+{1} - .NET field name.
+{2} - Java type.
+
+
+ "{0}.{1}" wird aufgrund eines doppelten geschachtelten Typnamens übersprungen. (Java-Typ: '{2}')
+ {0} - .NET type.
+{1} - .NET field name.
+{2} - Java type.
+
+
+ "{0}.{1}" wird aufgrund eines doppelten Feld- oder Eigenschaftsnamens übersprungen. (Java-Typ: '{2}')
+ {0} - .NET type.
+{1} - .NET field name.
+{2} - Java type.
+
+
+ "{0}.{1}" wird aufgrund eines doppelten Felds übersprungen. (Java-Typ: '{2}')
+ {0} - .NET type.
+{1} - .NET field name.
+{2} - Java type.
+
+
+ Der Typ '{0}' hat einen Typnamen, der mit dem einschließenden Namespacenamen übereinstimmt. Weitere Informationen finden Sie unter https://aka.ms/BG8403.
+ {0} - Java type.
+
+
+ Unerwartetes untergeordnetes Element von '<interface>': '{0}'.
+ {0} - XML element name.
+<interface> should not be translated.
+
+
+ In "{0}.{1}" wurde kein Ereignisname angegeben.
+ {0} - .NET type name
+{1} - .NET member.
+
+
+ '{0}' und alle geschachtelten Typen werden ungültig, da einige ihrer Schnittstellen ungültig waren.
+ {0} - .NET type name.
+
+
+ '{0}' und alle geschachtelten Typen werden ungültig, da einige ihrer Methoden ungültig waren.
+ {0} - .NET type name.
+
+
+ Der Ereignisname für "{0}.{1}" ist ungültig. Ein gültiger eventName- oder argsType-Wert kann zugewiesen werden, indem der Metadata.xml Transformationsdatei eine Regel hinzugefügt wird.
+ {0} - .NET type name
+{1} - .NET member.
+The following terms should not be translated: eventName, argsType, Metadata.xml.
+
+
+ Der Ereigniseigenschaftsname für "{0}.{1}" ist ungültig. Ein gültiger eventName- oder argsType-Wert kann zugewiesen werden, indem der Metadata.xml Transformationsdatei eine Regel hinzugefügt wird.
+ {0} - .NET type name
+{1} - .NET member.
+The following terms should not be translated: eventName, argsType, Metadata.xml.
+
+
+ Ungültige XML-Datei „{0}“: {1}.
+ {0} - File name
+{1} - The error encountered.
+
+
+ Es wurden keine '<package>' Elemente gefunden.
+ The following terms should not be translated: <package>.
+
+
+ Unerwarteter untergeordneter Stammknoten: "<{0}>".
+ {0} - XML element name.
+
+
+ Unerwarteter '<package>' untergeordneter Knoten: "<{0}>".
+ {0} - XML element name.
+The following terms should not be translated: <package>.
+
+
+ Der oberste Vorgängertyp '{0}' für geschachtelten Typ '{1}' wurde nicht gefunden.
+ {0}, {1} - .NET types.
+
+
+ Der Java-Typ '{0}' wurde nicht gefunden . (Fehlt ein Java-Verweis-JAR/AAR oder eine Java-Bindungsbibliothek, NuGet?).
+ {0} - Java type.
+
+
+ Einige Typen oder Member konnten nicht gebunden werden, da die referenzierten Javatypen nicht gefunden wurden. Weitere Informationen finden Sie in der Datei "java-resolution-report.log".
+ The following terms should not be translated: java-resolution-report.log
+
+
+ Unbekannter Rückgabetyp '{0}' für Mitglied '{1}'.
+ {0} - Java type.
+{1} - .NET member.
+
+
+ Ungültiger Rückgabetyp '{0}' für Mitglied '{1}'.
+ {0} - Java type.
+{1} - .NET member.
+
+
+ Unbekannter Parametertyp '{0}' für Mitglied '{1}'.
+ {0} - Java type.
+{1} - .NET member.
+
+
+ Ungültiger Parametertyp '{0}' für Mitglied '{1}'.
+ {0} - Java type.
+{1} - .NET member.
+
+
+ Metadata.xml Element '{0}' mit keinem Knoten übereinstimmen.
+ {0} - XML transform. (example: '<remove-node path="/api/package[@name='javax.sql']"')
+The following terms should not be translated: Metadata.xml.
+
+
+ Ungültige Namespacetransformation '{0}'
+ {0} - XML transform. (example: '<ns-replace source="example" replacement="Example" />')
+
+
+ Für das Metadata.xml-Element '{0}' fehlt das Path-Attribut.
+ {0} - XML transform. (example: '<remove-node path="/api/package[@name='javax.sql']"')
+The following terms should not be translated: Metadata.xml, path.
+
+
+ Unbekannter generischer Argumenteinschränkungstyp '{0}' für Mitglied'{1}'.
+ {0} - .NET type name
+{1} - .NET member.
+
+
+ Die Basisschnittstelle '{1}' für den Typ '{0}' wurde nicht gefunden.
+ {0}, {1} - .NET types.
+
+
+ Für den Typ '{0}' ist die Basisschnittstelle '{1}' ungültig.
+ {0}, {1} - .NET types.
+
+
+ Für den Typ '{0}' kann kein Java Wrapper generiert werden. Es werden nur class-Typen unterstützt.
+ {0} - Java type.
+The following terms should not be translated:
+class.
+
+
+ Der JNI-Name für den Typ '{0}' kann nicht bestimmt werden.
+ {0} - Java type.
+The following terms should not be translated: JNI.
+
+
+ Die Eigenschaft "Name" muss ein vollqualifizierter Typ wie "com.example.MyClass" sein, und es wurde kein Paket für '{0}' gefunden.
+ {0} - Java type.
+The following terms should not be translated:
+Name, com.example.MyClass.
+
+
+ Der Schnittstellentyp '{0}' kann nicht aufgelöst werden. Fehlt ein Assemblyverweis?
+ {0} - Java interface.
+
+
+ [ExportField] kann nur für Methoden mit 0 Parametern verwendet werden.
+ The following terms should not be translated: [ExportField].
+
+
+ [Export] kann nicht für einen generischen Typ verwendet werden.
+ The following terms should not be translated: [Export].
+
+
+ [ExportField] kann nicht für einen generischen Typ verwendet werden.
+ The following terms should not be translated: [ExportField].
+
+
+ [ExportField] kann nicht für eine Methode verwendet werden, die "void" zurückgibt.
+ The following terms should not be translated: [ExportField], void.
+
+
+ Die von Kotlin generierte Methode '{0}' kann nicht überschrieben werden, da es sich nicht um einen gültigen Java-Methodennamen handelt. Diese Methode kann nur von Kotlin überschrieben werden.
+ {0} - Kotlin method name.
+
+
+ Verweis '{0}' kann nicht vorab geladen werden.
+ {0} - assembly path
+
+
+ Geben Sie mindestens eine ASSEMBLY an, die verarbeitet werden soll.
+ The following terms should not be translated or have any capitalization changes: ASSEMBLY. This is a special case for this particular message. In most messages, "assembly" would be translated.
+
+
+ Java-VM {0}{1} kann nicht erstellt werden.
+ {0} - newline, {1} - exception
+
+
+ Profildatei „{0}“ kann nicht gelesen werden.{1}{2}
+ {0} - path, {1} - newline, {2} - exception. In this message, the term "profile" refers to a customized list of types to process.
+
+
+ Der Pfad „{0}“ ist nicht vorhanden.
+ {0} - path
+
+
+ Die Assembly '{0}'{1}{2}{1}{3} kann nicht verarbeitet werden.
+ {0} - assembly, {1} - newline, {2} - exception message, {3} exception
+
+
+ Schnittstelle {0} nicht gefunden
+ {0} - interface name
+
+
+ Ausnahme beim Laden von Typen. Die Typen, die nicht geladen werden können, werden nicht verarbeitet. Stellen Sie sicher, dass alle zusätzlichen Assemblyverweise, die für diese Typen erforderlich sind, mithilfe der Option "-r" bereitgestellt werden. Ausnahme:{0}{1}
+ {0} - newline, {1} - exception. The following terms should not be translated: -r
+
+
+ Typ '{0}' wurde nicht gefunden. Es wird nicht verarbeitet. Stellen Sie sicher, dass die Verzeichnisse für alle Assemblys, auf die verwiesen wird, mit der Option -L bereitgestellt werden.
+ {0} - type
+The following terms should not be translated: -L
+
+
+ Der Marshallmethodentyp '{0}' bereits vorhanden. Das Generieren von Marshallmethoden in assembly-'{1}' wurde übersprungen. Verwenden Sie -f, um bei Bedarf eine Neuerstellung zu erzwingen.
+ {0} - type, {1} - assembly name. The following terms should not be translated: -f. In this message, the term "marshal methods" refers to methods that allow interaction between the managed methods and Java methods, similar to the methods of the .NET System.Runtime.InteropServices.Marshal class.
+
+
+ Die Definition der Methode '{0}' wurde in den Assemblymetadaten nicht gefunden. Es wird nicht verarbeitet. Stellen Sie sicher, dass die Verzeichnisse für alle Assemblys, auf die verwiesen wird, mit der Option -L bereitgestellt werden.
+ {0} - method
+The following terms should not be translated: -L
+
+
+ Die System.Console.WriteLine()-Methode wurde nicht gefunden. Debuginjektion wird deaktiviert. Um die Debuginjektion zu aktivieren, stellen Sie sicher, dass das Verzeichnis, das mscorlib enthält, mit der Option -L bereitgestellt wird.
+ The following terms should not be translated: -L
+
+
\ No newline at end of file
diff --git a/external/Java.Interop/src/Java.Interop.Localization/Resources.es.resx b/external/Java.Interop/src/Java.Interop.Localization/Resources.es.resx
new file mode 100644
index 00000000000..a56e506f882
--- /dev/null
+++ b/external/Java.Interop/src/Java.Interop.Localization/Resources.es.resx
@@ -0,0 +1,402 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ Error al cargar el ensamblaje: "{0}".
+ {0} - File name
+
+
+ Ha ocurrido un error al eliminar las constantes antiguas: {0}.
+ {0} - The list of constants that could not be removed.
+In this message, the term "constants" refers to class or interface members that have constant values.
+
+
+ Ha ocurrido un error al procesar el mapeo del enum. Línea de texto: {0}.
+ {0} - The line that could not be processed.
+
+
+ Ha ocurrido un error durante el procesamiento de la corrección de metadatos: {0}.
+ {0} - The error encountered.
+
+
+ Especificación XPath no válida: {0}.
+ {0} - The invalid XPath line.
+
+
+ No se ha especificado el nombre del atributo de destino para la ruta: {0}.
+ {0} - The invalid XPath line.
+
+
+ Especificación inesperada de 'global::'. Este error se produce si se especifica 'global::' en el archivo de transformación Metadata.xml, por ejemplo.
+ The following are literal names and should not be translated: global::, Metadata.xml.
+
+
+ Clase secundaria inesperada {0}.
+ {0} - The unexpected child class.
+
+
+ La clase "{0}" tiene una base desconocido de tipo "{1}".
+ {0}, {1} - .NET types.
+
+
+ La clase "{0}" tiene una base inválida tipo "{1}".
+ {0}, {1} - .NET types.
+
+
+ Ha ocurrido un error al analizar el ensamblaje "{0}": {1}.
+ {0} - Error .NET assembly.
+{1} - The error encountered.
+
+
+ Para el constructor "{0}", no se ha podido encontrar el tipo envolvente "{1}".
+ {0} - .NET constructor method.
+{1} - .NET type.
+
+
+ Tipo de campo inesperado "{0}" ({1}).
+ {0} - .NET type.
+{1} - .NET field signature.
+
+
+ Se ha omitido "{0}.{1}" debido a un nombre de método duplicado. (Java tipo: "{2}")
+ {0} - .NET type.
+{1} - .NET field name.
+{2} - Java type.
+
+
+ El "{0}.{1}" ha sido omitido debido a un nombre de tipo anidado duplicado. (tipo Java: "{2}")
+ {0} - .NET type.
+{1} - .NET field name.
+{2} - Java type.
+
+
+ Se ha omitido "{0}.{1}" debido a un campo o nombre de propiedad duplicado. (tipo Java: "{2}")
+ {0} - .NET type.
+{1} - .NET field name.
+{2} - Java type.
+
+
+ Se ha omitido "{0}.{1}" debido a un campo duplicado. (tipo Java: "{2}")
+ {0} - .NET type.
+{1} - .NET field name.
+{2} - Java type.
+
+
+ El tipo "{0}" tiene un nombre de tipo que coincide con el nombre del espacio de nombres que lo rodea. Consulte https://aka.ms/BG8403 para obtener más información.
+ {0} - Java type.
+
+
+ Elemento secundario inesperado de '<interface>': "{0}".
+ {0} - XML element name.
+<interface> should not be translated.
+
+
+ No se ha proporcionado ningún nombre de evento en "{0}.{1}".
+ {0} - .NET type name
+{1} - .NET member.
+
+
+ Invalidando "{0}" y todos sus tipos anidados porque algunas de sus interfaces no eran válidas.
+ {0} - .NET type name.
+
+
+ Invalidando "{0}" y todos sus tipos anidados porque algunos de sus métodos no eran válidos.
+ {0} - .NET type name.
+
+
+ El nombre del evento para "{0}.{1}" no es válido. Se puede asignar un 'eventName' o 'argsType' válido agregando una regla al archivo de transformaciones Metadata.xml.
+ {0} - .NET type name
+{1} - .NET member.
+The following terms should not be translated: eventName, argsType, Metadata.xml.
+
+
+ El nombre de la propiedad del evento para "{0}.{1}" no es válido. Se puede asignar un 'eventName' o 'argsType' válido agregando una regla al archivo de transformaciones Metadata.xml.
+ {0} - .NET type name
+{1} - .NET member.
+The following terms should not be translated: eventName, argsType, Metadata.xml.
+
+
+ Archivo XML no válido "{0}": {1}.
+ {0} - File name
+{1} - The error encountered.
+
+
+ No se han encontrado los elementos '<package>'.
+ The following terms should not be translated: <package>.
+
+
+ Raíz de nodo secundario inesperado: "<{0}>".
+ {0} - XML element name.
+
+
+ Nodo secundario inesperado de "<package>": "<{0}>".
+ {0} - XML element name.
+The following terms should not be translated: <package>.
+
+
+ No se ha podido encontrar el tipo antecesor superior "{0}" para el tipo anidado "{1}".
+ {0}, {1} - .NET types.
+
+
+ No se ha podido encontrar el tipo de Java "{0}" (¿le falta un jar/aar de referencia de Java o una biblioteca de enlace de Java NuGet?)
+ {0} - Java type.
+
+
+ Algunos tipos o miembros no han podido ser vinculados debido a que no se han podido encontrar los tipos Java referenciados. Consulte el archivo "java-resolution-report.log" para más detalles.
+ The following terms should not be translated: java-resolution-report.log
+
+
+ Retorno desconocido tipo "{0}" para el miembro "{1}".
+ {0} - Java type.
+{1} - .NET member.
+
+
+ Retorno inválido tipo "{0}" para el miembro "{1}".
+ {0} - Java type.
+{1} - .NET member.
+
+
+ Parámetro desconocido tipo "{0}" para el miembro "{1}".
+ {0} - Java type.
+{1} - .NET member.
+
+
+ Parámetro inválido tipo "{0}" para el miembro "{1}".
+ {0} - Java type.
+{1} - .NET member.
+
+
+ El elemento Metadata.xml "{0}" no tiene nodos.
+ {0} - XML transform. (example: '<remove-node path="/api/package[@name='javax.sql']"')
+The following terms should not be translated: Metadata.xml.
+
+
+ Transformación de espacio de nombres inválida "{0}"
+ {0} - XML transform. (example: '<ns-replace source="example" replacement="Example" />')
+
+
+ Falta el atributo 'path' en el elemento Metadata.xml '{0}'.
+ {0} - XML transform. (example: '<remove-node path="/api/package[@name='javax.sql']"')
+The following terms should not be translated: Metadata.xml, path.
+
+
+ Tipo de restricción genérica desconocida "{0}" para el miembro "{1}".
+ {0} - .NET type name
+{1} - .NET member.
+
+
+ No se ha podido encontrar la interfaz base "{1}" para el tipo "{0}".
+ {0}, {1} - .NET types.
+
+
+ Para el tipo "{0}", la interfaz base "{1}" no es válida.
+ {0}, {1} - .NET types.
+
+
+ No se puede generar el contenedor de Java para el tipo '{0}'. Solo se admiten tipos "class".
+ {0} - Java type.
+The following terms should not be translated:
+class.
+
+
+ No se puede determinar el nombre JNI para el tipo "{0}".
+ {0} - Java type.
+The following terms should not be translated: JNI.
+
+
+ La propiedad "Name" debe ser un tipo completamente calificado como "com.example.MyClass" y no se encontró ningún paquete para "{0}".
+ {0} - Java type.
+The following terms should not be translated:
+Name, com.example.MyClass.
+
+
+ No se puede resolver el tipo de interfaz "{0}". ¿Le falta una referencia de ensamblaje?
+ {0} - Java interface.
+
+
+ [ExportField] solo puede utilizarse en métodos con 0 parámetros.
+ The following terms should not be translated: [ExportField].
+
+
+ No se puede utilizar [Exportar] en un tipo genérico.
+ The following terms should not be translated: [Export].
+
+
+ No se puede utilizar [ExportField] en un tipo genérico.
+ The following terms should not be translated: [ExportField].
+
+
+ No se puede utilizar [ExportField] en un método que devuelve "void".
+ The following terms should not be translated: [ExportField], void.
+
+
+ El método generado por Kotlin "{0}" no puede ser anulado debido a que no es un nombre de método Java válido. Este método sólo puede ser anulado desde Kotlin.
+ {0} - Kotlin method name.
+
+
+ No se ha podido precargar la referencia "{0}".
+ {0} - assembly path
+
+
+ Especifique al menos un ENSAMBLADO a procesar.
+ The following terms should not be translated or have any capitalization changes: ASSEMBLY. This is a special case for this particular message. In most messages, "assembly" would be translated.
+
+
+ No se puede crear Java VM{0}{1}
+ {0} - newline, {1} - exception
+
+
+ No se puede leer el archivo de perfil "{0}".{1}{2}
+ {0} - path, {1} - newline, {2} - exception. In this message, the term "profile" refers to a customized list of types to process.
+
+
+ La ruta "{0}" no existe.
+ {0} - path
+
+
+ No se puede procesar el ensamblado "{0}"{1}{2}{1}{3}
+ {0} - assembly, {1} - newline, {2} - exception message, {3} exception
+
+
+ No se encuentra la interfaz {0}
+ {0} - interface name
+
+
+ Se ha producido una excepción al cargar los tipos. Los tipos que no pueden ser cargados no serán procesados. Asegúrese de que las referencias de ensamblaje adicionales necesarias para esos tipos se proporcionan utilizando la opción -r. Excepción:{0}{1}
+ {0} - newline, {1} - exception. The following terms should not be translated: -r
+
+
+ No se puede encontrar el tipo "{0}". El tipo no será procesado. Asegúrese de que los directorios de todos los ensamblados referenciados se proporcionan con la opción -L.
+ {0} - type
+The following terms should not be translated: -L
+
+
+ Los métodos Marshal de tipo "{0}" ya existen. Se ha omitido la generación de métodos Marshal en el ensamblado "{1}". Utilice -f para forzar la regeneración cuando lo desee.
+ {0} - type, {1} - assembly name. The following terms should not be translated: -f. In this message, the term "marshal methods" refers to methods that allow interaction between the managed methods and Java methods, similar to the methods of the .NET System.Runtime.InteropServices.Marshal class.
+
+
+ No se ha podido encontrar la definición del método "{0}" en los metadatos del ensamblado. No será procesado. Asegúrese de que los directorios de todos los ensamblajes referenciados se proporcionan con la opción -L.
+ {0} - method
+The following terms should not be translated: -L
+
+
+ No se puede encontrar el método System.Console.WriteLine(). Desactivación de la inserción de la depuración. Para habilitar la inserción de depuración, asegúrese de que el directorio que contiene mscorlib se proporciona con la opción -L.
+ The following terms should not be translated: -L
+
+
\ No newline at end of file
diff --git a/external/Java.Interop/src/Java.Interop.Localization/Resources.fr.resx b/external/Java.Interop/src/Java.Interop.Localization/Resources.fr.resx
new file mode 100644
index 00000000000..b45ab91e543
--- /dev/null
+++ b/external/Java.Interop/src/Java.Interop.Localization/Resources.fr.resx
@@ -0,0 +1,402 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ Erreur lors du chargement de l'assemblage : '{0}'.
+ {0} - File name
+
+
+ Impossible de supprimer les anciennes constantes : {0}.
+ {0} - The list of constants that could not be removed.
+In this message, the term "constants" refers to class or interface members that have constant values.
+
+
+ Échec du traitement du mappage enum. Ligne de texte : {0}.
+ {0} - The line that could not be processed.
+
+
+ Erreur lors du traitement de la correction des métadonnées : {0}.
+ {0} - The error encountered.
+
+
+ Spécification XPath non valide : {0}.
+ {0} - The invalid XPath line.
+
+
+ Le nom d'attribut cible n'est pas spécifié pour le chemin : {0}.
+ {0} - The invalid XPath line.
+
+
+ Spécification 'globale ::' inattendue. Cette erreur se produit si 'global ::' est spécifié dans le fichier de transformation Metadata.xml, par exemple.
+ The following are literal names and should not be translated: global::, Metadata.xml.
+
+
+ Enfant de classe {0} inattendu.
+ {0} - The unexpected child class.
+
+
+ La classe '{0}' a un type de base inconnu '{1}'.
+ {0}, {1} - .NET types.
+
+
+ La classe '{0}' a un type de base '{1}' non valide.
+ {0}, {1} - .NET types.
+
+
+ Échec de l'analyse de l'assembly '{0}' : {1}.
+ {0} - Error .NET assembly.
+{1} - The error encountered.
+
+
+ Pour le constructeur '{0}', impossible de trouver le type englobant '{1}'.
+ {0} - .NET constructor method.
+{1} - .NET type.
+
+
+ Type de champ `{0}` ({1}) inattendu.
+ {0} - .NET type.
+{1} - .NET field signature.
+
+
+ Sauter '{0}.{1}' en raison d'un nom de méthode en double. (Type Java : '{2}')
+ {0} - .NET type.
+{1} - .NET field name.
+{2} - Java type.
+
+
+ Sauter '{0}.{1}' en raison d'un nom de type imbriqué en double. (Type Java : '{2}')
+ {0} - .NET type.
+{1} - .NET field name.
+{2} - Java type.
+
+
+ Sauter '{0}.{1}' en raison d'un champ ou d'un nom de propriété en double. (Type Java : '{2}')
+ {0} - .NET type.
+{1} - .NET field name.
+{2} - Java type.
+
+
+ Sauter '{0}.{1}' en raison d'un champ en double. (Type Java : '{2}')
+ {0} - .NET type.
+{1} - .NET field name.
+{2} - Java type.
+
+
+ Le type '{0}' a un nom de type qui correspond au nom de l'espace de noms englobant. Voir https://aka.ms/BG8403 pour plus d'informations.
+ {0} - Java type.
+
+
+ Élément enfant inattendu de '<interface>' : '{0}'.
+ {0} - XML element name.
+<interface> should not be translated.
+
+
+ Aucun nom d'événement fourni dans '{0}.{1}'.
+ {0} - .NET type name
+{1} - .NET member.
+
+
+ Invalidation de '{0}' et de tous ses types imbriqués car certaines de ses interfaces étaient invalides.
+ {0} - .NET type name.
+
+
+ Invalidation de '{0}' et de tous ses types imbriqués car certaines de ses méthodes étaient invalides.
+ {0} - .NET type name.
+
+
+ Nom de l'événement pour '{0}.{1}' est invalide. Un 'eventName' ou 'argsType' valide peut être attribué en ajoutant une règle au fichier de transformations Metadata.xml.
+ {0} - .NET type name
+{1} - .NET member.
+The following terms should not be translated: eventName, argsType, Metadata.xml.
+
+
+ Nom de la propriété d'événement pour '{0}.{1}' est invalide. Un 'eventName' ou 'argsType' valide peut être attribué en ajoutant une règle au fichier de transformations Metadata.xml.
+ {0} - .NET type name
+{1} - .NET member.
+The following terms should not be translated: eventName, argsType, Metadata.xml.
+
+
+ Fichier XML '{0}' non valide : {1}.
+ {0} - File name
+{1} - The error encountered.
+
+
+ Aucun élément '<package>' trouvé.
+ The following terms should not be translated: <package>.
+
+
+ Nœud enfant racine inattendu : '<{0}>'.
+ {0} - XML element name.
+
+
+ Nœud enfant '<package>' inattendu : '<{0}>'.
+ {0} - XML element name.
+The following terms should not be translated: <package>.
+
+
+ Impossible de trouver le type d'ancêtre supérieur '{0}' pour le type imbriqué '{1}'.
+ {0}, {1} - .NET types.
+
+
+ Le type Java '{0}' est introuvable (manque-t-il une référence Java jar/aar ou une bibliothèque de liaison Java NuGet ?)
+ {0} - Java type.
+
+
+ Certains types ou membres n'ont pas pu être liés car les types Java référencés sont introuvables. Voir le fichier 'java-resolution-report.log' pour plus de détails.
+ The following terms should not be translated: java-resolution-report.log
+
+
+ Type de retour inconnu '{0}' pour le membre '{1}'.
+ {0} - Java type.
+{1} - .NET member.
+
+
+ Type de retour non valide '{0}' pour le membre '{1}'.
+ {0} - Java type.
+{1} - .NET member.
+
+
+ Type de paramètre inconnu '{0}' pour le membre '{1}'.
+ {0} - Java type.
+{1} - .NET member.
+
+
+ Type de paramètre '{0}' non valide pour le membre '{1}'.
+ {0} - Java type.
+{1} - .NET member.
+
+
+ L'élément Metadata.xml '{0}' ne correspond à aucun nœud.
+ {0} - XML transform. (example: '<remove-node path="/api/package[@name='javax.sql']"')
+The following terms should not be translated: Metadata.xml.
+
+
+ Transformation d'espace de noms non valide '{0}'
+ {0} - XML transform. (example: '<ns-replace source="example" replacement="Example" />')
+
+
+ Metadata.xml’attribut 'path' est manquant dans l’élément '{0}'.
+ {0} - XML transform. (example: '<remove-node path="/api/package[@name='javax.sql']"')
+The following terms should not be translated: Metadata.xml, path.
+
+
+ Type de contrainte d'argument générique inconnu '{0}' pour le membre '{1}'.
+ {0} - .NET type name
+{1} - .NET member.
+
+
+ Impossible de trouver l'interface de base '{1}' pour le type '{0}'.
+ {0}, {1} - .NET types.
+
+
+ Pour le type '{0}', l'interface de base '{1}' n'est pas valide.
+ {0}, {1} - .NET types.
+
+
+ Impossible de générer le wrapper Java pour le type '{0}'. Seulement les types de 'classe' sont pris en charge.
+ {0} - Java type.
+The following terms should not be translated:
+class.
+
+
+ Impossible de déterminer le nom JNI pour le type '{0}'.
+ {0} - Java type.
+The following terms should not be translated: JNI.
+
+
+ La propriété 'Name' doit être un type complet tel que 'com.example.MyClass' et aucun package n'a été trouvé pour '{0}'.
+ {0} - Java type.
+The following terms should not be translated:
+Name, com.example.MyClass.
+
+
+ Impossible de résoudre le type d'interface '{0}'. Il vous manque une référence d'assemblage ?
+ {0} - Java interface.
+
+
+ [ExportField] ne peut être utilisé que sur des méthodes avec 0 paramètres.
+ The following terms should not be translated: [ExportField].
+
+
+ [Export] ne peut pas être utilisé sur un type générique.
+ The following terms should not be translated: [Export].
+
+
+ [ExportField] ne peut pas être utilisé sur un type générique.
+ The following terms should not be translated: [ExportField].
+
+
+ [ExportField] ne peut pas être utilisé sur une méthode retournant 'void'.
+ The following terms should not be translated: [ExportField], void.
+
+
+ Impossible de remplacer la méthode générée par Kotlin '{0}' car il ne s'agit pas d'un nom de méthode Java valide. Cette méthode ne peut être remplacée qu'à partir de Kotlin.
+ {0} - Kotlin method name.
+
+
+ Impossible de précharger la référence '{0}'.
+ {0} - assembly path
+
+
+ Veuillez spécifier au moins un ENSEMBLE à traiter.
+ The following terms should not be translated or have any capitalization changes: ASSEMBLY. This is a special case for this particular message. In most messages, "assembly" would be translated.
+
+
+ Impossible de créer la machine virtuelle Java{0}{1}
+ {0} - newline, {1} - exception
+
+
+ Impossible de lire le fichier de profil '{0}'.{1}{2}
+ {0} - path, {1} - newline, {2} - exception. In this message, the term "profile" refers to a customized list of types to process.
+
+
+ Le chemin '{0}' n'existe pas.
+ {0} - path
+
+
+ Impossible de traiter l'assemblage '{0}'{1}{2}{1}{3}
+ {0} - assembly, {1} - newline, {2} - exception message, {3} exception
+
+
+ Impossible de trouver l'interface {0}
+ {0} - interface name
+
+
+ A intercepté une exception lors du chargement des types. Les types qui ne peuvent pas être chargés ne seront pas traités. Assurez-vous que toutes les références d'assembly supplémentaires requises pour ces types sont fournies à l'aide de l'option -r. Exception : {0}{1}
+ {0} - newline, {1} - exception. The following terms should not be translated: -r
+
+
+ Impossible de trouver le type '{0}'. Le type ne sera pas traité. Assurez-vous que les répertoires de tous les assemblys référencés sont fournis avec l'option -L.
+ {0} - type
+The following terms should not be translated: -L
+
+
+ Le type de méthodes Marshal '{0}' existe déjà. Génération ignorée des méthodes marshal dans l'assembly '{1}'. Utilisez -f pour forcer la régénération lorsque vous le souhaitez.
+ {0} - type, {1} - assembly name. The following terms should not be translated: -f. In this message, the term "marshal methods" refers to methods that allow interaction between the managed methods and Java methods, similar to the methods of the .NET System.Runtime.InteropServices.Marshal class.
+
+
+ Impossible de trouver la définition de la méthode '{0}' dans les métadonnées de l'assembly. Il ne sera pas traité. Assurez-vous que les répertoires de tous les assemblys référencés sont fournis avec l'option -L.
+ {0} - method
+The following terms should not be translated: -L
+
+
+ Impossible de trouver la méthode System.Console.WriteLine(). Désactivation de l'injection de débogage. Pour activer l'injection de débogage, assurez-vous que le répertoire contenant mscorlib est fourni avec l'option -L.
+ The following terms should not be translated: -L
+
+
\ No newline at end of file
diff --git a/external/Java.Interop/src/Java.Interop.Localization/Resources.it.resx b/external/Java.Interop/src/Java.Interop.Localization/Resources.it.resx
new file mode 100644
index 00000000000..a7faa8fef44
--- /dev/null
+++ b/external/Java.Interop/src/Java.Interop.Localization/Resources.it.resx
@@ -0,0 +1,402 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ Errore durante il caricamento dell'assembly: '{0}'.
+ {0} - File name
+
+
+ Impossibile rimuovere le costanti precedenti: {0}.
+ {0} - The list of constants that could not be removed.
+In this message, the term "constants" refers to class or interface members that have constant values.
+
+
+ Impossibile elaborare il mapping dell'enumerazione. Riga di testo: {0}.
+ {0} - The line that could not be processed.
+
+
+ Errore durante l'elaborazione della correzione dei metadati: {0}.
+ {0} - The error encountered.
+
+
+ Specifica XPath non valida: {0}.
+ {0} - The invalid XPath line.
+
+
+ Il nome dell'attributo di destinazione non è specificato per il percorso: {0}.
+ {0} - The invalid XPath line.
+
+
+ Specifica 'global::' imprevista. Questo errore si verifica, ad esempio, se 'global::' è specificato nel file di trasformazione Metadata.xml.
+ The following are literal names and should not be translated: global::, Metadata.xml.
+
+
+ Elemento figlio classe imprevisto {0}.
+ {0} - The unexpected child class.
+
+
+ La classe '{0}' contiene il tipo di base sconosciuto '{1}'.
+ {0}, {1} - .NET types.
+
+
+ La classe '{0}' ha un tipo di base non valido '{1}'.
+ {0}, {1} - .NET types.
+
+
+ Impossibile analizzare l'assembly '{0}': {1}.
+ {0} - Error .NET assembly.
+{1} - The error encountered.
+
+
+ Per il costruttore '{0}' non è stato possibile trovare il tipo di inclusione '{1}'.
+ {0} - .NET constructor method.
+{1} - .NET type.
+
+
+ Tipo di campo '{0}' ({1}) imprevisto.
+ {0} - .NET type.
+{1} - .NET field signature.
+
+
+ '{0}.{1}' verrà ignorato a causa di un nome di metodo duplicato. (Tipo Java: '{2}')
+ {0} - .NET type.
+{1} - .NET field name.
+{2} - Java type.
+
+
+ '{0}.{1}' verrà ignorato a causa di un nome di tipo nidificato duplicato. (Tipo Java: '{2}')
+ {0} - .NET type.
+{1} - .NET field name.
+{2} - Java type.
+
+
+ '{0}.{1}' verrà ignorato a causa di un nome di proprietà o campo duplicato. (tipo Java: '{2}')
+ {0} - .NET type.
+{1} - .NET field name.
+{2} - Java type.
+
+
+ '{0}.{1}' verrà ignorato a causa di un campo duplicato. (Tipo Java: '{2}')
+ {0} - .NET type.
+{1} - .NET field name.
+{2} - Java type.
+
+
+ Il tipo '{0}' presenta un nome di tipo che corrisponde al nome dello spazio dei nomi contenitore. Per altre informazioni, vedere https://aka.ms/BG8403.
+ {0} - Java type.
+
+
+ Elemento figlio imprevisto di '<interface>': '{0}'.
+ {0} - XML element name.
+<interface> should not be translated.
+
+
+ Nessun nome di evento specificato in '{0}.{1}'.
+ {0} - .NET type name
+{1} - .NET member.
+
+
+ Convalida di '{0}' e di tutti i relativi tipi nidificati perché alcune interfacce non sono valide.
+ {0} - .NET type name.
+
+
+ Impossibile convalidare '{0}' e tutti i relativi tipi annidati perché alcuni dei relativi metodi non sono validi.
+ {0} - .NET type name.
+
+
+ Il nome dell'evento per '{0}.{1}' non è valido. È possibile assegnare un valore 'eventName' o 'argsType' valido aggiungendo una regola al file di trasformazioni Metadata.xml.
+ {0} - .NET type name
+{1} - .NET member.
+The following terms should not be translated: eventName, argsType, Metadata.xml.
+
+
+ Il nome della proprietà dell'evento per '{0}.{1}' non è valido. È possibile assegnare un valore 'eventName' o 'argsType' valido aggiungendo una regola al file di trasformazioni Metadata.xml.
+ {0} - .NET type name
+{1} - .NET member.
+The following terms should not be translated: eventName, argsType, Metadata.xml.
+
+
+ Il file XML '{0}' non è valido: {1}.
+ {0} - File name
+{1} - The error encountered.
+
+
+ Non sono stati trovati elementi '<package>'.
+ The following terms should not be translated: <package>.
+
+
+ Nodo figlio radice imprevisto: '<{0}>'.
+ {0} - XML element name.
+
+
+ Nodo figlio '<package>' imprevisto: '<{0}>'.
+ {0} - XML element name.
+The following terms should not be translated: <package>.
+
+
+ Non è stato possibile trovare il tipo predecessore principale '{0}' per il tipo nidificato '{1}'.
+ {0}, {1} - .NET types.
+
+
+ Non è stato possibile trovare il tipo Java '{0}' (manca un file jar/aar di riferimento Java o una libreria di binding Java NuGet?)
+ {0} - Java type.
+
+
+ Non è stato possibile associare alcuni tipi o membri perché non è stato possibile trovare i tipi Java a cui viene fatto riferimento. Per informazioni dettagliate, vedere il file 'java-resolution-report.log'.
+ The following terms should not be translated: java-resolution-report.log
+
+
+ Tipo restituito sconosciuto '{0}' per il membro '{1}'.
+ {0} - Java type.
+{1} - .NET member.
+
+
+ Tipo restituito non valido '{0}' per il membro '{1}'.
+ {0} - Java type.
+{1} - .NET member.
+
+
+ Tipo di parametro sconosciuto '{0}' per il membro '{1}'.
+ {0} - Java type.
+{1} - .NET member.
+
+
+ Tipo di parametro '{0}' non valido per il membro '{1}'.
+ {0} - Java type.
+{1} - .NET member.
+
+
+ L'elemento Metadata.xml '{0}' non corrisponde ad alcun nodo.
+ {0} - XML transform. (example: '<remove-node path="/api/package[@name='javax.sql']"')
+The following terms should not be translated: Metadata.xml.
+
+
+ Trasformazione dello spazio dei nomi '{0}' non valida
+ {0} - XML transform. (example: '<ns-replace source="example" replacement="Example" />')
+
+
+ L'elemento Metadata.xml '{0}' non dispone dell'attributo 'path'.
+ {0} - XML transform. (example: '<remove-node path="/api/package[@name='javax.sql']"')
+The following terms should not be translated: Metadata.xml, path.
+
+
+ Tipo di vincolo di argomento generico sconosciuto '{0}' per il membro '{1}'.
+ {0} - .NET type name
+{1} - .NET member.
+
+
+ Impossibile trovare l'interfaccia di base '{1}' per il tipo '{0}'.
+ {0}, {1} - .NET types.
+
+
+ Per il tipo '{0}', l'interfaccia di base '{1}' non è valida.
+ {0}, {1} - .NET types.
+
+
+ Non è possibile generare il wrapper Java per il tipo '{0}'. Sono supportati solo i tipi 'class'.
+ {0} - Java type.
+The following terms should not be translated:
+class.
+
+
+ Non è possibile determinare il nome JNI per il tipo '{0}'.
+ {0} - Java type.
+The following terms should not be translated: JNI.
+
+
+ La proprietà 'Name' deve essere un tipo completo come 'com.example.MyClass' e non è stato trovato alcun pacchetto per '{0}'.
+ {0} - Java type.
+The following terms should not be translated:
+Name, com.example.MyClass.
+
+
+ Impossibile risolvere il tipo di interfaccia '{0}'. Manca un riferimento all'assembly?
+ {0} - Java interface.
+
+
+ [ExportField] può essere utilizzato solo su metodi con 0 parametri.
+ The following terms should not be translated: [ExportField].
+
+
+ [Export] non può essere utilizzato in un tipo generico.
+ The following terms should not be translated: [Export].
+
+
+ [ExportField] non può essere utilizzato in un tipo generico.
+ The following terms should not be translated: [ExportField].
+
+
+ impossibile utilizzare [ExportField] su un metodo che restituisce 'void'.
+ The following terms should not be translated: [ExportField], void.
+
+
+ Non è possibile eseguire l'override del metodo generato da Kotlin '{0}' perché non è un nome di metodo Java valido. Questo metodo può essere sostituito solo da Kotlin.
+ {0} - Kotlin method name.
+
+
+ Non è possibile precaricare il riferimento '{0}'.
+ {0} - assembly path
+
+
+ Specificare almeno un ASSEMBLY da elaborare.
+ The following terms should not be translated or have any capitalization changes: ASSEMBLY. This is a special case for this particular message. In most messages, "assembly" would be translated.
+
+
+ Non è possibile creare la macchina virtuale Java{0}{1}
+ {0} - newline, {1} - exception
+
+
+ Impossibile leggere il file del profilo '{0}'.{1}{2}
+ {0} - path, {1} - newline, {2} - exception. In this message, the term "profile" refers to a customized list of types to process.
+
+
+ Il percorso '{0}' non esiste.
+ {0} - path
+
+
+ Impossibile elaborare l'assembly '{0}'{1}{2}{1}{3}
+ {0} - assembly, {1} - newline, {2} - exception message, {3} exception
+
+
+ Non è stato possibile trovare l'interfaccia {0}
+ {0} - interface name
+
+
+ È stata rilevata un'eccezione durante il caricamento dei tipi. I tipi che non possono essere caricati non verranno elaborati. Assicurarsi che tutti i riferimenti ad assembly aggiuntivi necessari per questi tipi vengano forniti usando l'opzione -r. Eccezione:{0}{1}
+ {0} - newline, {1} - exception. The following terms should not be translated: -r
+
+
+ Impossibile trovare il tipo '{0}'. Il tipo non verrà elaborato. Assicurarsi che le directory per tutti gli assembly a cui si fa riferimento siano fornite con l'opzione -L.
+ {0} - type
+The following terms should not be translated: -L
+
+
+ Il tipo di metodi di marshalling '{0}' esiste già. La generazione dei metodi di marshalling nell'assembly '{1}' è stata ignorata. Usare -f per forzare la rigenerazione quando si desidera.
+ {0} - type, {1} - assembly name. The following terms should not be translated: -f. In this message, the term "marshal methods" refers to methods that allow interaction between the managed methods and Java methods, similar to the methods of the .NET System.Runtime.InteropServices.Marshal class.
+
+
+ Impossibile trovare la definizione del metodo '{0}' nei metadati dell'assembly. Non verrà elaborato. Verificare che le directory per tutti gli assembly di riferimento siano fornite con l'opzione -L.
+ {0} - method
+The following terms should not be translated: -L
+
+
+ Impossibile trovare il metodo System.Console.WriteLine(). Disabilitazione dell'inserimento del debug. Per abilitare l'inserimento del debug, assicurarsi che la directory contenente mscorlib sia fornita con l'opzione -L.
+ The following terms should not be translated: -L
+
+
\ No newline at end of file
diff --git a/external/Java.Interop/src/Java.Interop.Localization/Resources.ja.resx b/external/Java.Interop/src/Java.Interop.Localization/Resources.ja.resx
new file mode 100644
index 00000000000..f8bab10a98e
--- /dev/null
+++ b/external/Java.Interop/src/Java.Interop.Localization/Resources.ja.resx
@@ -0,0 +1,402 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ アセンブリの読み込み時のエラー: '{0}'。
+ {0} - File name
+
+
+ 古い定数を削除できませんでした: {0}。
+ {0} - The list of constants that could not be removed.
+In this message, the term "constants" refers to class or interface members that have constant values.
+
+
+ 列挙型マッピングを処理できませんでした。テキスト行: {0}。
+ {0} - The line that could not be processed.
+
+
+ メタデータの修正の処理中にエラーが発生しました: {0}。
+ {0} - The error encountered.
+
+
+ XPath の指定が無効です: {0}。
+ {0} - The invalid XPath line.
+
+
+ パスにターゲット属性名が指定されていません: {0}。
+ {0} - The invalid XPath line.
+
+
+ 予期しない 'global::' 指定です。このエラーは、Metadata.xml 変換ファイルで 'global::' が指定されている場合などに発生します。
+ The following are literal names and should not be translated: global::, Metadata.xml.
+
+
+ 予期しないクラスの子 {0} です。
+ {0} - The unexpected child class.
+
+
+ クラス '{0}' に不明な基本型 '{1}' があります。
+ {0}, {1} - .NET types.
+
+
+ クラス '{0}' に無効な基本データ型 '{1}' があります。
+ {0}, {1} - .NET types.
+
+
+ アセンブリ '{0}' を解析できませんでした: {1}。
+ {0} - Error .NET assembly.
+{1} - The error encountered.
+
+
+ コンストラクター '{0}' について、それを囲む型 '{1}' が見つかりませんでした。
+ {0} - .NET constructor method.
+{1} - .NET type.
+
+
+ 予期しないフィールドの種類 '{0}' ({1}) です。
+ {0} - .NET type.
+{1} - .NET field signature.
+
+
+ メソッド名が重複しているため、'{0}.{1}' をスキップしています。(Java の型: '{2}')
+ {0} - .NET type.
+{1} - .NET field name.
+{2} - Java type.
+
+
+ 入れ子にされた型名が重複しているため、'{0}.{1}' をスキップしています。(Java の型: '{2}')
+ {0} - .NET type.
+{1} - .NET field name.
+{2} - Java type.
+
+
+ フィールド名またはプロパティ名が重複しているため、'{0}.{1}' をスキップしています。(Java の型: '{2}')
+ {0} - .NET type.
+{1} - .NET field name.
+{2} - Java type.
+
+
+ フィールドが重複しているため、'{0}.{1}' をスキップしています。(Java の型: '{2}')
+ {0} - .NET type.
+{1} - .NET field name.
+{2} - Java type.
+
+
+ 型 '{0}' に、それを囲む名前空間名と一致する型名が含まれています。詳細については、https://aka.ms/BG8403 を参照してください。
+ {0} - Java type.
+
+
+ '<interface>' の予期しない子要素です: '{0}'。
+ {0} - XML element name.
+<interface> should not be translated.
+
+
+ '{0}.{1}' にイベント名が指定されていません。
+ {0} - .NET type name
+{1} - .NET member.
+
+
+ 一部のインターフェイスが無効であったため、'{0}' とその入れ子にされたすべての型を無効にしています。
+ {0} - .NET type name.
+
+
+ 一部のメソッドが無効であったため、'{0}' とその入れ子にされたすべての型を無効にしています。
+ {0} - .NET type name.
+
+
+ '{0}.{1}' のイベント名が無効です。Metadata.xml 変換ファイルにルールを追加すると、有効な 'eventName' または 'argsType' を割り当てることができます。
+ {0} - .NET type name
+{1} - .NET member.
+The following terms should not be translated: eventName, argsType, Metadata.xml.
+
+
+ '{0}.{1}' のイベント プロパティ名が無効です。Metadata.xml 変換ファイルにルールを追加すると、有効な 'eventName' または 'argsType' を割り当てることができます。
+ {0} - .NET type name
+{1} - .NET member.
+The following terms should not be translated: eventName, argsType, Metadata.xml.
+
+
+ XML ファイル '{0}' が無効です: {1}。
+ {0} - File name
+{1} - The error encountered.
+
+
+ '<package>' 要素が見つかりません。
+ The following terms should not be translated: <package>.
+
+
+ 予期しないルートの子ノード: '<{0}>'。
+ {0} - XML element name.
+
+
+ 予期しない '<package>' 子ノードです: '<{0}>'。
+ {0} - XML element name.
+The following terms should not be translated: <package>.
+
+
+ 入れ子にされた型 '{0}' の上位先祖型 '{1}' が見つかりませんでした。
+ {0}, {1} - .NET types.
+
+
+ Java の型 '{0}' が見つかりませんでした (Java 参照 jar/aar または Java バインド ライブラリ NuGet が不足していないかどうかを確認してください。)
+ {0} - Java type.
+
+
+ 参照されている Java の型が見つからなかったため、一部の型またはメンバーをバインドできませんでした。詳細については、'java-resolution-report.log' ファイルを参照してください。
+ The following terms should not be translated: java-resolution-report.log
+
+
+ メンバー '{1}' の戻り値の型 '{0}' が不明です。
+ {0} - Java type.
+{1} - .NET member.
+
+
+ メンバー '{1}' の戻り値の型 '{0}' が無効です。
+ {0} - Java type.
+{1} - .NET member.
+
+
+ メンバー '{1}' のパラメーター型 '{0}' が不明です。
+ {0} - Java type.
+{1} - .NET member.
+
+
+ メンバー '{1}' のパラメーター型 '{0}' が無効です。
+ {0} - Java type.
+{1} - .NET member.
+
+
+ Metadata.xml 要素 '{0}' と一致するノードがありませんでした。
+ {0} - XML transform. (example: '<remove-node path="/api/package[@name='javax.sql']"')
+The following terms should not be translated: Metadata.xml.
+
+
+ 名前空間の変換 '{0}' が無効です
+ {0} - XML transform. (example: '<ns-replace source="example" replacement="Example" />')
+
+
+ Metadata.xml 要素 '{0}' に 'path' 属性がありません。
+ {0} - XML transform. (example: '<remove-node path="/api/package[@name='javax.sql']"')
+The following terms should not be translated: Metadata.xml, path.
+
+
+ メンバー '{1}' のジェネリック引数制約型 '{0}' が不明です。
+ {0} - .NET type name
+{1} - .NET member.
+
+
+ 型 '{0}' の基本インターフェイス '{1}' が見つかりませんでした。
+ {0}, {1} - .NET types.
+
+
+ 型'{0}' では、基本インターフェイス '{1}' が無効です。
+ {0}, {1} - .NET types.
+
+
+ 型 '{0}' の Java ラッパーを生成できません。'class' 型のみがサポートされています。
+ {0} - Java type.
+The following terms should not be translated:
+class.
+
+
+ 型 '{0}' の JNI 名を特定できません。
+ {0} - Java type.
+The following terms should not be translated: JNI.
+
+
+ 'Name' プロパティは 'com.example.MyClass' のような完全修飾型である必要があり、'{0}' のパッケージが見つかりませんでした。
+ {0} - Java type.
+The following terms should not be translated:
+Name, com.example.MyClass.
+
+
+ インターフェイスの型 '{0}' を解決できません。アセンブリ参照が不足していないかどうかを確認してください。
+ {0} - Java interface.
+
+
+ [ExportField] は、パラメーターが 0 個のメソッドでのみ使用できます。
+ The following terms should not be translated: [ExportField].
+
+
+ [Export] はジェネリック型では使用できません。
+ The following terms should not be translated: [Export].
+
+
+ [ExportField] はジェネリック型では使用できません。
+ The following terms should not be translated: [ExportField].
+
+
+ 'void' を返すメソッドでは、[ExportField] を使用できません。
+ The following terms should not be translated: [ExportField], void.
+
+
+ Kotlin で生成されたメソッド '{0}' は有効な Java メソッド名ではないため、オーバーライドできません。このメソッドは Kotlin からのみオーバーライドできます。
+ {0} - Kotlin method name.
+
+
+ 参照 '{0}' を事前に読み込むことができません。
+ {0} - assembly path
+
+
+ 処理する ASSEMBLY を少なくとも 1 つ指定してください。
+ The following terms should not be translated or have any capitalization changes: ASSEMBLY. This is a special case for this particular message. In most messages, "assembly" would be translated.
+
+
+ Java VM{0}{1} を作成できません
+ {0} - newline, {1} - exception
+
+
+ プロフィール ファイル '{0}' を読み取れません。{1}{2}
+ {0} - path, {1} - newline, {2} - exception. In this message, the term "profile" refers to a customized list of types to process.
+
+
+ パス '{0}' が存在しません。
+ {0} - path
+
+
+ アセンブリ '{0}' を処理できません{1}{2}{1}{3}
+ {0} - assembly, {1} - newline, {2} - exception message, {3} exception
+
+
+ インターフェイス {0}が見つかりませんでした
+ {0} - interface name
+
+
+ 型の読み込み中に例外が発生しました。読み込めない型は処理されません。これらの型に必要な追加のアセンブリ参照が -r オプションを使用して指定されていることを確認してください。例外:{0}{1}
+ {0} - newline, {1} - exception. The following terms should not be translated: -r
+
+
+ 型 '{0}' が見つかりません。この型は処理されません。参照されているすべてのアセンブリのディレクトリに -L オプションが指定されていることを確認してください。
+ {0} - type
+The following terms should not be translated: -L
+
+
+ マーシャリング メソッドの型 '{0}' は既に存在します。アセンブリ '{1}' でマーシャリング メソッドの生成をスキップしました。-f を使用して、必要に応じて再生成を強制してください。
+ {0} - type, {1} - assembly name. The following terms should not be translated: -f. In this message, the term "marshal methods" refers to methods that allow interaction between the managed methods and Java methods, similar to the methods of the .NET System.Runtime.InteropServices.Marshal class.
+
+
+ アセンブリ メタデータにメソッド '{0}' の定義が見つかりません。このメソッドは処理されません。参照されているすべてのアセンブリのディレクトリに -L オプションが指定されていることを確認してください。
+ {0} - method
+The following terms should not be translated: -L
+
+
+ System.Console.WriteLine() メソッドが見つかりません。デバッグ インジェクションを無効にしています。デバッグ インジェクションを有効にするには、mscorlib を含むディレクトリに -L オプションが指定されていることを確認してください。
+ The following terms should not be translated: -L
+
+
\ No newline at end of file
diff --git a/external/Java.Interop/src/Java.Interop.Localization/Resources.ko.resx b/external/Java.Interop/src/Java.Interop.Localization/Resources.ko.resx
new file mode 100644
index 00000000000..de1c62eb7e4
--- /dev/null
+++ b/external/Java.Interop/src/Java.Interop.Localization/Resources.ko.resx
@@ -0,0 +1,402 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ 어셈블리 로드 중 오류: '{0}'.
+ {0} - File name
+
+
+ 이전 상수를 제거하지 못했습니다: {0}.
+ {0} - The list of constants that could not be removed.
+In this message, the term "constants" refers to class or interface members that have constant values.
+
+
+ 열거 매핑을 처리하지 못했습니다. 텍스트 줄: {0}.
+ {0} - The line that could not be processed.
+
+
+ 메타데이터 수정 처리 중 오류: {0}.
+ {0} - The error encountered.
+
+
+ 잘못된 XPath 사양: {0}.
+ {0} - The invalid XPath line.
+
+
+ 대상 특성 이름이 경로 {0}에 지정되지 않았습니다.
+ {0} - The invalid XPath line.
+
+
+ 예기치 않은 'global::' 사양입니다. 이 오류는 예를 들어 Metadata.xml 변환 파일에 'global::'이 지정된 경우 발생합니다.
+ The following are literal names and should not be translated: global::, Metadata.xml.
+
+
+ 예기치 않은 클래스 하위 {0}.
+ {0} - The unexpected child class.
+
+
+ 클래스 '{0}'에 알 수 없는 기본 형식 '{1}'이(가) 있습니다.
+ {0}, {1} - .NET types.
+
+
+ 클래스 '{0}'에 잘못된 기본 형식 '{1}'이(가) 있습니다.
+ {0}, {1} - .NET types.
+
+
+ 어셈블리 '{0}' 구문 분석 실패: {1}.
+ {0} - Error .NET assembly.
+{1} - The error encountered.
+
+
+ 생성자 '{0}'의 경우 둘러싼 형식 '{1}'을(를) 찾을 수 없습니다.
+ {0} - .NET constructor method.
+{1} - .NET type.
+
+
+ 예기치 않은 필드 형식 `{0}`({1})입니다.
+ {0} - .NET type.
+{1} - .NET field signature.
+
+
+ 메소드 이름이 중복되어 '{0}.{1}'을(를) 건너뜁니다. (Java 형식: '{2}')
+ {0} - .NET type.
+{1} - .NET field name.
+{2} - Java type.
+
+
+ 중첩 형식 이름이 중복되어 '{0}.{1}'을(를) 건너뜁니다. (Java 형식: '{2}')
+ {0} - .NET type.
+{1} - .NET field name.
+{2} - Java type.
+
+
+ 중복 필드 또는 속성 이름으로 인해 '{0}.{1}'을(를) 건너뜁니다. (Java 형식: '{2}')
+ {0} - .NET type.
+{1} - .NET field name.
+{2} - Java type.
+
+
+ 중복 필드로 인해 '{0}.{1}'을(를) 건너뜁니다. (Java 형식: '{2}')
+ {0} - .NET type.
+{1} - .NET field name.
+{2} - Java type.
+
+
+ 형식 '{0}'에는 바깥쪽 네임스페이스 이름과 일치하는 형식 이름이 있습니다. 자세한 내용은 https://aka.ms/BG8403을 참조하세요.
+ {0} - Java type.
+
+
+ '<interface>'의 예기치 않은 하위 요소: '{0}'.
+ {0} - XML element name.
+<interface> should not be translated.
+
+
+ '{0}.{1}'에 이벤트 이름이 제공되지 않았습니다.
+ {0} - .NET type name
+{1} - .NET member.
+
+
+ 일부 인터페이스가 잘못되어 '{0}' 및 모든 중첩 형식을 무효화합니다.
+ {0} - .NET type name.
+
+
+ 일부 메서드가 잘못되어 '{0}' 및 모든 중첩 형식을 무효화합니다.
+ {0} - .NET type name.
+
+
+ '{0}.{1}'의 이벤트 이름이 잘못되었습니다. Metadata.xml 변환 파일에 규칙을 추가하여 유효한 'eventName' 또는 'argsType'을 할당할 수 있습니다.
+ {0} - .NET type name
+{1} - .NET member.
+The following terms should not be translated: eventName, argsType, Metadata.xml.
+
+
+ '{0}.{1}'의 이벤트 속성 이름이 잘못되었습니다. Metadata.xml 변환 파일에 규칙을 추가하여 유효한 'eventName' 또는 'argsType'을 할당할 수 있습니다.
+ {0} - .NET type name
+{1} - .NET member.
+The following terms should not be translated: eventName, argsType, Metadata.xml.
+
+
+ 잘못된 XML 파일 '{0}': {1}.
+ {0} - File name
+{1} - The error encountered.
+
+
+ '<package>' 요소를 찾을 수 없습니다.
+ The following terms should not be translated: <package>.
+
+
+ 예기치 않은 루트 하위 노드: '<{0}>'.
+ {0} - XML element name.
+
+
+ 예기치 않은 '<package>' 하위 노드: '<{0}>'.
+ {0} - XML element name.
+The following terms should not be translated: <package>.
+
+
+ 중첩 형식 '{1}'에 대한 상위 상위 항목 형식 '{0}'을(를) 찾을 수 없습니다.
+ {0}, {1} - .NET types.
+
+
+ Java 형식 '{0}'을(를) 찾을 수 없습니다(Java 참조 jar/aar 또는 Java 바인딩 라이브러리 NuGet이 누락되었습니까?)
+ {0} - Java type.
+
+
+ 참조된 Java 형식을 찾을 수 없기 때문에 일부 형식 또는 멤버를 바인딩할 수 없습니다. 자세한 내용은 'java-resolution-report.log' 파일을 참조하세요.
+ The following terms should not be translated: java-resolution-report.log
+
+
+ 멤버 '{1}'에 대한 알 수 없는 반환 형식 '{0}'.
+ {0} - Java type.
+{1} - .NET member.
+
+
+ 멤버 '{1}'에 대한 잘못된 반환 형식 '{0}'.
+ {0} - Java type.
+{1} - .NET member.
+
+
+ 멤버 '{1}'에 대한 알 수 없는 매개 변수 형식 '{0}'.
+ {0} - Java type.
+{1} - .NET member.
+
+
+ '{1}' 멤버에 대한 매개 변수 형식 '{0}'이(가) 잘못되었습니다.
+ {0} - Java type.
+{1} - .NET member.
+
+
+ Metadata.xml 요소 '{0}'이(가) 일치하는 노드가 없습니다.
+ {0} - XML transform. (example: '<remove-node path="/api/package[@name='javax.sql']"')
+The following terms should not be translated: Metadata.xml.
+
+
+ 잘못된 네임스페이스 변환 '{0}'
+ {0} - XML transform. (example: '<ns-replace source="example" replacement="Example" />')
+
+
+ Metadata.xml 요소 '{0}'에 'path' 특성이 없습니다.
+ {0} - XML transform. (example: '<remove-node path="/api/package[@name='javax.sql']"')
+The following terms should not be translated: Metadata.xml, path.
+
+
+ '{1}' 멤버에 대한 알 수 없는 일반 인수 제약 형식 '{0}'.
+ {0} - .NET type name
+{1} - .NET member.
+
+
+ 형식 '{0}'에 대한 기본 인터페이스 '{1}'을(를) 찾을 수 없습니다.
+ {0}, {1} - .NET types.
+
+
+ 형식 '{0}'의 경우 기본 인터페이스 '{1}'이(가) 잘못되었습니다.
+ {0}, {1} - .NET types.
+
+
+ 형식 '{0}'에 대한 Java 래퍼를 생성할 수 없습니다. '클래스' 형식만 지원됩니다.
+ {0} - Java type.
+The following terms should not be translated:
+class.
+
+
+ 형식 '{0}'에 대한 JNI 이름을 결정할 수 없습니다.
+ {0} - Java type.
+The following terms should not be translated: JNI.
+
+
+ '이름' 속성은 'com.example.MyClass'와 같은 정규화된 형식이어야 하며 '{0}'에 대한 패키지를 찾을 수 없습니다.
+ {0} - Java type.
+The following terms should not be translated:
+Name, com.example.MyClass.
+
+
+ 인터페이스 형식 '{0}'을(를) 확인할 수 없습니다. 어셈블리 참조가 누락되었습니까?
+ {0} - Java interface.
+
+
+ [ExportField]은(는) 매개 변수가 0인 메서드에만 사용할 수 있습니다.
+ The following terms should not be translated: [ExportField].
+
+
+ [내보내기]는 제네릭 형식에 사용할 수 없습니다.
+ The following terms should not be translated: [Export].
+
+
+ [ExportField]은(는) 제네릭 형식에 사용할 수 없습니다.
+ The following terms should not be translated: [ExportField].
+
+
+ [ExportField]은(는) 'void'를 반환하는 메서드에 사용할 수 없습니다.
+ The following terms should not be translated: [ExportField], void.
+
+
+ 유효한 Java 메소드 이름이 아니기 때문에 Kotlin 생성 메소드 '{0}'을(를) 재정의할 수 없습니다. 이 메서드는 Kotlin에서만 재정의할 수 있습니다.
+ {0} - Kotlin method name.
+
+
+ 참조 '{0}'을(를) 미리 로드할 수 없습니다.
+ {0} - assembly path
+
+
+ 처리할 ASSEMBLY를 하나 이상 지정하세요.
+ The following terms should not be translated or have any capitalization changes: ASSEMBLY. This is a special case for this particular message. In most messages, "assembly" would be translated.
+
+
+ Java VM을 생성할 수 없음{0}{1}
+ {0} - newline, {1} - exception
+
+
+ 프로필 파일 '{0}'을(를) 읽을 수 없습니다.{1}{2}
+ {0} - path, {1} - newline, {2} - exception. In this message, the term "profile" refers to a customized list of types to process.
+
+
+ 경로 '{0}'이(가) 존재하지 않습니다.
+ {0} - path
+
+
+ 어셈블리 '{0}'{1}{2}{1}{3}을(를) 처리할 수 없습니다.
+ {0} - assembly, {1} - newline, {2} - exception message, {3} exception
+
+
+ 인터페이스 {0}을(를) 찾을 수 없습니다.
+ {0} - interface name
+
+
+ 형식을 로드하는 동안 예외가 발생했습니다. 로드할 수 없는 형식은 처리되지 않습니다. 해당 형식에 필요한 추가 어셈블리 참조가 -r 옵션을 사용하여 제공되었는지 확인하세요. 예외:{0}{1}
+ {0} - newline, {1} - exception. The following terms should not be translated: -r
+
+
+ 형식 '{0}'을(를) 찾을 수 없습니다. 형식이 처리되지 않습니다. 참조된 모든 어셈블리의 디렉터리에 -L 옵션이 제공되었는지 확인합니다.
+ {0} - type
+The following terms should not be translated: -L
+
+
+ 마샬 메소드 형식 '{0}'이(가) 이미 존재합니다. 어셈블리 '{1}'에서 마샬 메서드 생성을 건너뛰었습니다. 원하는 경우 -f를 사용하여 재생성을 강제 실행합니다.
+ {0} - type, {1} - assembly name. The following terms should not be translated: -f. In this message, the term "marshal methods" refers to methods that allow interaction between the managed methods and Java methods, similar to the methods of the .NET System.Runtime.InteropServices.Marshal class.
+
+
+ 어셈블리 메타데이터에서 '{0}' 메서드의 정의를 찾을 수 없습니다. 처리되지 않습니다. 참조된 모든 어셈블리의 디렉터리에 -L 옵션이 제공되었는지 확인합니다.
+ {0} - method
+The following terms should not be translated: -L
+
+
+ System.Console.WriteLine() 메서드를 찾을 수 없습니다. 디버그 주입을 비활성화합니다. 디버그 삽입을 활성화하려면 mscorlib가 포함된 디렉터리에 -L 옵션이 제공되었는지 확인합니다.
+ The following terms should not be translated: -L
+
+
\ No newline at end of file
diff --git a/external/Java.Interop/src/Java.Interop.Localization/Resources.pl.resx b/external/Java.Interop/src/Java.Interop.Localization/Resources.pl.resx
new file mode 100644
index 00000000000..f580ed50d47
--- /dev/null
+++ b/external/Java.Interop/src/Java.Interop.Localization/Resources.pl.resx
@@ -0,0 +1,402 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ Błąd podczas ładowania motywu: „{0}”
+ {0} - File name
+
+
+ Nie można usunąć starych stałych: {0}.
+ {0} - The list of constants that could not be removed.
+In this message, the term "constants" refers to class or interface members that have constant values.
+
+
+ Nie można przetworzyć mapowania wyliczenia. Wiersz tekstu: {0}.
+ {0} - The line that could not be processed.
+
+
+ Błąd podczas przetwarzania poprawki metadanych: {0}.
+ {0} - The error encountered.
+
+
+ Nieprawidłowa specyfikacja XPath: {0}.
+ {0} - The invalid XPath line.
+
+
+ Nie określono nazwy atrybutu docelowego dla ścieżki: {0}.
+ {0} - The invalid XPath line.
+
+
+ Nieoczekiwana specyfikacja „global::”. Ten błąd występuje, jeśli w pliku przekształcenia Metadata.xml określono na przykład wartość „global::”.
+ The following are literal names and should not be translated: global::, Metadata.xml.
+
+
+ Nieoczekiwana klasa podrzędna {0}.
+ {0} - The unexpected child class.
+
+
+ Klasa „{0}” ma nieznany typ podstawowy „{1}”.
+ {0}, {1} - .NET types.
+
+
+ Klasa „{0}” ma nieprawidłowy typ podstawowy „{1}”.
+ {0}, {1} - .NET types.
+
+
+ Nie można przeanalizować zestawu „{0}”: {1}.
+ {0} - Error .NET assembly.
+{1} - The error encountered.
+
+
+ W przypadku konstruktora „{0}” nie można odnaleźć otaczającego typu „{1}”.
+ {0} - .NET constructor method.
+{1} - .NET type.
+
+
+ Nieoczekiwany typ pola „{0}” ({1}).
+ {0} - .NET type.
+{1} - .NET field signature.
+
+
+ Pomijanie typu „{0}.{1}” z powodu zduplikowanej nazwy metody. (Typ java: „{2}”)
+ {0} - .NET type.
+{1} - .NET field name.
+{2} - Java type.
+
+
+ Pomijanie elementu „{0}.{1}” z powodu zduplikowanej nazwy typu zagnieżdżonego. (Typ java: „{2}”)
+ {0} - .NET type.
+{1} - .NET field name.
+{2} - Java type.
+
+
+ Pomijanie elementu „{0}.{1}” z powodu zduplikowanej nazwy pola lub właściwości. (Typ java: „{2}”)
+ {0} - .NET type.
+{1} - .NET field name.
+{2} - Java type.
+
+
+ Pomijanie elementu „{0}.{1}” z powodu zduplikowanego pola. (Typ java: „{2}”)
+ {0} - .NET type.
+{1} - .NET field name.
+{2} - Java type.
+
+
+ „{0}” ma nazwę typu zgodną z otaczającą nazwą przestrzeni nazw. Aby uzyskać więcej informacji, zobacz https://aka.ms/BG8403.
+ {0} - Java type.
+
+
+ Nieoczekiwany element podrzędny „<interface>”: „{0}”.
+ {0} - XML element name.
+<interface> should not be translated.
+
+
+ Nie podano nazwy zdarzenia w typie „{0}.{1}”.
+ {0} - .NET type name
+{1} - .NET member.
+
+
+ Unieważnienie elementu „{0}” i wszystkich jego typów zagnieżdżonych, ponieważ niektóre z jego interfejsów były nieprawidłowe.
+ {0} - .NET type name.
+
+
+ Unieważnienie elementu „{0}” i wszystkich jego typów zagnieżdżonych, ponieważ niektóre z jego metod były nieprawidłowe.
+ {0} - .NET type name.
+
+
+ Nazwa zdarzenia „{0}.{1}” jest nieprawidłowa. Prawidłowy element „eventName” lub „argsType” można przypisać, dodając regułę do pliku przekształceń Metadata.xml.
+ {0} - .NET type name
+{1} - .NET member.
+The following terms should not be translated: eventName, argsType, Metadata.xml.
+
+
+ Nazwa właściwości zdarzenia „{0}.{1}” jest nieprawidłowa. Prawidłowy element „eventName” lub „argsType” można przypisać, dodając regułę do pliku przekształceń Metadata.xml.
+ {0} - .NET type name
+{1} - .NET member.
+The following terms should not be translated: eventName, argsType, Metadata.xml.
+
+
+ Nieprawidłowy plik XML „{0}”: {1}.
+ {0} - File name
+{1} - The error encountered.
+
+
+ Nie znaleziono elementów „<package>”.
+ The following terms should not be translated: <package>.
+
+
+ Nieoczekiwany główny węzeł podrzędny: „<{0}>”.
+ {0} - XML element name.
+
+
+ Nieoczekiwany węzeł podrzędny „<package>”: „<{0}>”.
+ {0} - XML element name.
+The following terms should not be translated: <package>.
+
+
+ Nie można odnaleźć typu elementu nadrzędnego „{0}” dla zagnieżdżonego typu „{1}”.
+ {0}, {1} - .NET types.
+
+
+ Nie można odnaleźć typu języka Java „{0}” (czy brakuje pliku jar/aar odwołania Java lub NuGet biblioteki powiązań Java?)
+ {0} - Java type.
+
+
+ Nie można powiązać niektórych typów lub elementów członkowskich, ponieważ nie można odnaleźć przywoływanych typów języka Java. Aby uzyskać szczegółowe informacje, zobacz plik „java-resolution-report.log”.
+ The following terms should not be translated: java-resolution-report.log
+
+
+ Nieznany zwracany typ „{0}” dla elementu członkowskiego „{1}”.
+ {0} - Java type.
+{1} - .NET member.
+
+
+ Nieprawidłowy zwracany typ „{0}” dla elementu członkowskiego „{1}”.
+ {0} - Java type.
+{1} - .NET member.
+
+
+ Nieznany typ parametru „{0}” dla elementu członkowskiego „{1}”.
+ {0} - Java type.
+{1} - .NET member.
+
+
+ Nieprawidłowy typ parametru „{0}” dla elementu członkowskiego „{1}”.
+ {0} - Java type.
+{1} - .NET member.
+
+
+ Element Metadata.xml „{0}” nie pasuje do węzłów.
+ {0} - XML transform. (example: '<remove-node path="/api/package[@name='javax.sql']"')
+The following terms should not be translated: Metadata.xml.
+
+
+ Nieprawidłowe przekształcenie przestrzeni nazw „{0}”
+ {0} - XML transform. (example: '<ns-replace source="example" replacement="Example" />')
+
+
+ W elemencie Metadata.xml „{0}” brakuje atrybutu „path”.
+ {0} - XML transform. (example: '<remove-node path="/api/package[@name='javax.sql']"')
+The following terms should not be translated: Metadata.xml, path.
+
+
+ Nieznany typ ograniczenia argumentu ogólnego „{0}” dla elementu członkowskiego „{1}”.
+ {0} - .NET type name
+{1} - .NET member.
+
+
+ Nie można odnaleźć interfejsu podstawowego „{1}” dla typu „{0}”.
+ {0}, {1} - .NET types.
+
+
+ W przypadku typu „{0}” interfejs podstawowy „{1}” jest nieprawidłowy.
+ {0}, {1} - .NET types.
+
+
+ Nie można wygenerować otoki Języka Java dla typu „{0}”. Obsługiwane są tylko typy „class”.
+ {0} - Java type.
+The following terms should not be translated:
+class.
+
+
+ Nie można określić nazwy JNI dla typu „{0}”.
+ {0} - Java type.
+The following terms should not be translated: JNI.
+
+
+ Właściwość „Name” musi być w pełni kwalifikowanym typem, takim jak „com.example.MyClass”, i nie znaleziono pakietu dla elementu „{0}”.
+ {0} - Java type.
+The following terms should not be translated:
+Name, com.example.MyClass.
+
+
+ Nie można rozpoznać typu interfejsu „{0}”. Czy brakuje odwołania do zestawu?
+ {0} - Java interface.
+
+
+ Elementu [ExportField] można używać tylko w metodach z parametrami 0.
+ The following terms should not be translated: [ExportField].
+
+
+ Nie można użyć elementu [Export] dla typu ogólnego.
+ The following terms should not be translated: [Export].
+
+
+ Nie można użyć elementu [ExportField] dla typu ogólnego.
+ The following terms should not be translated: [ExportField].
+
+
+ Nie można użyć elementu [ExportField] w metodzie zwracającej wartość „void”.
+ The following terms should not be translated: [ExportField], void.
+
+
+ Nie można przesłonić metody wygenerowanej przez metodę Kotlin „{0}”, ponieważ nie jest to prawidłowa nazwa metody Java. Tę metodę można zastąpić tylko za pomocą języka Kotlin.
+ {0} - Kotlin method name.
+
+
+ Nie można wstępnie załadować odwołania „{0}”.
+ {0} - assembly path
+
+
+ Określ co najmniej jeden ZESTAW do przetworzenia.
+ The following terms should not be translated or have any capitalization changes: ASSEMBLY. This is a special case for this particular message. In most messages, "assembly" would be translated.
+
+
+ Nie można utworzyć maszyny wirtualnej Java{0}{1}
+ {0} - newline, {1} - exception
+
+
+ Nie można odczytać pliku profilu „{0}”.{1}{2}
+ {0} - path, {1} - newline, {2} - exception. In this message, the term "profile" refers to a customized list of types to process.
+
+
+ Ścieżka „{0}” nie istnieje.
+ {0} - path
+
+
+ Nie można przetworzyć zestawu „{0}”{1}{2}{1}{3}
+ {0} - assembly, {1} - newline, {2} - exception message, {3} exception
+
+
+ Nie znaleziono interfejsu {0}
+ {0} - interface name
+
+
+ Przechwycono wyjątek podczas ładowania typów. Typy, których nie można załadować, nie zostaną przetworzone. Upewnij się, że wszelkie dodatkowe odwołania do zestawów wymagane dla tych typów są dostarczane przy użyciu opcji -r. Wyjątek:{0}{1}
+ {0} - newline, {1} - exception. The following terms should not be translated: -r
+
+
+ Nie można odnaleźć typu „{0}”. Typ nie zostanie przetworzony. Upewnij się, że katalogi dla wszystkich przywoływanych zestawów są dostarczane z opcją -L.
+ {0} - type
+The following terms should not be translated: -L
+
+
+ Typ metod marshalingu „{0}” już istnieje. Pominięto generowanie metod marshalingu w zestawie „{1}”. Użyj -f, aby wymusić ponowne wygenerowanie w razie potrzeby.
+ {0} - type, {1} - assembly name. The following terms should not be translated: -f. In this message, the term "marshal methods" refers to methods that allow interaction between the managed methods and Java methods, similar to the methods of the .NET System.Runtime.InteropServices.Marshal class.
+
+
+ Nie można odnaleźć definicji metody „{0}” w metadanych zestawu. Nie zostanie on przetworzony. Upewnij się, że katalogi dla wszystkich przywoływanych zestawów są dostarczane z opcją -L.
+ {0} - method
+The following terms should not be translated: -L
+
+
+ Nie można odnaleźć metody System.Console.WriteLine(). Wyłączanie iniekcji debugowania. Aby włączyć iniekcję debugowania, upewnij się, że katalog zawierający plik mscorlib jest dostarczany z opcją -L.
+ The following terms should not be translated: -L
+
+
\ No newline at end of file
diff --git a/external/Java.Interop/src/Java.Interop.Localization/Resources.pt-BR.resx b/external/Java.Interop/src/Java.Interop.Localization/Resources.pt-BR.resx
new file mode 100644
index 00000000000..22f77b675af
--- /dev/null
+++ b/external/Java.Interop/src/Java.Interop.Localization/Resources.pt-BR.resx
@@ -0,0 +1,402 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ Erro ao carregar o assembly: '{0}'.
+ {0} - File name
+
+
+ Ocorreu um erro ao remover as constantes antigas: {0}.
+ {0} - The list of constants that could not be removed.
+In this message, the term "constants" refers to class or interface members that have constant values.
+
+
+ Não foi possível processar o mapeamento de enumeração. Linha de texto: {0}.
+ {0} - The line that could not be processed.
+
+
+ Erro durante o processamento da correção dos metadados: {0}.
+ {0} - The error encountered.
+
+
+ Especificação de XPath inválida: {0}.
+ {0} - The invalid XPath line.
+
+
+ O nome do atributo de destino não foi especificado para o caminho: {0}.
+ {0} - The invalid XPath line.
+
+
+ Especificação 'global::' inesperada. Esse erro ocorre se 'global::' for especificado no arquivo de transformação Metadata.xml, por exemplo.
+ The following are literal names and should not be translated: global::, Metadata.xml.
+
+
+ Classe filho inesperada {0}.
+ {0} - The unexpected child class.
+
+
+ A classe '{0}' tem tipo base desconhecido '{1}'.
+ {0}, {1} - .NET types.
+
+
+ A classe '{0}' tem o tipo base '{1}' inválido.
+ {0}, {1} - .NET types.
+
+
+ Ocorreu um erro ao analisar o assembly '{0}': {1}.
+ {0} - Error .NET assembly.
+{1} - The error encountered.
+
+
+ Para o construtor '{0}', não foi possível encontrar o tipo de delimitação '{1}'.
+ {0} - .NET constructor method.
+{1} - .NET type.
+
+
+ Tipo de campo inesperado `{0}` ({1}).
+ {0} - .NET type.
+{1} - .NET field signature.
+
+
+ Ignorando '{0}.{1}' devido a um nome de método duplicado. (Tipo Java: '{2}')
+ {0} - .NET type.
+{1} - .NET field name.
+{2} - Java type.
+
+
+ Ignorando '{0}.{1}' devido a um nome de tipo aninhado duplicado. (Tipo Java: '{2}')
+ {0} - .NET type.
+{1} - .NET field name.
+{2} - Java type.
+
+
+ Ignorando '{0}.{1}' devido a um campo duplicado ou nome da propriedade. (Tipo Java: '{2}')
+ {0} - .NET type.
+{1} - .NET field name.
+{2} - Java type.
+
+
+ Ignorando '{0}.{1}' devido a um campo duplicado. (Tipo Java: '{2}')
+ {0} - .NET type.
+{1} - .NET field name.
+{2} - Java type.
+
+
+ O tipo '{0}' tem um nome de tipo que corresponde ao nome do namespace incluído. Visite https://aka.ms/BG8403 para obter mais informações.
+ {0} - Java type.
+
+
+ Elemento filho inesperado de '<interface>': '{0}'.
+ {0} - XML element name.
+<interface> should not be translated.
+
+
+ Nenhum nome de evento fornecido em '{0}.{1}'.
+ {0} - .NET type name
+{1} - .NET member.
+
+
+ Invalidando '{0}' e todos os seus tipos aninhados, pois algumas das suas interfaces eram inválidas.
+ {0} - .NET type name.
+
+
+ Invalidando '{0}' e todos os seus tipos aninhados, pois alguns de seus métodos eram inválidos.
+ {0} - .NET type name.
+
+
+ O nome do evento para '{0}.{1}' é inválido. Um 'eventName' ou 'argsType' válido pode ser atribuído adicionando uma regra ao arquivo de transformações Metadata.xml.
+ {0} - .NET type name
+{1} - .NET member.
+The following terms should not be translated: eventName, argsType, Metadata.xml.
+
+
+ O nome da propriedade do evento para '{0}.{1}' é inválido. Um 'eventName' ou 'argsType' válido pode ser atribuído adicionando uma regra ao arquivo de transformações Metadata.xml.
+ {0} - .NET type name
+{1} - .NET member.
+The following terms should not be translated: eventName, argsType, Metadata.xml.
+
+
+ Arquivo XML inválido '{0}': {1}.
+ {0} - File name
+{1} - The error encountered.
+
+
+ Nenhum elemento '<package>' foi encontrados.
+ The following terms should not be translated: <package>.
+
+
+ Nó filho raiz inesperado: '<{0}>'.
+ {0} - XML element name.
+
+
+ Nó filho '<package>' inesperado: '<{0}>'.
+ {0} - XML element name.
+The following terms should not be translated: <package>.
+
+
+ Não foi possível encontrar o tipo de ancestral superior '{0}' para o tipo aninhado '{1}'.
+ {0}, {1} - .NET types.
+
+
+ Não foi possível encontrar o tipo Java '{0}' (está faltando um jar/aar de referência Java ou uma biblioteca de vinculação Java NuGet?)
+ {0} - Java type.
+
+
+ Alguns tipos ou membros não puderam ser vinculados porque os tipos Java referenciados não puderam ser encontrados. Consulte o arquivo 'java-resolution-report.log' para obter detalhes.
+ The following terms should not be translated: java-resolution-report.log
+
+
+ Tipo de retorno desconhecido '{0}' para o membro '{1}'.
+ {0} - Java type.
+{1} - .NET member.
+
+
+ Tipo de retorno inválido '{0}' para o membro '{1}'.
+ {0} - Java type.
+{1} - .NET member.
+
+
+ Tipo de parâmetro desconhecido '{0}' para o membro '{1}'.
+ {0} - Java type.
+{1} - .NET member.
+
+
+ Tipo de parâmetro inválido '{0}' para o membro '{1}'.
+ {0} - Java type.
+{1} - .NET member.
+
+
+ O elemento Metadata.xml '{0}' não correspondeu a nenhum nó.
+ {0} - XML transform. (example: '<remove-node path="/api/package[@name='javax.sql']"')
+The following terms should not be translated: Metadata.xml.
+
+
+ Transformação do namespace inválida '{0}'
+ {0} - XML transform. (example: '<ns-replace source="example" replacement="Example" />')
+
+
+ O elemento Metadata.xml '{0}' não tem o atributo 'path'.
+ {0} - XML transform. (example: '<remove-node path="/api/package[@name='javax.sql']"')
+The following terms should not be translated: Metadata.xml, path.
+
+
+ Tipo de restrição de argumento genérico desconhecido '{0}' para o membro '{1}'.
+ {0} - .NET type name
+{1} - .NET member.
+
+
+ Não foi possível localizar a interface base '{1}' para o tipo '{0}'.
+ {0}, {1} - .NET types.
+
+
+ Para o tipo '{0}', a interface base '{1}' é inválida.
+ {0}, {1} - .NET types.
+
+
+ Não é possível gerar o wrapper Java para o tipo '{0}'. Somente tipos de 'classe' são suportados.
+ {0} - Java type.
+The following terms should not be translated:
+class.
+
+
+ Não é possível determinar o nome JNI para o tipo '{0}'.
+ {0} - Java type.
+The following terms should not be translated: JNI.
+
+
+ A propriedade 'Name' deve ser um tipo totalmente qualificado como 'com.example.MyClass' e nenhum pacote foi encontrado para '{0}'.
+ {0} - Java type.
+The following terms should not be translated:
+Name, com.example.MyClass.
+
+
+ Não é possível resolver o tipo de interface '{0}'. Uma referência de assembly está ausente?
+ {0} - Java interface.
+
+
+ [ExportField] só pode ser usado em métodos com parâmetros 0.
+ The following terms should not be translated: [ExportField].
+
+
+ [Export] não pode ser usado em um tipo genérico.
+ The following terms should not be translated: [Export].
+
+
+ [ExportField] não pode ser usado em um tipo genérico.
+ The following terms should not be translated: [ExportField].
+
+
+ [ExportField] não pode ser usado em um método que retorna 'void'.
+ The following terms should not be translated: [ExportField], void.
+
+
+ Não é possível substituir o método gerado pelo Kotlin '{0}' porque ele não é um nome de método Java válido. Esse método só pode ser substituído a partir do Kotlin.
+ {0} - Kotlin method name.
+
+
+ Não é possível pré-carregar a referência '{0}'.
+ {0} - assembly path
+
+
+ Especifique pelo menos um ASSEMBLY para processar.
+ The following terms should not be translated or have any capitalization changes: ASSEMBLY. This is a special case for this particular message. In most messages, "assembly" would be translated.
+
+
+ Não é possível criar a VM Java{0}{1}
+ {0} - newline, {1} - exception
+
+
+ Não é possível ler o arquivo de perfil '{0}'.{1}{2}
+ {0} - path, {1} - newline, {2} - exception. In this message, the term "profile" refers to a customized list of types to process.
+
+
+ Caminho '{0}' inexistente.
+ {0} - path
+
+
+ Não é possível processar o assembly '{0}'{1}{2}{1}{3}
+ {0} - assembly, {1} - newline, {2} - exception message, {3} exception
+
+
+ Não foi possível encontrar a interface {0}
+ {0} - interface name
+
+
+ Capturou uma exceção ao carregar tipos. Os tipos que não podem ser carregados não serão processados. Verifique se todas as referências de assembly adicionais necessárias para esses tipos foram fornecidas usando a opção -r. Exceção:{0}{1}
+ {0} - newline, {1} - exception. The following terms should not be translated: -r
+
+
+ Não é possível localizar o tipo '{0}'. O tipo não será processado. Verifique se os diretórios de todos os assemblies referenciados foram fornecidos com a opção -L.
+ {0} - type
+The following terms should not be translated: -L
+
+
+ O tipo de métodos marshaling '{0}' já existe. Foi ignorada a geração de métodos marshaling no assembly '{1}'. Use -f para forçar a regeneração quando desejar.
+ {0} - type, {1} - assembly name. The following terms should not be translated: -f. In this message, the term "marshal methods" refers to methods that allow interaction between the managed methods and Java methods, similar to the methods of the .NET System.Runtime.InteropServices.Marshal class.
+
+
+ Não é possível encontrar a definição do método '{0}' nos metadados do assembly. Não será processado. Verifique se os diretórios de todos os assemblies referenciados foram fornecidos com a opção -L.
+ {0} - method
+The following terms should not be translated: -L
+
+
+ Não é possível encontrar o método System.Console.WriteLine(). Desativando a injeção de depuração. Para habilitar a injeção de depuração, verifique se o diretório que contém o mscorlib foi fornecido com a opção -L.
+ The following terms should not be translated: -L
+
+
\ No newline at end of file
diff --git a/external/Java.Interop/src/Java.Interop.Localization/Resources.resx b/external/Java.Interop/src/Java.Interop.Localization/Resources.resx
new file mode 100644
index 00000000000..084f94f502b
--- /dev/null
+++ b/external/Java.Interop/src/Java.Interop.Localization/Resources.resx
@@ -0,0 +1,406 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ Error while loading assembly: '{0}'.
+ {0} - File name
+
+
+ Failed to remove old constants: {0}.
+ {0} - The list of constants that could not be removed.
+In this message, the term "constants" refers to class or interface members that have constant values.
+
+
+ Failed to process enum mapping. Text line: {0}.
+ {0} - The line that could not be processed.
+
+
+ Error during processing metadata fixup: {0}.
+ {0} - The error encountered.
+
+
+ Invalid XPath specification: {0}.
+ {0} - The invalid XPath line.
+
+
+ Target attribute name is not specified for path: {0}.
+ {0} - The invalid XPath line.
+
+
+ Unexpected 'global::' specification. This error happens if 'global::' is specified in the Metadata.xml transform file, for example.
+ The following are literal names and should not be translated: global::, Metadata.xml.
+
+
+ Unexpected class child {0}.
+ {0} - The unexpected child class.
+
+
+ Class '{0}' has unknown base type '{1}'.
+ {0}, {1} - .NET types.
+
+
+ Class '{0}' has invalid base type '{1}'.
+ {0}, {1} - .NET types.
+
+
+ Failed to parse assembly '{0}': {1}.
+ {0} - Error .NET assembly.
+{1} - The error encountered.
+
+
+ For constructor '{0}', could not find enclosing type '{1}'.
+ {0} - .NET constructor method.
+{1} - .NET type.
+
+
+ Unexpected field type `{0}` ({1}).
+ {0} - .NET type.
+{1} - .NET field signature.
+
+
+ Skipping '{0}.{1}' due to a duplicate method name. (Java type: '{2}')
+ {0} - .NET type.
+{1} - .NET field name.
+{2} - Java type.
+
+
+ Skipping '{0}.{1}' due to a duplicate nested type name. (Java type: '{2}')
+ {0} - .NET type.
+{1} - .NET field name.
+{2} - Java type.
+
+
+ Skipping '{0}.{1}' due to a duplicate field or property name. (Java type: '{2}')
+ {0} - .NET type.
+{1} - .NET field name.
+{2} - Java type.
+
+
+ Skipping '{0}.{1}' due to a duplicate field. (Java type: '{2}')
+ {0} - .NET type.
+{1} - .NET field name.
+{2} - Java type.
+
+
+ Type '{0}' has a type name which matches the enclosing namespace name. See https://aka.ms/BG8403 for more information.
+ {0} - Java type.
+
+
+ Unexpected child element of '<interface>': '{0}'.
+ {0} - XML element name.
+<interface> should not be translated.
+
+
+ No event name provided in '{0}.{1}'.
+ {0} - .NET type name
+{1} - .NET member.
+
+
+ Invalidating '{0}' and all its nested types because some of its interfaces were invalid.
+ {0} - .NET type name.
+
+
+ Invalidating '{0}' and all its nested types because some of its methods were invalid.
+ {0} - .NET type name.
+
+
+ Event name for '{0}.{1}' is invalid. A valid 'eventName' or 'argsType' can be assigned by adding a rule to the Metadata.xml transforms file.
+ {0} - .NET type name
+{1} - .NET member.
+The following terms should not be translated: eventName, argsType, Metadata.xml.
+
+
+ Event property name for '{0}.{1}' is invalid. A valid 'eventName' or 'argsType' can be assigned by adding a rule to the Metadata.xml transforms file.
+ {0} - .NET type name
+{1} - .NET member.
+The following terms should not be translated: eventName, argsType, Metadata.xml.
+
+
+ Invalid XML file '{0}': {1}.
+ {0} - File name
+{1} - The error encountered.
+
+
+ No '<package>' elements found.
+ The following terms should not be translated: <package>.
+
+
+ Unexpected root child node: '<{0}>'.
+ {0} - XML element name.
+
+
+ Unexpected '<package>' child node: '<{0}>'.
+ {0} - XML element name.
+The following terms should not be translated: <package>.
+
+
+ Could not find top ancestor type '{0}' for nested type '{1}'.
+ {0}, {1} - .NET types.
+
+
+ The Java type '{0}' could not be found (are you missing a Java reference jar/aar or a Java binding library NuGet?)
+ {0} - Java type.
+
+
+ Some types or members could not be bound because referenced Java types could not be found. See the 'java-resolution-report.log' file for details.
+ The following terms should not be translated: java-resolution-report.log
+
+
+ Unknown return type '{0}' for member '{1}'.
+ {0} - Java type.
+{1} - .NET member.
+
+
+ Invalid return type '{0}' for member '{1}'.
+ {0} - Java type.
+{1} - .NET member.
+
+
+ Unknown parameter type '{0}' for member '{1}'.
+ {0} - Java type.
+{1} - .NET member.
+
+
+ Invalid parameter type '{0}' for member '{1}'.
+ {0} - Java type.
+{1} - .NET member.
+
+
+ Metadata.xml element '{0}' matched no nodes.
+ {0} - XML transform. (example: '<remove-node path="/api/package[@name='javax.sql']"')
+The following terms should not be translated: Metadata.xml.
+
+
+ Invalid namespace transform '{0}'
+ {0} - XML transform. (example: '<ns-replace source="example" replacement="Example" />')
+
+
+ Metadata.xml element '{0}' is missing the 'path' attribute.
+ {0} - XML transform. (example: '<remove-node path="/api/package[@name='javax.sql']"')
+The following terms should not be translated: Metadata.xml, path.
+
+
+ Unknown generic argument constraint type '{0}' for member '{1}'.
+ {0} - .NET type name
+{1} - .NET member.
+
+
+ Could not find base interface '{1}' for type '{0}'.
+ {0}, {1} - .NET types.
+
+
+ For type '{0}', base interface '{1}' is invalid.
+ {0}, {1} - .NET types.
+
+
+ For type '{0}', the Kotlin name-mangled method '{1}' (originally '{2}') has multiple hash-suffixed siblings that erase to the same C# signature. Only the first will be emitted; remove the duplicate via Metadata.xml to suppress this warning.
+ {0} - .NET type. {1} - C# method name. {2} - Original (mangled) JVM method name.
+
+
+ Cannot generate Java wrapper for type '{0}'. Only 'class' types are supported.
+ {0} - Java type.
+The following terms should not be translated:
+class.
+
+
+ Cannot determine JNI name for type '{0}'.
+ {0} - Java type.
+The following terms should not be translated: JNI.
+
+
+ The 'Name' property must be a fully qualified type like 'com.example.MyClass' and no package was found for '{0}'.
+ {0} - Java type.
+The following terms should not be translated:
+Name, com.example.MyClass.
+
+
+ Unable to resolve interface type '{0}'. Are you missing an assembly reference?
+ {0} - Java interface.
+
+
+ [ExportField] can only be used on methods with 0 parameters.
+ The following terms should not be translated: [ExportField].
+
+
+ [Export] cannot be used on a generic type.
+ The following terms should not be translated: [Export].
+
+
+ [ExportField] cannot be used on a generic type.
+ The following terms should not be translated: [ExportField].
+
+
+ [ExportField] cannot be used on a method returning 'void'.
+ The following terms should not be translated: [ExportField], void.
+
+
+ Cannot override Kotlin-generated method '{0}' because it is not a valid Java method name. This method can only be overridden from Kotlin.
+ {0} - Kotlin method name.
+
+
+ Unable to preload reference '{0}'.
+ {0} - assembly path
+
+
+ Please specify at least one ASSEMBLY to process.
+ The following terms should not be translated or have any capitalization changes: ASSEMBLY. This is a special case for this particular message. In most messages, "assembly" would be translated.
+
+
+ Unable to create Java VM{0}{1}
+ {0} - newline, {1} - exception
+
+
+ Unable to read profile file '{0}'.{1}{2}
+ {0} - path, {1} - newline, {2} - exception. In this message, the term "profile" refers to a customized list of types to process.
+
+
+ Path '{0}' does not exist.
+ {0} - path
+
+
+ Unable to process assembly '{0}'{1}{2}{1}{3}
+ {0} - assembly, {1} - newline, {2} - exception message, {3} exception
+
+
+ Couln't find interface {0}
+ {0} - interface name
+
+
+ Caught an exception while loading types. The types that cannot be loaded will not be processed. Make sure that any additional assembly references required for those types are provided using the -r option. Exception:{0}{1}
+ {0} - newline, {1} - exception. The following terms should not be translated: -r
+
+
+ Unable to find type '{0}'. The type will not be processed. Make sure the directories for all referenced assemblies are provided with the -L option.
+ {0} - type
+The following terms should not be translated: -L
+
+
+ Marshal methods type '{0}' already exists. Skipped generation of marshal methods in assembly '{1}'. Use -f to force regeneration when desired.
+ {0} - type, {1} - assembly name. The following terms should not be translated: -f. In this message, the term "marshal methods" refers to methods that allow interaction between the managed methods and Java methods, similar to the methods of the .NET System.Runtime.InteropServices.Marshal class.
+
+
+ Unable to find definition of method '{0}' in assembly metadata. It will not be processed. Make sure the directories for all referenced assemblies are provided with the -L option.
+ {0} - method
+The following terms should not be translated: -L
+
+
+ Unable to find the System.Console.WriteLine() method. Disabling debug injection. To enable debug injection, ensure the directory containing mscorlib is provided with the -L option.
+ The following terms should not be translated: -L
+
+
\ No newline at end of file
diff --git a/external/Java.Interop/src/Java.Interop.Localization/Resources.ru.resx b/external/Java.Interop/src/Java.Interop.Localization/Resources.ru.resx
new file mode 100644
index 00000000000..d9cd71eaab6
--- /dev/null
+++ b/external/Java.Interop/src/Java.Interop.Localization/Resources.ru.resx
@@ -0,0 +1,402 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ Ошибка при загрузке сборки: "{0}".
+ {0} - File name
+
+
+ Сбой удаления старых констант: {0}.
+ {0} - The list of constants that could not be removed.
+In this message, the term "constants" refers to class or interface members that have constant values.
+
+
+ Сбой обработки сопоставления перечисления. Текстовая строка: {0}.
+ {0} - The line that could not be processed.
+
+
+ Ошибка при обработке исправления метаданных: {0}.
+ {0} - The error encountered.
+
+
+ Недопустимая спецификация XPath: {0}.
+ {0} - The invalid XPath line.
+
+
+ Имя целевого атрибута не указано для пути: {0}.
+ {0} - The invalid XPath line.
+
+
+ Неожиданная спецификация "global::". Эта ошибка происходит, если, например, "global::" указан в файле преобразования Metadata.xml.
+ The following are literal names and should not be translated: global::, Metadata.xml.
+
+
+ Непредвиденный дочерний класс {0}.
+ {0} - The unexpected child class.
+
+
+ Класс "{0}" имеет неизвестный базовый тип "{1}".
+ {0}, {1} - .NET types.
+
+
+ Класс "{0}" имеет недопустимый базовый тип "{1}".
+ {0}, {1} - .NET types.
+
+
+ Не удалось проанализировать сборку "{0}": {1}.
+ {0} - Error .NET assembly.
+{1} - The error encountered.
+
+
+ Для конструктора "{0}" не удалось найти вложенный тип "{1}".
+ {0} - .NET constructor method.
+{1} - .NET type.
+
+
+ Непредвиденный тип поля "{0}" ({1}).
+ {0} - .NET type.
+{1} - .NET field signature.
+
+
+ Пропуск "{0}.{1}" из-за дублирования имени метода. (Тип Java: "{2}")
+ {0} - .NET type.
+{1} - .NET field name.
+{2} - Java type.
+
+
+ Пропуск "{0}.{1}" из-за дублирования имени вложенного типа. (Тип Java: "{2}")
+ {0} - .NET type.
+{1} - .NET field name.
+{2} - Java type.
+
+
+ Пропуск "{0}.{1}" из-за дублирования имени поля или свойства. (Тип Java: "{2}")
+ {0} - .NET type.
+{1} - .NET field name.
+{2} - Java type.
+
+
+ Пропуск "{0}.{1}" из-за дублирования поля. (Тип Java: "{2}")
+ {0} - .NET type.
+{1} - .NET field name.
+{2} - Java type.
+
+
+ Тип "{0}" имеет имя типа, соответствующее имени вложенного пространства имен. Подробнее см. https://aka.ms/BG8403.
+ {0} - Java type.
+
+
+ Непредвиденный элемент "<interface>": "{0}".
+ {0} - XML element name.
+<interface> should not be translated.
+
+
+ Имя события не указано в "{0}.{1}".
+ {0} - .NET type name
+{1} - .NET member.
+
+
+ Аннулирование "{0}" и всех его вложенных типов из-за недопустимости некоторых его интерфейсов.
+ {0} - .NET type name.
+
+
+ Аннулирование "{0}" и всех его вложенных типов из-за недопустимых методов.
+ {0} - .NET type name.
+
+
+ Недопустимое имя события для "{0}.{1}". Допустимые "eventName" или "argsType" можно назначить, добавив правило в файл преобразований Metadata.xml.
+ {0} - .NET type name
+{1} - .NET member.
+The following terms should not be translated: eventName, argsType, Metadata.xml.
+
+
+ Недопустимое имя свойства события для "{0}.{1}". Допустимое значение "eventName" или "argsType" можно назначить, добавив правило в файл преобразований Metadata.xml.
+ {0} - .NET type name
+{1} - .NET member.
+The following terms should not be translated: eventName, argsType, Metadata.xml.
+
+
+ Недопустимый XML-файл "{0}": {1}.
+ {0} - File name
+{1} - The error encountered.
+
+
+ Элементы "<package>" не найдены.
+ The following terms should not be translated: <package>.
+
+
+ Непредвиденный корневой дочерний узел: "<{0}>".
+ {0} - XML element name.
+
+
+ Непредвиденный дочерний узел "<package>": "<{0}>".
+ {0} - XML element name.
+The following terms should not be translated: <package>.
+
+
+ Не удалось найти тип верхнего предка "{0}" для вложенного типа "{1}".
+ {0}, {1} - .NET types.
+
+
+ Не удалось найти тип Java "{0}" (может быть, вам не хватает справочного файла jar/aar Java или библиотеки привязки Java NuGet?)
+ {0} - Java type.
+
+
+ Некоторые типы или элементы не могут быть связаны, так как не удается найти ссылочные типы Java. Подробности в файле java-resolution-report.log.
+ The following terms should not be translated: java-resolution-report.log
+
+
+ Неизвестный тип возврата "{0}" для элемента "{1}".
+ {0} - Java type.
+{1} - .NET member.
+
+
+ Недопустимый тип возврата "{0}" для элемента "{1}".
+ {0} - Java type.
+{1} - .NET member.
+
+
+ Неизвестный тип параметра "{0}" для элемента "{1}".
+ {0} - Java type.
+{1} - .NET member.
+
+
+ Недопустимый тип параметра "{0}" для элемента "{1}".
+ {0} - Java type.
+{1} - .NET member.
+
+
+ Для элемента Metadata.xml "{0}" нет соответствующего узла.
+ {0} - XML transform. (example: '<remove-node path="/api/package[@name='javax.sql']"')
+The following terms should not be translated: Metadata.xml.
+
+
+ Недопустимое преобразование пространства имен "{0}"
+ {0} - XML transform. (example: '<ns-replace source="example" replacement="Example" />')
+
+
+ В элементе Metadata.xml "{0}" отсутствует атрибут "path".
+ {0} - XML transform. (example: '<remove-node path="/api/package[@name='javax.sql']"')
+The following terms should not be translated: Metadata.xml, path.
+
+
+ Неизвестный универсальный тип ограничения аргумента "{0}" для элемента "{1}".
+ {0} - .NET type name
+{1} - .NET member.
+
+
+ Не удалось найти базовый интерфейс "{1}" для типа "{0}".
+ {0}, {1} - .NET types.
+
+
+ Для типа "{0}" базовый интерфейс "{1}" является недопустимым.
+ {0}, {1} - .NET types.
+
+
+ Не удается создать оболочку Java для типа "{0}". Поддерживаются только типы "class".
+ {0} - Java type.
+The following terms should not be translated:
+class.
+
+
+ Не удается определить имя JNI для типа "{0}".
+ {0} - Java type.
+The following terms should not be translated: JNI.
+
+
+ Свойство "Name" должно иметь полный тип, например "com.example.MyClass", и пакет для "{0}" не найден.
+ {0} - Java type.
+The following terms should not be translated:
+Name, com.example.MyClass.
+
+
+ Не удалось разрешить тип интерфейса "{0}". Отсутствует ссылка на сборку?
+ {0} - Java interface.
+
+
+ [ExportField] можно использовать только для методов с 0 параметрами.
+ The following terms should not be translated: [ExportField].
+
+
+ [Export] нельзя использовать для универсального типа.
+ The following terms should not be translated: [Export].
+
+
+ [ExportField] нельзя использовать для универсального типа.
+ The following terms should not be translated: [ExportField].
+
+
+ [ExportField] нельзя использовать для метода, возвращающего "void".
+ The following terms should not be translated: [ExportField], void.
+
+
+ Невозможно переопределить сгенерированный Kotlin метод "{0}", так как это недопустимое имя метода Java. Этот метод можно переопределить только из Kotlin.
+ {0} - Kotlin method name.
+
+
+ Не удалось предварительно загрузить ссылку "{0}".
+ {0} - assembly path
+
+
+ Укажите по крайней мере одну СБОРКУ для обработки.
+ The following terms should not be translated or have any capitalization changes: ASSEMBLY. This is a special case for this particular message. In most messages, "assembly" would be translated.
+
+
+ Не удалось создать Java VM{0}{1}
+ {0} - newline, {1} - exception
+
+
+ Не удалось прочитать файл профиля "{0}".{1}{2}
+ {0} - path, {1} - newline, {2} - exception. In this message, the term "profile" refers to a customized list of types to process.
+
+
+ Путь "{0}" не существует
+ {0} - path
+
+
+ Не удалось обработать сборку "{0}"{1}{2}{1}{3}
+ {0} - assembly, {1} - newline, {2} - exception message, {3} exception
+
+
+ Не удается найти интерфейс {0}
+ {0} - interface name
+
+
+ Перехвачено исключение при загрузке типов. Типы, которые невозможно загрузить, не будут обработаны. Убедитесь, что любые дополнительные ссылки на сборки, необходимые для этих типов, предоставляются с помощью параметра -r. Исключение:{0}{1}
+ {0} - newline, {1} - exception. The following terms should not be translated: -r
+
+
+ Не удалось найти тип "{0}". Тип не будет обработан. Убедитесь, что каталоги для всех сборок, на которые есть ссылки, предоставляются с параметром -L.
+ {0} - type
+The following terms should not be translated: -L
+
+
+ Тип методов маршалирования "{0}" уже существует. Пропущено поколение методов маршалирования в сборке "{1}". При желании используйте -f для принудительного повторного создания.
+ {0} - type, {1} - assembly name. The following terms should not be translated: -f. In this message, the term "marshal methods" refers to methods that allow interaction between the managed methods and Java methods, similar to the methods of the .NET System.Runtime.InteropServices.Marshal class.
+
+
+ Не удалось найти определение метода "{0}" в метаданных сборки. Он не будет обработан. Убедитесь, что каталоги для всех сборок, на которые есть ссылки, предоставляются с параметром -L.
+ {0} - method
+The following terms should not be translated: -L
+
+
+ Не удалось найти метод System.Console.WriteLine(). Отключение внедрения отладки. Чтобы включить внедрение отладки, убедитесь, что каталог, содержащий mscorlib, указан с параметром -L.
+ The following terms should not be translated: -L
+
+
\ No newline at end of file
diff --git a/external/Java.Interop/src/Java.Interop.Localization/Resources.tr.resx b/external/Java.Interop/src/Java.Interop.Localization/Resources.tr.resx
new file mode 100644
index 00000000000..9582d46d249
--- /dev/null
+++ b/external/Java.Interop/src/Java.Interop.Localization/Resources.tr.resx
@@ -0,0 +1,402 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ Derleme yüklenirken hata oluştu: '{0}'.
+ {0} - File name
+
+
+ Eski sabitler kaldırılamadı: {0}.
+ {0} - The list of constants that could not be removed.
+In this message, the term "constants" refers to class or interface members that have constant values.
+
+
+ Sabit listesi eşlemesi işlenemedi. Metin satırı: {0}.
+ {0} - The line that could not be processed.
+
+
+ Meta veri düzeltmesi işlenirken hata oluştu: {0}.
+ {0} - The error encountered.
+
+
+ Geçersiz XPath belirtimi: {0}.
+ {0} - The invalid XPath line.
+
+
+ Yol için hedef öznitelik adı belirtilmedi: {0}.
+ {0} - The invalid XPath line.
+
+
+ Beklenmeyen 'global::' belirtimi. Bu hata, örneğin Metadata.xml dönüşüm dosyasında 'global::' belirtilirse oluşur.
+ The following are literal names and should not be translated: global::, Metadata.xml.
+
+
+ Beklenmeyen sınıf alt öğesi: {0}.
+ {0} - The unexpected child class.
+
+
+ '{0}' sınıfı, bilinmeyen '{1}' temel türüne sahip.
+ {0}, {1} - .NET types.
+
+
+ '{0}' sınıfı, geçersiz '{1}' temel türüne sahip.
+ {0}, {1} - .NET types.
+
+
+ '{0}' derlemesi ayrıştırılamadı: {1}.
+ {0} - Error .NET assembly.
+{1} - The error encountered.
+
+
+ '{0}' oluşturucusu için, '{1}' kapsayan türü bulunamadı.
+ {0} - .NET constructor method.
+{1} - .NET type.
+
+
+ Beklenmeyen alan türü `{0}` ({1}).
+ {0} - .NET type.
+{1} - .NET field signature.
+
+
+ Yinelenen bir yöntem adı nedeniyle '{0}.{1}' atlanıyor. (Java türü: '{2}')
+ {0} - .NET type.
+{1} - .NET field name.
+{2} - Java type.
+
+
+ Yinelenen bir içe geçmiş tür adı nedeniyle '{0}.{1}' atlanıyor. (Java türü: '{2}')
+ {0} - .NET type.
+{1} - .NET field name.
+{2} - Java type.
+
+
+ Yinelenen bir alan veya özellik adı nedeniyle '{0}.{1}' atlanıyor. (Java türü: '{2}')
+ {0} - .NET type.
+{1} - .NET field name.
+{2} - Java type.
+
+
+ Yinelenen bir alan nedeniyle '{0}.{1}' atlanıyor. (Java türü: '{2}')
+ {0} - .NET type.
+{1} - .NET field name.
+{2} - Java type.
+
+
+ '{0}' türü, kapsayan ad alanı adıyla eşleşen bir tür adına sahip. Daha fazla bilgi edinmek için bkz. https://aka.ms/BG8403.
+ {0} - Java type.
+
+
+ Beklenmeyen '<interface>' alt öğesi: '{0}'.
+ {0} - XML element name.
+<interface> should not be translated.
+
+
+ '{0}.{1}' içinde sağlanmış olay adı yok.
+ {0} - .NET type name
+{1} - .NET member.
+
+
+ Bazı arabirimleri geçersiz olduğundan '{0}' ve tüm içe geçmiş türleri geçersiz kılınıyor.
+ {0} - .NET type name.
+
+
+ Bazı yöntemleri geçersiz olduğundan '{0}' ve tüm içe geçmiş türleri geçersiz kılınıyor.
+ {0} - .NET type name.
+
+
+ '{0}.{1}' için olay adı geçersiz. Metadata.xml dönüşümleri dosyasına bir kural eklenerek geçerli bir 'eventName' veya 'argsType' atanabilir.
+ {0} - .NET type name
+{1} - .NET member.
+The following terms should not be translated: eventName, argsType, Metadata.xml.
+
+
+ '{0}.{1}' için olay özelliği adı geçersiz. Metadata.xml dönüşümleri dosyasına bir kural eklenerek geçerli bir 'eventName' veya 'argsType' atanabilir.
+ {0} - .NET type name
+{1} - .NET member.
+The following terms should not be translated: eventName, argsType, Metadata.xml.
+
+
+ '{0}' XML dosyası geçersiz: {1}.
+ {0} - File name
+{1} - The error encountered.
+
+
+ '<package>' öğeleri bulunamadı.
+ The following terms should not be translated: <package>.
+
+
+ Beklenmeyen kök alt düğüm: '<{0}>'.
+ {0} - XML element name.
+
+
+ Beklenmeyen '<package>' alt düğümü: '<{0}>'.
+ {0} - XML element name.
+The following terms should not be translated: <package>.
+
+
+ '{1}' iç içe geçmiş türü için '{0}' üst türü bulunamadı.
+ {0}, {1} - .NET types.
+
+
+ '{0}' Java türü bulunamadı (Java başvuru JAR/AAR veya Java bağlama kitaplığı NuGet paketleri eksik mi?)
+ {0} - Java type.
+
+
+ Başvurulan Java türleri bulunamadığından bazı türler veya üyeler bağlanamadı. Ayrıntılar için 'java-resolution-report.log' dosyasına bakın.
+ The following terms should not be translated: java-resolution-report.log
+
+
+ '{1}' üyesi için '{0}' dönüş türü bilinmiyor.
+ {0} - Java type.
+{1} - .NET member.
+
+
+ '{1}' üyesi için '{0}' dönüş türü geçersiz.
+ {0} - Java type.
+{1} - .NET member.
+
+
+ '{1}' üyesi için '{0}' parametre türü bilinmiyor.
+ {0} - Java type.
+{1} - .NET member.
+
+
+ '{1}' üyesi için '{0}' parametre türü geçersiz.
+ {0} - Java type.
+{1} - .NET member.
+
+
+ '{0}' Metadata.xml öğesi hiçbir düğümle eşleşmedi.
+ {0} - XML transform. (example: '<remove-node path="/api/package[@name='javax.sql']"')
+The following terms should not be translated: Metadata.xml.
+
+
+ '{0}' ad alanı dönüşümü geçersiz.
+ {0} - XML transform. (example: '<ns-replace source="example" replacement="Example" />')
+
+
+ '{0}' Metadata.xml öğesinde 'path' özniteliği yok.
+ {0} - XML transform. (example: '<remove-node path="/api/package[@name='javax.sql']"')
+The following terms should not be translated: Metadata.xml, path.
+
+
+ '{1}' üyesi için '{0}' genel bağımsız değişken kısıtlama türü bilinmiyor.
+ {0} - .NET type name
+{1} - .NET member.
+
+
+ '{0}' türü için '{1}' temel arabirimi bulunamadı.
+ {0}, {1} - .NET types.
+
+
+ '{0}' türü için '{1}' temel arabirimi geçersiz.
+ {0}, {1} - .NET types.
+
+
+ '{0}' türü için Java sarmalayıcı oluşturulamıyor. Yalnızca 'class' türleri desteklenir.
+ {0} - Java type.
+The following terms should not be translated:
+class.
+
+
+ '{0}' türü için JNI adı belirlenemiyor.
+ {0} - Java type.
+The following terms should not be translated: JNI.
+
+
+ 'Name' özelliği 'com.example.MyClass' gibi tam bir tür olmalıdır ve '{0}' için paket bulunamadı.
+ {0} - Java type.
+The following terms should not be translated:
+Name, com.example.MyClass.
+
+
+ '{0}' arabirim türü çözümlenemiyor. Derleme başvurusu eksik mi?
+ {0} - Java interface.
+
+
+ [ExportField] yalnızca 0 parametreli yöntemlerde kullanılabilir.
+ The following terms should not be translated: [ExportField].
+
+
+ [Export] genel türde kullanılamaz.
+ The following terms should not be translated: [Export].
+
+
+ [ExportField] genel türde kullanılamaz.
+ The following terms should not be translated: [ExportField].
+
+
+ [ExportField] 'void' döndüren bir yöntemde kullanılamaz.
+ The following terms should not be translated: [ExportField], void.
+
+
+ Geçerli bir Java yöntem adı olmadığından Kotlin’de oluşturulan '{0}' yöntemi geçersiz kılınamıyor. Bu yöntem yalnızca Kotlin'den geçersiz kılınabilir.
+ {0} - Kotlin method name.
+
+
+ '{0}' başvurusu önceden yüklenemiyor.
+ {0} - assembly path
+
+
+ Lütfen işlemek için en az bir ASSEMBLY belirtin.
+ The following terms should not be translated or have any capitalization changes: ASSEMBLY. This is a special case for this particular message. In most messages, "assembly" would be translated.
+
+
+ Java VM hesabı oluşturulamıyor{0}{1}
+ {0} - newline, {1} - exception
+
+
+ '{0}' profil dosyası okunamıyor.{1}{2}
+ {0} - path, {1} - newline, {2} - exception. In this message, the term "profile" refers to a customized list of types to process.
+
+
+ '{0}' yolu yok.
+ {0} - path
+
+
+ '{0}' derlemesi işlenemiyor{1}{2}{1}{3}
+ {0} - assembly, {1} - newline, {2} - exception message, {3} exception
+
+
+ {0} arabirimi bulunamadı.
+ {0} - interface name
+
+
+ Türler yüklenirken bir özel durum yakalandı. Yüklenemeyen türler işlenmeyecek. Bu türler için gereken ek derleme başvurularının -r seçeneği kullanılarak sağlanmış olduğundan emin olun. Özel durum:{0}{1}
+ {0} - newline, {1} - exception. The following terms should not be translated: -r
+
+
+ '{0}' türü bulunamıyor. Tür işlenmeyecek. Başvurulan tüm derlemelere ait dizinlerin -L seçeneğiyle sağlanmış olduğundan emin olun.
+ {0} - type
+The following terms should not be translated: -L
+
+
+ '{0}' türü sıralama yöntemleri zaten var. '{1}' adlı derlemede sıralama yöntemlerinin oluşturulması atlandı. İstendiğinde yeniden oluşturmayı zorlamak için -f kullanın.
+ {0} - type, {1} - assembly name. The following terms should not be translated: -f. In this message, the term "marshal methods" refers to methods that allow interaction between the managed methods and Java methods, similar to the methods of the .NET System.Runtime.InteropServices.Marshal class.
+
+
+ Derleme meta verilerinde '{0}' yönteminin tanımı bulunamıyor. İşlenmeyecek. Başvurulan tüm derlemelere ait dizinlerin -L seçeneğiyle sağlanmış olduğundan emin olun.
+ {0} - method
+The following terms should not be translated: -L
+
+
+ System.Console.WriteLine() yöntemi bulunamıyor. Hata ayıklama ekleme devre dışı bırakılıyor. Hata ayıklama eklemeyi etkinleştirmek için mscorlib içeren dizinin -L seçeneğiyle sağlanmış olduğundan emin olun.
+ The following terms should not be translated: -L
+
+
\ No newline at end of file
diff --git a/external/Java.Interop/src/Java.Interop.Localization/Resources.zh-Hans.resx b/external/Java.Interop/src/Java.Interop.Localization/Resources.zh-Hans.resx
new file mode 100644
index 00000000000..edb4705ffa6
--- /dev/null
+++ b/external/Java.Interop/src/Java.Interop.Localization/Resources.zh-Hans.resx
@@ -0,0 +1,402 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ 加载程序集“{0}”时出错。
+ {0} - File name
+
+
+ 无法删除旧常量: {0}。
+ {0} - The list of constants that could not be removed.
+In this message, the term "constants" refers to class or interface members that have constant values.
+
+
+ 无法处理枚举映射。文本行: {0}。
+ {0} - The line that could not be processed.
+
+
+ 处理元数据修复期间出错: {0}。
+ {0} - The error encountered.
+
+
+ XPath 规范无效: {0}。
+ {0} - The invalid XPath line.
+
+
+ 没有为路径 {0} 指定目标属性名称。
+ {0} - The invalid XPath line.
+
+
+ 意外的 “global::” 规范。例如,如果在 Metadata.xml 转换文件中指定了 “global::”,则会发生此错误。
+ The following are literal names and should not be translated: global::, Metadata.xml.
+
+
+ 意外的类子级 {0}。
+ {0} - The unexpected child class.
+
+
+ 类“{0}”具有未知的基类型“{1}”。
+ {0}, {1} - .NET types.
+
+
+ 类“{0}”具有无效的基类型“{1}”。
+ {0}, {1} - .NET types.
+
+
+ 无法分析程序集“{0}”: {1}。
+ {0} - Error .NET assembly.
+{1} - The error encountered.
+
+
+ 对于构造函数“{0}”,找不到封闭类型“{1}”。
+ {0} - .NET constructor method.
+{1} - .NET type.
+
+
+ 意外的字段类型 `{0}` ({1})。
+ {0} - .NET type.
+{1} - .NET field signature.
+
+
+ 由于方法名称重复,正在跳过“{0}.{1}”。(Java 类型:“{2}')
+ {0} - .NET type.
+{1} - .NET field name.
+{2} - Java type.
+
+
+ 由于嵌套类型名称重复,正在跳过“{0}.{1}”。(Java 类型:“{2}')
+ {0} - .NET type.
+{1} - .NET field name.
+{2} - Java type.
+
+
+ 由于字段或属性名称重复,正在跳过“{0}.{1}”。(Java 类型:“{2}”)
+ {0} - .NET type.
+{1} - .NET field name.
+{2} - Java type.
+
+
+ 由于字段重复,正在跳过“{0}.{1}”。(Java 类型:“{2}')
+ {0} - .NET type.
+{1} - .NET field name.
+{2} - Java type.
+
+
+ 类型“{0}”具有与封闭命名空间名称匹配的类型名称。有关详细信息,请参阅 https://aka.ms/BG8403。
+ {0} - Java type.
+
+
+ “<interface>”的意外子元素:“{0}”。
+ {0} - XML element name.
+<interface> should not be translated.
+
+
+ “{0}.{1}”中未提供任何事件名称。
+ {0} - .NET type name
+{1} - .NET member.
+
+
+ 正在使“{0}”及其所有嵌套类型失效,因为其某些接口无效。
+ {0} - .NET type name.
+
+
+ 正在使“{0}”及其所有嵌套类型失效,因为其某些方法无效。
+ {0} - .NET type name.
+
+
+ “{0}.{1}”的事件名称无效。可以通过将规则添加到 Metadata.xml 转换文件来分配有效的 “eventName” 或 “argsType”。
+ {0} - .NET type name
+{1} - .NET member.
+The following terms should not be translated: eventName, argsType, Metadata.xml.
+
+
+ “{0}.{1}”的事件属性名称无效。可以通过将规则添加到 Metadata.xml 转换文件来分配有效的 “eventName” 或 “argsType”。
+ {0} - .NET type name
+{1} - .NET member.
+The following terms should not be translated: eventName, argsType, Metadata.xml.
+
+
+ XML 文件“{0}”无效: {1}。
+ {0} - File name
+{1} - The error encountered.
+
+
+ 找不到“<package>”元素。
+ The following terms should not be translated: <package>.
+
+
+ 意外的根子节点:“<{0}>”。
+ {0} - XML element name.
+
+
+ 意外的“<package>”子节点:“<{0}>”。
+ {0} - XML element name.
+The following terms should not be translated: <package>.
+
+
+ 找不到嵌套类型“{1}”的顶级上级类型“{0}”。
+ {0}, {1} - .NET types.
+
+
+ 找不到 Java 类型“{0}”(是否缺少 Java 引用 jar/aar 或 Java 绑定库 NuGet?)
+ {0} - Java type.
+
+
+ 无法绑定某些类型或成员,因为找不到引用的 Java 类型。有关详细信息,请参阅 “java-resolution-report.log” 文件。
+ The following terms should not be translated: java-resolution-report.log
+
+
+ 成员“{1}”的返回类型“{0}”未知。
+ {0} - Java type.
+{1} - .NET member.
+
+
+ 成员“{1}”的返回类型“{0}”无效。
+ {0} - Java type.
+{1} - .NET member.
+
+
+ 成员“{1}”的参数类型“{0}”未知。
+ {0} - Java type.
+{1} - .NET member.
+
+
+ 成员“{1}”的参数类型“{0}”无效。
+ {0} - Java type.
+{1} - .NET member.
+
+
+ Metadata.xml 元素“{0}”不匹配任何节点。
+ {0} - XML transform. (example: '<remove-node path="/api/package[@name='javax.sql']"')
+The following terms should not be translated: Metadata.xml.
+
+
+ 命名空间转换“{0}”无效
+ {0} - XML transform. (example: '<ns-replace source="example" replacement="Example" />')
+
+
+ Metadata.xml 元素 "{0}" 缺少 "path" 属性。
+ {0} - XML transform. (example: '<remove-node path="/api/package[@name='javax.sql']"')
+The following terms should not be translated: Metadata.xml, path.
+
+
+ 成员“{1}”的泛型参数约束类型“{0}”未知。
+ {0} - .NET type name
+{1} - .NET member.
+
+
+ 找不到类型“{0}”的基接口“{1}”。
+ {0}, {1} - .NET types.
+
+
+ 对于类型“{0}”,基接口“{1}”无效。
+ {0}, {1} - .NET types.
+
+
+ 无法为类型“{0}”生成 Java 包装器。仅支持 “class” 类型。
+ {0} - Java type.
+The following terms should not be translated:
+class.
+
+
+ 无法确定类型“{0}”的 JNI 名称。
+ {0} - Java type.
+The following terms should not be translated: JNI.
+
+
+ “Name” 属性必须是完全限定的类型,如 “com.example.MyClass”,并且找不到“{0}”的包。
+ {0} - Java type.
+The following terms should not be translated:
+Name, com.example.MyClass.
+
+
+ 无法解析接口类型“{0}”。是否缺少程序集引用?
+ {0} - Java interface.
+
+
+ [ExportField] 只能用于具有 0 个参数的方法。
+ The following terms should not be translated: [ExportField].
+
+
+ [Export] 不能用于泛型类型。
+ The following terms should not be translated: [Export].
+
+
+ [ExportField] 不能用于泛型类型。
+ The following terms should not be translated: [ExportField].
+
+
+ [ExportField] 不能用于返回 “void” 的方法。
+ The following terms should not be translated: [ExportField], void.
+
+
+ 无法替代 Kotlin 生成的方法“{0}”,因为它不是有效的 Java 方法名称。只能从 Kotlin 替代此方法。
+ {0} - Kotlin method name.
+
+
+ 无法预加载引用“{0}”。
+ {0} - assembly path
+
+
+ 请至少指定一个要处理的程序集。
+ The following terms should not be translated or have any capitalization changes: ASSEMBLY. This is a special case for this particular message. In most messages, "assembly" would be translated.
+
+
+ 无法创建 Java VM{0}{1}
+ {0} - newline, {1} - exception
+
+
+ 无法读取配置文件“{0}”。{1}{2}
+ {0} - path, {1} - newline, {2} - exception. In this message, the term "profile" refers to a customized list of types to process.
+
+
+ 路径“{0}”不存在。
+ {0} - path
+
+
+ 无法处理程序集“{0}”{1}{2}{1}{3}
+ {0} - assembly, {1} - newline, {2} - exception message, {3} exception
+
+
+ 找不到接口 {0}
+ {0} - interface name
+
+
+ 加载类型时捕获到异常。将不处理无法加载的类型。请确保使用 -r 选项提供这些类型所需的任何其他程序集引用。异常:{0}{1}
+ {0} - newline, {1} - exception. The following terms should not be translated: -r
+
+
+ 找不到类型“{0}”。将不会处理该类型。确保使用 -L 选项提供所有引用的程序集的目录。
+ {0} - type
+The following terms should not be translated: -L
+
+
+ 封送方法类型“{0}”已存在。已跳过程序集“{1}”中封送方法的生成。在需要时使用 -f 强制重新生成。
+ {0} - type, {1} - assembly name. The following terms should not be translated: -f. In this message, the term "marshal methods" refers to methods that allow interaction between the managed methods and Java methods, similar to the methods of the .NET System.Runtime.InteropServices.Marshal class.
+
+
+ 在程序集元数据中找不到方法“{0}”的定义。将不会处理它。确保使用 -L 选项提供所有引用的程序集的目录。
+ {0} - method
+The following terms should not be translated: -L
+
+
+ 找不到 System.Console.WriteLine() 方法。正在禁用调试注入。要启用调试注入,请确保使用 -L 选项提供包含 mscorlib 的目录。
+ The following terms should not be translated: -L
+
+
\ No newline at end of file
diff --git a/external/Java.Interop/src/Java.Interop.Localization/Resources.zh-Hant.resx b/external/Java.Interop/src/Java.Interop.Localization/Resources.zh-Hant.resx
new file mode 100644
index 00000000000..900a23bb780
--- /dev/null
+++ b/external/Java.Interop/src/Java.Interop.Localization/Resources.zh-Hant.resx
@@ -0,0 +1,402 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ 載入組件: '{0}' 時發生錯誤。
+ {0} - File name
+
+
+ 無法移除舊的常數: {0}。
+ {0} - The list of constants that could not be removed.
+In this message, the term "constants" refers to class or interface members that have constant values.
+
+
+ 無法處理列舉對應。文字行: {0}。
+ {0} - The line that could not be processed.
+
+
+ 處理中繼資料修復期間發生錯誤: {0}。
+ {0} - The error encountered.
+
+
+ 無效的 XPath 規格: {0}。
+ {0} - The invalid XPath line.
+
+
+ 未指定路徑的目標屬性名稱: {0}。
+ {0} - The invalid XPath line.
+
+
+ 未預期的 'global::' 規格。例如,如果在 Metadata.xml 轉換檔案中指定了 'global::',就會發生此錯誤。
+ The following are literal names and should not be translated: global::, Metadata.xml.
+
+
+ 未預期的類別子系 {0}。
+ {0} - The unexpected child class.
+
+
+ 類別 '{0}' 具有未知的基底型別 '{1}'。
+ {0}, {1} - .NET types.
+
+
+ 類別 '{0}' 的基底型別 '{1}' 無效。
+ {0}, {1} - .NET types.
+
+
+ 無法剖析組件 '{0}': {1}。
+ {0} - Error .NET assembly.
+{1} - The error encountered.
+
+
+ 對於建構函式 '{0}',找不到封閉型別 '{1}'。
+ {0} - .NET constructor method.
+{1} - .NET type.
+
+
+ 未預期的欄位型別 '{0}' ({1})。
+ {0} - .NET type.
+{1} - .NET field signature.
+
+
+ 因為方法名稱重複,所以略過 '{0}.{1}'。(JAVA 型別: '{2}')
+ {0} - .NET type.
+{1} - .NET field name.
+{2} - Java type.
+
+
+ 因為巢狀類型名稱重複,所以略過 '{0}.{1}'。(JAVA 型別: '{2}')
+ {0} - .NET type.
+{1} - .NET field name.
+{2} - Java type.
+
+
+ 因為欄位或屬性名稱重複,所以略過 '{0}.{1}'。(JAVA 型別: '{2}')
+ {0} - .NET type.
+{1} - .NET field name.
+{2} - Java type.
+
+
+ 因為欄位重複,所以略過 '{0}.{1}'。(JAVA 型別: '{2}')
+ {0} - .NET type.
+{1} - .NET field name.
+{2} - Java type.
+
+
+ 型別 '{0}' 具有符合封閉命名空間名稱的型別名稱。如需詳細資訊,請參閱 https://aka.ms/BG8403。
+ {0} - Java type.
+
+
+ 未預期的 '<interface>' 子項目: '{0}'。
+ {0} - XML element name.
+<interface> should not be translated.
+
+
+ '{0}.{1}' 中未提供事件名稱。
+ {0} - .NET type name
+{1} - .NET member.
+
+
+ 正在使 '{0}' 及其所有巢狀型別失效,因為其某些介面無效。
+ {0} - .NET type name.
+
+
+ 正在使 '{0}' 及其所有巢狀型別失效,因為其某些方法無效。
+ {0} - .NET type name.
+
+
+ '{0}.{1}' 的事件名稱無效。將規則新增至 Metadata.xml 轉換檔案,即可指派有效的 'eventName' 或 'argsType'。
+ {0} - .NET type name
+{1} - .NET member.
+The following terms should not be translated: eventName, argsType, Metadata.xml.
+
+
+ '{0}.{1}' 的事件屬性名稱無效。將規則新增至 Metadata.xml 轉換檔案,即可指派有效的 'eventName' 或 'argsType'。
+ {0} - .NET type name
+{1} - .NET member.
+The following terms should not be translated: eventName, argsType, Metadata.xml.
+
+
+ 無效的 XML 檔案'{0}': {1}。
+ {0} - File name
+{1} - The error encountered.
+
+
+ 找不到 '<package>' 元素。
+ The following terms should not be translated: <package>.
+
+
+ 未預期的根子節點: '<{0}>'。
+ {0} - XML element name.
+
+
+ 未預期的 '<package>' 子節點: '<{0}>'。
+ {0} - XML element name.
+The following terms should not be translated: <package>.
+
+
+ 找不到巢狀型別 '{1}' 的上階型別 '{0}'。
+ {0}, {1} - .NET types.
+
+
+ 找不到 JAVA 型別 '{0}' (您是否遺漏 JAVA 參考 jar/aar 或 JAVA 繫結程式庫 NuGet?)
+ {0} - Java type.
+
+
+ 因為找不到參照的 JAVA 型別,所以無法繫結某些型別或成員。如需詳細資料,請參閱 'java-resolution-report.log' 檔案。
+ The following terms should not be translated: java-resolution-report.log
+
+
+ 成員 '{1}' 的傳回型別 '{0}' 未知。
+ {0} - Java type.
+{1} - .NET member.
+
+
+ 成員 '{1}' 的傳回型別 '{0}' 無效。
+ {0} - Java type.
+{1} - .NET member.
+
+
+ 成員 '{1}' 的參數型別 '{0}' 未知。
+ {0} - Java type.
+{1} - .NET member.
+
+
+ 成員 '{1}' 的參數型別 '{0}' 無效。
+ {0} - Java type.
+{1} - .NET member.
+
+
+ Metadata.xml 元素 '{0}' 與節點相符。
+ {0} - XML transform. (example: '<remove-node path="/api/package[@name='javax.sql']"')
+The following terms should not be translated: Metadata.xml.
+
+
+ 命名空間轉換 '{0}' 無效
+ {0} - XML transform. (example: '<ns-replace source="example" replacement="Example" />')
+
+
+ Metadata.xml 元素 '{0}' 遺漏 'path' 屬性。
+ {0} - XML transform. (example: '<remove-node path="/api/package[@name='javax.sql']"')
+The following terms should not be translated: Metadata.xml, path.
+
+
+ 成員 '{1}' 的未知泛型引數限制式型別 '{0}'。
+ {0} - .NET type name
+{1} - .NET member.
+
+
+ 找不到型別 '{0}' 的基底介面 '{1}'。
+ {0}, {1} - .NET types.
+
+
+ 針對型別 '{0}',基底介面 '{1}' 無效。
+ {0}, {1} - .NET types.
+
+
+ 無法產生型別 '{0}' 的 JAVA 包裝函式。只支援 'class' 型別。
+ {0} - Java type.
+The following terms should not be translated:
+class.
+
+
+ 無法判斷型別 '{0}' 的 JNI 名稱。
+ {0} - Java type.
+The following terms should not be translated: JNI.
+
+
+ 'Name' 屬性必須是如 'com.example.MyClass' 的完整型別,但找不到 '{0}' 的套件。
+ {0} - Java type.
+The following terms should not be translated:
+Name, com.example.MyClass.
+
+
+ 無法解析介面型別 '{0}'。您是否遺失組件參考?
+ {0} - Java interface.
+
+
+ [ExportField] 只能在具有 0 個參數的方法上使用。
+ The following terms should not be translated: [ExportField].
+
+
+ [Export] 無法用於泛型型別。
+ The following terms should not be translated: [Export].
+
+
+ [Export] 無法用於泛型型別。
+ The following terms should not be translated: [ExportField].
+
+
+ [ExportField] 無法用於傳回 'void' 的方法。
+ The following terms should not be translated: [ExportField], void.
+
+
+ 無法覆寫 Kotlin 產生的方法 '{0}',因為它不是有效的 JAVA 方法名稱。此方法只能從 Kotlin 覆寫。
+ {0} - Kotlin method name.
+
+
+ 無法預先載入參考 '{0}'。
+ {0} - assembly path
+
+
+ 請至少指定一個要處理的組件。
+ The following terms should not be translated or have any capitalization changes: ASSEMBLY. This is a special case for this particular message. In most messages, "assembly" would be translated.
+
+
+ 無法建立 JAVA VM{0}{1}
+ {0} - newline, {1} - exception
+
+
+ 無法讀取設定檔檔案 '{0}'.{1}{2}
+ {0} - path, {1} - newline, {2} - exception. In this message, the term "profile" refers to a customized list of types to process.
+
+
+ 路徑 '{0}' 不存在。
+ {0} - path
+
+
+ 無法處理組件 '{0}'{1}{2}{1}{3}
+ {0} - assembly, {1} - newline, {2} - exception message, {3} exception
+
+
+ 找不到介面 {0}
+ {0} - interface name
+
+
+ 載入型別時發生例外狀況。將不會處理無法載入的型別。請確定已使用 -r 選項提供這些型別所需的任何其他組件參考。例外狀況: {0}{1}
+ {0} - newline, {1} - exception. The following terms should not be translated: -r
+
+
+ 找不到型別 '{0}'。型別將不會處理。請確定所有參考組件的目錄都是以 -L 選項提供。
+ {0} - type
+The following terms should not be translated: -L
+
+
+ 封送處理方法型別 '{0}' 已存在。已略過在組件 '{1}' 中產生封送處理方法。使用 -f 在需要時強制重新產生。
+ {0} - type, {1} - assembly name. The following terms should not be translated: -f. In this message, the term "marshal methods" refers to methods that allow interaction between the managed methods and Java methods, similar to the methods of the .NET System.Runtime.InteropServices.Marshal class.
+
+
+ 在組件中繼資料中找不到方法 '{0}' 的定義。將不會處理。請確定所有參考組件的目錄都是以 -L 選項提供。
+ {0} - method
+The following terms should not be translated: -L
+
+
+ 找不到 System.Console.WriteLine() 方法。正在停用偵錯插入。若要啟用偵錯插入,請確認已使用 -L 選項提供包含 mscorlib 的目錄。
+ The following terms should not be translated: -L
+
+
\ No newline at end of file
diff --git a/external/Java.Interop/src/Java.Interop.NamingCustomAttributes/Android.Runtime/RegisterAttribute.cs b/external/Java.Interop/src/Java.Interop.NamingCustomAttributes/Android.Runtime/RegisterAttribute.cs
new file mode 100644
index 00000000000..caa417936e8
--- /dev/null
+++ b/external/Java.Interop/src/Java.Interop.NamingCustomAttributes/Android.Runtime/RegisterAttribute.cs
@@ -0,0 +1,65 @@
+#nullable enable
+
+using System;
+
+using Mono.Cecil;
+
+namespace Android.Runtime {
+
+ [AttributeUsage (AttributeTargets.Class | AttributeTargets.Constructor | AttributeTargets.Field | AttributeTargets.Interface | AttributeTargets.Method | AttributeTargets.Property)]
+#if !JCW_ONLY_TYPE_NAMES
+ public
+#endif // !JCW_ONLY_TYPE_NAMES
+ sealed class RegisterAttribute : Attribute, Java.Interop.IJniNameProviderAttribute {
+
+ string? connector;
+ string name;
+ string? signature;
+
+ public RegisterAttribute (string name)
+ {
+ this.name = name;
+ }
+
+ public RegisterAttribute (string name, string signature, string connector)
+ : this (name)
+ {
+ this.connector = connector;
+ this.signature = signature;
+ }
+#if HAVE_CECIL
+ public RegisterAttribute (string name, CustomAttribute? originAttribute)
+ : this (name)
+ {
+ OriginAttribute = originAttribute;
+ }
+
+ public RegisterAttribute (string name, string signature, string connector, CustomAttribute? originAttribute)
+ : this (name, signature, connector)
+ {
+ OriginAttribute = originAttribute;
+ }
+
+ public CustomAttribute? OriginAttribute { get; }
+#endif // HAVE_CECIL
+
+ public string? Connector {
+ get { return connector; }
+ set { connector = value; }
+ }
+
+ public string Name {
+ get { return name; }
+ set { name = value; }
+ }
+
+ public string? Signature {
+ get { return signature; }
+ set { signature = value; }
+ }
+
+ public bool DoNotGenerateAcw {get; set;}
+
+ public int ApiSince {get; set;}
+ }
+}
diff --git a/external/Java.Interop/src/Java.Interop.NamingCustomAttributes/Java.Interop.NamingCustomAttributes.projitems b/external/Java.Interop/src/Java.Interop.NamingCustomAttributes/Java.Interop.NamingCustomAttributes.projitems
new file mode 100644
index 00000000000..42892e984ea
--- /dev/null
+++ b/external/Java.Interop/src/Java.Interop.NamingCustomAttributes/Java.Interop.NamingCustomAttributes.projitems
@@ -0,0 +1,22 @@
+
+
+
+ $(MSBuildAllProjects);$(MSBuildThisFileFullPath)
+ true
+ {FE789F04-5E95-42C5-AEF1-E33F8DF06B3F}
+
+
+ Java.Interop.NamingCustomAttributes
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/external/Java.Interop/src/Java.Interop.NamingCustomAttributes/Java.Interop/ExportAttribute.cs b/external/Java.Interop/src/Java.Interop.NamingCustomAttributes/Java.Interop/ExportAttribute.cs
new file mode 100644
index 00000000000..c2ef7ce00b4
--- /dev/null
+++ b/external/Java.Interop/src/Java.Interop.NamingCustomAttributes/Java.Interop/ExportAttribute.cs
@@ -0,0 +1,32 @@
+#nullable enable
+
+using System;
+
+namespace Java.Interop {
+
+ [Serializable]
+ [AttributeUsage (AttributeTargets.Method | AttributeTargets.Constructor,
+ AllowMultiple=false,
+ Inherited=false)]
+#if !JCW_ONLY_TYPE_NAMES
+ public
+#endif // !JCW_ONLY_TYPE_NAMES
+ partial class ExportAttribute : Attribute {
+
+ public ExportAttribute ()
+ {
+ }
+
+ public ExportAttribute (string? name)
+ {
+ Name = name;
+ }
+
+ public string? Name {get; private set;}
+ public string? SuperArgumentsString {get; set;}
+ public Type []? Throws {get; set;}
+ internal string []? ThrownNames {get; set;} // msbuild internal use
+ }
+}
+
+
diff --git a/external/Java.Interop/src/Java.Interop.NamingCustomAttributes/Java.Interop/ExportFieldAttribute.cs b/external/Java.Interop/src/Java.Interop.NamingCustomAttributes/Java.Interop/ExportFieldAttribute.cs
new file mode 100644
index 00000000000..753406e2633
--- /dev/null
+++ b/external/Java.Interop/src/Java.Interop.NamingCustomAttributes/Java.Interop/ExportFieldAttribute.cs
@@ -0,0 +1,23 @@
+using System;
+
+namespace Java.Interop {
+
+ [Serializable]
+ [AttributeUsage (AttributeTargets.Method,
+ AllowMultiple=false,
+ Inherited=false)]
+#if !JCW_ONLY_TYPE_NAMES
+ public
+#endif // !JCW_ONLY_TYPE_NAMES
+ partial class ExportFieldAttribute : Attribute {
+
+ public ExportFieldAttribute (string name)
+ {
+ Name = name;
+ }
+
+ public string Name {get; set;}
+ }
+}
+
+
diff --git a/external/Java.Interop/src/Java.Interop.NamingCustomAttributes/Java.Interop/ExportParameterAttribute.cs b/external/Java.Interop/src/Java.Interop.NamingCustomAttributes/Java.Interop/ExportParameterAttribute.cs
new file mode 100644
index 00000000000..ea6ceb6199d
--- /dev/null
+++ b/external/Java.Interop/src/Java.Interop.NamingCustomAttributes/Java.Interop/ExportParameterAttribute.cs
@@ -0,0 +1,23 @@
+using System;
+
+namespace Java.Interop {
+
+ [Serializable]
+ [AttributeUsage (AttributeTargets.Parameter | AttributeTargets.ReturnValue,
+ AllowMultiple=false,
+ Inherited=false)]
+#if !JCW_ONLY_TYPE_NAMES
+ public
+#endif // !JCW_ONLY_TYPE_NAMES
+ partial class ExportParameterAttribute : Attribute {
+
+ public ExportParameterAttribute (ExportParameterKind kind)
+ {
+ Kind = kind;
+ }
+
+ public ExportParameterKind Kind { get; private set; }
+ }
+}
+
+
diff --git a/external/Java.Interop/src/Java.Interop.NamingCustomAttributes/Java.Interop/ExportParameterKind.cs b/external/Java.Interop/src/Java.Interop.NamingCustomAttributes/Java.Interop/ExportParameterKind.cs
new file mode 100644
index 00000000000..b3c9b5e2b37
--- /dev/null
+++ b/external/Java.Interop/src/Java.Interop.NamingCustomAttributes/Java.Interop/ExportParameterKind.cs
@@ -0,0 +1,12 @@
+namespace Java.Interop {
+#if !JCW_ONLY_TYPE_NAMES
+ public
+#endif // !JCW_ONLY_TYPE_NAMES
+ enum ExportParameterKind {
+ Unspecified,
+ InputStream,
+ OutputStream,
+ XmlPullParser,
+ XmlResourceParser
+ }
+}
diff --git a/external/Java.Interop/src/Java.Interop.NamingCustomAttributes/Java.Interop/IJniNameProviderAttribute.cs b/external/Java.Interop/src/Java.Interop.NamingCustomAttributes/Java.Interop/IJniNameProviderAttribute.cs
new file mode 100644
index 00000000000..fb8e3c6babe
--- /dev/null
+++ b/external/Java.Interop/src/Java.Interop.NamingCustomAttributes/Java.Interop/IJniNameProviderAttribute.cs
@@ -0,0 +1,11 @@
+using System;
+namespace Java.Interop
+{
+#if !JCW_ONLY_TYPE_NAMES
+ public
+#endif // !JCW_ONLY_TYPE_NAMES
+ interface IJniNameProviderAttribute
+ {
+ string Name { get; }
+ }
+}
diff --git a/external/Java.Interop/src/Java.Interop.Tools.Cecil/Java.Interop.Tools.Cecil.csproj b/external/Java.Interop/src/Java.Interop.Tools.Cecil/Java.Interop.Tools.Cecil.csproj
new file mode 100644
index 00000000000..949defc3ba9
--- /dev/null
+++ b/external/Java.Interop/src/Java.Interop.Tools.Cecil/Java.Interop.Tools.Cecil.csproj
@@ -0,0 +1,27 @@
+
+
+
+ netstandard2.0
+ enable
+ true
+ ..\..\product.snk
+
+
+
+
+
+ $(ToolOutputFullPath)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/external/Java.Interop/src/Java.Interop.Tools.Cecil/Java.Interop.Tools.Cecil/CustomAttributeProviderRocks.cs b/external/Java.Interop/src/Java.Interop.Tools.Cecil/Java.Interop.Tools.Cecil/CustomAttributeProviderRocks.cs
new file mode 100644
index 00000000000..11b49859397
--- /dev/null
+++ b/external/Java.Interop/src/Java.Interop.Tools.Cecil/Java.Interop.Tools.Cecil/CustomAttributeProviderRocks.cs
@@ -0,0 +1,48 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+
+using Mono.Cecil;
+
+namespace Java.Interop.Tools.Cecil {
+
+ public static class CustomAttributeProviderRocks
+ {
+ public static bool AnyCustomAttributes (this ICustomAttributeProvider item, Type attribute) =>
+ item.AnyCustomAttributes (attribute.FullName);
+
+ public static IEnumerable GetCustomAttributes (this ICustomAttributeProvider item, Type attribute)
+ {
+ return item.GetCustomAttributes (attribute.FullName);
+ }
+
+ public static bool AnyCustomAttributes (this ICustomAttributeProvider item, string attribute_fullname)
+ {
+ foreach (CustomAttribute custom_attribute in item.CustomAttributes) {
+ if (custom_attribute.Constructor.DeclaringType.FullName == attribute_fullname)
+ return true;
+ }
+ return false;
+ }
+
+ public static IEnumerable GetCustomAttributes (this ICustomAttributeProvider item, string attribute_fullname)
+ {
+ foreach (CustomAttribute custom_attribute in item.CustomAttributes) {
+ if (custom_attribute.Constructor.DeclaringType.FullName != attribute_fullname)
+ continue;
+
+ yield return custom_attribute;
+ }
+ }
+
+ public static IEnumerable GetCustomAttributes (this IEnumerable items, Type attribute)
+ {
+ return items.GetCustomAttributes (attribute.FullName);
+ }
+
+ public static IEnumerable GetCustomAttributes (this IEnumerable items, string attribute_fullname)
+ {
+ return items.SelectMany (e => e.GetCustomAttributes (attribute_fullname));
+ }
+ }
+}
diff --git a/external/Java.Interop/src/Java.Interop.Tools.Cecil/Java.Interop.Tools.Cecil/DirectoryAssemblyResolver.cs b/external/Java.Interop/src/Java.Interop.Tools.Cecil/Java.Interop.Tools.Cecil/DirectoryAssemblyResolver.cs
new file mode 100644
index 00000000000..0fd3c37e516
--- /dev/null
+++ b/external/Java.Interop/src/Java.Interop.Tools.Cecil/Java.Interop.Tools.Cecil/DirectoryAssemblyResolver.cs
@@ -0,0 +1,354 @@
+//
+// AssemblyResolver.cs
+//
+// Author:
+// Jb Evain (jbevain@novell.com)
+// Jonathan Pryor (jpryor@novell.com)
+//
+// (C) 2010 Novell, Inc.
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Diagnostics;
+using System.Collections;
+using System.Collections.Generic;
+using System.IO;
+using System.IO.MemoryMappedFiles;
+using System.Linq;
+using System.Reflection;
+
+using Java.Interop.Tools.Diagnostics;
+
+using Mono.Cecil;
+using Mono.Cecil.Cil;
+
+namespace Java.Interop.Tools.Cecil {
+
+ public static class AssemblyResolverCoda {
+
+ public static AssemblyDefinition GetAssembly (this IAssemblyResolver resolver, string fileName)
+ {
+ return resolver.Resolve (AssemblyNameReference.Parse (Path.GetFileNameWithoutExtension (fileName)));
+ }
+ }
+
+ /*
+ * IAssemblyResolver which looks for assembly references within
+ * DirectoryAssemblyResolver.SearchDirectories, in SearchDirectories order.
+ *
+ * Can't use Mono.Cecil.BaseAssemblyResolver as that special-cases
+ * mscorlib.dll and tries a directory based on
+ * `typeof (object).Module.FullyQualifiedName`, which will never be valid.
+ */
+ public class DirectoryAssemblyResolver : IAssemblyResolver {
+
+ public ICollection SearchDirectories {get; private set;}
+
+ readonly List viewStreams = new List ();
+ Dictionary cache;
+ bool loadDebugSymbols;
+ Action logger;
+
+ ReaderParameters loadReaderParameters;
+
+ static readonly ReaderParameters DefaultLoadReaderParameters = new ReaderParameters {
+ };
+
+ [Obsolete ("Use DirectoryAssemblyResolver(Action, bool, ReaderParameters)")]
+ public DirectoryAssemblyResolver (Action logWarnings, bool loadDebugSymbols, ReaderParameters? loadReaderParameters = null)
+ : this ((TraceLevel level, string value) => logWarnings?.Invoke ("{0}", new[]{value}), loadDebugSymbols, loadReaderParameters)
+ {
+ if (logWarnings == null)
+ throw new ArgumentNullException (nameof (logWarnings));
+ }
+
+ public DirectoryAssemblyResolver (Action logger, bool loadDebugSymbols, ReaderParameters? loadReaderParameters = null)
+ {
+ if (logger == null)
+ throw new ArgumentNullException (nameof (logger));
+ cache = new Dictionary ();
+ this.loadDebugSymbols = loadDebugSymbols;
+ this.logger = logger;
+ SearchDirectories = new List ();
+ this.loadReaderParameters = loadReaderParameters ?? DefaultLoadReaderParameters;
+ }
+
+ public void Dispose ()
+ {
+ Dispose (disposing: true);
+ GC.SuppressFinalize (this);
+ }
+
+ protected virtual void Dispose (bool disposing)
+ {
+ if (!disposing || cache == null)
+ return;
+ foreach (var e in cache) {
+ e.Value?.Dispose ();
+ }
+ cache.Clear ();
+ foreach (var viewStream in viewStreams) {
+ viewStream.Dispose ();
+ }
+ viewStreams.Clear ();
+ }
+
+ public Dictionary ToResolverCache ()
+ {
+ return new Dictionary(cache);
+ }
+
+ public bool AddToCache (AssemblyDefinition assembly)
+ {
+ var name = Path.GetFileNameWithoutExtension (assembly.MainModule.FileName);
+
+ if (cache.ContainsKey (name))
+ return false;
+
+ cache [name] = assembly;
+
+ return true;
+ }
+
+ public virtual AssemblyDefinition? Load (string fileName, bool forceLoad = false)
+ {
+ AssemblyDefinition? assembly = null;
+ var name = Path.GetFileNameWithoutExtension (fileName);
+ if (!forceLoad && cache.TryGetValue (name, out assembly))
+ return assembly;
+
+ try {
+ assembly = ReadAssembly (fileName);
+ } catch (Exception e) when (e is FileNotFoundException || e is DirectoryNotFoundException) {
+ // These are ok, we can return null
+ return null;
+ } catch (Exception e) {
+ Diagnostic.Error (9, e, Localization.Resources.CecilResolver_XA0009, fileName);
+ }
+ cache [name] = assembly;
+ return assembly;
+ }
+
+ protected virtual AssemblyDefinition ReadAssembly (string file)
+ {
+ var reader_parameters = new ReaderParameters () {
+ ApplyWindowsRuntimeProjections = loadReaderParameters.ApplyWindowsRuntimeProjections,
+ AssemblyResolver = this,
+ MetadataImporterProvider = loadReaderParameters.MetadataImporterProvider,
+ InMemory = loadReaderParameters.InMemory,
+ MetadataResolver = loadReaderParameters.MetadataResolver,
+ ReadingMode = loadReaderParameters.ReadingMode,
+ ReadWrite = loadReaderParameters.ReadWrite,
+ ReflectionImporterProvider = loadReaderParameters.ReflectionImporterProvider,
+ SymbolReaderProvider = loadReaderParameters.SymbolReaderProvider,
+ };
+ try {
+ return LoadFromMemoryMappedFile (file, reader_parameters, loadDebugSymbols);
+ } catch (Exception ex) {
+ if (!loadDebugSymbols)
+ throw;
+ logger (
+ TraceLevel.Verbose,
+ $"Failed to read '{file}' with debugging symbols. Retrying to load it without it. Error details are logged below.");
+ logger (TraceLevel.Verbose, ex.ToString ());
+ reader_parameters.ReadSymbols = false;
+ return LoadFromMemoryMappedFile (file, reader_parameters, loadSymbols: false);
+ } finally {
+ reader_parameters.SymbolStream?.Dispose ();
+ }
+ }
+
+ AssemblyDefinition LoadFromMemoryMappedFile (string file, ReaderParameters options, bool loadSymbols)
+ {
+ // We can't use MemoryMappedFile when ReadWrite is true
+ if (options.ReadWrite) {
+ if (loadSymbols) {
+ LoadSymbols (file, options, File.OpenRead);
+ }
+ return AssemblyDefinition.ReadAssembly (file, options);
+ }
+
+ // We know the capacity for disposables
+ var disposables = new List (
+ (1 + (loadSymbols ? 1 : 0)) * OpenMemoryMappedViewStream_disposables_Add_calls);
+ try {
+ if (loadSymbols) {
+ LoadSymbols (file, options, f => OpenMemoryMappedViewStream (f, disposables));
+ }
+
+ var viewStream = OpenMemoryMappedViewStream (file, disposables);
+ AssemblyDefinition result = ModuleDefinition.ReadModule (viewStream, options).Assembly;
+
+ // Transfer ownership to `viewStreams` collection
+ viewStreams.Add (viewStream);
+ disposables.Remove (viewStream);
+ if (options.SymbolStream is MemoryMappedViewStream m) {
+ viewStreams.Add (m);
+ disposables.Remove (m);
+ options.SymbolStream = null; // Prevents caller from disposing
+ }
+ return result;
+ } finally {
+ for (int i = disposables.Count - 1; i >= 0; i--) {
+ disposables [i].Dispose ();
+ }
+ }
+ }
+
+ static void LoadSymbols (string assemblyPath, ReaderParameters options, Func getStream)
+ {
+ var symbolStream = options.SymbolStream;
+ if (symbolStream == null) {
+ var symbolPath = Path.ChangeExtension (assemblyPath, ".pdb");
+ if (File.Exists (symbolPath)) {
+ symbolStream = getStream (symbolPath);
+ }
+ }
+ options.ReadSymbols = symbolStream != null;
+ options.SymbolStream = symbolStream;
+ }
+
+ ///
+ /// Number of times OpenMemoryMappedViewStream() calls disposables.Add()
+ ///
+ const int OpenMemoryMappedViewStream_disposables_Add_calls = 3;
+
+ static MemoryMappedViewStream OpenMemoryMappedViewStream (string file, List disposables)
+ {
+ // Create stream because CreateFromFile(string, ...) uses FileShare.None which is too strict
+ var fileStream = new FileStream (file, FileMode.Open, FileAccess.Read, FileShare.Read, 4096, useAsync: false);
+ disposables.Add (fileStream);
+
+ var mappedFile = MemoryMappedFile.CreateFromFile (
+ fileStream, null, fileStream.Length, MemoryMappedFileAccess.Read, HandleInheritability.None, leaveOpen: true);
+ disposables.Add (mappedFile);
+
+ var viewStream = mappedFile.CreateViewStream (0, 0, MemoryMappedFileAccess.Read);
+ disposables.Add (viewStream);
+
+ return viewStream;
+ }
+
+ public AssemblyDefinition GetAssembly (string fileName)
+ {
+ return Resolve (Path.GetFileNameWithoutExtension (fileName));
+ }
+
+ public AssemblyDefinition Resolve (string fullName)
+ {
+ return Resolve (fullName, null);
+ }
+
+ public AssemblyDefinition Resolve (string fullName, ReaderParameters? parameters)
+ {
+ return Resolve (AssemblyNameReference.Parse (fullName), parameters);
+ }
+
+ public AssemblyDefinition Resolve (AssemblyNameReference reference)
+ {
+ return Resolve (reference, null);
+ }
+
+ public string FindAssemblyFile (string fullName)
+ {
+ return FindAssemblyFile (AssemblyNameReference.Parse (fullName));
+ }
+
+ public string FindAssemblyFile (AssemblyNameReference reference)
+ {
+ var name = reference.Name;
+
+ string? assembly;
+ foreach (var dir in SearchDirectories)
+ if ((assembly = SearchDirectory (name, dir)) != null)
+ return assembly;
+
+ throw new System.IO.FileNotFoundException (
+ string.Format ("Could not load assembly '{0}, Version={1}, Culture={2}, PublicKeyToken={3}'. Perhaps it doesn't exist in the Mono for Android profile?",
+ name,
+ reference.Version,
+ string.IsNullOrEmpty (reference.Culture) ? "neutral" : reference.Culture,
+ reference.PublicKeyToken == null
+ ? "null"
+ : string.Join ("", reference.PublicKeyToken.Select(b => b.ToString ("x2")))),
+ name + ".dll");
+ }
+
+ public AssemblyDefinition Resolve (AssemblyNameReference reference, ReaderParameters? parameters)
+ {
+ var name = reference.Name;
+
+ AssemblyDefinition? assembly;
+ if (cache.TryGetValue (name, out assembly)) {
+ if (assembly is null)
+ throw CreateLoadException (reference);
+
+ return assembly;
+ }
+
+ string? assemblyFile;
+ AssemblyDefinition? candidate = null;
+ foreach (var dir in SearchDirectories) {
+ if ((assemblyFile = SearchDirectory (name, dir)) != null) {
+ var loaded = Load (assemblyFile);
+ if (Array.Equals (loaded?.Name.MetadataToken, reference.MetadataToken))
+ return loaded;
+ candidate = candidate ?? loaded;
+ }
+ }
+ // signature mismatch, but return it as it used to do.
+ if (candidate != null)
+ return candidate;
+
+ throw CreateLoadException (reference);
+ }
+
+ static FileNotFoundException CreateLoadException (AssemblyNameReference reference)
+ {
+ return new System.IO.FileNotFoundException (
+ string.Format ("Could not load assembly '{0}, Version={1}, Culture={2}, PublicKeyToken={3}'. Perhaps it doesn't exist in the Mono for Android profile?",
+ reference.Name,
+ reference.Version,
+ string.IsNullOrEmpty (reference.Culture) ? "neutral" : reference.Culture,
+ reference.PublicKeyToken == null
+ ? "null"
+ : string.Join ("", reference.PublicKeyToken.Select (b => b.ToString ("x2")))),
+ reference.Name + ".dll");
+ }
+
+ string? SearchDirectory (string name, string directory)
+ {
+ if (Path.IsPathRooted (name) && File.Exists (name))
+ return name;
+
+ var file = Path.Combine (directory, name + ".dll");
+ if (File.Exists (file))
+ return file;
+
+ file = Path.Combine (directory, name + ".exe");
+ if (File.Exists (file))
+ return file;
+
+ return null;
+ }
+ }
+}
diff --git a/external/Java.Interop/src/Java.Interop.Tools.Cecil/Java.Interop.Tools.Cecil/MethodDefinitionRocks.cs b/external/Java.Interop/src/Java.Interop.Tools.Cecil/Java.Interop.Tools.Cecil/MethodDefinitionRocks.cs
new file mode 100644
index 00000000000..cdbdcaf0210
--- /dev/null
+++ b/external/Java.Interop/src/Java.Interop.Tools.Cecil/Java.Interop.Tools.Cecil/MethodDefinitionRocks.cs
@@ -0,0 +1,136 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+
+using Mono.Cecil;
+using Mono.Collections.Generic;
+
+namespace Java.Interop.Tools.Cecil {
+
+ public static class MethodDefinitionRocks
+ {
+ [Obsolete ("Use the TypeDefinitionCache overload for better performance.", error: true)]
+ public static MethodDefinition GetBaseDefinition (this MethodDefinition method) => throw new NotSupportedException ();
+
+ public static MethodDefinition GetBaseDefinition (this MethodDefinition method, TypeDefinitionCache cache) =>
+ GetBaseDefinition (method, (IMetadataResolver) cache);
+
+ public static MethodDefinition GetBaseDefinition (this MethodDefinition method, IMetadataResolver resolver)
+ {
+ if (method.IsStatic || method.IsNewSlot || !method.IsVirtual)
+ return method;
+
+ foreach (var baseType in method.DeclaringType.GetBaseTypes (resolver)) {
+ foreach (var m in baseType.Methods) {
+ if (!m.IsConstructor &&
+ m.Name == method.Name &&
+ (m.IsVirtual || m.IsAbstract) &&
+ AreParametersCompatibleWith (m.Parameters, method.Parameters, resolver)) {
+ return m;
+ }
+ }
+ }
+ return method;
+ }
+
+ [Obsolete ("Use the TypeDefinitionCache overload for better performance.", error: true)]
+ public static IEnumerable GetOverriddenMethods (MethodDefinition method, bool inherit) => throw new NotSupportedException ();
+
+ public static IEnumerable GetOverriddenMethods (MethodDefinition method, bool inherit, TypeDefinitionCache cache) =>
+ GetOverriddenMethods (method, inherit, (IMetadataResolver) cache);
+
+ public static IEnumerable GetOverriddenMethods (MethodDefinition method, bool inherit, IMetadataResolver resolver)
+ {
+ yield return method;
+ if (inherit) {
+ MethodDefinition baseMethod = method;
+ while ((baseMethod = method.GetBaseDefinition (resolver)) != null && baseMethod != method) {
+ yield return method;
+ method = baseMethod;
+ }
+ }
+ }
+
+ [Obsolete ("Use the TypeDefinitionCache overload for better performance.", error: true)]
+ public static bool AreParametersCompatibleWith (this Collection a, Collection b) => throw new NotSupportedException ();
+
+ public static bool AreParametersCompatibleWith (this Collection a, Collection b, TypeDefinitionCache cache) =>
+ AreParametersCompatibleWith (a, b, (IMetadataResolver) cache);
+
+ public static bool AreParametersCompatibleWith (this Collection a, Collection b, IMetadataResolver resolver)
+ {
+ if (a.Count != b.Count)
+ return false;
+
+ if (a.Count == 0)
+ return true;
+
+ for (int i = 0; i < a.Count; i++)
+ if (!IsParameterCompatibleWith (a [i].ParameterType, b [i].ParameterType, resolver))
+ return false;
+
+ return true;
+ }
+
+ static bool IsParameterCompatibleWith (IModifierType a, IModifierType b, IMetadataResolver cache)
+ {
+ if (!IsParameterCompatibleWith (a.ModifierType, b.ModifierType, cache))
+ return false;
+
+ return IsParameterCompatibleWith (a.ElementType, b.ElementType, cache);
+ }
+
+ static bool IsParameterCompatibleWith (TypeSpecification a, TypeSpecification b, IMetadataResolver cache)
+ {
+ if (a is GenericInstanceType)
+ return IsParameterCompatibleWith ((GenericInstanceType) a, (GenericInstanceType) b, cache);
+
+ if (a is IModifierType)
+ return IsParameterCompatibleWith ((IModifierType) a, (IModifierType) b, cache);
+
+ return IsParameterCompatibleWith (a.ElementType, b.ElementType, cache);
+ }
+
+ static bool IsParameterCompatibleWith (GenericInstanceType a, GenericInstanceType b, IMetadataResolver cache)
+ {
+ if (!IsParameterCompatibleWith (a.ElementType, b.ElementType, cache))
+ return false;
+
+ if (a.GenericArguments.Count != b.GenericArguments.Count)
+ return false;
+
+ if (a.GenericArguments.Count == 0)
+ return true;
+
+ for (int i = 0; i < a.GenericArguments.Count; i++)
+ if (!IsParameterCompatibleWith (a.GenericArguments [i], b.GenericArguments [i], cache))
+ return false;
+
+ return true;
+ }
+
+ static bool IsParameterCompatibleWith (TypeReference a, TypeReference b, IMetadataResolver cache)
+ {
+ if (a is TypeSpecification || b is TypeSpecification) {
+ if (a.GetType () != b.GetType ())
+ return false;
+
+ return IsParameterCompatibleWith ((TypeSpecification) a, (TypeSpecification) b, cache);
+ }
+
+ if (a.IsGenericParameter) {
+ if (b.IsGenericParameter && a.Name == b.Name)
+ return true;
+ var gpa = (GenericParameter) a;
+ foreach (var c in gpa.Constraints) {
+ if (!c.ConstraintType.IsAssignableFrom (b, cache))
+ return false;
+ }
+ return true;
+ }
+
+ return a.FullName == b.FullName;
+ }
+ }
+}
+
diff --git a/external/Java.Interop/src/Java.Interop.Tools.Cecil/Java.Interop.Tools.Cecil/NullableReferenceTypesRocks.cs b/external/Java.Interop/src/Java.Interop.Tools.Cecil/Java.Interop.Tools.Cecil/NullableReferenceTypesRocks.cs
new file mode 100644
index 00000000000..d9cf70f36de
--- /dev/null
+++ b/external/Java.Interop/src/Java.Interop.Tools.Cecil/Java.Interop.Tools.Cecil/NullableReferenceTypesRocks.cs
@@ -0,0 +1,121 @@
+using System;
+using System.Linq;
+using Mono.Cecil;
+using Mono.Collections.Generic;
+
+namespace Java.Interop.Tools.Cecil
+{
+ // Partial support for determining NRT status of method and field types.
+ // Reference: https://github.com/dotnet/roslyn/blob/main/docs/features/nullable-metadata.md
+ // The basics are supported, but advanced annotations like array elements,
+ // type parameters, and tuples are not supported. Our use case doesn't really need them.
+ public static class NullableReferenceTypesRocks
+ {
+ public static Nullability GetTypeNullability (this FieldDefinition field)
+ {
+ if (field.FieldType.FullName == "System.Void")
+ return Nullability.NotNull;
+
+ // Look for explicit annotation on field
+ var metadata = NullableMetadata.FromAttributeCollection (field.CustomAttributes);
+
+ if (metadata != null)
+ return (Nullability) metadata.Data [0];
+
+ // Default nullability status for type
+ return GetNullableContext (field.DeclaringType.CustomAttributes);
+ }
+
+ public static Nullability GetReturnTypeNullability (this MethodDefinition method)
+ {
+ if (method.MethodReturnType.ReturnType.FullName == "System.Void")
+ return Nullability.NotNull;
+
+ // Look for explicit annotation on return type
+ var metadata = NullableMetadata.FromAttributeCollection (method.MethodReturnType.CustomAttributes);
+
+ if (metadata != null)
+ return (Nullability) metadata.Data [0];
+
+ // Default nullability status for method
+ var nullable = GetNullableContext (method.CustomAttributes);
+
+ if (nullable != Nullability.Oblivous)
+ return nullable;
+
+ // Default nullability status for type
+ return GetNullableContext (method.DeclaringType.CustomAttributes);
+ }
+
+ public static Nullability GetTypeNullability (this ParameterDefinition parameter, MethodDefinition method)
+ {
+ if (parameter.ParameterType.FullName == "System.Void")
+ return Nullability.NotNull;
+
+ // Look for explicit annotation on parameter
+ var metadata = NullableMetadata.FromAttributeCollection (parameter.CustomAttributes);
+
+ if (metadata != null)
+ return (Nullability) metadata.Data [0];
+
+ // Default nullability status for method
+ var nullable = GetNullableContext (method.CustomAttributes);
+
+ if (nullable != Nullability.Oblivous)
+ return nullable;
+
+ // Default nullability status for type
+ return GetNullableContext (method.DeclaringType.CustomAttributes);
+ }
+
+ static Nullability GetNullableContext (Collection attrs)
+ {
+ var attribute = attrs.FirstOrDefault (t => t.AttributeType.FullName == "System.Runtime.CompilerServices.NullableContextAttribute");
+
+ if (attribute != null)
+ return (Nullability) (byte) attribute.ConstructorArguments.First ().Value;
+
+ return Nullability.Oblivous;
+ }
+ }
+
+ public enum Nullability
+ {
+ Oblivous,
+ NotNull,
+ Nullable
+ }
+
+ class NullableMetadata
+ {
+ public byte [] Data { get; private set; }
+
+ NullableMetadata (byte [] data) => Data = data;
+
+ NullableMetadata (byte data) => Data = new [] { data };
+
+ public static NullableMetadata? FromAttributeCollection (Collection attrs)
+ {
+ if (attrs is null)
+ return null;
+
+ var attribute = attrs.FirstOrDefault (t => t.AttributeType.FullName == "System.Runtime.CompilerServices.NullableAttribute");
+
+ if (attribute is null)
+ return null;
+
+ var ctor_arg = attribute.ConstructorArguments.First ();
+
+ if (ctor_arg.Value is CustomAttributeArgument [] caa)
+ ctor_arg = caa [0];
+
+ if (ctor_arg.Value is byte b)
+ return new NullableMetadata (b);
+
+ if (ctor_arg.Value is byte [] b2)
+ return new NullableMetadata (b2);
+
+ return null;
+ }
+ }
+}
diff --git a/external/Java.Interop/src/Java.Interop.Tools.Cecil/Java.Interop.Tools.Cecil/TypeDefinitionCache.cs b/external/Java.Interop/src/Java.Interop.Tools.Cecil/Java.Interop.Tools.Cecil/TypeDefinitionCache.cs
new file mode 100644
index 00000000000..c402b44e578
--- /dev/null
+++ b/external/Java.Interop/src/Java.Interop.Tools.Cecil/Java.Interop.Tools.Cecil/TypeDefinitionCache.cs
@@ -0,0 +1,37 @@
+using System.Collections.Generic;
+using Mono.Cecil;
+
+namespace Java.Interop.Tools.Cecil
+{
+ ///
+ /// A class for caching lookups from TypeReference -> TypeDefinition.
+ /// Generally its lifetime should match an AssemblyResolver instance.
+ ///
+ public class TypeDefinitionCache : IMetadataResolver
+ {
+ readonly Dictionary types = new Dictionary ();
+ readonly Dictionary fields = new Dictionary ();
+ readonly Dictionary methods = new Dictionary ();
+
+ public virtual TypeDefinition? Resolve (TypeReference typeReference)
+ {
+ if (types.TryGetValue (typeReference, out var typeDefinition))
+ return typeDefinition;
+ return types [typeReference] = typeReference.Resolve ();
+ }
+
+ public virtual FieldDefinition? Resolve (FieldReference field)
+ {
+ if (fields.TryGetValue (field, out var fieldDefinition))
+ return fieldDefinition;
+ return fields [field] = field.Resolve ();
+ }
+
+ public virtual MethodDefinition? Resolve (MethodReference method)
+ {
+ if (methods.TryGetValue (method, out var methodDefinition))
+ return methodDefinition;
+ return methods [method] = method.Resolve ();
+ }
+ }
+}
diff --git a/external/Java.Interop/src/Java.Interop.Tools.Cecil/Java.Interop.Tools.Cecil/TypeDefinitionRocks.cs b/external/Java.Interop/src/Java.Interop.Tools.Cecil/Java.Interop.Tools.Cecil/TypeDefinitionRocks.cs
new file mode 100644
index 00000000000..2873b4b7d6a
--- /dev/null
+++ b/external/Java.Interop/src/Java.Interop.Tools.Cecil/Java.Interop.Tools.Cecil/TypeDefinitionRocks.cs
@@ -0,0 +1,202 @@
+using System;
+using System.Collections.Generic;
+
+using Mono.Cecil;
+
+namespace Java.Interop.Tools.Cecil {
+
+ public static class TypeDefinitionRocks {
+
+ [Obsolete ("Use the TypeDefinitionCache overload for better performance.", error: true)]
+ public static TypeDefinition? GetBaseType (this TypeDefinition type) => throw new NotSupportedException ();
+
+ public static TypeDefinition? GetBaseType (this TypeDefinition type, TypeDefinitionCache cache) =>
+ GetBaseType (type, (IMetadataResolver) cache);
+
+ public static TypeDefinition? GetBaseType (this TypeDefinition type, IMetadataResolver resolver)
+ {
+ var bt = type.BaseType;
+ if (bt == null)
+ return null;
+ return resolver.Resolve (bt);
+ }
+
+ [Obsolete ("Use the TypeDefinitionCache overload for better performance.", error: true)]
+ public static IEnumerable GetTypeAndBaseTypes (this TypeDefinition type) => throw new NotSupportedException ();
+
+ public static IEnumerable GetTypeAndBaseTypes (this TypeDefinition type, TypeDefinitionCache cache) =>
+ GetTypeAndBaseTypes (type, (IMetadataResolver) cache);
+
+ public static IEnumerable GetTypeAndBaseTypes (this TypeDefinition type, IMetadataResolver resolver)
+ {
+ TypeDefinition? t = type;
+
+ while (t != null) {
+ yield return t;
+ t = t.GetBaseType (resolver);
+ }
+ }
+
+ [Obsolete ("Use the TypeDefinitionCache overload for better performance.", error: true)]
+ public static IEnumerable GetBaseTypes (this TypeDefinition type) => throw new NotSupportedException();
+
+ public static IEnumerable GetBaseTypes (this TypeDefinition type, TypeDefinitionCache cache) =>
+ GetBaseTypes (type, (IMetadataResolver) cache);
+
+ public static IEnumerable GetBaseTypes (this TypeDefinition type, IMetadataResolver resolver)
+ {
+ TypeDefinition? t = type;
+
+ while ((t = t.GetBaseType (resolver)) != null) {
+ yield return t;
+ }
+ }
+
+ [Obsolete ("Use the TypeDefinitionCache overload for better performance.", error: true)]
+ public static bool IsAssignableFrom (this TypeReference type, TypeReference c) => throw new NotSupportedException ();
+
+ public static bool IsAssignableFrom (this TypeReference type, TypeReference c, TypeDefinitionCache cache) =>
+ IsAssignableFrom (type, c, (IMetadataResolver) cache);
+
+ public static bool IsAssignableFrom (this TypeReference type, TypeReference c, IMetadataResolver resolver)
+ {
+ if (type.FullName == c.FullName)
+ return true;
+ var d = resolver.Resolve (c);
+ if (d == null)
+ return false;
+ foreach (var t in d.GetTypeAndBaseTypes (resolver)) {
+ if (type.FullName == t.FullName)
+ return true;
+ foreach (var ifaceImpl in t.Interfaces) {
+ var i = ifaceImpl.InterfaceType;
+ if (IsAssignableFrom (type, i, resolver))
+ return true;
+ }
+ }
+ return false;
+ }
+
+ [Obsolete ("Use the TypeDefinitionCache overload for better performance.", error: true)]
+ public static bool IsSubclassOf (this TypeDefinition type, string typeName) => throw new NotSupportedException ();
+
+ public static bool IsSubclassOf (this TypeDefinition type, string typeName, TypeDefinitionCache cache) =>
+ IsSubclassOf (type, typeName, (IMetadataResolver) cache);
+ public static bool IsSubclassOf (this TypeDefinition type, string typeName, IMetadataResolver resolver)
+ {
+ foreach (var t in type.GetTypeAndBaseTypes (resolver)) {
+ if (t.FullName == typeName) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ public static bool HasJavaPeer (this TypeDefinition type, IMetadataResolver resolver)
+ {
+ if (type.IsInterface && type.ImplementsInterface ("Java.Interop.IJavaPeerable", resolver))
+ return true;
+
+ foreach (var t in type.GetTypeAndBaseTypes (resolver)) {
+ switch (t.FullName) {
+ case "Java.Lang.Object":
+ case "Java.Lang.Throwable":
+ case "Java.Interop.JavaObject":
+ case "Java.Interop.JavaException":
+ return true;
+ default:
+ break;
+ }
+ }
+ return false;
+ }
+
+ [Obsolete ("Use the TypeDefinitionCache overload for better performance.", error: true)]
+ public static bool ImplementsInterface (this TypeDefinition type, string interfaceName) => throw new NotSupportedException ();
+
+ public static bool ImplementsInterface (this TypeDefinition type, string interfaceName, TypeDefinitionCache cache) =>
+ ImplementsInterface (type, interfaceName, (IMetadataResolver) cache);
+
+ public static bool ImplementsInterface (this TypeDefinition type, string interfaceName, IMetadataResolver resolver)
+ {
+ foreach (var t in type.GetTypeAndBaseTypes (resolver)) {
+ foreach (var i in t.Interfaces) {
+ if (i.InterfaceType.FullName == interfaceName) {
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+
+ [Obsolete ("Use the TypeDefinitionCache overload for better performance.", error: true)]
+ public static string GetPartialAssemblyName (this TypeReference type) => throw new NotSupportedException ();
+
+ public static string GetPartialAssemblyName (this TypeReference type, TypeDefinitionCache cache) =>
+ GetPartialAssemblyName (type, (IMetadataResolver) cache);
+
+ public static string GetPartialAssemblyName (this TypeReference type, IMetadataResolver resolver)
+ {
+ TypeDefinition? def = resolver.Resolve (type);
+ return (def ?? type).Module.Assembly.Name.Name;
+ }
+
+ [Obsolete ("Use the TypeDefinitionCache overload for better performance.", error: true)]
+ public static string GetPartialAssemblyQualifiedName (this TypeReference type) => throw new NotSupportedException ();
+
+ public static string GetPartialAssemblyQualifiedName (this TypeReference type, TypeDefinitionCache cache) =>
+ GetPartialAssemblyQualifiedName (type, (IMetadataResolver) cache);
+
+ public static string GetPartialAssemblyQualifiedName (this TypeReference type, IMetadataResolver resolver)
+ {
+ return string.Format ("{0}, {1}",
+ // Cecil likes to use '/' as the nested type separator, while
+ // Reflection uses '+' as the nested type separator. Use Reflection.
+ CecilTypeNameToReflectionTypeName (type.FullName),
+ type.GetPartialAssemblyName (resolver));
+ }
+
+ [Obsolete ("Use the TypeDefinitionCache overload for better performance.", error: true)]
+ public static string GetAssemblyQualifiedName (this TypeReference type) => throw new NotSupportedException ();
+
+ public static string GetAssemblyQualifiedName (this TypeReference type, TypeDefinitionCache cache) =>
+ GetAssemblyQualifiedName (type, (IMetadataResolver) cache);
+
+ public static string GetAssemblyQualifiedName (this TypeReference type, IMetadataResolver resolver)
+ {
+ TypeDefinition? def = resolver.Resolve (type);
+ return string.Format ("{0}, {1}",
+ // Cecil likes to use '/' as the nested type separator, while
+ // Reflection uses '+' as the nested type separator. Use Reflection.
+ CecilTypeNameToReflectionTypeName (type.FullName),
+ (def ?? type).Module.Assembly.Name.FullName);
+ }
+
+ public static TypeDefinition? GetNestedType (this TypeDefinition type, string name)
+ {
+ if (type == null)
+ return null;
+
+ foreach (TypeDefinition t in type.NestedTypes)
+ if (t.Name == name || t.FullName == name)
+ return t;
+
+ return null;
+ }
+
+ // Note: this is not recursive, so it will not find nested types.
+ public static TypeDefinition? FindType (this ModuleDefinition module, string name)
+ {
+ if (module == null)
+ return null;
+
+ foreach (TypeDefinition t in module.Types)
+ if (t.Name == name || t.FullName == name)
+ return t;
+
+ return null;
+ }
+
+ public static string? CecilTypeNameToReflectionTypeName (string? typeName) => typeName?.Replace ('/', '+');
+ }
+}
diff --git a/external/Java.Interop/src/Java.Interop.Tools.Diagnostics/Java.Interop.Tools.Diagnostics.csproj b/external/Java.Interop/src/Java.Interop.Tools.Diagnostics/Java.Interop.Tools.Diagnostics.csproj
new file mode 100644
index 00000000000..8e4c99f324b
--- /dev/null
+++ b/external/Java.Interop/src/Java.Interop.Tools.Diagnostics/Java.Interop.Tools.Diagnostics.csproj
@@ -0,0 +1,22 @@
+
+
+
+ netstandard2.0
+ enable
+ true
+ ..\..\product.snk
+
+
+
+
+
+ $(ToolOutputFullPath)
+
+
+
+
+
+
+
+
+
diff --git a/external/Java.Interop/src/Java.Interop.Tools.Diagnostics/Java.Interop.Tools.Diagnostics/Diagnostic.cs b/external/Java.Interop/src/Java.Interop.Tools.Diagnostics/Java.Interop.Tools.Diagnostics/Diagnostic.cs
new file mode 100644
index 00000000000..a260ba98f42
--- /dev/null
+++ b/external/Java.Interop/src/Java.Interop.Tools.Diagnostics/Java.Interop.Tools.Diagnostics/Diagnostic.cs
@@ -0,0 +1,198 @@
+// Copyright 2012, Xamarin Inc. All rights reserved,
+
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Diagnostics.CodeAnalysis;
+using Mono.Cecil.Cil;
+
+namespace Java.Interop.Tools.Diagnostics {
+
+ // Error allocation (not all used; values from MonoTouch)
+ //
+ // FIXME: THOSE CODE COMMENTS ARE VERY INACCURATE. Any MT-specific numbers should be removed.
+ // XA0xxx mtouch itself, e.g. parameters, environment (e.g. missing tools)
+ // XA0000 Unexpected error - Please fill a bug report at http://bugzilla.xamarin.com
+ // XA0001 Invalid or unsupported $(TargetFrameworkVersion) value of '{0}'.
+ // XA0002 Could not parse the environment variable '{0}'.
+ // XA0003 Application name '{0}.exe' conflicts with an SDK or product assembly (.dll) name.
+ // XA0004 New refcounting logic requires sgen to be enabled too
+ // XA0005 The output directory '{0}' does not exist
+ // XA0006 There is no devel platform at '{0}', use --platform=PLAT to specify the SDK
+ // XA0007 The root assembly '{0}' does not exist
+ // XA0008 You should provide one root assembly only
+ // XA0009 Error while loading assemblies: {0}
+ // XA0010 Could not parse the command line arguments: {0}
+ // XA0011 {0} was built against a more recent runtime ({1}) than MonoTouch supports
+ // XA0012 Incomplete data is provided to complete `{0}`.
+ // XA0013 Profiling support requires sgen to be enabled too
+ // XA0014 iOS {0} does not support building applications targeting ARMv6
+ // XA0020 Could not launch mandroid daemon.
+
+ // XA0100 EmbeddedNativeLibrary '{0}' is invalid in Android Application project. Please use AndroidNativeLibrary instead.
+ // XA0101 @(Content) build action is not supported
+ // XA0102 Lint Warning
+ // XA0103 Lint Error
+ // XA0104 Invalid Sequence Point mode
+ // XA0105 The TargetFrameworkVersion for {0} (v{1}) is greater than the TargetFrameworkVersion for your project (v{2}). You need to increase the TargetFrameworkVersion for your project.
+
+ // XA1xxx file copy / symlinks (project related)
+ // XA10xx installer.cs / mtouch.cs
+ // XA1001 Could not find an application at the specified directory
+ // XA1002 Could not create symlinks, files were copied
+ // XA1003 Could not kill the application '{0}'. You may have to kill the application manually.
+ // XA1004 Could not get the list of installed applications.
+ // XA1005 Could not kill the application '{0}' on the device '{1}': {2}. You may have to kill the application manually.
+ // XA1006 Could not install the application '{0}' on the device '{1}': {2}.
+ // XA1007 Failed to launch the application '{0}' on the device '{1}': {2}. You can still launch the application manually by tapping on it.
+ // XA1008 Failed to launch the simulator: {0}
+ // XA1009 Could not copy the assembly '{0}' to '{1}': {2}
+ // XA1010 Could not load the assembly '{0}': {1}
+ // XA1011 Could not add missing resource file: '{0}'
+ // XA11xx DebugService.cs
+ // XA1101 Could not start app
+ // XA1102 Could not attach to the app (to kill it): {0}
+ // XA1103 Could not detach
+ // XA1104 Failed to send packet: {0}
+ // XA1105 Unexpected response type
+ // XA1106 Could not get list of applications on the device: Request timed out.
+ // XA1107 Application failed to launch
+ // XA12xx simcontroller.cs
+ // XA1201 Could not load the simulator: {0}
+ // XA13xx [LinkWith]
+ // XA1301 Native library `{0}` ({1}) was ignored since it does not match the current build architecture(s) ({2})
+ // XA2xxx Linker
+ // XA20xx Linker (general) errors
+ // XA2001 Could not link assemblies
+ // XA2002 Can not resolve reference: {0}
+ // XA2003 Option '{0}' will be ignored since linking is disabled
+ // XA2004 Extra linker definitions file '{0}' could not be located.
+ // XA2005 Definitions from '{0}' could not be parsed.
+ // XA2006 Reference to metadata item '{0}' (defined in '{1}') from '{2}' could not be resolved.
+ // XA3xxx AOT
+ // XA30xx AOT (general) errors
+ // XA3001 Could not AOT the assembly '{0}'
+ // XA3002 AOT restriction: Method '{0}' must be static since it is decorated with [MonoPInvokeCallback]. See http://ios.xamarin.com/Documentation/Limitations#Reverse_Callbacks # this error message comes from the AOT compiler
+ // XA3003 Conflicting --debug and --llvm options. Soft-debugging is disabled.
+ // XA3004 Incompatible AOT configuration: '{0}'.
+ // XA4xxx code generation
+ // XA40xx main.m
+ // XA4001 The main template could not be expansed to `{0}`.
+ // XA41xx registrar.m
+ // XA4101 The registrar cannot build a signature for type `{0}`.
+ // XA4102 The registrar found an invalid type `{0}` in signature for method `{2}`. Use `{1}` instead.
+ // XA4103 The registrar found an invalid type `{0}` in signature for method `{2}`: The type implements INativeObject, but does not have a constructor that takes two (IntPtr, bool) arguments
+ // XA4104 The registrar cannot marshal the return value for type `{0}` in signature for method `{1}`.
+ // XA4105 The registrar cannot marshal the parameter of type `{0}` in signature for method `{1}`.
+ // XA4106 The registrar cannot marshal the return value for structure `{0}` in signature for method `{1}`.
+ // XA4107 The registrar cannot marshal the parameter of type `{0}` in signature for method `{1}`.
+ // XA4108 The registrar cannot get the ObjectiveC type for managed type `{0}`."
+ // XA4109 Failed to compile the generated registrar code. Please file a bug report at http://bugzilla.xamarin.com
+ // XA4110 The registrar cannot marshal the out parameter of type `{0}` in signature for method `{1}`.
+ // XA4111 The registrar cannot build a signature for type `{0}' in method `{1}`.
+ // XA42xx ACW generation
+ // XA4200 Can only generate ACW's for `claas` types.
+ // XA4201 Unable to determine JNI name for type {0}.
+ // XA4203 The specified type name must be fully qualified.
+ // XA4204 Unable to resolve interface type '{0}'. Are you missing an assembly reference?
+ // XA4205 [ExportField] can only be used on methods with 0 parameters.
+ // XA4206 [Export] cannot be used on a generic type.
+ // XA4207 [ExportField] cannot be used on a generic type.
+ // XA4208 [Java.Interop.ExportFieldAttribute] cannot be used on a method returning void.
+ // XA4209 Failed to create JavaTypeInfo for class: {0} due to {1}
+ // XA4210 "You need to add a reference to Mono.Android.Export.dll when you use ExportAttribute or ExportFieldAttribute."
+ // XA4211 AndroidManifest.xml //uses-sdk/@android:targetSdkVersion '{0}' is less than $(TargetFrameworkVersion) '{1}'. Using API-{1} for ACW compilation.
+ // XA4212 Type `{0}` implements `Android.Runtime.IJavaObject` but does not inherit `Java.Lang.Object` or `Java.Lang.Throwable`. This is not supported.
+ // XA4217 Cannot override Kotlin-generated method '{0}' because it is not a valid Java method name. This method can only be overridden from Kotlin."
+ // XA5xxx GCC and toolchain
+ // XA32xx .apk generation
+ // XA4300 Unsupported $(AndroidSupportedAbis) value '{0}'; ignoring.
+ // XA4301 Apk already contains the item {0}; ignoring.
+ // XA51xx compilation
+ // XA5101 Missing '{0}' compiler. Please install Android NDK.
+ // XA5102 Conversion from assembly to native code failed. Please file a bug report at http://bugzilla.xamarin.com
+ // XA5103 Failed to compile the file '{0}'. Please file a bug report at http://bugzilla.xamarin.com
+ // XA52xx linking
+ // XA5201 Native linking failed. Please review user flags provided to gcc: {0}
+ // XA5202 Native linking failed. Please review the build log.
+ // XA5203 Failed to generate the debug symbols (dSYM directory). Please review the build log.
+ // XA5204 Failed to strip the final binary. Please review the build log.
+ // XA52xx other tools
+ // XA5205 Missing 'aapt' tool. Please install the Android SDK Build-tools package.
+ // XA5206 {0}. Android resource directory {1} doesn't exist.
+ // XA5207 {0}. Java library file {1} doesn't exist.
+ // XA5208 Download failed. Please download {0} and put it to the {1} directory.
+ // XA5209 Unzipping failed. Please download {0} and extract it to the {1} directory.
+ // XA5210 {0}. Native library file {1} doesn't exist.
+ // XA5211 Embedded wear app package name differs from handheld app package name ({0} != {1}).
+ // XA5212 The Minimum Sdk Version ({0}) in AndroidManifest is invalid.
+ // XA5213 Java.Lang.OutOfMemory Excption. Consider increasing the value of $(JavaMaximumHeapSize).
+ // XA5214 Duplicate resource file.
+ // XA5215 Duplicate "values" Resource found
+ // XA5216 Duplicate Resource found for
+ // XA53xx linking
+ // XA5303 Native linking warning: {0}
+ // XA53xx other tools
+ // XA5300 Andorid SDK not found or not fully installed.
+ // XA5301 Missing 'strip' tool. Please install Xcode 'Command-Line Tools' component
+ // XA5302 Missing 'dsymutil' tool. Please install Xcode 'Command-Line Tools' component
+ // XA6xxx mtouch internal tools
+ // XA600x Stripper
+ // XA6001 Running version of Cecil doesn't support assembly stripping
+ // XA6002 Could not strip assembly `{0}`.
+ // XA6003 [UnauthorizedAccessException message]
+ // XA7xxx reserved
+ // XA8xxx reserved
+ // XA9xxx Licensing
+ // --- these are listed in activation/src/utils/activation.cs ---
+ //
+
+ public static class Diagnostic {
+ [DoesNotReturn]
+ public static void Error (int code, SequencePoint? location, string message, params object[] args)
+ {
+ throw new XamarinAndroidException (code, message, args) {
+ Location = location,
+ };
+ }
+
+
+ [DoesNotReturn]
+ public static void Error (int code, string message, params object[] args)
+ {
+ throw new XamarinAndroidException (code, message, args);
+ }
+
+ [DoesNotReturn]
+ public static void Error (int code, Exception innerException, string message, params object[] args)
+ {
+ throw new XamarinAndroidException (code, innerException, message, args);
+ }
+
+ public static void WriteTo (System.IO.TextWriter destination, Exception message, bool verbose = false)
+ {
+ var xae = message as XamarinAndroidException;
+ if (xae != null) {
+ destination.WriteLine ("monodroid: {0}", xae.Message);
+ if (verbose && xae.Code < 9000)
+ destination.WriteLine ("monodroid: {0}", xae.ToString ());
+ return;
+ }
+
+ destination.WriteLine ("monodroid: error XA0000: Unexpected error - Please file a bug report at http://bugzilla.xamarin.com. Reason: {0}",
+ verbose ? message.Message : message.ToString ());
+ }
+
+ public static Action CreateConsoleLogger ()
+ {
+ Action logger = (level, value) => {
+ if (level == TraceLevel.Error)
+ Console.Error.WriteLine (value);
+ else
+ Console.WriteLine (value);
+ };
+ return logger;
+ }
+ }
+}
+
diff --git a/external/Java.Interop/src/Java.Interop.Tools.Diagnostics/Java.Interop.Tools.Diagnostics/XamarinAndroidException.cs b/external/Java.Interop/src/Java.Interop.Tools.Diagnostics/Java.Interop.Tools.Diagnostics/XamarinAndroidException.cs
new file mode 100644
index 00000000000..7cea2dfa12b
--- /dev/null
+++ b/external/Java.Interop/src/Java.Interop.Tools.Diagnostics/Java.Interop.Tools.Diagnostics/XamarinAndroidException.cs
@@ -0,0 +1,49 @@
+using System;
+using System.Text;
+
+using Mono.Cecil.Cil;
+
+namespace Java.Interop.Tools.Diagnostics {
+
+ public class XamarinAndroidException : Exception
+ {
+
+ public XamarinAndroidException (int code, string message, params object [] args)
+ : this (code, null, message, args)
+ {
+ }
+
+ // http://blogs.msdn.com/b/msbuild/archive/2006/11/03/msbuild-visual-studio-aware-error-messages-and-message-formats.aspx
+ static string GetMessage (int code, string message, object [] args)
+ {
+ var m = new StringBuilder ();
+ m.Append ("error ");
+ m.AppendFormat ("XA{0:0000}", code);
+ m.Append (": ");
+ m.AppendFormat (message, args);
+ return m.ToString ();
+ }
+
+ public XamarinAndroidException (int code, Exception? innerException, string message, params object [] args)
+ : base (GetMessage (code, message, args), innerException)
+ {
+ Code = code;
+ MessageWithoutCode = string.Format (message, args);
+ }
+
+ public string MessageWithoutCode { get; private set; }
+
+ public int Code { get; private set; }
+
+ public SequencePoint? Location { get; set; }
+
+ public string? SourceFile {
+ get { return Location?.Document.Url; }
+ }
+
+ public int SourceLine {
+ get { return Location == null ? 0 : Location.StartLine; }
+ }
+ }
+}
+
diff --git a/external/Java.Interop/src/Java.Interop.Tools.Generator/Enumification/ConstantAction.cs b/external/Java.Interop/src/Java.Interop.Tools.Generator/Enumification/ConstantAction.cs
new file mode 100644
index 00000000000..ab7c6a11824
--- /dev/null
+++ b/external/Java.Interop/src/Java.Interop.Tools.Generator/Enumification/ConstantAction.cs
@@ -0,0 +1,11 @@
+namespace Java.Interop.Tools.Generator.Enumification
+{
+ public enum ConstantAction
+ {
+ None,
+ Ignore,
+ Enumify,
+ Add,
+ Remove
+ }
+}
diff --git a/external/Java.Interop/src/Java.Interop.Tools.Generator/Enumification/ConstantEntry.cs b/external/Java.Interop/src/Java.Interop.Tools.Generator/Enumification/ConstantEntry.cs
new file mode 100644
index 00000000000..6838e36c29a
--- /dev/null
+++ b/external/Java.Interop/src/Java.Interop.Tools.Generator/Enumification/ConstantEntry.cs
@@ -0,0 +1,231 @@
+using System;
+using System.Xml.Linq;
+
+namespace Java.Interop.Tools.Generator.Enumification
+{
+ ///
+ /// This represents a Java int constant and/or a C# enum entry.
+ ///
+ public class ConstantEntry
+ {
+ public ConstantAction Action { get; set; }
+ public AndroidSdkVersion ApiLevel { get; set; }
+ public string? JavaSignature { get; set; }
+ public string? Value { get; set; }
+ public string? EnumFullType { get; set; }
+ public string? EnumMember { get; set; }
+ public FieldAction FieldAction { get; set; }
+ public bool IsFlags { get; set; }
+ public AndroidSdkVersion? DeprecatedSince { get; set; }
+
+ public string EnumNamespace {
+ get {
+ if (!EnumFullType.HasValue ())
+ return string.Empty;
+
+ var index = EnumFullType.LastIndexOf ('.');
+
+ // There is no namespace, only a type
+ if (index == -1)
+ return string.Empty;
+
+ return EnumFullType.Substring (0, index);
+ }
+ }
+
+ public string EnumType {
+ get {
+ if (!EnumFullType.HasValue ())
+ return string.Empty;
+
+ var index = EnumFullType.LastIndexOf ('.');
+
+ // There is no namespace, only a type
+ if (index == -1)
+ return EnumFullType;
+
+ return EnumFullType.Substring (index + 1);
+ }
+ }
+
+ public string JavaPackage {
+ get {
+ if (!JavaSignature.HasValue ())
+ return string.Empty;
+
+ var index = JavaSignature.LastIndexOf ('/');
+
+ // There is no namespace, only a type
+ if (index == -1)
+ return string.Empty;
+
+ return JavaSignature.Substring (0, index);
+ }
+ }
+
+ public string JavaType {
+ get {
+ if (!JavaSignature.HasValue ())
+ return string.Empty;
+
+ var index = JavaSignature.LastIndexOf ('/');
+ var dot_index = JavaSignature.LastIndexOf ('.');
+
+ return JavaSignature.Substring (index + 1, dot_index - index - 1);
+ }
+ }
+
+ public string JavaName {
+ get {
+ if (!JavaSignature.HasValue ())
+ return string.Empty;
+
+ var index = JavaSignature.LastIndexOf ('.');
+
+ return JavaSignature.Substring (index + 1);
+ }
+ }
+
+ public static ConstantEntry FromString (string line, bool transientMode = false)
+ {
+ var parser = new CsvParser (line);
+
+ if (parser.GetField (0).In ("?", "I", "E", "A", "R"))
+ return FromVersion2String (parser);
+
+ return FromVersion1String (parser, transientMode);
+ }
+
+ static ConstantEntry FromVersion1String (CsvParser parser, bool transientMode)
+ {
+ var entry = new ConstantEntry {
+ Action = ConstantAction.Enumify,
+ ApiLevel = parser.GetFieldAsAndroidSdkVersion (0),
+ EnumFullType = parser.GetField (1),
+ EnumMember = parser.GetField (2),
+ JavaSignature = parser.GetField (3),
+ Value = parser.GetField (4),
+ IsFlags = parser.GetField (5).ToLowerInvariant () == "flags",
+ FieldAction = transientMode ? FieldAction.Remove : FieldAction.Keep
+ };
+
+ if (!entry.EnumNamespace.HasValue ()) {
+ // This is a line that only deletes a const, not maps it to an enum
+ entry.Action = ConstantAction.Remove;
+ entry.FieldAction = FieldAction.Remove;
+ } else if (!entry.JavaSignature.HasValue ()) {
+ // This is a line that adds an unmapped enum member
+ entry.Action = ConstantAction.Add;
+ entry.FieldAction = transientMode ? FieldAction.Remove : FieldAction.None;
+ }
+
+ entry.NormalizeJavaSignature ();
+
+ return entry;
+ }
+
+ static ConstantEntry FromVersion2String (CsvParser parser)
+ {
+ var entry = new ConstantEntry {
+ Action = FromConstantActionString (parser.GetField (0)),
+ ApiLevel = parser.GetFieldAsAndroidSdkVersion (1),
+ JavaSignature = parser.GetField (2),
+ Value = parser.GetField (3),
+ EnumFullType = parser.GetField (4),
+ EnumMember = parser.GetField (5),
+ FieldAction = FromFieldActionString (parser.GetField (6)),
+ IsFlags = parser.GetField (7).ToLowerInvariant () == "flags",
+ DeprecatedSince = parser.GetFieldAsNullableAndroidSdkVersion (8)
+ };
+
+ entry.NormalizeJavaSignature ();
+
+ return entry;
+ }
+
+ public static ConstantEntry FromElement (XElement elem)
+ {
+ var entry = new ConstantEntry {
+ Action = ConstantAction.None,
+ ApiLevel = NamingConverter.ParseApiLevel (elem),
+ JavaSignature = elem.Parent?.Parent?.Attribute ("name")?.Value,
+ Value = elem.Attribute ("value")?.Value,
+ };
+
+ var java_package = elem.Parent?.Parent?.Attribute ("name")?.Value.Replace ('.', '/');
+ var java_type = elem.Parent?.Attribute ("name")?.Value.Replace ('.', '$');
+ var java_member = elem.Attribute ("name")?.Value;
+
+ entry.JavaSignature = $"{java_package}/{java_type}.{java_member}".TrimStart ('/');
+
+ // Interfaces get an "I:" prefix
+ if (elem.Parent?.Name.LocalName == "interface")
+ entry.JavaSignature = "I:" + entry.JavaSignature;
+
+ return entry;
+ }
+
+ public override string ToString () => $"[{EnumMember}, {Value}]";
+
+ public string ToVersion2String ()
+ {
+ var fields = new [] {
+ Action == ConstantAction.None ? "?" : Action.ToString ().Substring (0, 1),
+ ApiLevel.ToString (),
+ JavaSignature,
+ Value,
+ EnumFullType,
+ EnumMember,
+ ToConstantFieldActionString (FieldAction),
+ IsFlags ? "flags" : string.Empty,
+ DeprecatedSince.HasValue ? DeprecatedSince.Value.ToString () : string.Empty,
+ };
+
+ return string.Join (",", fields);
+ }
+
+ static string ToConstantFieldActionString (FieldAction value)
+ {
+ return value switch
+ {
+ FieldAction.None => string.Empty,
+ FieldAction.Remove => "remove",
+ FieldAction.Keep => "keep",
+ _ => string.Empty
+ };
+
+ }
+
+ static ConstantAction FromConstantActionString (string value)
+ {
+ return value switch
+ {
+ "?" => ConstantAction.None,
+ "I" => ConstantAction.Ignore,
+ "E" => ConstantAction.Enumify,
+ "A" => ConstantAction.Add,
+ "R" => ConstantAction.Remove,
+ _ => throw new ArgumentOutOfRangeException (nameof (value), $"Specified action '{value}' is not valid"),
+ };
+ }
+
+ static FieldAction FromFieldActionString (string value)
+ {
+ return value.ToLowerInvariant () switch
+ {
+ "" => FieldAction.None,
+ "remove" => FieldAction.Remove,
+ "keep" => FieldAction.Keep,
+ _ => throw new ArgumentOutOfRangeException (nameof (value), $"Specified field action '{value}' is not valid"),
+ };
+ }
+
+ void NormalizeJavaSignature ()
+ {
+ // Somehow we got a mix of using dollar signs and periods
+ // for nested classes. Normalize to dollar signs.
+ if (JavaSignature.HasValue ())
+ JavaSignature = $"{JavaPackage}/{JavaType.Replace ('.', '$')}.{JavaName}";
+ }
+ }
+}
diff --git a/external/Java.Interop/src/Java.Interop.Tools.Generator/Enumification/ConstantsParser.cs b/external/Java.Interop/src/Java.Interop.Tools.Generator/Enumification/ConstantsParser.cs
new file mode 100644
index 00000000000..cdc499e711e
--- /dev/null
+++ b/external/Java.Interop/src/Java.Interop.Tools.Generator/Enumification/ConstantsParser.cs
@@ -0,0 +1,111 @@
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Xml.Linq;
+using System.Xml.XPath;
+
+namespace Java.Interop.Tools.Generator.Enumification
+{
+ public static class ConstantsParser
+ {
+ public static List FromEnumMapCsv (string filename)
+ {
+ using (var sr = new StreamReader (filename))
+ return FromEnumMapCsv (sr);
+ }
+
+ public static List FromEnumMapCsv (TextReader reader)
+ {
+ var constants = new List ();
+ var transient = false;
+
+ string? s;
+
+ // Read the enum csv file
+ while ((s = reader.ReadLine ()) != null) {
+ // Skip empty lines and comments
+ if (string.IsNullOrEmpty (s) || s.StartsWith ("//", StringComparison.Ordinal))
+ continue;
+
+ // Transient mode means remove the original field
+ if (s == "- ENTER TRANSIENT MODE -") {
+ transient = true;
+ continue;
+ }
+
+ constants.Add (ConstantEntry.FromString (s, transient));
+ }
+
+ return constants;
+ }
+
+ public static void SaveEnumMapCsv (List constants, string filename)
+ {
+ using (var sw = new StreamWriter (filename))
+ SaveEnumMapCsv (constants, sw);
+ }
+
+ public static void SaveEnumMapCsv (List constants, TextWriter writer)
+ {
+ var column_names = new [] {
+ "Action",
+ "API Level",
+ "JNI Signature",
+ "Enum Value",
+ "C# Enum Type",
+ "C# Member Name",
+ "Field Action",
+ "Is Flags",
+ "Deprecated Since",
+ };
+
+ writer.WriteLine ("// " + string.Join (",", column_names));
+
+ foreach (var c in Sort (constants))
+ writer.WriteLine (c.ToVersion2String ());
+ }
+
+ public static List FromApiXml (string filename) => FromApiXml (XDocument.Load (filename));
+
+ public static List FromApiXml (XDocument doc)
+ {
+ var int_fields = doc.XPathSelectElements ("//field[@type='int']");
+
+ return int_fields.Select (f => ConstantEntry.FromElement (f)).Where (c => c.Value.HasValue ()).ToList ();
+ }
+
+ public static List Sort (List constants)
+ {
+ // We want a well-defined sort to reduce diffs, but it's not as easy as just
+ // using the JavaSignature, because there may be added enum members that do not
+ // have a JavaSignature, and we would like them to be with their other members.
+ // For example:
+ // - A,0,,0,Java.MyEnum,None
+ // - E,1,java/class/member1,1,Java.MyEnum,Member1
+ // - E,1,java/class/member2,2,Java.MyEnum,Member2
+ var sorted = constants.Where (c => c.JavaSignature.HasValue ()).OrderBy (c => c.JavaSignature).ToList ();
+
+ // Try to put members without signatures at the beginning of the section with
+ // their fellow enum members. If not, put them at the end of the list.
+ foreach (var c in constants.Where (c => !c.JavaSignature.HasValue ()).OrderBy (c => $"{c.EnumFullType}.{c.EnumMember}")) {
+ var sibling_index = sorted.FindIndex (c2 => c2.EnumFullType == c.EnumFullType);
+
+ if (sibling_index >= 0)
+ sorted.Insert (sibling_index, c);
+ else
+ sorted.Add (c);
+ }
+
+ return sorted;
+ }
+ }
+
+ public class JavaSignatureComparer : IEqualityComparer
+ {
+ public static JavaSignatureComparer Instance { get; } = new JavaSignatureComparer ();
+
+ public bool Equals (ConstantEntry? x, ConstantEntry? y) => x?.JavaSignature == y?.JavaSignature;
+ public int GetHashCode (ConstantEntry obj) => 0;
+ }
+}
diff --git a/external/Java.Interop/src/Java.Interop.Tools.Generator/Enumification/FieldAction.cs b/external/Java.Interop/src/Java.Interop.Tools.Generator/Enumification/FieldAction.cs
new file mode 100644
index 00000000000..03e5c5ce2db
--- /dev/null
+++ b/external/Java.Interop/src/Java.Interop.Tools.Generator/Enumification/FieldAction.cs
@@ -0,0 +1,9 @@
+namespace Java.Interop.Tools.Generator.Enumification
+{
+ public enum FieldAction
+ {
+ None,
+ Remove,
+ Keep
+ }
+}
diff --git a/external/Java.Interop/src/Java.Interop.Tools.Generator/Enumification/MethodAction.cs b/external/Java.Interop/src/Java.Interop.Tools.Generator/Enumification/MethodAction.cs
new file mode 100644
index 00000000000..05af02ae98f
--- /dev/null
+++ b/external/Java.Interop/src/Java.Interop.Tools.Generator/Enumification/MethodAction.cs
@@ -0,0 +1,9 @@
+namespace Java.Interop.Tools.Generator.Enumification
+{
+ public enum MethodAction
+ {
+ None,
+ Ignore,
+ Enumify,
+ }
+}
diff --git a/external/Java.Interop/src/Java.Interop.Tools.Generator/Enumification/MethodMapEntry.cs b/external/Java.Interop/src/Java.Interop.Tools.Generator/Enumification/MethodMapEntry.cs
new file mode 100644
index 00000000000..52e26e3d721
--- /dev/null
+++ b/external/Java.Interop/src/Java.Interop.Tools.Generator/Enumification/MethodMapEntry.cs
@@ -0,0 +1,144 @@
+using System;
+using System.Collections.Generic;
+using System.Xml.Linq;
+using Xamarin.Android.Tools;
+
+namespace Java.Interop.Tools.Generator.Enumification
+{
+ public class MethodMapEntry
+ {
+ public MethodAction Action { get; set; }
+ public AndroidSdkVersion ApiLevel { get; set; }
+ public string? JavaPackage { get; set; }
+ public string? JavaType { get; set; }
+ public string? JavaName { get; set; }
+ public string? ParameterName { get; set; }
+ public string? EnumFullType { get; set; }
+ public string JavaSignature => $"{JavaPackage}/{JavaType}.{JavaName}.{ParameterName}";
+ public bool IsInterface { get; set; }
+
+ public static IEnumerable FromXml (XElement element)
+ {
+ // Handle fields first
+ if (element.Name == "field") {
+ yield return FromElement (element, element.XGetAttribute ("name")!);
+ yield break;
+ }
+
+ // Now methods and constructors
+ // There could be multiple entries, from the return type and multiple parameters
+ if (element.XGetAttribute ("return") == "int")
+ yield return FromElement (element, "return");
+
+ foreach (var p in element.Elements ("parameter"))
+ if (p.XGetAttribute ("type") == "int")
+ yield return FromElement (element, p.XGetAttribute ("name")!);
+ }
+
+ static MethodMapEntry FromElement (XElement element, string parameterName)
+ {
+ var entry = new MethodMapEntry {
+ JavaPackage = element.Parent?.Parent?.XGetAttribute ("name")?.Replace ('.', '/'),
+ JavaType = element.Parent?.XGetAttribute ("name")?.Replace ('.', '$'),
+ JavaName = element.XGetAttribute ("name"),
+ ParameterName = parameterName,
+ ApiLevel = NamingConverter.ParseApiLevel (element),
+ IsInterface = element.Parent?.Name == "interface"
+ };
+
+ if (element.Name == "constructor")
+ entry.JavaName = "ctor";
+
+ return entry;
+ }
+
+ public static MethodMapEntry FromString (string line)
+ {
+ var parser = new CsvParser (line);
+
+ if (parser.GetField (0).In ("?", "I", "E"))
+ return FromVersion2String (parser);
+
+ return FromVersion1String (parser);
+ }
+
+ static MethodMapEntry FromVersion1String (CsvParser parser)
+ {
+ var entry = new MethodMapEntry {
+ Action = MethodAction.Enumify,
+ ApiLevel = parser.GetFieldAsAndroidSdkVersion (0),
+ JavaPackage = parser.GetField (1),
+ JavaType = parser.GetField (2),
+ JavaName = parser.GetField (3),
+ ParameterName = parser.GetField (4),
+ EnumFullType = parser.GetField (5)
+ };
+
+ if (entry.JavaType.StartsWith ("[Interface]", StringComparison.Ordinal)) {
+ entry.IsInterface = true;
+ entry.JavaType = entry.JavaType.Substring ("[Interface]".Length);
+ }
+
+ return entry;
+ }
+
+ static MethodMapEntry FromVersion2String (CsvParser parser)
+ {
+ var entry = new MethodMapEntry {
+ Action = FromMethodActionString (parser.GetField (0)),
+ ApiLevel = parser.GetFieldAsAndroidSdkVersion (1),
+ JavaPackage = parser.GetField (2),
+ JavaType = parser.GetField (3),
+ JavaName = parser.GetField (4),
+ ParameterName = parser.GetField (5),
+ EnumFullType = parser.GetField (6)
+ };
+
+ if (entry.JavaType.StartsWith ("[Interface]", StringComparison.Ordinal)) {
+ entry.IsInterface = true;
+ entry.JavaType = entry.JavaType.Substring ("[Interface]".Length);
+ }
+
+ return entry;
+ }
+
+ static MethodAction FromMethodActionString (string value)
+ {
+ return value switch {
+ "?" => MethodAction.None,
+ "I" => MethodAction.Ignore,
+ "E" => MethodAction.Enumify,
+ _ => throw new ArgumentOutOfRangeException (nameof (value), $"Specified action '{value}' is not valid"),
+ };
+ }
+
+ public string ToVersion1String ()
+ {
+ var fields = new [] {
+ ApiLevel.ToString (),
+ JavaPackage,
+ (IsInterface ? "I:" : string.Empty) + JavaType,
+ JavaName,
+ ParameterName,
+ EnumFullType,
+ };
+
+ return string.Join (",", fields);
+ }
+
+ public string ToVersion2String ()
+ {
+ var fields = new [] {
+ Action == MethodAction.None ? "?" : Action.ToString ().Substring (0, 1),
+ ApiLevel.ToString (),
+ JavaPackage,
+ (IsInterface ? "[Interface]" : string.Empty) + JavaType,
+ JavaName,
+ ParameterName,
+ EnumFullType,
+ };
+
+ return string.Join (",", fields);
+ }
+ }
+}
diff --git a/external/Java.Interop/src/Java.Interop.Tools.Generator/Enumification/MethodMapParser.cs b/external/Java.Interop/src/Java.Interop.Tools.Generator/Enumification/MethodMapParser.cs
new file mode 100644
index 00000000000..781625cbcf6
--- /dev/null
+++ b/external/Java.Interop/src/Java.Interop.Tools.Generator/Enumification/MethodMapParser.cs
@@ -0,0 +1,66 @@
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Xml.Linq;
+using System.Xml.XPath;
+
+namespace Java.Interop.Tools.Generator.Enumification
+{
+ public class MethodMapParser
+ {
+ public static List FromMethodMapCsv (string filename)
+ {
+ using (var sr = new StreamReader (filename))
+ return FromMethodMapCsv (sr);
+ }
+
+ public static List FromMethodMapCsv (TextReader reader)
+ {
+ var entries = new List ();
+
+ string? s;
+
+ // Read the enum csv file
+ while ((s = reader.ReadLine ()) != null) {
+ // Skip empty lines and comments
+ if (string.IsNullOrEmpty (s) || s.StartsWith ("//", StringComparison.Ordinal))
+ continue;
+
+ entries.Add (MethodMapEntry.FromString (s));
+ }
+
+ return entries;
+ }
+
+ public static void SaveMethodMapCsv (IEnumerable entries, string filename, bool version2)
+ {
+ using (var sw = new StreamWriter (filename))
+ SaveMethodMapCsv (entries, sw, version2);
+ }
+
+ public static void SaveMethodMapCsv (IEnumerable entries, TextWriter writer, bool version2)
+ {
+ foreach (var entry in entries.OrderBy (e => e.JavaSignature))
+ writer.WriteLine (version2 ? entry.ToVersion2String () : entry.ToVersion1String ());
+ }
+
+ public static List FromApiXml (string filename) => FromApiXml (XDocument.Load (filename));
+
+ public static List FromApiXml (XDocument doc)
+ {
+ var results = new List ();
+
+ // Methods that return int or have an int parameter
+ results.AddRange (doc.XPathSelectElements ("//method[@return='int'] | //method[parameter/@type='int']").SelectMany (x => MethodMapEntry.FromXml (x)));
+
+ // Constructors with an int parameter
+ results.AddRange (doc.XPathSelectElements ("//constructor[parameter/@type='int']").SelectMany (x => MethodMapEntry.FromXml (x)));
+
+ // Fields that are a non-constant int
+ results.AddRange (doc.XPathSelectElements ("//field[@type='int' and @final='false']").SelectMany (x => MethodMapEntry.FromXml (x)));
+
+ return results;
+ }
+ }
+}
diff --git a/external/Java.Interop/src/Java.Interop.Tools.Generator/Extensions/UtilityExtensions.cs b/external/Java.Interop/src/Java.Interop.Tools.Generator/Extensions/UtilityExtensions.cs
new file mode 100644
index 00000000000..a20b2833f64
--- /dev/null
+++ b/external/Java.Interop/src/Java.Interop.Tools.Generator/Extensions/UtilityExtensions.cs
@@ -0,0 +1,75 @@
+using System;
+using System.Diagnostics.CodeAnalysis;
+using System.Globalization;
+using System.Text;
+using System.Xml;
+using System.Xml.Linq;
+
+namespace Java.Interop.Tools.Generator
+{
+ public static class UtilityExtensions
+ {
+ public static bool In (this T enumeration, params T [] values)
+ {
+ if (enumeration is null)
+ return false;
+
+ foreach (var en in values)
+ if (enumeration.Equals (en))
+ return true;
+
+ return false;
+ }
+
+ public static bool StartsWithAny (this string value, params string [] values)
+ {
+ foreach (var en in values)
+ if (value.StartsWith (en, StringComparison.OrdinalIgnoreCase))
+ return true;
+
+ return false;
+ }
+
+ public static bool HasValue ([NotNullWhen (true)]this string? str) => !string.IsNullOrEmpty (str);
+
+ public static XDocument? LoadXmlDocument (string filename)
+ {
+ try {
+ return XDocument.Load (filename, LoadOptions.SetBaseUri | LoadOptions.SetLineInfo);
+ } catch (XmlException e) {
+ Report.Verbose (0, "Exception: {0}", e);
+ Report.LogCodedWarning (0, Report.WarningInvalidXmlFile, e, filename, e.Message);
+ }
+
+ return null;
+ }
+
+ // A case-insensitive Replace doesn't exist in classic .NET Framework. Loosely based on:
+ // https://github.com/dotnet/runtime/blob/main/src/libraries/System.Private.CoreLib/src/System/String.Manipulation.cs
+ public static string ReplaceOrdinalIgnoreCase (this string source, string oldValue, string newValue)
+ {
+ var result = new StringBuilder ();
+ var pos = 0;
+
+ while (true) {
+ var index = source.IndexOf (oldValue, pos, StringComparison.OrdinalIgnoreCase);
+
+ // Not found, bail
+ if (index < 0)
+ break;
+
+ // Append the unmodified portion of search space
+ result.Append (source.Substring (pos, index));
+
+ // Append the replacement
+ result.Append (newValue);
+
+ pos = index + oldValue.Length;
+ }
+
+ // Append what remains of the search space, then allocate the new string.
+ result.Append (source.Substring (pos));
+ return result.ToString ();
+ }
+ }
+}
diff --git a/external/Java.Interop/src/Java.Interop.Tools.Generator/Extensions/XmlExtensions.cs b/external/Java.Interop/src/Java.Interop.Tools.Generator/Extensions/XmlExtensions.cs
new file mode 100644
index 00000000000..cf115d06f66
--- /dev/null
+++ b/external/Java.Interop/src/Java.Interop.Tools.Generator/Extensions/XmlExtensions.cs
@@ -0,0 +1,28 @@
+using System;
+using System.Globalization;
+using System.Xml.Linq;
+using System.Xml.XPath;
+
+using Java.Interop.Tools.Generator;
+
+namespace Xamarin.Android.Tools
+{
+ static class XmlExtensions
+ {
+ public static string? XGetAttribute (this XElement element, string name)
+ => element.Attribute (name)?.Value.Trim ();
+
+ public static string? XGetAttribute (this XPathNavigator nav, string name, string ns)
+ => nav.GetAttribute (name, ns)?.Trim ();
+
+ public static AndroidSdkVersion? XGetAttributeAsAndroidSdkVersion (this XElement element, string name)
+ {
+ var value = element.XGetAttribute (name);
+
+ if (AndroidSdkVersion.TryParse (value, out var result))
+ return result;
+
+ return null;
+ }
+ }
+}
diff --git a/external/Java.Interop/src/Java.Interop.Tools.Generator/Java.Interop.Tools.Generator.csproj b/external/Java.Interop/src/Java.Interop.Tools.Generator/Java.Interop.Tools.Generator.csproj
new file mode 100644
index 00000000000..adaa4943033
--- /dev/null
+++ b/external/Java.Interop/src/Java.Interop.Tools.Generator/Java.Interop.Tools.Generator.csproj
@@ -0,0 +1,22 @@
+
+
+
+ $(DotNetTargetFramework)
+ enable
+
+
+
+
+
+ $(UtilityOutputFullPath)
+
+
+
+
+
+
+
+
+
+
+
diff --git a/external/Java.Interop/src/Java.Interop.Tools.Generator/Metadata/FixupXmlDocument.cs b/external/Java.Interop/src/Java.Interop.Tools.Generator/Metadata/FixupXmlDocument.cs
new file mode 100644
index 00000000000..3c169f9ae3c
--- /dev/null
+++ b/external/Java.Interop/src/Java.Interop.Tools.Generator/Metadata/FixupXmlDocument.cs
@@ -0,0 +1,232 @@
+using System;
+using System.Linq;
+using System.Xml.XPath;
+using System.Xml.Linq;
+
+using Xamarin.Android.Tools;
+using System.Collections.Generic;
+
+namespace Java.Interop.Tools.Generator
+{
+ public class FixupXmlDocument
+ {
+ public XDocument FixupDocument { get; }
+
+ public FixupXmlDocument (XDocument fixupDocument)
+ {
+ FixupDocument = fixupDocument;
+ }
+
+ public static FixupXmlDocument? Load (string filename)
+ {
+ if (UtilityExtensions.LoadXmlDocument (filename) is XDocument doc)
+ return new FixupXmlDocument (doc);
+
+ return null;
+ }
+
+ public void Apply (ApiXmlDocument apiDocument, string apiLevelString, int productVersion)
+ {
+ // Defaulting to 0 here is fine
+ AndroidSdkVersion.TryParse (apiLevelString, out var apiLevel);
+
+ var metadataChildren = FixupDocument.XPathSelectElements ("/metadata/*");
+
+ string? prev_path = null;
+ XElement? attr_last_cache = null;
+
+ foreach (var metaitem in metadataChildren) {
+ if (ShouldSkip (metaitem, apiLevel, productVersion))
+ continue;
+ if (!ShouldApply (metaitem, apiDocument))
+ continue;
+
+ // Namespace replacements are handled elsewhere
+ if (metaitem.Name.LocalName == "ns-replace")
+ continue;
+
+ var path = metaitem.XGetAttribute ("path");
+
+ if (path != prev_path)
+ attr_last_cache = null;
+
+ prev_path = path;
+
+ if (path is null) {
+ Report.LogCodedWarning (0, Report.WarningNodeMissingPathAttribute, null, metaitem, metaitem.ToString ());
+ continue;
+ }
+
+ switch (metaitem.Name.LocalName) {
+ case "remove-node":
+ try {
+ var nodes = apiDocument.ApiDocument.XPathSelectElements (path).ToArray ();
+
+ if (nodes.Any ())
+ foreach (var node in nodes)
+ node.Remove ();
+ else
+ // BG8A00
+ Report.LogCodedWarning (0, Report.WarningRemoveNodeMatchedNoNodes, null, metaitem, $"");
+ } catch (XPathException) {
+ // BG4301
+ Report.LogCodedError (Report.ErrorRemoveNodeInvalidXPath, metaitem, path);
+ }
+ break;
+ case "add-node":
+ try {
+ var nodes = apiDocument.ApiDocument.XPathSelectElements (path);
+
+ if (!nodes.Any ())
+ // BG8A01
+ Report.LogCodedWarning (0, Report.WarningAddNodeMatchedNoNodes, null, metaitem, $"");
+ else {
+ foreach (var node in nodes)
+ node.Add (metaitem.Nodes ());
+ }
+ } catch (XPathException) {
+ // BG4302
+ Report.LogCodedError (Report.ErrorAddNodeInvalidXPath, metaitem, path);
+ }
+ break;
+ case "change-node":
+ try {
+ var nodes = apiDocument.ApiDocument.XPathSelectElements (path);
+ var matched = false;
+
+ foreach (var node in nodes) {
+ var newChild = new XElement (metaitem.Value);
+ newChild.Add (node.Attributes ());
+ newChild.Add (node.Nodes ());
+ node.ReplaceWith (newChild);
+ matched = true;
+ }
+
+ if (!matched)
+ // BG8A03
+ Report.LogCodedWarning (0, Report.WarningChangeNodeTypeMatchedNoNodes, null, metaitem, $"");
+ } catch (XPathException) {
+ // BG4303
+ Report.LogCodedError (Report.ErrorChangeNodeInvalidXPath, metaitem, path);
+ }
+ break;
+ case "attr":
+ try {
+ var attr_name = metaitem.XGetAttribute ("name");
+
+ if (string.IsNullOrEmpty (attr_name)) {
+ // BG4307
+ Report.LogCodedError (Report.ErrorMissingAttrName, metaitem, path);
+ continue;
+ }
+
+ var nodes = attr_last_cache != null ? new XElement [] { attr_last_cache } : apiDocument.ApiDocument.XPathSelectElements (path);
+ var attr_matched = 0;
+
+ foreach (var n in nodes) {
+ n.SetAttributeValue (attr_name, metaitem.Value);
+ attr_matched++;
+ }
+ if (attr_matched == 0)
+ // BG8A04
+ Report.LogCodedWarning (0, Report.WarningAttrMatchedNoNodes, null, metaitem, $"");
+ if (attr_matched != 1)
+ attr_last_cache = null;
+ } catch (XPathException) {
+ // BG4304
+ Report.LogCodedError (Report.ErrorAttrInvalidXPath, metaitem, path);
+ }
+ break;
+ case "move-node":
+ try {
+ var parent = metaitem.Value;
+ var parents = apiDocument.ApiDocument.XPathSelectElements (parent);
+ var matched = false;
+
+ foreach (var parent_node in parents) {
+ var nodes = parent_node.XPathSelectElements (path).ToArray ();
+ foreach (var node in nodes)
+ node.Remove ();
+ parent_node.Add (nodes);
+ matched = true;
+ }
+ if (!matched)
+ // BG8A05
+ Report.LogCodedWarning (0, Report.WarningMoveNodeMatchedNoNodes, null, metaitem, $"");
+ } catch (XPathException) {
+ // BG4305
+ Report.LogCodedError (Report.ErrorMoveNodeInvalidXPath, metaitem, path);
+ }
+ break;
+ case "remove-attr":
+ try {
+ var name = metaitem.XGetAttribute ("name");
+ var nodes = apiDocument.ApiDocument.XPathSelectElements (path);
+ var matched = false;
+
+ foreach (var node in nodes) {
+ node.Attributes (name).Remove ();
+ matched = true;
+ }
+
+ if (!matched)
+ // BG8A06
+ Report.LogCodedWarning (0, Report.WarningRemoveAttrMatchedNoNodes, null, metaitem, $"");
+ } catch (XPathException) {
+ // BG4306
+ Report.LogCodedError (Report.ErrorRemoveAttrInvalidXPath, metaitem, path);
+ }
+ break;
+ }
+ }
+ }
+
+ public IList GetNamespaceTransforms ()
+ {
+ var list = new List ();
+
+ foreach (var xe in FixupDocument.XPathSelectElements ("/metadata/ns-replace")) {
+ if (NamespaceTransform.TryParse (xe, out var transform))
+ list.Add (transform);
+ }
+
+ return list;
+ }
+
+ bool ShouldSkip (XElement node, AndroidSdkVersion apiLevel, int productVersion)
+ {
+ if (apiLevel > 0) {
+ var since = node.XGetAttributeAsAndroidSdkVersion ("api-since");
+ var until = node.XGetAttributeAsAndroidSdkVersion ("api-until");
+
+ if (since is AndroidSdkVersion since_int && since_int > apiLevel)
+ return true;
+ else if (until is AndroidSdkVersion until_int && until_int < apiLevel)
+ return true;
+ }
+
+ if (productVersion > 0) {
+ var product_version = node.XGetAttributeAsAndroidSdkVersion ("product-version");
+
+ if (product_version is AndroidSdkVersion version && version > productVersion)
+ return true;
+
+ }
+ return false;
+ }
+
+ bool ShouldApply (XElement node, ApiXmlDocument apiDocument)
+ {
+ if (apiDocument.ApiSource.HasValue ()) {
+ var targetsource = node.XGetAttribute ("api-source");
+
+ if (!targetsource.HasValue ())
+ return true;
+
+ return targetsource == apiDocument.ApiSource;
+ }
+
+ return true;
+ }
+ }
+}
diff --git a/external/Java.Interop/src/Java.Interop.Tools.Generator/Metadata/NamespaceTransform.cs b/external/Java.Interop/src/Java.Interop.Tools.Generator/Metadata/NamespaceTransform.cs
new file mode 100644
index 00000000000..4db92796e75
--- /dev/null
+++ b/external/Java.Interop/src/Java.Interop.Tools.Generator/Metadata/NamespaceTransform.cs
@@ -0,0 +1,123 @@
+using System;
+using System.Collections.Generic;
+using System.Diagnostics.CodeAnalysis;
+using System.Xml.Linq;
+using Xamarin.Android.Tools;
+
+namespace Java.Interop.Tools.Generator
+{
+ public class NamespaceTransform
+ {
+ public string OldValue { get; }
+ public string NewValue { get; }
+ public bool IsStartsWith { get; }
+ public bool IsEndsWith { get; }
+
+ public NamespaceTransform (string oldValue, string newValue)
+ {
+ OldValue = oldValue;
+ NewValue = newValue;
+
+ if (OldValue.EndsWith (".", StringComparison.Ordinal)) {
+ IsStartsWith = true;
+ OldValue = OldValue.Substring (0, OldValue.Length - 1);
+ }
+
+ if (OldValue.StartsWith (".", StringComparison.Ordinal)) {
+ IsEndsWith = true;
+ OldValue = OldValue.Substring (1);
+ }
+ }
+
+ public string ApplyInternal (string value)
+ {
+ string result;
+
+ while (true) {
+ result = ApplyInternal (value);
+
+ if (result == value)
+ return result;
+
+ value = result;
+ }
+ }
+
+ public string Apply (string value)
+ {
+ // Handle a "starts with" and "ends with" transform
+ if (IsStartsWith && IsEndsWith) {
+ if (value.Equals (OldValue, StringComparison.OrdinalIgnoreCase))
+ return NewValue;
+
+ // Don't let this fall through
+ return value;
+ }
+
+ // Handle a "starts with" transform
+ if (IsStartsWith) {
+ if (value.StartsWith (OldValue, StringComparison.OrdinalIgnoreCase))
+ return (NewValue + value.Substring (OldValue.Length)).TrimStart ('.');
+
+ return value;
+ }
+
+ // Handle an "ends with" transform
+ if (IsEndsWith) {
+ if (value.EndsWith (OldValue, StringComparison.OrdinalIgnoreCase))
+ return (value.Substring (0, value.Length - OldValue.Length) + NewValue).TrimEnd ('.');
+
+ return value;
+ }
+
+ // Handle an "anywhere" transform
+ var value_tokens = value.Split ('.');
+ var match_tokens = OldValue.Split ('.');
+
+ var results = new List ();
+
+ for (var i = 0; i < value_tokens.Length; i++) {
+ if (AtMatch (value_tokens, i, match_tokens, 0)) {
+ if (NewValue.HasValue ())
+ results.Add (NewValue);
+
+ i += match_tokens.Length - 1;
+ } else {
+ results.Add (value_tokens [i]);
+ }
+ }
+
+ return string.Join (".", results);
+ }
+
+ public static bool TryParse (XElement element, [NotNullWhen (true)] out NamespaceTransform? transform)
+ {
+ var source = element.XGetAttribute ("source");
+ var replacement = element.XGetAttribute ("replacement");
+
+ if (!source.HasValue () || replacement is null) {
+ Report.LogCodedWarning (0, Report.WarningInvalidNamespaceTransform, null, element, element.ToString ());
+ transform = null;
+ return false;
+ }
+
+ transform = new NamespaceTransform (source, replacement);
+ return true;
+ }
+
+ private bool AtMatch (string [] valueTokens, int valueIndex, string [] matchTokens, int matchIndex)
+ {
+ if (matchIndex >= matchTokens.Length)
+ return true;
+
+ if (valueIndex >= valueTokens.Length)
+ return false;
+
+ if (string.Compare (valueTokens [valueIndex], matchTokens [matchIndex], StringComparison.OrdinalIgnoreCase) == 0)
+ return AtMatch (valueTokens, valueIndex + 1, matchTokens, matchIndex + 1);
+
+ return false;
+ }
+ }
+}
+
diff --git a/external/Java.Interop/src/Java.Interop.Tools.Generator/Utilities/AndroidSdkVersion.cs b/external/Java.Interop/src/Java.Interop.Tools.Generator/Utilities/AndroidSdkVersion.cs
new file mode 100644
index 00000000000..b78de05b621
--- /dev/null
+++ b/external/Java.Interop/src/Java.Interop.Tools.Generator/Utilities/AndroidSdkVersion.cs
@@ -0,0 +1,126 @@
+
+using System;
+using System.Diagnostics.CodeAnalysis;
+
+namespace Java.Interop.Tools.Generator;
+
+public struct AndroidSdkVersion : IComparable, IComparable, IEquatable
+{
+ public int ApiLevel { get; private set; }
+ public int MinorRelease { get; private set; }
+
+ public AndroidSdkVersion (int major, int minor = 0)
+ {
+ ApiLevel = major;
+ MinorRelease = minor;
+ }
+
+ int IComparable.CompareTo (object? value)
+ {
+ var other = value as AndroidSdkVersion?;
+ if (other == null) {
+ return 1;
+ }
+ return CompareTo (other.Value);
+ }
+
+ public int CompareTo (AndroidSdkVersion value)
+ {
+ int r = ApiLevel.CompareTo (value.ApiLevel);
+ if (r == 0) {
+ r = MinorRelease.CompareTo (value.MinorRelease);
+ }
+ return r;
+ }
+
+ public override int GetHashCode ()
+ => ApiLevel ^ MinorRelease;
+
+ public override bool Equals (object? value)
+ {
+ var other = value as AndroidSdkVersion?;
+ if (other == null) {
+ return false;
+ }
+ return Equals (other.Value);
+ }
+
+ public bool Equals (AndroidSdkVersion value)
+ {
+ return value.ApiLevel == ApiLevel && value.MinorRelease == MinorRelease;
+ }
+
+ public override string ToString ()
+ => MinorRelease == 0
+ ? ApiLevel.ToString ()
+ : $"{ApiLevel}.{MinorRelease}";
+
+ // public static implicit operator ApiLevel (int value)
+ // => new ApiLevel (value);
+
+ public static bool operator < (AndroidSdkVersion lhs, AndroidSdkVersion rhs)
+ => lhs.CompareTo (rhs) < 0;
+ public static bool operator <= (AndroidSdkVersion lhs, AndroidSdkVersion rhs)
+ => lhs.CompareTo (rhs) <= 0;
+ public static bool operator > (AndroidSdkVersion lhs, AndroidSdkVersion rhs)
+ => lhs.CompareTo (rhs) > 0;
+ public static bool operator >= (AndroidSdkVersion lhs, AndroidSdkVersion rhs)
+ => lhs.CompareTo (rhs) >= 0;
+ public static bool operator == (AndroidSdkVersion lhs, AndroidSdkVersion rhs)
+ => lhs.Equals (rhs);
+ public static bool operator != (AndroidSdkVersion lhs, AndroidSdkVersion rhs)
+ => !lhs.Equals (rhs);
+
+ public static bool operator < (AndroidSdkVersion lhs, int rhs)
+ => lhs.ApiLevel.CompareTo (rhs) < 0;
+ public static bool operator <= (AndroidSdkVersion lhs, int rhs)
+ => lhs.ApiLevel.CompareTo (rhs) <= 0;
+ public static bool operator > (AndroidSdkVersion lhs, int rhs)
+ => lhs.ApiLevel.CompareTo (rhs) > 0;
+ public static bool operator >= (AndroidSdkVersion lhs, int rhs)
+ => lhs.ApiLevel.CompareTo (rhs) >= 0;
+ public static bool operator == (AndroidSdkVersion lhs, int rhs)
+ => lhs.ApiLevel.Equals (rhs);
+ public static bool operator != (AndroidSdkVersion lhs, int rhs)
+ => !lhs.ApiLevel.Equals (rhs);
+
+ public static bool operator < (int lhs, AndroidSdkVersion rhs)
+ => lhs.CompareTo (rhs.ApiLevel) < 0;
+ public static bool operator <= (int lhs, AndroidSdkVersion rhs)
+ => lhs.CompareTo (rhs.ApiLevel) <= 0;
+ public static bool operator > (int lhs, AndroidSdkVersion rhs)
+ => lhs.CompareTo (rhs.ApiLevel) > 0;
+ public static bool operator >= (int lhs, AndroidSdkVersion rhs)
+ => lhs.CompareTo (rhs.ApiLevel) >= 0;
+ public static bool operator == (int lhs, AndroidSdkVersion rhs)
+ => lhs.Equals (rhs.ApiLevel);
+ public static bool operator != (int lhs, AndroidSdkVersion rhs)
+ => !lhs.Equals (rhs.ApiLevel);
+
+ public static bool TryParse (string? value, out AndroidSdkVersion apiLevel)
+ {
+ if (value == null) {
+ apiLevel = default;
+ return false;
+ }
+ if (Version.TryParse (value, out var v)) {
+ apiLevel = new AndroidSdkVersion (v.Major, v.Minor);
+ return true;
+ }
+ if (int.TryParse (value, out var major)) {
+ apiLevel = new AndroidSdkVersion (major);
+ return true;
+ }
+ apiLevel = default;
+ return false;
+ }
+
+ public static AndroidSdkVersion Parse (string? value)
+ {
+ AndroidSdkVersion v;
+ if (TryParse (value, out v)) {
+ return v;
+ }
+ throw new NotSupportedException ($"Could not parse `{value}` as an ApiLevel.");
+ }
+}
diff --git a/external/Java.Interop/src/Java.Interop.Tools.Generator/Utilities/ApiXmlDocument.cs b/external/Java.Interop/src/Java.Interop.Tools.Generator/Utilities/ApiXmlDocument.cs
new file mode 100644
index 00000000000..42f6a4f1b8c
--- /dev/null
+++ b/external/Java.Interop/src/Java.Interop.Tools.Generator/Utilities/ApiXmlDocument.cs
@@ -0,0 +1,47 @@
+using System;
+using System.Xml;
+using System.Xml.Linq;
+using Xamarin.Android.Tools;
+
+namespace Java.Interop.Tools.Generator
+{
+ public class ApiXmlDocument
+ {
+ public XDocument ApiDocument { get; }
+ public string ApiLevel { get; }
+ public int ProductVersion { get; }
+
+ public string? ApiSource => ApiDocument.Root?.XGetAttribute ("api-source");
+
+ public ApiXmlDocument (XDocument document, string apiLevel, int productVersion)
+ {
+ ApiDocument = document;
+ ApiLevel = apiLevel;
+ ProductVersion = productVersion;
+ }
+
+ public static ApiXmlDocument? Load (string filename, string apiLevel, int productVersion)
+ {
+ if (UtilityExtensions.LoadXmlDocument (filename) is XDocument doc)
+ return new ApiXmlDocument (doc, apiLevel, productVersion);
+
+ return null;
+ }
+
+ public void ApplyFixupFile (string filename)
+ {
+ if (FixupXmlDocument.Load (filename) is FixupXmlDocument fixup)
+ ApplyFixupFile (fixup);
+ }
+
+ public void ApplyFixupFile (FixupXmlDocument fixup)
+ {
+ try {
+ fixup.Apply (this, ApiLevel, ProductVersion);
+ } catch (XmlException ex) {
+ // BG4200
+ Report.LogCodedErrorAndExit (Report.ErrorFailedToProcessMetadata, null, fixup.FixupDocument, ex.Message);
+ }
+ }
+ }
+}
diff --git a/external/Java.Interop/src/Java.Interop.Tools.Generator/Utilities/CsvParser.cs b/external/Java.Interop/src/Java.Interop.Tools.Generator/Utilities/CsvParser.cs
new file mode 100644
index 00000000000..31228131636
--- /dev/null
+++ b/external/Java.Interop/src/Java.Interop.Tools.Generator/Utilities/CsvParser.cs
@@ -0,0 +1,37 @@
+using System;
+
+namespace Java.Interop.Tools.Generator
+{
+ public class CsvParser
+ {
+ readonly string [] fields;
+
+ public CsvParser (string line)
+ {
+ fields = line.Split (',');
+ }
+
+ public string GetField (int index)
+ {
+ if (index >= fields.Length)
+ return string.Empty;
+
+ return fields [index].Trim ();
+ }
+
+ public AndroidSdkVersion GetFieldAsAndroidSdkVersion (int index)
+ {
+ return AndroidSdkVersion.Parse (GetField (index));
+ }
+
+ public AndroidSdkVersion? GetFieldAsNullableAndroidSdkVersion (int index)
+ {
+ var value = GetField (index);
+
+ if (AndroidSdkVersion.TryParse (value, out var val))
+ return val;
+
+ return default;
+ }
+ }
+}
diff --git a/external/Java.Interop/src/Java.Interop.Tools.Generator/Utilities/ISourceLineInfo.cs b/external/Java.Interop/src/Java.Interop.Tools.Generator/Utilities/ISourceLineInfo.cs
new file mode 100644
index 00000000000..2cd96537d03
--- /dev/null
+++ b/external/Java.Interop/src/Java.Interop.Tools.Generator/Utilities/ISourceLineInfo.cs
@@ -0,0 +1,27 @@
+using System;
+
+namespace Java.Interop.Tools.Generator
+{
+ public interface ISourceLineInfo
+ {
+ int LineNumber { get; set; }
+ int LinePosition { get; set; }
+ string SourceFile { get; set; }
+ }
+
+ public class SourceLineInfo : ISourceLineInfo
+ {
+ public int LineNumber { get; set; }
+ public int LinePosition { get; set; }
+ public string SourceFile { get; set; }
+
+ public SourceLineInfo (string sourceFile) : this (sourceFile, 0, 0) { }
+
+ public SourceLineInfo (string sourceFile, int lineNumber, int linePosition)
+ {
+ SourceFile = sourceFile;
+ LineNumber = lineNumber;
+ LinePosition = linePosition;
+ }
+ }
+}
diff --git a/external/Java.Interop/src/Java.Interop.Tools.Generator/Utilities/NamingConverter.cs b/external/Java.Interop/src/Java.Interop.Tools.Generator/Utilities/NamingConverter.cs
new file mode 100644
index 00000000000..17b4d769946
--- /dev/null
+++ b/external/Java.Interop/src/Java.Interop.Tools.Generator/Utilities/NamingConverter.cs
@@ -0,0 +1,100 @@
+using System;
+using System.Linq;
+using System.Xml.Linq;
+
+namespace Java.Interop.Tools.Generator
+{
+ public static class NamingConverter
+ {
+ ///
+ /// Converts a 'merge.SourceFile' attribute to an API level. (ex. "..\..\bin\BuildDebug\api\api-28.xml.in")
+ ///
+ public static AndroidSdkVersion ParseApiLevel (string? value)
+ {
+ var result = ExtractApiLevel (value);
+ if (!result.HasValue ())
+ return default;
+
+ return result switch {
+ "R" => new AndroidSdkVersion (30),
+ "S" => new AndroidSdkVersion (31),
+ _ => AndroidSdkVersion.Parse (result)
+ };
+ }
+
+ static string? ExtractApiLevel (string? value)
+ {
+ if (!value.HasValue ())
+ return null;
+
+ const string ApiFilenamePrefix = "api-";
+
+ var hyphen = value.LastIndexOf (ApiFilenamePrefix);
+ if (hyphen < 0 || checked (hyphen + 1 + ApiFilenamePrefix.Length) >= value.Length)
+ return null;
+ hyphen += ApiFilenamePrefix.Length;
+
+ int end = hyphen;
+ if (char.IsAsciiDigit (value [end++])) {
+ for ( ; end < value.Length; ++end) {
+ var n = value [end + 1];
+ if (!char.IsAsciiDigit (n) && n != '.')
+ break;
+ }
+ } else {
+ // codename; expect ALLCAPS
+ for ( ; end < value.Length; ++end) {
+ if (!char.IsAsciiLetterUpper (value [end]))
+ break;
+ }
+ }
+
+ return value.Substring (hyphen, end - hyphen);
+ }
+
+ // The 'merge.SourceFile' attribute may be on the element, or only on its parent. For example,
+ // a new 'class' added will only put the attribute on the '' element and not its children s.
+ public static AndroidSdkVersion ParseApiLevel (XElement element)
+ {
+ var loop = element;
+
+ while (loop != null) {
+ if (loop.Attribute ("merge.SourceFile") is XAttribute attr)
+ return ParseApiLevel (attr.Value);
+
+ loop = loop.Parent;
+ }
+
+ return default;
+ }
+
+ public static string ConvertNamespaceToCSharp (string v)
+ {
+ return string.Join (".", v.Split ('.').Select (s => Capitalize (s)));
+ }
+
+ public static string ConvertClassToCSharp (string javaType)
+ {
+ return javaType;
+ }
+
+ public static string ConvertFieldToCSharp (string javaName)
+ {
+ // EX: FOREGROUND_SERVICE_IMMEDIATE
+ return string.Join ("", javaName.Split ('_').Select (s => SentenceCase (s)));
+ }
+
+ public static string Capitalize (this string value)
+ {
+ if (value.Length < 1)
+ return value;
+
+ return char.ToUpperInvariant (value[0]) + value.Substring (1);
+ }
+
+ public static string SentenceCase (this string value)
+ {
+ return Capitalize (value.ToLowerInvariant ());
+ }
+ }
+}
diff --git a/external/Java.Interop/src/Java.Interop.Tools.Generator/Utilities/Report.cs b/external/Java.Interop/src/Java.Interop.Tools.Generator/Utilities/Report.cs
new file mode 100644
index 00000000000..4485049669b
--- /dev/null
+++ b/external/Java.Interop/src/Java.Interop.Tools.Generator/Utilities/Report.cs
@@ -0,0 +1,208 @@
+using System;
+using System.Diagnostics;
+using System.Xml;
+using System.Xml.Linq;
+
+namespace Java.Interop.Tools.Generator
+{
+ public class Report
+ {
+ public static int? Verbosity { get; set; }
+ public static Action? OutputDelegate { get; set; }
+
+ public class LocalizedMessage
+ {
+ public int Code { get; set; }
+ public string Value { get; set; }
+
+ public LocalizedMessage (int code, string value)
+ {
+ Code = code;
+ Value = value;
+ }
+ }
+
+ public static LocalizedMessage ErrorFailedToRemoveConstants => new LocalizedMessage (0x4000, Localization.Resources.Generator_BG4000);
+ public static LocalizedMessage ErrorFailedToProcessEnumMap => new LocalizedMessage (0x4100, Localization.Resources.Generator_BG4100);
+ public static LocalizedMessage ErrorFailedToProcessMetadata => new LocalizedMessage (0x4200, Localization.Resources.Generator_BG4200);
+ public static LocalizedMessage ErrorRemoveNodeInvalidXPath => new LocalizedMessage (0x4301, Localization.Resources.Generator_BG4300);
+ public static LocalizedMessage ErrorAddNodeInvalidXPath => new LocalizedMessage (0x4302, Localization.Resources.Generator_BG4300);
+ public static LocalizedMessage ErrorChangeNodeInvalidXPath => new LocalizedMessage (0x4303, Localization.Resources.Generator_BG4300);
+ public static LocalizedMessage ErrorAttrInvalidXPath => new LocalizedMessage (0x4304, Localization.Resources.Generator_BG4300);
+ public static LocalizedMessage ErrorMoveNodeInvalidXPath => new LocalizedMessage (0x4305, Localization.Resources.Generator_BG4300);
+ public static LocalizedMessage ErrorRemoveAttrInvalidXPath => new LocalizedMessage (0x4306, Localization.Resources.Generator_BG4300);
+ public static LocalizedMessage ErrorMissingAttrName => new LocalizedMessage (0x4307, Localization.Resources.Generator_BG4307);
+ public static LocalizedMessage ErrorUnexpectedGlobal => new LocalizedMessage (0x4400, Localization.Resources.Generator_BG4400);
+
+ public static LocalizedMessage WarningUnexpectedChild => new LocalizedMessage (0x8101, Localization.Resources.Generator_BG8101);
+ public static LocalizedMessage WarningUnknownBaseType => new LocalizedMessage (0x8102, Localization.Resources.Generator_BG8102);
+ public static LocalizedMessage WarningInvalidBaseType => new LocalizedMessage (0x8103, Localization.Resources.Generator_BG8103);
+ public static LocalizedMessage WarningAssemblyParseFailure => new LocalizedMessage (0x8200, Localization.Resources.Generator_BG8200);
+ public static LocalizedMessage WarningMissingClassForConstructor => new LocalizedMessage (0x8300, Localization.Resources.Generator_BG8300);
+ public static LocalizedMessage WarningUnexpectedFieldType => new LocalizedMessage (0x8400, Localization.Resources.Generator_BG8400);
+ public static LocalizedMessage WarningFieldNameCollision_Property => new LocalizedMessage (0x8401, Localization.Resources.Generator_BG8401_Property);
+ public static LocalizedMessage WarningFieldNameCollision_Method => new LocalizedMessage (0x8401, Localization.Resources.Generator_BG8401_Method);
+ public static LocalizedMessage WarningFieldNameCollision_NestedType => new LocalizedMessage (0x8401, Localization.Resources.Generator_BG8401_NestedType);
+ public static LocalizedMessage WarningDuplicateField => new LocalizedMessage (0x8402, Localization.Resources.Generator_BG8402);
+ public static LocalizedMessage WarningTypeNameMatchesEnclosingNamespace => new LocalizedMessage (0x8403, Localization.Resources.Generator_BG8403);
+ public static LocalizedMessage WarningUnexpectedInterfaceChild => new LocalizedMessage (0x8500, Localization.Resources.Generator_BG8500);
+ public static LocalizedMessage WarningEmptyEventName => new LocalizedMessage (0x8501, Localization.Resources.Generator_BG8501);
+ public static LocalizedMessage WarningInvalidDueToInterfaces => new LocalizedMessage (0x8502, Localization.Resources.Generator_BG8502);
+ public static LocalizedMessage WarningInvalidDueToMethods => new LocalizedMessage (0x8503, Localization.Resources.Generator_BG8503);
+ public static LocalizedMessage WarningInvalidEventName => new LocalizedMessage (0x8504, Localization.Resources.Generator_BG8504);
+ public static LocalizedMessage WarningInvalidEventName2 => new LocalizedMessage (0x8505, Localization.Resources.Generator_BG8504);
+ public static LocalizedMessage WarningInvalidEventPropertyName => new LocalizedMessage (0x8506, Localization.Resources.Generator_BG8506);
+ public static LocalizedMessage WarningInvalidXmlFile => new LocalizedMessage (0x8600, Localization.Resources.Generator_BG8600);
+ public static LocalizedMessage WarningNoPackageElements => new LocalizedMessage (0x8601, Localization.Resources.Generator_BG8601);
+ public static LocalizedMessage WarningUnexpectedRootChildNode => new LocalizedMessage (0x8602, Localization.Resources.Generator_BG8602);
+ public static LocalizedMessage WarningUnexpectedPackageChildNode => new LocalizedMessage (0x8603, Localization.Resources.Generator_BG8603);
+ public static LocalizedMessage WarningNestedTypeAncestorNotFound => new LocalizedMessage (0x8604, Localization.Resources.Generator_BG8604);
+ public static LocalizedMessage WarningJavaTypeNotResolved => new LocalizedMessage (0x8605, Localization.Resources.Generator_BG8605);
+ public static LocalizedMessage WarningTypesNotBoundDueToMissingJavaTypes => new LocalizedMessage (0x8606, Localization.Resources.Generator_BG8606);
+ public static LocalizedMessage WarningUnknownReturnType => new LocalizedMessage (0x8700, Localization.Resources.Generator_BG8700);
+ public static LocalizedMessage WarningInvalidReturnType => new LocalizedMessage (0x8701, Localization.Resources.Generator_BG8701);
+ public static LocalizedMessage WarningUnknownParameterType => new LocalizedMessage (0x8800, Localization.Resources.Generator_BG8800);
+ public static LocalizedMessage WarningInvalidParameterType => new LocalizedMessage (0x8801, Localization.Resources.Generator_BG8801);
+ public static LocalizedMessage WarningRemoveNodeMatchedNoNodes => new LocalizedMessage (0x8A00, Localization.Resources.Generator_BG8A00);
+ public static LocalizedMessage WarningAddNodeMatchedNoNodes => new LocalizedMessage (0x8A01, Localization.Resources.Generator_BG8A00);
+ public static LocalizedMessage WarningChangeNodeTypeMatchedNoNodes => new LocalizedMessage (0x8A03, Localization.Resources.Generator_BG8A00);
+ public static LocalizedMessage WarningAttrMatchedNoNodes => new LocalizedMessage (0x8A04, Localization.Resources.Generator_BG8A00);
+ public static LocalizedMessage WarningMoveNodeMatchedNoNodes => new LocalizedMessage (0x8A05, Localization.Resources.Generator_BG8A00);
+ public static LocalizedMessage WarningRemoveAttrMatchedNoNodes => new LocalizedMessage (0x8A06, Localization.Resources.Generator_BG8A00);
+ public static LocalizedMessage WarningInvalidNamespaceTransform => new LocalizedMessage (0x8A07, Localization.Resources.Generator_BG8A07);
+ public static LocalizedMessage WarningNodeMissingPathAttribute => new LocalizedMessage (0x8A08, Localization.Resources.Generator_BG8A08);
+ public static LocalizedMessage WarningUnknownGenericConstraint => new LocalizedMessage (0x8B00, Localization.Resources.Generator_BG8B00);
+ public static LocalizedMessage WarningBaseInterfaceNotFound => new LocalizedMessage (0x8C00, Localization.Resources.Generator_BG8C00);
+ public static LocalizedMessage WarningBaseInterfaceInvalid => new LocalizedMessage (0x8C01, Localization.Resources.Generator_BG8C01);
+ public static LocalizedMessage WarningKotlinNameMangledCollision => new LocalizedMessage (0x8C02, Localization.Resources.Generator_BG8C02);
+
+ public static void LogCodedErrorAndExit (LocalizedMessage message, params string [] args)
+ => LogCodedErrorAndExit (message, null, null, args);
+
+ public static void LogCodedErrorAndExit (LocalizedMessage message, Exception? innerException, params string [] args)
+ => LogCodedErrorAndExit (message, innerException, null, args);
+
+ public static void LogCodedErrorAndExit (LocalizedMessage message, Exception? innerException, XNode? node, params string? [] args)
+ {
+ LogCodedError (message, node, args);
+
+ // Throwing a BindingGeneratorException will cause generator to terminate
+ throw new BindingGeneratorException (message.Code, string.Format (message.Value, args), innerException);
+ }
+
+ public static void LogCodedError (LocalizedMessage message, XNode? node, params string? [] args)
+ {
+ var (file, line, col) = GetLineInfo (node);
+
+ LogCodedError (message, file, line, col, args);
+ }
+
+ public static void LogCodedError (LocalizedMessage message, string? sourceFile, int line, int column, params string? [] args)
+ {
+ WriteOutput (TraceLevel.Error, Format (true, message.Code, sourceFile, line, column, message.Value, args));
+ }
+
+ public static void LogCodedWarning (int verbosity, LocalizedMessage message, params string? [] args)
+ => LogCodedWarning (verbosity, message, null, null, -1, -1, args);
+
+ public static void LogCodedWarning (int verbosity, LocalizedMessage message, ISourceLineInfo sourceInfo, params string? [] args)
+ => LogCodedWarning (verbosity, message, null, sourceInfo.SourceFile, sourceInfo.LineNumber, sourceInfo.LinePosition, args);
+
+ public static void LogCodedWarning (int verbosity, LocalizedMessage message, Exception? innerException, params string? [] args)
+ => LogCodedWarning (verbosity, message, innerException, null, -1, -1, args);
+
+ public static void LogCodedWarning (int verbosity, LocalizedMessage message, Exception? innerException, XNode node, params string? [] args)
+ {
+ var (file, line, col) = GetLineInfo (node);
+
+ LogCodedWarning (verbosity, message, innerException, file, line, col, args);
+ }
+
+ public static void LogCodedWarning (int verbosity, LocalizedMessage message, Exception? innerException, string? sourceFile, int line, int column, params string? [] args)
+ {
+ if (verbosity > (Verbosity ?? 0))
+ return;
+
+ var supp = innerException != null ? " For details, see verbose output." : null;
+ WriteOutput (TraceLevel.Warning, Format (false, message.Code, sourceFile, line, column, message.Value, args) + supp);
+
+ if (innerException != null)
+ WriteOutput (TraceLevel.Warning, innerException.ToString ());
+ }
+
+ public static void Verbose (int verbosity, string format, params object?[] args)
+ {
+ if (verbosity > (Verbosity ?? 0))
+ return;
+ WriteOutput (TraceLevel.Verbose, format, args);
+ }
+
+ public static string FormatCodedMessage (bool error, LocalizedMessage message, params object? [] args)
+ => Format (error, message.Code, null, -1, -1, message.Value, args);
+
+ public static string Format (bool error, int errorCode, string? sourceFile, int line, int column, string format, params object?[] args)
+ {
+ var origin = FormatOrigin (sourceFile, line, column);
+
+ return $"{origin}{(error ? "error" : "warning")} BG{errorCode:X04}: " + string.Format (format, args);
+ }
+
+ static string? FormatOrigin (string? sourceFile, int line, int column)
+ {
+ if (string.IsNullOrWhiteSpace (sourceFile))
+ return null;
+
+ var ret = sourceFile;
+
+ if (line == 0)
+ return ret + ": ";
+
+ if (column > 0)
+ return ret + $"({line},{column}): ";
+
+ return ret + $"({line}): ";
+ }
+
+ static (string? file, int line, int col) GetLineInfo (XNode? node)
+ {
+ if (node is null)
+ return (null, -1, -1);
+
+ var file = Uri.TryCreate (node.BaseUri, UriKind.Absolute, out var uri) ? uri.LocalPath : null;
+ var pos = (node as IXmlLineInfo)?.HasLineInfo () == true ? node as IXmlLineInfo : null;
+
+ return (file, pos?.LineNumber ?? -1, pos?.LinePosition ?? -1);
+ }
+
+ static void WriteOutput (TraceLevel traceLevel, string format, params object?[] args)
+ {
+ // Write to overridden output if requested
+ if (OutputDelegate != null) {
+ OutputDelegate (traceLevel, string.Format (format, args));
+ return;
+ }
+
+ // Write to Console.Error
+ Console.Error.WriteLine (format, args);
+ }
+ }
+
+ ///
+ /// Throwing this exception will cause generator to exit gracefully.
+ ///
+ public class BindingGeneratorException : Exception
+ {
+ public BindingGeneratorException (int errorCode, string message)
+ : this (errorCode, message, null)
+ {
+ }
+ public BindingGeneratorException (int errorCode, string message, Exception? innerException)
+ : this (errorCode, null, -1, -1, message, innerException)
+ {
+ }
+ public BindingGeneratorException (int errorCode, string? sourceFile, int line, int column, string message, Exception? innerException)
+ : base (Report.Format (true, errorCode, sourceFile, line, column, message), innerException)
+ {
+ }
+ }
+}
diff --git a/external/Java.Interop/src/Java.Interop.Tools.JavaCallableWrappers/Extensions/XmlExtensions.cs b/external/Java.Interop/src/Java.Interop.Tools.JavaCallableWrappers/Extensions/XmlExtensions.cs
new file mode 100644
index 00000000000..b70f24aae8e
--- /dev/null
+++ b/external/Java.Interop/src/Java.Interop.Tools.JavaCallableWrappers/Extensions/XmlExtensions.cs
@@ -0,0 +1,41 @@
+using System;
+using System.Xml;
+using System.Xml.Linq;
+
+namespace Java.Interop.Tools.JavaCallableWrappers.Extensions;
+
+static class XmlExtensions
+{
+ public static T GetAttributeOrDefault (this XElement xml, string name, T defaultValue)
+ {
+ var value = xml.Attribute (name)?.Value;
+
+ if (string.IsNullOrWhiteSpace (value))
+ return defaultValue;
+
+ return (T) Convert.ChangeType (value, typeof (T));
+ }
+
+ public static string GetRequiredAttribute (this XElement xml, string name)
+ {
+ var value = xml.Attribute (name)?.Value;
+
+ if (string.IsNullOrWhiteSpace (value))
+ throw new InvalidOperationException ($"Missing required attribute '{name}' within element `{xml.ToString()}`.");
+
+ return value!; // NRT - Guarded by IsNullOrWhiteSpace check above
+ }
+
+ public static void WriteAttributeStringIfNotNull (this XmlWriter xml, string name, string? value)
+ {
+ if (value is not null)
+ xml.WriteAttributeString (name, value);
+ }
+
+ public static void WriteAttributeStringIfNotFalse (this XmlWriter xml, string name, bool value)
+ {
+ // If value is false, don't write the attribute, we'll default to false on import
+ if (value)
+ xml.WriteAttributeString (name, value.ToString ());
+ }
+}
diff --git a/external/Java.Interop/src/Java.Interop.Tools.JavaCallableWrappers/Java.Interop.Tools.JavaCallableWrappers.Adapters/CecilImporter.cs b/external/Java.Interop/src/Java.Interop.Tools.JavaCallableWrappers/Java.Interop.Tools.JavaCallableWrappers.Adapters/CecilImporter.cs
new file mode 100644
index 00000000000..c60045c0103
--- /dev/null
+++ b/external/Java.Interop/src/Java.Interop.Tools.JavaCallableWrappers/Java.Interop.Tools.JavaCallableWrappers.Adapters/CecilImporter.cs
@@ -0,0 +1,570 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using Android.Runtime;
+using Java.Interop.Tools.Cecil;
+using Java.Interop.Tools.Diagnostics;
+using Java.Interop.Tools.JavaCallableWrappers.CallableWrapperMembers;
+using Java.Interop.Tools.JavaCallableWrappers.Utilities;
+using Java.Interop.Tools.TypeNameMappings;
+using Mono.Cecil;
+
+namespace Java.Interop.Tools.JavaCallableWrappers.Adapters;
+
+public class CecilImporter
+{
+ // Don't expose internal "outerType" parameter to the public API
+ public static CallableWrapperType CreateType (TypeDefinition type, IMetadataResolver resolver, CallableWrapperReaderOptions? options = null)
+ => CreateType (type, resolver, options, null);
+
+ static CallableWrapperType CreateType (TypeDefinition type, IMetadataResolver resolver, CallableWrapperReaderOptions? options = null, string? outerType = null)
+ {
+ if (type.IsEnum || type.IsInterface || type.IsValueType)
+ Diagnostic.Error (4200, CecilExtensions.LookupSource (type), Localization.Resources.JavaCallableWrappers_XA4200, type.FullName);
+
+ var jniName = JavaNativeTypeManager.ToJniName (type, resolver);
+
+ if (jniName is null)
+ Diagnostic.Error (4201, CecilExtensions.LookupSource (type), Localization.Resources.JavaCallableWrappers_XA4201, type.FullName);
+
+ if (outerType != null && !string.IsNullOrEmpty (outerType)) {
+ jniName = jniName.Substring (outerType.Length + 1);
+ ExtractJavaNames (outerType, out var p, out outerType);
+ }
+
+ ExtractJavaNames (jniName, out var package, out var name);
+
+ options ??= new CallableWrapperReaderOptions ();
+
+ if (string.IsNullOrEmpty (package) &&
+ (type.IsSubclassOf ("Android.App.Activity", resolver) ||
+ type.IsSubclassOf ("Android.App.Application", resolver) ||
+ type.IsSubclassOf ("Android.App.Service", resolver) ||
+ type.IsSubclassOf ("Android.Content.BroadcastReceiver", resolver) ||
+ type.IsSubclassOf ("Android.Content.ContentProvider", resolver)))
+ Diagnostic.Error (4203, CecilExtensions.LookupSource (type), Localization.Resources.JavaCallableWrappers_XA4203, jniName);
+
+ var cwt = new CallableWrapperType (name, package, type.GetPartialAssemblyQualifiedName (resolver)) {
+ IsApplication = JavaNativeTypeManager.IsApplication (type, resolver),
+ IsInstrumentation = JavaNativeTypeManager.IsInstrumentation (type, resolver),
+ IsAbstract = type.IsAbstract,
+ ApplicationJavaClass = options.DefaultApplicationJavaClass,
+ GenerateOnCreateOverrides = options.DefaultGenerateOnCreateOverrides,
+ MonoRuntimeInitialization = options.DefaultMonoRuntimeInitialization,
+ };
+
+ // Type annotations
+ cwt.Annotations.AddRange (CreateAnnotations (type, resolver));
+
+ // Extends
+ cwt.ExtendsType = GetJavaTypeName (type.BaseType, resolver);
+
+ // Implemented interfaces
+ foreach (var ifaceInfo in type.Interfaces) {
+ var iface = resolver.Resolve (ifaceInfo.InterfaceType);
+ if (iface is null)
+ continue;
+
+ if (!CecilExtensions.GetTypeRegistrationAttributes (iface).Any ())
+ continue;
+
+ cwt.ImplementedInterfaces.Add (GetJavaTypeName (iface, resolver));
+ }
+
+ // Application constructor
+ if (CreateApplicationConstructor (cwt.Name, type, resolver) is CallableWrapperApplicationConstructor app_ctor)
+ cwt.ApplicationConstructor = app_ctor;
+
+ // Methods
+ foreach (var minfo in type.Methods.Where (m => !m.IsConstructor)) {
+ var baseRegisteredMethod = CecilExtensions.GetBaseRegisteredMethod (minfo, resolver);
+
+ if (baseRegisteredMethod is not null)
+ AddMethod (cwt, type, baseRegisteredMethod, minfo, options.MethodClassifier, resolver);
+ else if (minfo.AnyCustomAttributes ("Java.Interop.JavaCallableAttribute")) {
+ AddMethod (cwt, type, null, minfo, options.MethodClassifier, resolver);
+ cwt.HasExport = true;
+ } else if (minfo.AnyCustomAttributes ("Java.Interop.JavaCallableConstructorAttribute")) {
+ AddMethod (cwt, type, null, minfo, options.MethodClassifier, resolver);
+ cwt.HasExport = true;
+ } else if (minfo.AnyCustomAttributes (typeof (ExportFieldAttribute))) {
+ AddMethod (cwt, type, null, minfo, options.MethodClassifier, resolver);
+ cwt.HasExport = true;
+ } else if (minfo.AnyCustomAttributes (typeof (ExportAttribute))) {
+ AddMethod (cwt, type, null, minfo, options.MethodClassifier, resolver);
+ cwt.HasExport = true;
+ }
+ }
+
+ // Methods from interfaces
+ foreach (InterfaceImplementation ifaceInfo in type.Interfaces) {
+ var typeReference = ifaceInfo.InterfaceType;
+ var typeDefinition = resolver.Resolve (typeReference);
+
+ if (typeDefinition is null) {
+ Diagnostic.Error (4204,
+ CecilExtensions.LookupSource (type),
+ Localization.Resources.JavaCallableWrappers_XA4204,
+ typeReference.FullName);
+ continue;
+ }
+
+ if (!CecilExtensions.GetTypeRegistrationAttributes (typeDefinition).Any ())
+ continue;
+
+ foreach (MethodDefinition imethod in typeDefinition.Methods) {
+ if (imethod.IsStatic)
+ continue;
+
+ AddMethod (cwt, type, imethod, imethod, options.MethodClassifier, resolver);
+ }
+ }
+
+ // Constructors
+ var ctorTypes = new List () {
+ type,
+ };
+
+ foreach (var bt in type.GetBaseTypes (resolver)) {
+ ctorTypes.Add (bt);
+ var rattr = CecilExtensions.GetTypeRegistrationAttributes (bt).FirstOrDefault ();
+
+ if (rattr != null && rattr.DoNotGenerateAcw)
+ break;
+ }
+
+ ctorTypes.Reverse ();
+
+ var curCtors = new List ();
+
+ foreach (var minfo in type.Methods) {
+ if (minfo.IsConstructor && minfo.AnyCustomAttributes (typeof (ExportAttribute))) {
+ if (minfo.IsStatic) {
+ // Diagnostic.Warning (log, "ExportAttribute does not work on static constructor");
+ } else {
+ if (CreateConstructor (cwt, minfo, ctorTypes [0], type, outerType, null, curCtors, false, true, resolver) is CallableWrapperConstructor c)
+ cwt.Constructors.Add (c);
+
+ cwt.HasExport = true;
+ }
+ }
+ }
+
+ AddConstructors (cwt, ctorTypes [0], type, outerType, null, curCtors, true, resolver);
+
+ for (var i = 1; i < ctorTypes.Count; ++i) {
+ var baseCtors = curCtors;
+ curCtors = new List ();
+ AddConstructors (cwt, ctorTypes [i], type, outerType, baseCtors, curCtors, false, resolver);
+ }
+
+ AddNestedTypes (cwt, type, resolver, options);
+
+ return cwt;
+ }
+
+ static CallableWrapperField CreateField (MethodDefinition method, string fieldName, IMetadataResolver resolver)
+ {
+ var visibility = GetJavaAccess (method.Attributes & MethodAttributes.MemberAccessMask);
+ var type_name = JavaNativeTypeManager.ReturnTypeFromSignature (JavaNativeTypeManager.GetJniSignature (method, resolver))?.Type
+ ?? throw new ArgumentException ($"Could not get JNI signature for method `{method.Name}`", nameof (method));
+
+ var field = new CallableWrapperField (fieldName, type_name, visibility, method.Name) {
+ IsStatic = method.IsStatic,
+ };
+
+ field.Annotations.AddRange (CreateAnnotations (method, resolver));
+
+ return field;
+ }
+
+ // Constructor with [Register] attribute
+ static CallableWrapperConstructor CreateConstructor (MethodDefinition methodDefinition, CallableWrapperType type, RegisterAttribute register, string? managedParameters, string? outerType, IMetadataResolver cache, bool shouldBeDynamicallyRegistered = true)
+ {
+ var method = CreateConstructor (methodDefinition.Name, type, register.Signature, register.Connector, managedParameters, outerType, null);
+
+ method.Annotations.AddRange (CreateAnnotations (methodDefinition, cache));
+ method.IsDynamicallyRegistered = shouldBeDynamicallyRegistered;
+
+ return method;
+ }
+
+ // Constructor with [Export] attribute
+ static CallableWrapperConstructor CreateConstructor (MethodDefinition methodDefinition, CallableWrapperType type, ExportAttribute export, string? managedParameters, IMetadataResolver resolver)
+ {
+ var method = CreateConstructor (methodDefinition.Name, type, JavaNativeTypeManager.GetJniSignature (methodDefinition, resolver), "__export__", null, null, export.SuperArgumentsString);
+
+ method.IsExport = true;
+ method.IsStatic = methodDefinition.IsStatic;
+ method.JavaAccess = GetJavaAccess (methodDefinition.Attributes & MethodAttributes.MemberAccessMask);
+ method.ThrownTypeNames = export.ThrownNames;
+ method.JavaNameOverride = export.Name;
+ method.ManagedParameters = managedParameters;
+ method.Annotations.AddRange (CreateAnnotations (methodDefinition, resolver));
+
+ return method;
+ }
+
+ // Common constructor creation code
+ static CallableWrapperConstructor CreateConstructor (string name, CallableWrapperType type, string? signature, string? connector, string? managedParameters, string? outerType, string? superCall)
+ {
+ signature = signature ?? throw new ArgumentNullException ("`connector` cannot be null.", nameof (connector));
+ var method_name = "n_" + name + ":" + signature + ":" + connector;
+
+ var method = new CallableWrapperConstructor (type, name, method_name, signature);
+
+ PopulateMethod (method, signature, managedParameters, outerType, superCall);
+
+ method.Name = type.Name;
+
+ return method;
+ }
+
+ // Method with a [Register] attribute
+ static CallableWrapperMethod CreateMethod (MethodDefinition methodDefinition, CallableWrapperType declaringType, RegisterAttribute register, string? managedParameters, string? outerType, IMetadataResolver resolver, bool shouldBeDynamicallyRegistered = true)
+ {
+ var method = CreateMethod (register.Name, declaringType, register.Signature, register.Connector, managedParameters, outerType, null);
+
+ method.Annotations.AddRange (CreateAnnotations (methodDefinition, resolver));
+ method.IsDynamicallyRegistered = shouldBeDynamicallyRegistered;
+
+ return method;
+ }
+
+ // Method with an [Export] attribute
+ static CallableWrapperMethod CreateMethod (MethodDefinition methodDefinition, CallableWrapperType declaringType, ExportAttribute export, string? managedParameters, IMetadataResolver resolver)
+ {
+ var method = CreateMethod (methodDefinition.Name, declaringType, JavaNativeTypeManager.GetJniSignature (methodDefinition, resolver), "__export__", null, null, export.SuperArgumentsString);
+
+ method.IsExport = true;
+ method.IsStatic = methodDefinition.IsStatic;
+ method.JavaAccess = GetJavaAccess (methodDefinition.Attributes & MethodAttributes.MemberAccessMask);
+ method.ThrownTypeNames = export.ThrownNames;
+ method.JavaNameOverride = export.Name;
+ method.ManagedParameters = managedParameters;
+ method.Annotations.AddRange (CreateAnnotations (methodDefinition, resolver));
+
+ return method;
+ }
+
+ // Method with an [ExportField] attribute
+ static CallableWrapperMethod CreateMethod (MethodDefinition methodDefinition, CallableWrapperType declaringType, IMetadataResolver resolver)
+ {
+ var method = CreateMethod (methodDefinition.Name, declaringType, JavaNativeTypeManager.GetJniSignature (methodDefinition, resolver), "__export__", null, null, null);
+
+ if (methodDefinition.HasParameters)
+ Diagnostic.Error (4205, CecilExtensions.LookupSource (methodDefinition), Localization.Resources.JavaCallableWrappers_XA4205);
+ if (methodDefinition.ReturnType.MetadataType == MetadataType.Void)
+ Diagnostic.Error (4208, CecilExtensions.LookupSource (methodDefinition), Localization.Resources.JavaCallableWrappers_XA4208);
+
+ method.IsExport = true;
+ method.IsStatic = methodDefinition.IsStatic;
+ method.JavaAccess = GetJavaAccess (methodDefinition.Attributes & MethodAttributes.MemberAccessMask);
+
+ // Annotations are processed within CallableWrapperField, not the initializer method. So we don't generate them here.
+
+ return method;
+ }
+
+ // Common method creation code
+ static CallableWrapperMethod CreateMethod (string name, CallableWrapperType declaringType, string? signature, string? connector, string? managedParameters, string? outerType, string? superCall)
+ {
+ signature = signature ?? throw new ArgumentNullException ("`connector` cannot be null.", nameof (connector));
+ var method_name = "n_" + name + ":" + signature + ":" + connector?.Replace ('/', '+');
+
+ var method = new CallableWrapperMethod (declaringType, name, method_name, signature);
+
+ PopulateMethod (method, signature, managedParameters, outerType, superCall);
+
+ return method;
+ }
+
+ // This is done this way to allow sharing between CallableWrapperMethod and CallableWrapperConstructor
+ static void PopulateMethod (CallableWrapperMethod method, string signature, string? managedParameters, string? outerType, string? superCall)
+ {
+ method.ManagedParameters = managedParameters;
+
+ var jnisig = signature;
+ var closer = jnisig.IndexOf (')');
+ var ret = jnisig.Substring (closer + 1);
+
+ method.Retval = JavaNativeTypeManager.Parse (ret)?.Type;
+
+ var jniparms = jnisig.Substring (1, closer - 1);
+
+ if (string.IsNullOrEmpty (jniparms) && string.IsNullOrEmpty (superCall))
+ return;
+
+ var parms = new StringBuilder ();
+ var scall = new StringBuilder ();
+ var acall = new StringBuilder ();
+ var first = true;
+ var i = 0;
+
+ foreach (var jti in JavaNativeTypeManager.FromSignature (jniparms)) {
+ if (outerType != null) {
+ acall.Append (outerType).Append (".this");
+ outerType = null;
+ continue;
+ }
+
+ var parmType = jti.Type;
+
+ if (!first) {
+ parms.Append (", ");
+ scall.Append (", ");
+ acall.Append (", ");
+ }
+
+ first = false;
+ parms.Append (parmType).Append (" p").Append (i);
+ scall.Append ("p").Append (i);
+ acall.Append ("p").Append (i);
+ ++i;
+ }
+
+ method.Params = parms.ToString ();
+ method.SuperCall = superCall ?? scall.ToString ();
+ method.ActivateCall = acall.ToString ();
+ }
+
+ static void AddConstructors (CallableWrapperType declaringType, TypeDefinition type, TypeDefinition rootType, string? outerType, List? baseCtors, List curCtors, bool onlyRegisteredOrExportedCtors, IMetadataResolver cache)
+ {
+ foreach (var ctor in type.Methods)
+ if (ctor.IsConstructor && !ctor.IsStatic && !ctor.AnyCustomAttributes (typeof (ExportAttribute)))
+ if (CreateConstructor (declaringType, ctor, type, rootType, outerType, baseCtors, curCtors, onlyRegisteredOrExportedCtors, false, cache) is CallableWrapperConstructor c)
+ declaringType.Constructors.Add (c);
+ }
+
+ static CallableWrapperConstructor? CreateConstructor (CallableWrapperType declaringType, MethodDefinition ctor, TypeDefinition type, TypeDefinition rootType, string? outerType, List? baseCtors, List curCtors, bool onlyRegisteredOrExportedCtors, bool skipParameterCheck, IMetadataResolver cache)
+ {
+ // We create a parameter-less constructor for the application class, so don't use the imported one
+ if (!ctor.HasParameters && JavaNativeTypeManager.IsApplication (rootType, cache))
+ return null;
+
+ var managedParameters = GetManagedParameters (ctor, outerType, type, cache);
+
+ if (!skipParameterCheck && (managedParameters == null || declaringType.Constructors.Any (c => c.ManagedParameters == managedParameters)))
+ return null;
+
+ // Constructor with [Export] attribute
+ var eattr = CecilExtensions.GetExportAttributes (ctor, cache).FirstOrDefault ();
+
+ if (eattr != null) {
+ if (!string.IsNullOrEmpty (eattr.Name)) {
+ // Diagnostic.Warning (log, "Use of ExportAttribute.Name property is invalid on constructors");
+ }
+
+ curCtors.Add (ctor);
+ return CreateConstructor (ctor, declaringType, eattr, managedParameters, cache);
+ }
+
+ // Constructor with [Register] attribute
+ var rattr = CecilExtensions.GetMethodRegistrationAttributes (ctor).FirstOrDefault ();
+
+ if (rattr != null) {
+ if (declaringType.Constructors.Any (c => c.JniSignature == rattr.Signature))
+ return null;
+
+ curCtors.Add (ctor);
+ return CreateConstructor (ctor, declaringType, rattr, managedParameters, outerType, cache);
+ }
+
+ if (onlyRegisteredOrExportedCtors)
+ return null;
+
+ // Constructors without [Export] or [Register] attributes
+ var jniSignature = JavaNativeTypeManager.GetJniSignature (ctor, cache);
+
+ if (jniSignature is null)
+ return null;
+
+ if (declaringType.Constructors.Any (c => c.JniSignature == jniSignature))
+ return null;
+
+ if (baseCtors is null)
+ throw new InvalidOperationException ("`baseCtors` should not be null!");
+
+ if (baseCtors.Any (m => m.Parameters.AreParametersCompatibleWith (ctor.Parameters, cache))) {
+ curCtors.Add (ctor);
+ return CreateConstructor (".ctor", declaringType, jniSignature, "", managedParameters, outerType, null);
+ }
+
+ if (baseCtors.Any (m => !m.HasParameters)) {
+ curCtors.Add (ctor);
+ return CreateConstructor (".ctor", declaringType, jniSignature, "", managedParameters, outerType, "");
+ }
+
+ return null;
+ }
+
+ static string GetManagedParameters (MethodDefinition ctor, string? outerType, TypeDefinition type, IMetadataResolver cache)
+ {
+ var sb = new StringBuilder ();
+
+ foreach (var pdef in ctor.Parameters) {
+ if (sb.Length > 0)
+ sb.Append (':');
+ if (outerType != null && sb.Length == 0)
+ sb.Append (type.DeclaringType.GetPartialAssemblyQualifiedName (cache));
+ else
+ sb.Append (pdef.ParameterType.GetPartialAssemblyQualifiedName (cache));
+ }
+
+ return sb.ToString ();
+ }
+
+ static CallableWrapperApplicationConstructor? CreateApplicationConstructor (string name, TypeDefinition type, IMetadataResolver resolver)
+ {
+ if (!JavaNativeTypeManager.IsApplication (type, resolver))
+ return null;
+
+ return new CallableWrapperApplicationConstructor (name);
+ }
+
+ static void AddNestedTypes (CallableWrapperType declaringType, TypeDefinition type, IMetadataResolver cache, CallableWrapperReaderOptions? options)
+ {
+ if (!type.HasNestedTypes)
+ return;
+
+ foreach (var nt in type.NestedTypes) {
+ if (!nt.HasJavaPeer (cache))
+ continue;
+ if (!JavaNativeTypeManager.IsNonStaticInnerClass (nt, cache))
+ continue;
+
+ declaringType.NestedTypes.Add (CreateType (nt, cache, options, JavaNativeTypeManager.ToJniName (type, cache)));
+ AddNestedTypes (declaringType, nt, cache, options);
+ }
+
+ declaringType.HasExport |= declaringType.NestedTypes.Any (t => t.HasExport);
+ }
+
+ static void AddMethod (CallableWrapperType declaringType, TypeDefinition type, MethodDefinition? registeredMethod, MethodDefinition implementedMethod, JavaCallableMethodClassifier? methodClassifier, IMetadataResolver cache)
+ {
+ if (registeredMethod != null)
+ foreach (RegisterAttribute attr in CecilExtensions.GetMethodRegistrationAttributes (registeredMethod)) {
+ // Check for Kotlin-mangled methods that cannot be overridden
+ if (attr.Name.Contains ("-impl") || (attr.Name.Length > 7 && attr.Name [attr.Name.Length - 8] == '-'))
+ Diagnostic.Error (4217, CecilExtensions.LookupSource (implementedMethod), Localization.Resources.JavaCallableWrappers_XA4217, attr.Name);
+
+ var shouldBeDynamicallyRegistered = methodClassifier?.ShouldBeDynamicallyRegistered (type, registeredMethod, implementedMethod, attr.OriginAttribute) ?? true;
+ var method = CreateMethod (implementedMethod, declaringType, attr, null, null, cache, shouldBeDynamicallyRegistered);
+
+ if (!registeredMethod.IsConstructor && !declaringType.Methods.Any (m => m.Name == method.Name && m.Params == method.Params))
+ declaringType.Methods.Add (method);
+ }
+ foreach (ExportAttribute attr in CecilExtensions.GetExportAttributes (implementedMethod, cache)) {
+ if (type.HasGenericParameters)
+ Diagnostic.Error (4206, CecilExtensions.LookupSource (implementedMethod), Localization.Resources.JavaCallableWrappers_XA4206);
+
+ var method = CreateMethod (implementedMethod, declaringType, attr, null, cache);
+
+ if (!string.IsNullOrEmpty (attr.SuperArgumentsString)) {
+ // Diagnostic.Warning (log, "Use of ExportAttribute.SuperArgumentsString property is invalid on methods");
+ }
+
+ if (!implementedMethod.IsConstructor && !declaringType.Methods.Any (m => m.Name == method.Name && m.Params == method.Params))
+ declaringType.Methods.Add (method);
+ }
+ foreach (ExportFieldAttribute attr in CecilExtensions.GetExportFieldAttributes (implementedMethod)) {
+ if (type.HasGenericParameters)
+ Diagnostic.Error (4207, CecilExtensions.LookupSource (implementedMethod), Localization.Resources.JavaCallableWrappers_XA4207);
+
+ var method = CreateMethod (implementedMethod, declaringType, cache);
+
+ if (!implementedMethod.IsConstructor && !declaringType.Methods.Any (m => m.Name == method.Name && m.Params == method.Params)) {
+ declaringType.Methods.Add (method);
+ declaringType.Fields.Add (CreateField (implementedMethod, attr.Name, cache));
+ }
+ }
+ }
+
+ static void ExtractJavaNames (string jniName, out string package, out string type)
+ {
+ var i = jniName.LastIndexOf ('/');
+
+ if (i < 0) {
+ type = jniName;
+ package = string.Empty;
+ } else {
+ type = jniName.Substring (i + 1);
+ package = jniName.Substring (0, i).Replace ('/', '.');
+ }
+ }
+
+ static string GetJavaTypeName (TypeReference r, IMetadataResolver cache)
+ {
+ var d = cache.Resolve (r);
+ var jniName = JavaNativeTypeManager.ToJniName (d, cache);
+
+ if (jniName is null) {
+ Diagnostic.Error (4201, Localization.Resources.JavaCallableWrappers_XA4201, r.FullName);
+ throw new InvalidOperationException ("--nrt:jniName-- Should not be reached");
+ }
+
+ return jniName.Replace ('/', '.').Replace ('$', '.');
+ }
+
+ static IEnumerable CreateAnnotations (ICustomAttributeProvider type, IMetadataResolver resolver)
+ {
+ foreach (var ca in type.CustomAttributes) {
+ var annotation = CreateAnnotation (ca, resolver);
+
+ if (annotation is not null)
+ yield return annotation;
+ }
+ }
+
+ static CallableWrapperTypeAnnotation? CreateAnnotation (CustomAttribute ca, IMetadataResolver resolver)
+ {
+ var catype = resolver.Resolve (ca.AttributeType);
+ var tca = catype.CustomAttributes.FirstOrDefault (a => a.AttributeType.FullName == "Android.Runtime.AnnotationAttribute");
+
+ if (tca is null)
+ return null;
+
+ var name_object = tca.ConstructorArguments [0].Value;
+
+ // Should never be hit
+ if (name_object is not string name)
+ throw new ArgumentException ($"Expected a string for the first argument of the {nameof (RegisterAttribute)} constructor.", nameof (ca));
+
+ var annotation = new CallableWrapperTypeAnnotation (name);
+
+ foreach (var p in ca.Properties) {
+ var pd = catype.Properties.FirstOrDefault (pp => pp.Name == p.Name);
+ var reg = pd?.CustomAttributes.FirstOrDefault (pdca => pdca.AttributeType.FullName == "Android.Runtime.RegisterAttribute");
+ var key = reg != null ? (string) reg.ConstructorArguments [0].Value : p.Name;
+ var value = ManagedValueToJavaSource (p.Argument.Value);
+
+ annotation.Properties.Add (new KeyValuePair (key, value));
+ }
+
+ return annotation;
+ }
+
+ // FIXME: this is hacky. Is there any existing code for value to source conversion?
+ static string ManagedValueToJavaSource (object value)
+ {
+ if (value is string)
+ return "\"" + value.ToString ()?.Replace ("\"", "\"\"") + '"';
+ else if (value.GetType ().FullName == "Java.Lang.Class")
+ return value.ToString () + ".class";
+ else if (value is bool v)
+ return v ? "true" : "false";
+ else
+ return value.ToString () ?? "";
+ }
+
+ static string GetJavaAccess (MethodAttributes access)
+ {
+ return access switch {
+ MethodAttributes.Public => "public",
+ MethodAttributes.FamORAssem => "protected",
+ MethodAttributes.Family => "protected",
+ _ => "private",
+ };
+ }
+}
diff --git a/external/Java.Interop/src/Java.Interop.Tools.JavaCallableWrappers/Java.Interop.Tools.JavaCallableWrappers.Adapters/XmlExporter.cs b/external/Java.Interop/src/Java.Interop.Tools.JavaCallableWrappers/Java.Interop.Tools.JavaCallableWrappers.Adapters/XmlExporter.cs
new file mode 100644
index 00000000000..748270142f0
--- /dev/null
+++ b/external/Java.Interop/src/Java.Interop.Tools.JavaCallableWrappers/Java.Interop.Tools.JavaCallableWrappers.Adapters/XmlExporter.cs
@@ -0,0 +1,193 @@
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Text;
+using System.Xml;
+using Java.Interop.Tools.JavaCallableWrappers.CallableWrapperMembers;
+using Java.Interop.Tools.JavaCallableWrappers.Extensions;
+
+namespace Java.Interop.Tools.JavaCallableWrappers.Adapters;
+
+public static class XmlExporter
+{
+ static XmlWriterSettings settings = new XmlWriterSettings {
+ Indent = true,
+ NewLineOnAttributes = false,
+ OmitXmlDeclaration = true,
+ };
+
+ public static void Export (string filename, IEnumerable types)
+ {
+ using (var sw = new StreamWriter (filename, false, Encoding.UTF8))
+ Export (sw, types);
+ }
+
+ public static void Export (TextWriter sw, IEnumerable types)
+ {
+ using (var xml = XmlWriter.Create (sw, settings))
+ Export (xml, types);
+ }
+
+ public static void Export (XmlWriter xml, IEnumerable types)
+ {
+ ExportTypes (xml, types);
+ }
+
+ static void ExportTypes (XmlWriter xml, IEnumerable types)
+ {
+ foreach (var type in types)
+ ExportType (xml, type);
+ }
+
+ public static void ExportType (XmlWriter xml, CallableWrapperType type)
+ {
+ xml.WriteStartElement ("type");
+ xml.WriteAttributeString ("name", type.Name);
+ xml.WriteAttributeString ("package", type.Package);
+ xml.WriteAttributeStringIfNotFalse ("is_abstract", type.IsAbstract);
+ xml.WriteAttributeStringIfNotNull ("application_java_class", type.ApplicationJavaClass);
+ xml.WriteAttributeStringIfNotFalse ("generate_on_create_overrides", type.GenerateOnCreateOverrides);
+ xml.WriteAttributeStringIfNotNull ("mono_runtime_initialization", type.MonoRuntimeInitialization);
+ xml.WriteAttributeStringIfNotNull ("extends_type", type.ExtendsType);
+ xml.WriteAttributeStringIfNotFalse ("is_application", type.IsApplication);
+ xml.WriteAttributeStringIfNotFalse ("is_instrumentation", type.IsInstrumentation);
+ xml.WriteAttributeString ("partial_assembly_qualified_name", type.PartialAssemblyQualifiedName);
+ xml.WriteAttributeStringIfNotFalse ("has_export", type.HasExport);
+
+ if (type.ApplicationConstructor is not null)
+ xml.WriteAttributeString ("application_constructor", type.ApplicationConstructor.Name);
+
+ ExportAnnotations (xml, type.Annotations);
+ ExportImplementedInterfaces (xml, type.ImplementedInterfaces);
+ ExportConstructors (xml, type.Constructors);
+ ExportFields (xml, type.Fields);
+ ExportMethods (xml, type.Methods);
+ ExportNestedTypes (xml, type.NestedTypes);
+
+ xml.WriteEndElement ();
+ }
+
+ static void ExportAnnotations (XmlWriter writer, IEnumerable annotations)
+ {
+ if (annotations.Count () == 0)
+ return;
+
+ writer.WriteStartElement ("annotations");
+
+ foreach (var annotation in annotations) {
+ writer.WriteStartElement ("annotation");
+ writer.WriteAttributeString ("name", annotation.Name);
+
+ foreach (var property in annotation.Properties) {
+ writer.WriteStartElement ("property");
+ writer.WriteAttributeString ("name", property.Key);
+ writer.WriteAttributeString ("value", property.Value);
+ writer.WriteEndElement ();
+ }
+
+ writer.WriteEndElement ();
+ }
+
+ writer.WriteEndElement ();
+ }
+
+ static void ExportImplementedInterfaces (XmlWriter writer, List interfaces)
+ {
+ if (interfaces.Count == 0)
+ return;
+
+ writer.WriteStartElement ("implemented_interfaces");
+
+ foreach (var @interface in interfaces) {
+ writer.WriteStartElement ("interface");
+ writer.WriteAttributeString ("name", @interface);
+ writer.WriteEndElement ();
+ }
+
+ writer.WriteEndElement ();
+ }
+
+ static void ExportConstructors (XmlWriter xml, IEnumerable constructors)
+ {
+ if (constructors.Count () == 0)
+ return;
+
+ xml.WriteStartElement ("constructors");
+
+ foreach (var constructor in constructors)
+ ExportMethod (xml, constructor);
+
+ xml.WriteEndElement ();
+ }
+
+ static void ExportFields (XmlWriter xml, IEnumerable fields)
+ {
+ if (fields.Count () == 0)
+ return;
+
+ xml.WriteStartElement ("fields");
+
+ foreach (var field in fields) {
+ xml.WriteStartElement ("field");
+ xml.WriteAttributeString ("name", field.FieldName);
+ xml.WriteAttributeString ("type", field.TypeName);
+ xml.WriteAttributeString ("visibility", field.Visibility);
+ xml.WriteAttributeStringIfNotFalse ("is_static", field.IsStatic);
+ xml.WriteAttributeString ("initializer_name", field.InitializerName);
+ ExportAnnotations (xml, field.Annotations);
+ xml.WriteEndElement ();
+ }
+
+ xml.WriteEndElement ();
+ }
+
+ static void ExportMethods (XmlWriter xml, IEnumerable methods)
+ {
+ if (methods.Count () == 0)
+ return;
+
+ xml.WriteStartElement ("methods");
+
+ foreach (var method in methods)
+ ExportMethod (xml, method);
+
+ xml.WriteEndElement ();
+ }
+
+ static void ExportMethod (XmlWriter xml, CallableWrapperMethod method)
+ {
+ xml.WriteStartElement (method is CallableWrapperConstructor ? "constructor" : "method");
+ xml.WriteAttributeString ("name", method.Name);
+ xml.WriteAttributeString ("method", method.Method);
+ xml.WriteAttributeString ("jni_signature", method.JniSignature);
+ xml.WriteAttributeStringIfNotNull ("managed_parameters", method.ManagedParameters);
+ xml.WriteAttributeStringIfNotNull ("java_name_override", method.JavaNameOverride);
+ xml.WriteAttributeStringIfNotNull ("params", method.Params);
+ xml.WriteAttributeStringIfNotNull ("retval", method.Retval);
+ xml.WriteAttributeStringIfNotNull ("java_access", method.JavaAccess);
+ xml.WriteAttributeStringIfNotFalse ("is_export", method.IsExport);
+ xml.WriteAttributeStringIfNotFalse ("is_static", method.IsStatic);
+ xml.WriteAttributeStringIfNotFalse ("is_dynamically_registered", method.IsDynamicallyRegistered);
+ xml.WriteAttributeStringIfNotNull ("thrown_type_names", method.ThrownTypeNames != null ? string.Join (", ", method.ThrownTypeNames) : null);
+ xml.WriteAttributeStringIfNotNull ("super_call", method.SuperCall);
+ xml.WriteAttributeStringIfNotNull ("activate_call", method.ActivateCall);
+
+ ExportAnnotations (xml, method.Annotations);
+
+ xml.WriteEndElement ();
+ }
+
+ static void ExportNestedTypes (XmlWriter xml, IEnumerable nestedTypes)
+ {
+ if (nestedTypes.Count () == 0)
+ return;
+
+ xml.WriteStartElement ("nested_types");
+
+ foreach (var nestedType in nestedTypes)
+ ExportType (xml, nestedType);
+
+ xml.WriteEndElement ();
+ }
+}
diff --git a/external/Java.Interop/src/Java.Interop.Tools.JavaCallableWrappers/Java.Interop.Tools.JavaCallableWrappers.Adapters/XmlImporter.cs b/external/Java.Interop/src/Java.Interop.Tools.JavaCallableWrappers/Java.Interop.Tools.JavaCallableWrappers.Adapters/XmlImporter.cs
new file mode 100644
index 00000000000..32702c75013
--- /dev/null
+++ b/external/Java.Interop/src/Java.Interop.Tools.JavaCallableWrappers/Java.Interop.Tools.JavaCallableWrappers.Adapters/XmlImporter.cs
@@ -0,0 +1,237 @@
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Text;
+using System.Xml;
+using System.Xml.Linq;
+using Java.Interop.Tools.JavaCallableWrappers.CallableWrapperMembers;
+using Java.Interop.Tools.JavaCallableWrappers.Extensions;
+using Java.Interop.Tools.TypeNameMappings;
+
+namespace Java.Interop.Tools.JavaCallableWrappers.Adapters;
+
+public static class XmlImporter
+{
+ public static List Import (string filename)
+ {
+ using (var sr = new StreamReader (filename, Encoding.UTF8))
+ return Import (sr);
+ }
+
+ public static List Import (TextReader sr)
+ {
+ using (var xml = XmlReader.Create (sr))
+ return Import (xml);
+ }
+
+ public static List Import (XmlReader xml)
+ {
+ var doc = XDocument.Load (xml);
+
+ var types = new List ();
+
+ foreach (var type in doc.Root.Elements ("type"))
+ types.Add (ImportType (type));
+
+ return types;
+ }
+
+
+ public static List Import (XElement xml)
+ {
+ var types = new List ();
+
+ foreach (var type in xml.Elements ("type"))
+ types.Add (ImportType (type));
+
+ return types;
+ }
+
+ public static CallableWrapperType ImportType (XElement xml)
+ {
+ var name = xml.GetRequiredAttribute ("name");
+ var package = xml.GetAttributeOrDefault ("package", (string?) "");
+ var partial_assembly_qualified_name = xml.GetRequiredAttribute ("partial_assembly_qualified_name");
+
+ // If package is empty, generate a crc64 package name from the assembly qualified name
+ if (string.IsNullOrEmpty (package))
+ package = GeneratePackageFromAssemblyQualifiedName (partial_assembly_qualified_name);
+
+ var type = new CallableWrapperType (name, package ?? "", partial_assembly_qualified_name) {
+ ApplicationJavaClass = xml.GetAttributeOrDefault ("application_java_class", (string?) null),
+ ExtendsType = xml.GetAttributeOrDefault ("extends_type", (string?) null),
+ GenerateOnCreateOverrides = xml.GetAttributeOrDefault ("generate_on_create_overrides", false),
+ HasExport = xml.GetAttributeOrDefault ("has_export", false),
+ IsAbstract = xml.GetAttributeOrDefault ("is_abstract", false),
+ IsApplication = xml.GetAttributeOrDefault ("is_application", false),
+ IsInstrumentation = xml.GetAttributeOrDefault ("is_instrumentation", false),
+ MonoRuntimeInitialization = xml.GetAttributeOrDefault ("mono_runtime_initialization", (string?) null),
+ };
+
+ if (xml.GetAttributeOrDefault ("application_constructor", (string?) null) is string applicationConstructor)
+ type.ApplicationConstructor = new CallableWrapperApplicationConstructor (applicationConstructor);
+
+ ImportAnnotations (type.Annotations, xml.Element ("annotations"));
+ ImportImplementedInterfaces (type, xml.Element ("implemented_interfaces"));
+ ImportConstructors (type, xml.Element ("constructors"));
+ ImportMethods (type, xml.Element ("methods"));
+ ImportFields (type, xml.Element ("fields"));
+
+ foreach (var nestedType in xml.Elements ("nested_type"))
+ type.NestedTypes.Add (ImportType (nestedType));
+
+ return type;
+ }
+
+ static void ImportAnnotations (List annotations, XElement? xml)
+ {
+ foreach (var annotation in xml?.Elements ("annotation") ?? []) {
+ var a = ImportAnnotation (annotation);
+ annotations.Add (a);
+ }
+ }
+
+ static CallableWrapperTypeAnnotation ImportAnnotation (XElement xml)
+ {
+ var name = xml.GetRequiredAttribute ("name");
+ var annotation = new CallableWrapperTypeAnnotation (name);
+
+ foreach (var property in xml.Elements ("property")) {
+ var p = ImportAnnotationProperty (property);
+ annotation.Properties.Add (p);
+ }
+
+ return annotation;
+ }
+
+ static KeyValuePair ImportAnnotationProperty (XElement xml)
+ {
+ var name = xml.GetRequiredAttribute ("name");
+ var value = xml.GetRequiredAttribute ("value");
+
+ return new KeyValuePair (name, value);
+ }
+
+ static void ImportImplementedInterfaces (CallableWrapperType type, XElement? xml)
+ {
+ foreach (var iface in xml?.Elements ("interface") ?? []) {
+ var name = iface.GetRequiredAttribute ("name");
+ type.ImplementedInterfaces.Add (name);
+ }
+ }
+
+ static void ImportConstructors (CallableWrapperType type, XElement? xml)
+ {
+ foreach (var ctor in xml?.Elements ("constructor") ?? []) {
+ var c = ImportConstructor (type, ctor);
+ type.Constructors.Add (c);
+ }
+ }
+
+ static void ImportMethods (CallableWrapperType type, XElement? xml)
+ {
+ foreach (var method in xml?.Elements ("method") ?? []) {
+ var m = ImportMethod (type, method);
+ type.Methods.Add (m);
+ }
+ }
+
+ static CallableWrapperConstructor ImportConstructor (CallableWrapperType type, XElement xml)
+ {
+ var name = xml.GetRequiredAttribute ("name");
+ var method = xml.GetRequiredAttribute ("method");
+ var jniSig = xml.GetRequiredAttribute ("jni_signature");
+
+ var ctor = new CallableWrapperConstructor (type, name, method, jniSig);
+ FillInMethodDetails (ctor, xml);
+
+ return ctor;
+ }
+
+ static CallableWrapperMethod ImportMethod (CallableWrapperType type, XElement xml)
+ {
+ var name = xml.GetRequiredAttribute ("name");
+ var method = xml.GetRequiredAttribute ("method");
+ var jniSig = xml.GetRequiredAttribute ("jni_signature");
+
+ var m = new CallableWrapperMethod (type, name, method, jniSig);
+ FillInMethodDetails (m, xml);
+
+ return m;
+ }
+
+ static void FillInMethodDetails (CallableWrapperMethod method, XElement xml)
+ {
+ // Common between constructors and methods
+ method.ManagedParameters = xml.GetAttributeOrDefault ("managed_parameters", (string?) null);
+ method.JavaNameOverride = xml.GetAttributeOrDefault ("java_name_override", (string?) null);
+ method.Params = xml.GetAttributeOrDefault ("params", (string?) null);
+ method.Retval = xml.GetAttributeOrDefault ("retval", (string?) null);
+ method.JavaAccess = xml.GetAttributeOrDefault ("java_access", (string?) null);
+ method.IsExport = xml.GetAttributeOrDefault ("is_export", false);
+ method.IsStatic = xml.GetAttributeOrDefault ("is_static", false);
+ method.IsDynamicallyRegistered = xml.GetAttributeOrDefault ("is_dynamically_registered", false);
+ method.SuperCall = xml.GetAttributeOrDefault ("super_call", (string?) null);
+ method.ActivateCall = xml.GetAttributeOrDefault ("activate_call", (string?) null);
+
+ if (xml.GetAttributeOrDefault ("thrown_type_names", (string?) null) is string thrownTypeNames)
+ method.ThrownTypeNames = thrownTypeNames.Split (new [] { ',' }, StringSplitOptions.RemoveEmptyEntries);
+
+ ImportAnnotations (method.Annotations, xml.Element ("annotations"));
+ }
+
+ static void ImportFields (CallableWrapperType type, XElement? xml)
+ {
+ foreach (var field in xml?.Elements ("field") ?? []) {
+ var f = ImportField (field);
+ type.Fields.Add (f);
+ }
+ }
+
+ static CallableWrapperField ImportField (XElement xml)
+ {
+ var name = xml.GetRequiredAttribute ("name");
+ var type = xml.GetRequiredAttribute ("type");
+ var visibility = xml.GetRequiredAttribute ("visibility");
+ var initializer_name = xml.GetRequiredAttribute ("initializer_name");
+
+ var field = new CallableWrapperField (name, type, visibility, initializer_name) {
+ IsStatic = xml.GetAttributeOrDefault ("is_static", false),
+ };
+
+ ImportAnnotations (field.Annotations, xml.Element ("annotations"));
+
+ return field;
+ }
+
+ ///
+ /// Generates a package name from a partial assembly qualified name.
+ /// This is used when the package attribute is missing or empty in the XML.
+ ///
+ /// The partial assembly qualified name in format "Namespace.TypeName, AssemblyName"
+ /// A package name based on the current
+ static string GeneratePackageFromAssemblyQualifiedName (string partialAssemblyQualifiedName)
+ {
+ // Format: "Namespace.TypeName, AssemblyName" or "Namespace.TypeName+NestedType, AssemblyName"
+ var commaIndex = partialAssemblyQualifiedName.IndexOf (',');
+ if (commaIndex < 0)
+ return "";
+
+ var fullTypeName = partialAssemblyQualifiedName.Substring (0, commaIndex).Trim ();
+ var assemblyName = partialAssemblyQualifiedName.Substring (commaIndex + 1).Trim ();
+
+ // Extract namespace from full type name
+ // Handle nested types by using '+' as separator
+ var plusIndex = fullTypeName.IndexOf ('+');
+ var typeNameWithoutNested = plusIndex >= 0 ? fullTypeName.Substring (0, plusIndex) : fullTypeName;
+
+ var lastDotIndex = typeNameWithoutNested.LastIndexOf ('.');
+ var ns = lastDotIndex >= 0 ? typeNameWithoutNested.Substring (0, lastDotIndex) : "";
+
+ // If no namespace, return empty (will use default package)
+ if (string.IsNullOrEmpty (ns))
+ return "";
+
+ return JavaNativeTypeManager.GetPackageName (ns, assemblyName);
+ }
+}
diff --git a/external/Java.Interop/src/Java.Interop.Tools.JavaCallableWrappers/Java.Interop.Tools.JavaCallableWrappers.CallableWrapperMembers/CallableWrapperApplicationConstructor.cs b/external/Java.Interop/src/Java.Interop.Tools.JavaCallableWrappers/Java.Interop.Tools.JavaCallableWrappers.CallableWrapperMembers/CallableWrapperApplicationConstructor.cs
new file mode 100644
index 00000000000..2d8c40938d2
--- /dev/null
+++ b/external/Java.Interop/src/Java.Interop.Tools.JavaCallableWrappers/Java.Interop.Tools.JavaCallableWrappers.CallableWrapperMembers/CallableWrapperApplicationConstructor.cs
@@ -0,0 +1,26 @@
+using System.IO;
+
+namespace Java.Interop.Tools.JavaCallableWrappers.CallableWrapperMembers;
+
+public class CallableWrapperApplicationConstructor
+{
+ public string Name { get; set; }
+
+ public CallableWrapperApplicationConstructor (string name)
+ {
+ Name = name;
+ }
+
+ public void Generate (TextWriter sw, CallableWrapperWriterOptions options)
+ {
+ sw.WriteLine ();
+
+ sw.Write ("\tpublic ");
+ sw.Write (Name);
+ sw.WriteLine (" ()");
+
+ sw.WriteLine ("\t{");
+ sw.WriteLine ("\t\tmono.MonoPackageManager.setContext (this);");
+ sw.WriteLine ("\t}");
+ }
+}
diff --git a/external/Java.Interop/src/Java.Interop.Tools.JavaCallableWrappers/Java.Interop.Tools.JavaCallableWrappers.CallableWrapperMembers/CallableWrapperConstructor.cs b/external/Java.Interop/src/Java.Interop.Tools.JavaCallableWrappers/Java.Interop.Tools.JavaCallableWrappers.CallableWrapperMembers/CallableWrapperConstructor.cs
new file mode 100644
index 00000000000..59ef048ae7a
--- /dev/null
+++ b/external/Java.Interop/src/Java.Interop.Tools.JavaCallableWrappers/Java.Interop.Tools.JavaCallableWrappers.CallableWrapperMembers/CallableWrapperConstructor.cs
@@ -0,0 +1,72 @@
+using System.IO;
+
+namespace Java.Interop.Tools.JavaCallableWrappers.CallableWrapperMembers;
+
+public class CallableWrapperConstructor : CallableWrapperMethod
+{
+ public CallableWrapperConstructor (CallableWrapperType declaringType, string name, string method, string jniSignature) : base (declaringType, name, method, jniSignature)
+ {
+ }
+
+ public override void Generate (TextWriter sw, CallableWrapperWriterOptions options)
+ {
+ // TODO: we only generate constructors so that Android types w/ no
+ // default constructor can be subclasses by our generated code.
+ //
+ // This does NOT currently allow creating managed types from Java.
+ sw.WriteLine ();
+
+ foreach (var annotation in Annotations)
+ annotation.Generate (sw, "", options);
+
+ sw.Write ("\tpublic ");
+ sw.Write (Name);
+
+ sw.Write (" (");
+ sw.Write (Params);
+ sw.Write (')');
+
+ sw.WriteLine (ThrowsDeclaration);
+
+ sw.WriteLine ("\t{");
+ sw.Write ("\t\tsuper (");
+ sw.Write (SuperCall);
+ sw.WriteLine (");");
+
+#if MONODROID_TIMING
+ sw.WriteLine ("\t\tandroid.util.Log.i(\"MonoDroid-Timing\", \"{0}..ctor({1}): time: \"+java.lang.System.currentTimeMillis());", Name, Params);
+#endif
+
+ if (!DeclaringType.CannotRegisterInStaticConstructor) {
+
+ sw.Write ("\t\tif (getClass () == ");
+ sw.Write (Name);
+ sw.WriteLine (".class) {");
+
+ sw.Write ("\t\t\t");
+
+ switch (options.CodeGenerationTarget) {
+ case JavaPeerStyle.JavaInterop1:
+ sw.Write ("net.dot.jni.ManagedPeer.construct (this, \"");
+ sw.Write (JniSignature);
+ sw.Write ("\", new java.lang.Object[] { ");
+ sw.Write (ActivateCall);
+ sw.WriteLine (" });");
+ break;
+ default:
+ sw.Write ("mono.android.TypeManager.Activate (\"");
+ sw.Write (DeclaringType.PartialAssemblyQualifiedName);
+ sw.Write ("\", \"");
+ sw.Write (ManagedParameters);
+ sw.Write ("\", this, new java.lang.Object[] { ");
+ sw.Write (ActivateCall);
+ sw.WriteLine (" });");
+ break;
+ }
+
+ sw.WriteLine ("\t\t}");
+ }
+
+ sw.WriteLine ("\t}");
+ }
+}
diff --git a/external/Java.Interop/src/Java.Interop.Tools.JavaCallableWrappers/Java.Interop.Tools.JavaCallableWrappers.CallableWrapperMembers/CallableWrapperField.cs b/external/Java.Interop/src/Java.Interop.Tools.JavaCallableWrappers/Java.Interop.Tools.JavaCallableWrappers.CallableWrapperMembers/CallableWrapperField.cs
new file mode 100644
index 00000000000..043dedc9ee1
--- /dev/null
+++ b/external/Java.Interop/src/Java.Interop.Tools.JavaCallableWrappers/Java.Interop.Tools.JavaCallableWrappers.CallableWrapperMembers/CallableWrapperField.cs
@@ -0,0 +1,46 @@
+using System.Collections.Generic;
+using System.IO;
+
+namespace Java.Interop.Tools.JavaCallableWrappers.CallableWrapperMembers;
+
+public class CallableWrapperField
+{
+ public string FieldName { get; set; }
+ public string TypeName { get; set; }
+ public string Visibility { get; set; }
+ public bool IsStatic { get; set; }
+ public string InitializerName { get; set; }
+ public List Annotations { get; } = new List ();
+
+ public CallableWrapperField (string fieldName, string typeName, string visibility, string initializerName)
+ {
+ FieldName = fieldName;
+ TypeName = typeName;
+ Visibility = visibility;
+ InitializerName = initializerName;
+ }
+
+ public void Generate (TextWriter sw, CallableWrapperWriterOptions options)
+ {
+ sw.WriteLine ();
+
+ foreach (var annotation in Annotations)
+ annotation.Generate (sw, "", options);
+
+ sw.Write ("\t");
+ sw.Write (Visibility);
+ sw.Write (' ');
+
+ if (IsStatic)
+ sw.Write ("static ");
+
+ sw.Write (TypeName);
+ sw.Write (' ');
+
+ sw.Write (FieldName);
+ sw.Write (" = ");
+
+ sw.Write (InitializerName);
+ sw.WriteLine (" ();");
+ }
+}
diff --git a/external/Java.Interop/src/Java.Interop.Tools.JavaCallableWrappers/Java.Interop.Tools.JavaCallableWrappers.CallableWrapperMembers/CallableWrapperMethod.cs b/external/Java.Interop/src/Java.Interop.Tools.JavaCallableWrappers/Java.Interop.Tools.JavaCallableWrappers.CallableWrapperMembers/CallableWrapperMethod.cs
new file mode 100644
index 00000000000..9b9e692d5f1
--- /dev/null
+++ b/external/Java.Interop/src/Java.Interop.Tools.JavaCallableWrappers/Java.Interop.Tools.JavaCallableWrappers.CallableWrapperMembers/CallableWrapperMethod.cs
@@ -0,0 +1,97 @@
+using System;
+using System.Collections.Generic;
+using System.IO;
+
+namespace Java.Interop.Tools.JavaCallableWrappers.CallableWrapperMembers;
+
+public class CallableWrapperMethod
+{
+ public string Name { get; set; }
+ public string Method { get; set; }
+ public string JniSignature { get; set; }
+ public string? ManagedParameters { get; set; }
+ public string? JavaNameOverride { get; set; }
+ public string? Params { get; set; }
+ public string? Retval { get; set; }
+ public string? JavaAccess { get; set; }
+ public bool IsExport { get; set; }
+ public bool IsStatic { get; set; }
+ public bool IsDynamicallyRegistered { get; set; } = true;
+ public string []? ThrownTypeNames { get; set; }
+ public string? SuperCall { get; set; }
+ public string? ActivateCall { get; set; }
+ public string JavaName => JavaNameOverride ?? Name;
+ public List Annotations { get; } = new List ();
+ public CallableWrapperType DeclaringType { get; }
+
+ public string? ThrowsDeclaration => ThrownTypeNames?.Length > 0 ? $" throws {string.Join (", ", ThrownTypeNames)}" : null;
+
+ public CallableWrapperMethod (CallableWrapperType declaringType, string name, string method, string jniSignature)
+ {
+ DeclaringType = declaringType;
+ Name = name;
+ Method = method;
+ JniSignature = jniSignature;
+ }
+
+ public virtual void Generate (TextWriter sw, CallableWrapperWriterOptions options)
+ {
+ sw.WriteLine ();
+
+ foreach (var annotation in Annotations)
+ annotation.Generate (sw, "", options);
+
+ sw.Write ("\t");
+
+ sw.Write (IsExport ? JavaAccess : "public");
+ sw.Write (' ');
+
+ if (IsStatic)
+ sw.Write ("static ");
+
+ sw.Write (Retval);
+ sw.Write (' ');
+
+ sw.Write (JavaName);
+
+ sw.Write (" (");
+ sw.Write (Params);
+ sw.Write (')');
+
+ sw.WriteLine (ThrowsDeclaration);
+ sw.WriteLine ("\t{");
+
+#if MONODROID_TIMING
+ sw.WriteLine ("\t\tandroid.util.Log.i(\"MonoDroid-Timing\", \"{0}.{1}: time: \"+java.lang.System.currentTimeMillis());", Name, Method);
+#endif
+
+ sw.Write ("\t\t");
+ sw.Write (Retval == "void" ? string.Empty : "return ");
+
+ sw.Write ("n_");
+ sw.Write (Name);
+
+ sw.Write (" (");
+ sw.Write (ActivateCall);
+ sw.WriteLine (");");
+
+ sw.WriteLine ("\t}");
+ sw.WriteLine ();
+
+ sw.Write ("\tprivate ");
+
+ if (IsStatic)
+ sw.Write ("static ");
+
+ sw.Write ("native ");
+
+ sw.Write (Retval);
+
+ sw.Write (" n_");
+ sw.Write (Name);
+
+ sw.Write (" (");
+ sw.Write (Params);
+ sw.WriteLine (");");
+ }
+}
diff --git a/external/Java.Interop/src/Java.Interop.Tools.JavaCallableWrappers/Java.Interop.Tools.JavaCallableWrappers.CallableWrapperMembers/CallableWrapperType.cs b/external/Java.Interop/src/Java.Interop.Tools.JavaCallableWrappers/Java.Interop.Tools.JavaCallableWrappers.CallableWrapperMembers/CallableWrapperType.cs
new file mode 100644
index 00000000000..720a90d6e0d
--- /dev/null
+++ b/external/Java.Interop/src/Java.Interop.Tools.JavaCallableWrappers/Java.Interop.Tools.JavaCallableWrappers.CallableWrapperMembers/CallableWrapperType.cs
@@ -0,0 +1,322 @@
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+
+namespace Java.Interop.Tools.JavaCallableWrappers.CallableWrapperMembers;
+
+public class CallableWrapperType
+{
+ public string Name { get; set; }
+ public string Package { get; set; }
+ public bool IsAbstract { get; set; }
+ public string? ApplicationJavaClass { get; set; }
+ public bool GenerateOnCreateOverrides { get; set; }
+ ///
+ /// The Java source code to be included in Instrumentation.onCreate
+ ///
+ /// Originally came from MonoRuntimeProvider.java delimited by:
+ /// // Mono Runtime Initialization {{{
+ /// // }}}
+ ///
+ public string? MonoRuntimeInitialization { get; set; }
+ public string? ExtendsType { get; set; }
+ public CallableWrapperApplicationConstructor? ApplicationConstructor { get; set; }
+ public bool IsApplication { get; set; }
+ public bool IsInstrumentation { get; set; }
+ public string PartialAssemblyQualifiedName { get; set; }
+ public bool HasExport { get; set; }
+
+ public List Annotations { get; } = new List ();
+ public List ImplementedInterfaces { get; } = new List ();
+ public List Constructors { get; } = new List ();
+ public List Fields { get; } = new List ();
+ public List Methods { get; } = new List ();
+ public List NestedTypes { get; } = new List ();
+
+ public bool CannotRegisterInStaticConstructor => IsApplication || IsInstrumentation;
+
+ public CallableWrapperType (string name, string package, string partialAssemblyQualifiedName)
+ {
+ Name = name;
+ Package = package;
+ PartialAssemblyQualifiedName = partialAssemblyQualifiedName;
+ }
+
+ // example of java target to generate for a type
+ //
+ // package mono.droid;
+ //
+ // import android.app.Activity;
+ // import android.os.Bundle;
+ //
+ // public class MonoActivity extends android.app.Activity
+ // {
+ // static final String __md_methods;
+ // static {
+ // __md_methods =
+ // "n_OnCreate:(Landroid/os/Bundle;)V:GetOnCreate_Landroid_os_Bundle_Handler\n" +
+ // "";
+ // mono.android.Runtime.register ("Mono.Droid.MonoActivity, AssemblyName", MonoActivity.class, __md_methods);
+ // }
+ //
+ // public void onCreate(android.os.Bundle savedInstanceState)
+ // {
+ // n_onCreate (savedInstanceState);
+ // }
+ //
+ // private native void n_onCreate (android.os.Bundle bundle);
+ // }
+ public void Generate (TextWriter writer, CallableWrapperWriterOptions options, bool isNested = false)
+ {
+ if (!isNested && !string.IsNullOrEmpty (Package)) {
+ writer.WriteLine ("package " + Package + ";");
+ writer.WriteLine ();
+ }
+
+ GenerateHeader (writer, options);
+
+ if (!isNested)
+ GenerateInfrastructure (writer, options);
+
+ GenerateBody (writer, options);
+
+ foreach (var nested in NestedTypes)
+ nested.Generate (writer, options, true);
+
+ GenerateFooter (writer, options);
+ }
+
+ void GenerateHeader (TextWriter sw, CallableWrapperWriterOptions options)
+ {
+ sw.WriteLine ();
+
+ // Type annotations
+ foreach (var annotation in Annotations)
+ annotation.Generate (sw, "", options);
+
+ sw.WriteLine ("public " + (IsAbstract ? "abstract " : "") + "class " + Name);
+
+ var extends = ExtendsType;
+
+ // Do this check here rather than the constructor because it can be set after the constructor is called
+ if (extends == "android.app.Application" && ApplicationJavaClass != null && !string.IsNullOrEmpty (ApplicationJavaClass))
+ extends = ApplicationJavaClass;
+
+ sw.WriteLine ("\textends " + extends);
+
+ sw.WriteLine ("\timplements");
+ sw.Write ("\t\t");
+
+ switch (options.CodeGenerationTarget) {
+ case JavaPeerStyle.JavaInterop1:
+ sw.Write ("net.dot.jni.GCUserPeerable");
+ break;
+ default:
+ sw.Write ("mono.android.IGCUserPeer");
+ break;
+ }
+
+ foreach (var iface in ImplementedInterfaces) {
+ sw.WriteLine (",");
+ sw.Write ("\t\t");
+ sw.Write (iface);
+ }
+
+ sw.WriteLine ();
+ sw.WriteLine ("{");
+ }
+
+ void GenerateInfrastructure (TextWriter writer, CallableWrapperWriterOptions options)
+ {
+ var needCtor = false;
+
+ if (HasDynamicallyRegisteredMethods) {
+ needCtor = true;
+ writer.WriteLine ("/** @hide */");
+ writer.WriteLine ("\tpublic static final String __md_methods;");
+ }
+
+ for (var i = 0; i < NestedTypes.Count; i++) {
+ if (!NestedTypes [i].HasDynamicallyRegisteredMethods)
+ continue;
+
+ needCtor = true;
+ writer.Write ("\tstatic final String __md_");
+ writer.Write (i + 1);
+ writer.WriteLine ("_methods;");
+ }
+
+ if (needCtor) {
+ writer.WriteLine ("\tstatic {");
+
+ if (HasDynamicallyRegisteredMethods)
+ GenerateRegisterType (writer, this, "__md_methods", options);
+
+ for (var i = 0; i < NestedTypes.Count; ++i)
+ GenerateRegisterType (writer, NestedTypes [i], $"__md_{i + 1}_methods", options);
+
+ writer.WriteLine ("\t}");
+ }
+ }
+
+ void GenerateBody (TextWriter sw, CallableWrapperWriterOptions options)
+ {
+ foreach (var ctor in Constructors)
+ ctor.Generate (sw, options);
+
+ ApplicationConstructor?.Generate (sw, options);
+
+ foreach (var field in Fields)
+ field.Generate (sw, options);
+
+ foreach (var method in Methods)
+ method.Generate (sw, options);
+
+ if (GenerateOnCreateOverrides && IsApplication && !Methods.Any (m => m.Name == "onCreate"))
+ WriteApplicationOnCreate (sw, options);
+
+ if (GenerateOnCreateOverrides && IsInstrumentation && !Methods.Any (m => m.Name == "onCreate"))
+ WriteInstrumentationOnCreate (sw, options);
+
+ var addRef = options.CodeGenerationTarget == JavaPeerStyle.JavaInterop1 ? "jiAddManagedReference" : "monodroidAddReference";
+ var clearRefs = options.CodeGenerationTarget == JavaPeerStyle.JavaInterop1 ? "jiClearManagedReferences" : "monodroidClearReferences";
+
+ sw.WriteLine ();
+ sw.WriteLine ("\tprivate java.util.ArrayList refList;");
+
+ sw.WriteLine ($"\tpublic void {addRef} (java.lang.Object obj)");
+ sw.WriteLine ("\t{");
+ sw.WriteLine ("\t\tif (refList == null)");
+ sw.WriteLine ("\t\t\trefList = new java.util.ArrayList ();");
+ sw.WriteLine ("\t\trefList.add (obj);");
+ sw.WriteLine ("\t}");
+ sw.WriteLine ();
+
+ sw.WriteLine ($"\tpublic void {clearRefs} ()");
+ sw.WriteLine ("\t{");
+ sw.WriteLine ("\t\tif (refList != null)");
+ sw.WriteLine ("\t\t\trefList.clear ();");
+ sw.WriteLine ("\t}");
+ }
+
+ void GenerateFooter (TextWriter sw, CallableWrapperWriterOptions options)
+ {
+ sw.WriteLine ("}");
+ }
+
+ void WriteApplicationOnCreate (TextWriter sw, CallableWrapperWriterOptions options)
+ {
+ sw.WriteLine ();
+
+ sw.WriteLine ("\tpublic void onCreate ()");
+ sw.WriteLine ("\t{");
+
+ sw.Write ("\t\tmono.android.Runtime.register (\"");
+ sw.Write (PartialAssemblyQualifiedName);
+ sw.Write ("\", ");
+ sw.Write (Name);
+ sw.WriteLine (".class, __md_methods);");
+
+ sw.WriteLine ("\t\tsuper.onCreate ();");
+ sw.WriteLine ("\t}");
+ }
+
+ void WriteInstrumentationOnCreate (TextWriter sw, CallableWrapperWriterOptions options)
+ {
+ sw.WriteLine ();
+ sw.WriteLine ("\tpublic void onCreate (android.os.Bundle arguments)");
+ sw.WriteLine ("\t{");
+
+#if MONODROID_TIMING
+ sw.WriteLine ("\t\tandroid.util.Log.i(\"MonoDroid-Timing\", \"{0}.onCreate(Bundle): time: \"+java.lang.System.currentTimeMillis());", Name);
+ sw.WriteLine ();
+#endif
+
+ sw.WriteLine ("\t\tandroid.content.Context context = getContext ();");
+ sw.WriteLine ();
+
+ if (!string.IsNullOrEmpty (MonoRuntimeInitialization)) {
+ sw.WriteLine (MonoRuntimeInitialization);
+ sw.WriteLine ();
+ }
+
+ sw.Write ("\t\tmono.android.Runtime.register (\"");
+ sw.Write (PartialAssemblyQualifiedName);
+ sw.Write ("\", ");
+ sw.Write (Name);
+ sw.WriteLine (".class, __md_methods);");
+
+ sw.WriteLine ("\t\tsuper.onCreate (arguments);");
+ sw.WriteLine ("\t}");
+ }
+
+ void GenerateRegisterType (TextWriter sw, CallableWrapperType self, string field, CallableWrapperWriterOptions options)
+ {
+ if (!self.HasDynamicallyRegisteredMethods)
+ return;
+
+ sw.Write ("\t\t");
+ sw.Write (field);
+ sw.WriteLine (" = ");
+
+ foreach (var method in self.Methods) {
+ if (method.IsDynamicallyRegistered) {
+ sw.Write ("\t\t\t\"", method.Method);
+ sw.Write (method.Method);
+ sw.WriteLine ("\\n\" +");
+ }
+ }
+
+ sw.WriteLine ("\t\t\t\"\";");
+
+ if (CannotRegisterInStaticConstructor)
+ return;
+
+ sw.Write ("\t\t");
+
+ switch (options.CodeGenerationTarget) {
+ case JavaPeerStyle.JavaInterop1:
+ sw.Write ("net.dot.jni.ManagedPeer.registerNativeMembers (");
+ sw.Write (self.Name);
+ sw.Write (".class, ");
+ sw.Write (field);
+ sw.WriteLine (");");
+ break;
+ default:
+ sw.Write ("mono.android.Runtime.register (\"");
+ sw.Write (self.PartialAssemblyQualifiedName);
+ sw.Write ("\", ");
+ sw.Write (self.Name);
+ sw.Write (".class, ");
+ sw.Write (field);
+ sw.WriteLine (");");
+ break;
+ }
+ }
+
+ // If there are no methods, we need to generate "empty" registration because of backward compatibility
+ public bool HasDynamicallyRegisteredMethods => Methods.Count == 0 || Methods.Any (sig => sig.IsDynamicallyRegistered);
+
+ ///
+ /// Returns a destination file path based on the package name of this Java type
+ ///
+ public string GetDestinationPath (string outputPath)
+ {
+ var dir = Package.Replace ('.', Path.DirectorySeparatorChar);
+ return Path.Combine (outputPath, dir, Name + ".java");
+ }
+
+ public void Generate (string outputPath, CallableWrapperWriterOptions options)
+ {
+ using (StreamWriter sw = OpenStream (outputPath))
+ Generate (sw, options, false);
+ }
+
+ StreamWriter OpenStream (string outputPath)
+ {
+ var destination = GetDestinationPath (outputPath);
+ Directory.CreateDirectory (Path.GetDirectoryName (destination)!);
+
+ return new StreamWriter (new FileStream (destination, FileMode.Create, FileAccess.Write));
+ }
+}
diff --git a/external/Java.Interop/src/Java.Interop.Tools.JavaCallableWrappers/Java.Interop.Tools.JavaCallableWrappers.CallableWrapperMembers/CallableWrapperTypeAnnotation.cs b/external/Java.Interop/src/Java.Interop.Tools.JavaCallableWrappers/Java.Interop.Tools.JavaCallableWrappers.CallableWrapperMembers/CallableWrapperTypeAnnotation.cs
new file mode 100644
index 00000000000..e605eee62e7
--- /dev/null
+++ b/external/Java.Interop/src/Java.Interop.Tools.JavaCallableWrappers/Java.Interop.Tools.JavaCallableWrappers.CallableWrapperMembers/CallableWrapperTypeAnnotation.cs
@@ -0,0 +1,33 @@
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+
+namespace Java.Interop.Tools.JavaCallableWrappers.CallableWrapperMembers;
+
+public class CallableWrapperTypeAnnotation
+{
+ public string Name { get; set; }
+ public List> Properties { get; } = new ();
+
+ public CallableWrapperTypeAnnotation (string name)
+ {
+ Name = name;
+ }
+
+ public void Generate (TextWriter sw, string indent, CallableWrapperWriterOptions options)
+ {
+ sw.Write (indent);
+ sw.Write ('@');
+ sw.Write (Name);
+
+ var properties = string.Join (", ", Properties.Select (p => $"{p.Key} = {p.Value}"));
+
+ if (!string.IsNullOrEmpty (properties)) {
+ sw.Write (" (");
+ sw.Write (properties);
+ sw.Write (")");
+ }
+
+ sw.WriteLine ();
+ }
+}
diff --git a/external/Java.Interop/src/Java.Interop.Tools.JavaCallableWrappers/Java.Interop.Tools.JavaCallableWrappers.csproj b/external/Java.Interop/src/Java.Interop.Tools.JavaCallableWrappers/Java.Interop.Tools.JavaCallableWrappers.csproj
new file mode 100644
index 00000000000..07d9f770589
--- /dev/null
+++ b/external/Java.Interop/src/Java.Interop.Tools.JavaCallableWrappers/Java.Interop.Tools.JavaCallableWrappers.csproj
@@ -0,0 +1,39 @@
+
+
+
+ netstandard2.0
+ enable
+ true
+ true
+ true
+ ..\..\product.snk
+ $(DefineConstants);JCW_ONLY_TYPE_NAMES;HAVE_CECIL
+
+
+
+
+
+ $(ToolOutputFullPath)
+
+
+
+
+
+
+ JavaNativeTypeManager.cs
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/external/Java.Interop/src/Java.Interop.Tools.JavaCallableWrappers/Java.Interop.Tools.JavaCallableWrappers/CallableWrapperReaderOptions.cs b/external/Java.Interop/src/Java.Interop.Tools.JavaCallableWrappers/Java.Interop.Tools.JavaCallableWrappers/CallableWrapperReaderOptions.cs
new file mode 100644
index 00000000000..acd5a9633ab
--- /dev/null
+++ b/external/Java.Interop/src/Java.Interop.Tools.JavaCallableWrappers/Java.Interop.Tools.JavaCallableWrappers/CallableWrapperReaderOptions.cs
@@ -0,0 +1,9 @@
+namespace Java.Interop.Tools.JavaCallableWrappers;
+
+public class CallableWrapperReaderOptions
+{
+ public string? DefaultApplicationJavaClass { get; set; }
+ public bool DefaultGenerateOnCreateOverrides { get; set; }
+ public string? DefaultMonoRuntimeInitialization { get; set; }
+ public JavaCallableMethodClassifier? MethodClassifier { get; set; }
+}
diff --git a/external/Java.Interop/src/Java.Interop.Tools.JavaCallableWrappers/Java.Interop.Tools.JavaCallableWrappers/CallableWrapperWriterOptions.cs b/external/Java.Interop/src/Java.Interop.Tools.JavaCallableWrappers/Java.Interop.Tools.JavaCallableWrappers/CallableWrapperWriterOptions.cs
new file mode 100644
index 00000000000..e0bd76c0878
--- /dev/null
+++ b/external/Java.Interop/src/Java.Interop.Tools.JavaCallableWrappers/Java.Interop.Tools.JavaCallableWrappers/CallableWrapperWriterOptions.cs
@@ -0,0 +1,10 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Java.Interop.Tools.JavaCallableWrappers;
+
+public class CallableWrapperWriterOptions
+{
+ public JavaPeerStyle CodeGenerationTarget { get; set; }
+}
diff --git a/external/Java.Interop/src/Java.Interop.Tools.JavaCallableWrappers/Java.Interop.Tools.JavaCallableWrappers/CecilExtensions.cs b/external/Java.Interop/src/Java.Interop.Tools.JavaCallableWrappers/Java.Interop.Tools.JavaCallableWrappers/CecilExtensions.cs
new file mode 100644
index 00000000000..74e10e08c22
--- /dev/null
+++ b/external/Java.Interop/src/Java.Interop.Tools.JavaCallableWrappers/Java.Interop.Tools.JavaCallableWrappers/CecilExtensions.cs
@@ -0,0 +1,257 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Text.RegularExpressions;
+using Android.Runtime;
+using Java.Interop.Tools.Cecil;
+using Java.Interop.Tools.TypeNameMappings;
+using Mono.Cecil;
+using Mono.Cecil.Cil;
+using static Java.Interop.Tools.TypeNameMappings.JavaNativeTypeManager;
+
+namespace Java.Interop.Tools.JavaCallableWrappers.Utilities;
+
+static class CecilExtensions
+{
+ public static IEnumerable GetExportFieldAttributes (Mono.Cecil.ICustomAttributeProvider p)
+ {
+ return GetAttributes (p, a => ToExportFieldAttribute (a));
+ }
+
+ public static IEnumerable GetAttributes (Mono.Cecil.ICustomAttributeProvider p, Func selector)
+ where TAttribute : class
+ {
+ return GetAttributes (p, typeof (TAttribute).FullName!, selector);
+ }
+
+ public static IEnumerable GetAttributes (Mono.Cecil.ICustomAttributeProvider p, string attributeName, Func selector)
+ where TAttribute : class
+ {
+ return p.GetCustomAttributes (attributeName)
+ .Select (selector)
+ .Where (v => v != null)
+ .Select (v => v!);
+ }
+
+ internal static ExportFieldAttribute ToExportFieldAttribute (CustomAttribute attr)
+ {
+ return new ExportFieldAttribute ((string) attr.ConstructorArguments [0].Value);
+ }
+
+ public static MethodDefinition? GetBaseRegisteredMethod (MethodDefinition method, IMetadataResolver cache)
+ {
+ MethodDefinition bmethod;
+ while ((bmethod = method.GetBaseDefinition (cache)) != method) {
+ method = bmethod;
+
+ if (HasMethodRegistrationAttributes (method)) {
+ return method;
+ }
+ }
+ return null;
+ }
+
+ internal static RegisterAttribute? ToRegisterAttribute (CustomAttribute attr)
+ {
+ // attr.Resolve ();
+ RegisterAttribute? r = null;
+ if (attr.ConstructorArguments.Count == 1)
+ r = new RegisterAttribute ((string) attr.ConstructorArguments [0].Value, attr);
+ else if (attr.ConstructorArguments.Count == 3)
+ r = new RegisterAttribute (
+ (string) attr.ConstructorArguments [0].Value,
+ (string) attr.ConstructorArguments [1].Value,
+ (string) attr.ConstructorArguments [2].Value,
+ attr);
+ if (r != null) {
+ var v = attr.Properties.FirstOrDefault (p => p.Name == "DoNotGenerateAcw");
+ r.DoNotGenerateAcw = v.Name == null ? false : (bool) v.Argument.Value;
+ }
+ return r;
+ }
+
+
+ internal static RegisterAttribute? RegisterFromJniTypeSignatureAttribute (CustomAttribute attr)
+ {
+ // attr.Resolve ();
+ RegisterAttribute? r = null;
+ if (attr.ConstructorArguments.Count == 1)
+ r = new RegisterAttribute ((string) attr.ConstructorArguments [0].Value, attr);
+ if (r != null) {
+ var v = attr.Properties.FirstOrDefault (p => p.Name == "GenerateJavaPeer");
+ if (v.Name == null) {
+ r.DoNotGenerateAcw = false;
+ } else if (v.Name == "GenerateJavaPeer") {
+ r.DoNotGenerateAcw = !(bool) v.Argument.Value;
+ }
+ var isKeyProp = attr.Properties.FirstOrDefault (p => p.Name == "IsKeyword");
+ var isKeyword = isKeyProp.Name != null && ((bool) isKeyProp.Argument.Value) == true;
+ var arrRankProp = attr.Properties.FirstOrDefault (p => p.Name == "ArrayRank");
+ if (arrRankProp.Name != null && arrRankProp.Argument.Value is int rank) {
+ r.Name = new string ('[', rank) + (isKeyword ? r.Name : "L" + r.Name + ";");
+ }
+ }
+ return r;
+ }
+
+ internal static RegisterAttribute? RegisterFromJniConstructorSignatureAttribute (CustomAttribute attr)
+ {
+ // attr.Resolve ();
+ RegisterAttribute? r = null;
+ if (attr.ConstructorArguments.Count == 1)
+ r = new RegisterAttribute (
+ name: ".ctor",
+ signature: (string) attr.ConstructorArguments [0].Value,
+ connector: "",
+ originAttribute: attr);
+ return r;
+ }
+
+ internal static RegisterAttribute? RegisterFromJniMethodSignatureAttribute (CustomAttribute attr)
+ {
+ // attr.Resolve ();
+ RegisterAttribute? r = null;
+ if (attr.ConstructorArguments.Count == 2)
+ r = new RegisterAttribute ((string) attr.ConstructorArguments [0].Value,
+ (string) attr.ConstructorArguments [1].Value,
+ "",
+ attr);
+ return r;
+ }
+
+ static ExportAttribute ToExportAttribute (CustomAttribute attr, IMemberDefinition declaringMember, IMetadataResolver cache)
+ {
+ var name = attr.ConstructorArguments.Count > 0 ? (string) attr.ConstructorArguments [0].Value : declaringMember.Name;
+ if (attr.Properties.Count == 0)
+ return new ExportAttribute (name);
+ var typeArgs = (CustomAttributeArgument []) attr.Properties.FirstOrDefault (p => p.Name == "Throws").Argument.Value;
+ var thrown = typeArgs != null && typeArgs.Any ()
+ ? (from caa in typeArgs select JavaNativeTypeManager.Parse (GetJniTypeName ((TypeReference) caa.Value, cache))?.Type)
+ .Where (v => v != null)
+ .ToArray ()
+ : null;
+ var superArgs = (string) attr.Properties.FirstOrDefault (p => p.Name == "SuperArgumentsString").Argument.Value;
+ return new ExportAttribute (name) { ThrownNames = thrown, SuperArgumentsString = superArgs };
+ }
+
+ static ExportAttribute ToExportAttributeFromJavaCallableAttribute (CustomAttribute attr, IMemberDefinition declaringMember)
+ {
+ var name = attr.ConstructorArguments.Count > 0
+ ? (string) attr.ConstructorArguments [0].Value
+ : declaringMember.Name;
+ return new ExportAttribute (name);
+ }
+
+ static ExportAttribute ToExportAttributeFromJavaCallableConstructorAttribute (CustomAttribute attr, IMemberDefinition declaringMember)
+ {
+ var superArgs = (string) attr.Properties
+ .FirstOrDefault (p => p.Name == "SuperConstructorExpression")
+ .Argument
+ .Value;
+ return new ExportAttribute (".ctor") {
+ SuperArgumentsString = superArgs,
+ };
+ }
+
+ internal static IEnumerable GetTypeRegistrationAttributes (Mono.Cecil.ICustomAttributeProvider p)
+ {
+ foreach (var a in CecilExtensions.GetAttributes (p, a => CecilExtensions.ToRegisterAttribute (a))) {
+ yield return a;
+ }
+ foreach (var c in p.GetCustomAttributes ("Java.Interop.JniTypeSignatureAttribute")) {
+ var r = RegisterFromJniTypeSignatureAttribute (c);
+ if (r == null) {
+ continue;
+ }
+ yield return r;
+ }
+ }
+
+ // Keep in sync w/ HasMethodRegistrationAttributes()
+ public static IEnumerable GetMethodRegistrationAttributes (Mono.Cecil.ICustomAttributeProvider p)
+ {
+ foreach (var a in CecilExtensions.GetAttributes (p, a => CecilExtensions.ToRegisterAttribute (a))) {
+ yield return a;
+ }
+ foreach (var c in p.GetCustomAttributes ("Java.Interop.JniConstructorSignatureAttribute")) {
+ var r = RegisterFromJniConstructorSignatureAttribute (c);
+ if (r == null) {
+ continue;
+ }
+ yield return r;
+ }
+ foreach (var c in p.GetCustomAttributes ("Java.Interop.JniMethodSignatureAttribute")) {
+ var r = RegisterFromJniMethodSignatureAttribute (c);
+ if (r == null) {
+ continue;
+ }
+ yield return r;
+ }
+ }
+
+ static readonly string[] MethodRegistrationAttributes = new[]{
+ typeof (RegisterAttribute).FullName,
+ "Java.Interop.JniConstructorSignatureAttribute",
+ "Java.Interop.JniMethodSignatureAttribute",
+ };
+
+ // Keep in sync w/ GetMethodRegistrationAttributes()
+ public static bool HasMethodRegistrationAttributes (Mono.Cecil.ICustomAttributeProvider p)
+ {
+ foreach (CustomAttribute custom_attribute in p.CustomAttributes) {
+ var customAttrType = custom_attribute.Constructor.DeclaringType.FullName;
+ foreach (var t in MethodRegistrationAttributes) {
+ if (customAttrType == t)
+ return true;
+ }
+ }
+ return false;
+ }
+
+ public static IEnumerable GetExportAttributes (IMemberDefinition p, IMetadataResolver cache)
+ {
+ return CecilExtensions.GetAttributes (p, a => CecilExtensions.ToExportAttribute (a, p, cache))
+ .Concat (CecilExtensions.GetAttributes (p, "Java.Interop.JavaCallableAttribute",
+ a => CecilExtensions.ToExportAttributeFromJavaCallableAttribute (a, p)))
+ .Concat (CecilExtensions.GetAttributes (p, "Java.Interop.JavaCallableConstructorAttribute",
+ a => CecilExtensions.ToExportAttributeFromJavaCallableConstructorAttribute (a, p)));
+ }
+
+ public static SequencePoint? LookupSource (MethodDefinition method)
+ {
+ if (!method.HasBody)
+ return null;
+
+ foreach (var ins in method.Body.Instructions) {
+ var seqPoint = method.DebugInformation.GetSequencePoint (ins);
+ if (seqPoint != null)
+ return seqPoint;
+ }
+
+ return null;
+ }
+
+ public static SequencePoint? LookupSource (TypeDefinition type)
+ {
+ SequencePoint? candidate = null;
+ foreach (var method in type.Methods) {
+ if (!method.HasBody)
+ continue;
+
+ foreach (var ins in method.Body.Instructions) {
+ var seq = method.DebugInformation.GetSequencePoint (ins);
+ if (seq == null)
+ continue;
+
+ if (Regex.IsMatch (seq.Document.Url, ".+\\.(g|designer)\\..+"))
+ break;
+ if (candidate == null || seq.StartLine < candidate.StartLine)
+ candidate = seq;
+ break;
+ }
+ }
+
+ return candidate;
+ }
+}
diff --git a/external/Java.Interop/src/Java.Interop.Tools.JavaCallableWrappers/Java.Interop.Tools.JavaCallableWrappers/Crc64.Table.cs b/external/Java.Interop/src/Java.Interop.Tools.JavaCallableWrappers/Java.Interop.Tools.JavaCallableWrappers/Crc64.Table.cs
new file mode 100644
index 00000000000..c82097ed5b0
--- /dev/null
+++ b/external/Java.Interop/src/Java.Interop.Tools.JavaCallableWrappers/Java.Interop.Tools.JavaCallableWrappers/Crc64.Table.cs
@@ -0,0 +1,536 @@
+namespace Java.Interop.Tools.JavaCallableWrappers
+{
+ partial class Crc64Helper
+ {
+ static readonly ulong[,] table = {
+ {
+ 0x0000000000000000, 0x7ad870c830358979, 0xf5b0e190606b12f2, 0x8f689158505e9b8b,
+ 0xc038e5739841b68f, 0xbae095bba8743ff6, 0x358804e3f82aa47d, 0x4f50742bc81f2d04,
+ 0xab28ecb46814fe75, 0xd1f09c7c5821770c, 0x5e980d24087fec87, 0x24407dec384a65fe,
+ 0x6b1009c7f05548fa, 0x11c8790fc060c183, 0x9ea0e857903e5a08, 0xe478989fa00bd371,
+ 0x7d08ff3b88be6f81, 0x07d08ff3b88be6f8, 0x88b81eabe8d57d73, 0xf2606e63d8e0f40a,
+ 0xbd301a4810ffd90e, 0xc7e86a8020ca5077, 0x4880fbd87094cbfc, 0x32588b1040a14285,
+ 0xd620138fe0aa91f4, 0xacf86347d09f188d, 0x2390f21f80c18306, 0x594882d7b0f40a7f,
+ 0x1618f6fc78eb277b, 0x6cc0863448deae02, 0xe3a8176c18803589, 0x997067a428b5bcf0,
+ 0xfa11fe77117cdf02, 0x80c98ebf2149567b, 0x0fa11fe77117cdf0, 0x75796f2f41224489,
+ 0x3a291b04893d698d, 0x40f16bccb908e0f4, 0xcf99fa94e9567b7f, 0xb5418a5cd963f206,
+ 0x513912c379682177, 0x2be1620b495da80e, 0xa489f35319033385, 0xde51839b2936bafc,
+ 0x9101f7b0e12997f8, 0xebd98778d11c1e81, 0x64b116208142850a, 0x1e6966e8b1770c73,
+ 0x8719014c99c2b083, 0xfdc17184a9f739fa, 0x72a9e0dcf9a9a271, 0x08719014c99c2b08,
+ 0x4721e43f0183060c, 0x3df994f731b68f75, 0xb29105af61e814fe, 0xc849756751dd9d87,
+ 0x2c31edf8f1d64ef6, 0x56e99d30c1e3c78f, 0xd9810c6891bd5c04, 0xa3597ca0a188d57d,
+ 0xec09088b6997f879, 0x96d1784359a27100, 0x19b9e91b09fcea8b, 0x636199d339c963f2,
+ 0xdf7adabd7a6e2d6f, 0xa5a2aa754a5ba416, 0x2aca3b2d1a053f9d, 0x50124be52a30b6e4,
+ 0x1f423fcee22f9be0, 0x659a4f06d21a1299, 0xeaf2de5e82448912, 0x902aae96b271006b,
+ 0x74523609127ad31a, 0x0e8a46c1224f5a63, 0x81e2d7997211c1e8, 0xfb3aa75142244891,
+ 0xb46ad37a8a3b6595, 0xceb2a3b2ba0eecec, 0x41da32eaea507767, 0x3b024222da65fe1e,
+ 0xa2722586f2d042ee, 0xd8aa554ec2e5cb97, 0x57c2c41692bb501c, 0x2d1ab4dea28ed965,
+ 0x624ac0f56a91f461, 0x1892b03d5aa47d18, 0x97fa21650afae693, 0xed2251ad3acf6fea,
+ 0x095ac9329ac4bc9b, 0x7382b9faaaf135e2, 0xfcea28a2faafae69, 0x8632586aca9a2710,
+ 0xc9622c4102850a14, 0xb3ba5c8932b0836d, 0x3cd2cdd162ee18e6, 0x460abd1952db919f,
+ 0x256b24ca6b12f26d, 0x5fb354025b277b14, 0xd0dbc55a0b79e09f, 0xaa03b5923b4c69e6,
+ 0xe553c1b9f35344e2, 0x9f8bb171c366cd9b, 0x10e3202993385610, 0x6a3b50e1a30ddf69,
+ 0x8e43c87e03060c18, 0xf49bb8b633338561, 0x7bf329ee636d1eea, 0x012b592653589793,
+ 0x4e7b2d0d9b47ba97, 0x34a35dc5ab7233ee, 0xbbcbcc9dfb2ca865, 0xc113bc55cb19211c,
+ 0x5863dbf1e3ac9dec, 0x22bbab39d3991495, 0xadd33a6183c78f1e, 0xd70b4aa9b3f20667,
+ 0x985b3e827bed2b63, 0xe2834e4a4bd8a21a, 0x6debdf121b863991, 0x1733afda2bb3b0e8,
+ 0xf34b37458bb86399, 0x8993478dbb8deae0, 0x06fbd6d5ebd3716b, 0x7c23a61ddbe6f812,
+ 0x3373d23613f9d516, 0x49aba2fe23cc5c6f, 0xc6c333a67392c7e4, 0xbc1b436e43a74e9d,
+ 0x95ac9329ac4bc9b5, 0xef74e3e19c7e40cc, 0x601c72b9cc20db47, 0x1ac40271fc15523e,
+ 0x5594765a340a7f3a, 0x2f4c0692043ff643, 0xa02497ca54616dc8, 0xdafce7026454e4b1,
+ 0x3e847f9dc45f37c0, 0x445c0f55f46abeb9, 0xcb349e0da4342532, 0xb1eceec59401ac4b,
+ 0xfebc9aee5c1e814f, 0x8464ea266c2b0836, 0x0b0c7b7e3c7593bd, 0x71d40bb60c401ac4,
+ 0xe8a46c1224f5a634, 0x927c1cda14c02f4d, 0x1d148d82449eb4c6, 0x67ccfd4a74ab3dbf,
+ 0x289c8961bcb410bb, 0x5244f9a98c8199c2, 0xdd2c68f1dcdf0249, 0xa7f41839ecea8b30,
+ 0x438c80a64ce15841, 0x3954f06e7cd4d138, 0xb63c61362c8a4ab3, 0xcce411fe1cbfc3ca,
+ 0x83b465d5d4a0eece, 0xf96c151de49567b7, 0x76048445b4cbfc3c, 0x0cdcf48d84fe7545,
+ 0x6fbd6d5ebd3716b7, 0x15651d968d029fce, 0x9a0d8ccedd5c0445, 0xe0d5fc06ed698d3c,
+ 0xaf85882d2576a038, 0xd55df8e515432941, 0x5a3569bd451db2ca, 0x20ed197575283bb3,
+ 0xc49581ead523e8c2, 0xbe4df122e51661bb, 0x3125607ab548fa30, 0x4bfd10b2857d7349,
+ 0x04ad64994d625e4d, 0x7e7514517d57d734, 0xf11d85092d094cbf, 0x8bc5f5c11d3cc5c6,
+ 0x12b5926535897936, 0x686de2ad05bcf04f, 0xe70573f555e26bc4, 0x9ddd033d65d7e2bd,
+ 0xd28d7716adc8cfb9, 0xa85507de9dfd46c0, 0x273d9686cda3dd4b, 0x5de5e64efd965432,
+ 0xb99d7ed15d9d8743, 0xc3450e196da80e3a, 0x4c2d9f413df695b1, 0x36f5ef890dc31cc8,
+ 0x79a59ba2c5dc31cc, 0x037deb6af5e9b8b5, 0x8c157a32a5b7233e, 0xf6cd0afa9582aa47,
+ 0x4ad64994d625e4da, 0x300e395ce6106da3, 0xbf66a804b64ef628, 0xc5bed8cc867b7f51,
+ 0x8aeeace74e645255, 0xf036dc2f7e51db2c, 0x7f5e4d772e0f40a7, 0x05863dbf1e3ac9de,
+ 0xe1fea520be311aaf, 0x9b26d5e88e0493d6, 0x144e44b0de5a085d, 0x6e963478ee6f8124,
+ 0x21c640532670ac20, 0x5b1e309b16452559, 0xd476a1c3461bbed2, 0xaeaed10b762e37ab,
+ 0x37deb6af5e9b8b5b, 0x4d06c6676eae0222, 0xc26e573f3ef099a9, 0xb8b627f70ec510d0,
+ 0xf7e653dcc6da3dd4, 0x8d3e2314f6efb4ad, 0x0256b24ca6b12f26, 0x788ec2849684a65f,
+ 0x9cf65a1b368f752e, 0xe62e2ad306bafc57, 0x6946bb8b56e467dc, 0x139ecb4366d1eea5,
+ 0x5ccebf68aecec3a1, 0x2616cfa09efb4ad8, 0xa97e5ef8cea5d153, 0xd3a62e30fe90582a,
+ 0xb0c7b7e3c7593bd8, 0xca1fc72bf76cb2a1, 0x45775673a732292a, 0x3faf26bb9707a053,
+ 0x70ff52905f188d57, 0x0a2722586f2d042e, 0x854fb3003f739fa5, 0xff97c3c80f4616dc,
+ 0x1bef5b57af4dc5ad, 0x61372b9f9f784cd4, 0xee5fbac7cf26d75f, 0x9487ca0fff135e26,
+ 0xdbd7be24370c7322, 0xa10fceec0739fa5b, 0x2e675fb4576761d0, 0x54bf2f7c6752e8a9,
+ 0xcdcf48d84fe75459, 0xb71738107fd2dd20, 0x387fa9482f8c46ab, 0x42a7d9801fb9cfd2,
+ 0x0df7adabd7a6e2d6, 0x772fdd63e7936baf, 0xf8474c3bb7cdf024, 0x829f3cf387f8795d,
+ 0x66e7a46c27f3aa2c, 0x1c3fd4a417c62355, 0x935745fc4798b8de, 0xe98f353477ad31a7,
+ 0xa6df411fbfb21ca3, 0xdc0731d78f8795da, 0x536fa08fdfd90e51, 0x29b7d047efec8728
+ },
+ {
+ 0x0000000000000000, 0x89e99ffd73bddf69, 0x388a19a9bfec2db9, 0xb1638654cc51f2d0,
+ 0x711433537fd85b72, 0xf8fdacae0c65841b, 0x499e2afac03476cb, 0xc077b507b389a9a2,
+ 0xe22866a6ffb0b6e4, 0x6bc1f95b8c0d698d, 0xdaa27f0f405c9b5d, 0x534be0f233e14434,
+ 0x933c55f58068ed96, 0x1ad5ca08f3d532ff, 0xabb64c5c3f84c02f, 0x225fd3a14c391f46,
+ 0xef09eb1ea7f6fea3, 0x66e074e3d44b21ca, 0xd783f2b7181ad31a, 0x5e6a6d4a6ba70c73,
+ 0x9e1dd84dd82ea5d1, 0x17f447b0ab937ab8, 0xa697c1e467c28868, 0x2f7e5e19147f5701,
+ 0x0d218db858464847, 0x84c812452bfb972e, 0x35ab9411e7aa65fe, 0xbc420bec9417ba97,
+ 0x7c35beeb279e1335, 0xf5dc21165423cc5c, 0x44bfa74298723e8c, 0xcd5638bfebcfe1e5,
+ 0xf54af06e177a6e2d, 0x7ca36f9364c7b144, 0xcdc0e9c7a8964394, 0x4429763adb2b9cfd,
+ 0x845ec33d68a2355f, 0x0db75cc01b1fea36, 0xbcd4da94d74e18e6, 0x353d4569a4f3c78f,
+ 0x176296c8e8cad8c9, 0x9e8b09359b7707a0, 0x2fe88f615726f570, 0xa601109c249b2a19,
+ 0x6676a59b971283bb, 0xef9f3a66e4af5cd2, 0x5efcbc3228feae02, 0xd71523cf5b43716b,
+ 0x1a431b70b08c908e, 0x93aa848dc3314fe7, 0x22c902d90f60bd37, 0xab209d247cdd625e,
+ 0x6b572823cf54cbfc, 0xe2beb7debce91495, 0x53dd318a70b8e645, 0xda34ae770305392c,
+ 0xf86b7dd64f3c266a, 0x7182e22b3c81f903, 0xc0e1647ff0d00bd3, 0x4908fb82836dd4ba,
+ 0x897f4e8530e47d18, 0x0096d1784359a271, 0xb1f5572c8f0850a1, 0x381cc8d1fcb58fc8,
+ 0xc1ccc68f76634f31, 0x4825597205de9058, 0xf946df26c98f6288, 0x70af40dbba32bde1,
+ 0xb0d8f5dc09bb1443, 0x39316a217a06cb2a, 0x8852ec75b65739fa, 0x01bb7388c5eae693,
+ 0x23e4a02989d3f9d5, 0xaa0d3fd4fa6e26bc, 0x1b6eb980363fd46c, 0x9287267d45820b05,
+ 0x52f0937af60ba2a7, 0xdb190c8785b67dce, 0x6a7a8ad349e78f1e, 0xe393152e3a5a5077,
+ 0x2ec52d91d195b192, 0xa72cb26ca2286efb, 0x164f34386e799c2b, 0x9fa6abc51dc44342,
+ 0x5fd11ec2ae4deae0, 0xd638813fddf03589, 0x675b076b11a1c759, 0xeeb29896621c1830,
+ 0xcced4b372e250776, 0x4504d4ca5d98d81f, 0xf467529e91c92acf, 0x7d8ecd63e274f5a6,
+ 0xbdf9786451fd5c04, 0x3410e7992240836d, 0x857361cdee1171bd, 0x0c9afe309dacaed4,
+ 0x348636e16119211c, 0xbd6fa91c12a4fe75, 0x0c0c2f48def50ca5, 0x85e5b0b5ad48d3cc,
+ 0x459205b21ec17a6e, 0xcc7b9a4f6d7ca507, 0x7d181c1ba12d57d7, 0xf4f183e6d29088be,
+ 0xd6ae50479ea997f8, 0x5f47cfbaed144891, 0xee2449ee2145ba41, 0x67cdd61352f86528,
+ 0xa7ba6314e171cc8a, 0x2e53fce992cc13e3, 0x9f307abd5e9de133, 0x16d9e5402d203e5a,
+ 0xdb8fddffc6efdfbf, 0x52664202b55200d6, 0xe305c4567903f206, 0x6aec5bab0abe2d6f,
+ 0xaa9beeacb93784cd, 0x23727151ca8a5ba4, 0x9211f70506dba974, 0x1bf868f87566761d,
+ 0x39a7bb59395f695b, 0xb04e24a44ae2b632, 0x012da2f086b344e2, 0x88c43d0df50e9b8b,
+ 0x48b3880a46873229, 0xc15a17f7353aed40, 0x703991a3f96b1f90, 0xf9d00e5e8ad6c0f9,
+ 0xa8c0ab4db4510d09, 0x212934b0c7ecd260, 0x904ab2e40bbd20b0, 0x19a32d197800ffd9,
+ 0xd9d4981ecb89567b, 0x503d07e3b8348912, 0xe15e81b774657bc2, 0x68b71e4a07d8a4ab,
+ 0x4ae8cdeb4be1bbed, 0xc3015216385c6484, 0x7262d442f40d9654, 0xfb8b4bbf87b0493d,
+ 0x3bfcfeb83439e09f, 0xb215614547843ff6, 0x0376e7118bd5cd26, 0x8a9f78ecf868124f,
+ 0x47c9405313a7f3aa, 0xce20dfae601a2cc3, 0x7f4359faac4bde13, 0xf6aac607dff6017a,
+ 0x36dd73006c7fa8d8, 0xbf34ecfd1fc277b1, 0x0e576aa9d3938561, 0x87bef554a02e5a08,
+ 0xa5e126f5ec17454e, 0x2c08b9089faa9a27, 0x9d6b3f5c53fb68f7, 0x1482a0a12046b79e,
+ 0xd4f515a693cf1e3c, 0x5d1c8a5be072c155, 0xec7f0c0f2c233385, 0x659693f25f9eecec,
+ 0x5d8a5b23a32b6324, 0xd463c4ded096bc4d, 0x6500428a1cc74e9d, 0xece9dd776f7a91f4,
+ 0x2c9e6870dcf33856, 0xa577f78daf4ee73f, 0x141471d9631f15ef, 0x9dfdee2410a2ca86,
+ 0xbfa23d855c9bd5c0, 0x364ba2782f260aa9, 0x8728242ce377f879, 0x0ec1bbd190ca2710,
+ 0xceb60ed623438eb2, 0x475f912b50fe51db, 0xf63c177f9cafa30b, 0x7fd58882ef127c62,
+ 0xb283b03d04dd9d87, 0x3b6a2fc0776042ee, 0x8a09a994bb31b03e, 0x03e03669c88c6f57,
+ 0xc397836e7b05c6f5, 0x4a7e1c9308b8199c, 0xfb1d9ac7c4e9eb4c, 0x72f4053ab7543425,
+ 0x50abd69bfb6d2b63, 0xd942496688d0f40a, 0x6821cf32448106da, 0xe1c850cf373cd9b3,
+ 0x21bfe5c884b57011, 0xa8567a35f708af78, 0x1935fc613b595da8, 0x90dc639c48e482c1,
+ 0x690c6dc2c2324238, 0xe0e5f23fb18f9d51, 0x5186746b7dde6f81, 0xd86feb960e63b0e8,
+ 0x18185e91bdea194a, 0x91f1c16cce57c623, 0x20924738020634f3, 0xa97bd8c571bbeb9a,
+ 0x8b240b643d82f4dc, 0x02cd94994e3f2bb5, 0xb3ae12cd826ed965, 0x3a478d30f1d3060c,
+ 0xfa303837425aafae, 0x73d9a7ca31e770c7, 0xc2ba219efdb68217, 0x4b53be638e0b5d7e,
+ 0x860586dc65c4bc9b, 0x0fec1921167963f2, 0xbe8f9f75da289122, 0x37660088a9954e4b,
+ 0xf711b58f1a1ce7e9, 0x7ef82a7269a13880, 0xcf9bac26a5f0ca50, 0x467233dbd64d1539,
+ 0x642de07a9a740a7f, 0xedc47f87e9c9d516, 0x5ca7f9d3259827c6, 0xd54e662e5625f8af,
+ 0x1539d329e5ac510d, 0x9cd04cd496118e64, 0x2db3ca805a407cb4, 0xa45a557d29fda3dd,
+ 0x9c469dacd5482c15, 0x15af0251a6f5f37c, 0xa4cc84056aa401ac, 0x2d251bf81919dec5,
+ 0xed52aeffaa907767, 0x64bb3102d92da80e, 0xd5d8b756157c5ade, 0x5c3128ab66c185b7,
+ 0x7e6efb0a2af89af1, 0xf78764f759454598, 0x46e4e2a39514b748, 0xcf0d7d5ee6a96821,
+ 0x0f7ac8595520c183, 0x869357a4269d1eea, 0x37f0d1f0eaccec3a, 0xbe194e0d99713353,
+ 0x734f76b272bed2b6, 0xfaa6e94f01030ddf, 0x4bc56f1bcd52ff0f, 0xc22cf0e6beef2066,
+ 0x025b45e10d6689c4, 0x8bb2da1c7edb56ad, 0x3ad15c48b28aa47d, 0xb338c3b5c1377b14,
+ 0x916710148d0e6452, 0x188e8fe9feb3bb3b, 0xa9ed09bd32e249eb, 0x20049640415f9682,
+ 0xe0732347f2d63f20, 0x699abcba816be049, 0xd8f93aee4d3a1299, 0x5110a5133e87cdf0
+ },
+ {
+ 0x0000000000000000, 0xf4125129ce4038be, 0xc37d8400c417e217, 0x376fd5290a57daa9,
+ 0xada22e52d0b85745, 0x59b07f7b1ef86ffb, 0x6edfaa5214afb552, 0x9acdfb7bdaef8dec,
+ 0x701d7af6f9e73de1, 0x840f2bdf37a7055f, 0xb360fef63df0dff6, 0x4772afdff3b0e748,
+ 0xddbf54a4295f6aa4, 0x29ad058de71f521a, 0x1ec2d0a4ed4888b3, 0xead0818d2308b00d,
+ 0xe03af5edf3ce7bc2, 0x1428a4c43d8e437c, 0x234771ed37d999d5, 0xd75520c4f999a16b,
+ 0x4d98dbbf23762c87, 0xb98a8a96ed361439, 0x8ee55fbfe761ce90, 0x7af70e962921f62e,
+ 0x90278f1b0a294623, 0x6435de32c4697e9d, 0x535a0b1bce3ea434, 0xa7485a32007e9c8a,
+ 0x3d85a149da911166, 0xc997f06014d129d8, 0xfef825491e86f371, 0x0aea7460d0c6cbcf,
+ 0xeb2ccd88bf0b64ef, 0x1f3e9ca1714b5c51, 0x285149887b1c86f8, 0xdc4318a1b55cbe46,
+ 0x468ee3da6fb333aa, 0xb29cb2f3a1f30b14, 0x85f367daaba4d1bd, 0x71e136f365e4e903,
+ 0x9b31b77e46ec590e, 0x6f23e65788ac61b0, 0x584c337e82fbbb19, 0xac5e62574cbb83a7,
+ 0x3693992c96540e4b, 0xc281c805581436f5, 0xf5ee1d2c5243ec5c, 0x01fc4c059c03d4e2,
+ 0x0b1638654cc51f2d, 0xff04694c82852793, 0xc86bbc6588d2fd3a, 0x3c79ed4c4692c584,
+ 0xa6b416379c7d4868, 0x52a6471e523d70d6, 0x65c99237586aaa7f, 0x91dbc31e962a92c1,
+ 0x7b0b4293b52222cc, 0x8f1913ba7b621a72, 0xb876c6937135c0db, 0x4c6497babf75f865,
+ 0xd6a96cc1659a7589, 0x22bb3de8abda4d37, 0x15d4e8c1a18d979e, 0xe1c6b9e86fcdaf20,
+ 0xfd00bd4226815ab5, 0x0912ec6be8c1620b, 0x3e7d3942e296b8a2, 0xca6f686b2cd6801c,
+ 0x50a29310f6390df0, 0xa4b0c2393879354e, 0x93df1710322eefe7, 0x67cd4639fc6ed759,
+ 0x8d1dc7b4df666754, 0x790f969d11265fea, 0x4e6043b41b718543, 0xba72129dd531bdfd,
+ 0x20bfe9e60fde3011, 0xd4adb8cfc19e08af, 0xe3c26de6cbc9d206, 0x17d03ccf0589eab8,
+ 0x1d3a48afd54f2177, 0xe92819861b0f19c9, 0xde47ccaf1158c360, 0x2a559d86df18fbde,
+ 0xb09866fd05f77632, 0x448a37d4cbb74e8c, 0x73e5e2fdc1e09425, 0x87f7b3d40fa0ac9b,
+ 0x6d2732592ca81c96, 0x99356370e2e82428, 0xae5ab659e8bffe81, 0x5a48e77026ffc63f,
+ 0xc0851c0bfc104bd3, 0x34974d223250736d, 0x03f8980b3807a9c4, 0xf7eac922f647917a,
+ 0x162c70ca998a3e5a, 0xe23e21e357ca06e4, 0xd551f4ca5d9ddc4d, 0x2143a5e393dde4f3,
+ 0xbb8e5e984932691f, 0x4f9c0fb1877251a1, 0x78f3da988d258b08, 0x8ce18bb14365b3b6,
+ 0x66310a3c606d03bb, 0x92235b15ae2d3b05, 0xa54c8e3ca47ae1ac, 0x515edf156a3ad912,
+ 0xcb93246eb0d554fe, 0x3f8175477e956c40, 0x08eea06e74c2b6e9, 0xfcfcf147ba828e57,
+ 0xf61685276a444598, 0x0204d40ea4047d26, 0x356b0127ae53a78f, 0xc179500e60139f31,
+ 0x5bb4ab75bafc12dd, 0xafa6fa5c74bc2a63, 0x98c92f757eebf0ca, 0x6cdb7e5cb0abc874,
+ 0x860bffd193a37879, 0x7219aef85de340c7, 0x45767bd157b49a6e, 0xb1642af899f4a2d0,
+ 0x2ba9d183431b2f3c, 0xdfbb80aa8d5b1782, 0xe8d45583870ccd2b, 0x1cc604aa494cf595,
+ 0xd1585cd715952601, 0x254a0dfedbd51ebf, 0x1225d8d7d182c416, 0xe63789fe1fc2fca8,
+ 0x7cfa7285c52d7144, 0x88e823ac0b6d49fa, 0xbf87f685013a9353, 0x4b95a7accf7aabed,
+ 0xa1452621ec721be0, 0x555777082232235e, 0x6238a2212865f9f7, 0x962af308e625c149,
+ 0x0ce708733cca4ca5, 0xf8f5595af28a741b, 0xcf9a8c73f8ddaeb2, 0x3b88dd5a369d960c,
+ 0x3162a93ae65b5dc3, 0xc570f813281b657d, 0xf21f2d3a224cbfd4, 0x060d7c13ec0c876a,
+ 0x9cc0876836e30a86, 0x68d2d641f8a33238, 0x5fbd0368f2f4e891, 0xabaf52413cb4d02f,
+ 0x417fd3cc1fbc6022, 0xb56d82e5d1fc589c, 0x820257ccdbab8235, 0x761006e515ebba8b,
+ 0xecddfd9ecf043767, 0x18cfacb701440fd9, 0x2fa0799e0b13d570, 0xdbb228b7c553edce,
+ 0x3a74915faa9e42ee, 0xce66c07664de7a50, 0xf909155f6e89a0f9, 0x0d1b4476a0c99847,
+ 0x97d6bf0d7a2615ab, 0x63c4ee24b4662d15, 0x54ab3b0dbe31f7bc, 0xa0b96a247071cf02,
+ 0x4a69eba953797f0f, 0xbe7bba809d3947b1, 0x89146fa9976e9d18, 0x7d063e80592ea5a6,
+ 0xe7cbc5fb83c1284a, 0x13d994d24d8110f4, 0x24b641fb47d6ca5d, 0xd0a410d28996f2e3,
+ 0xda4e64b25950392c, 0x2e5c359b97100192, 0x1933e0b29d47db3b, 0xed21b19b5307e385,
+ 0x77ec4ae089e86e69, 0x83fe1bc947a856d7, 0xb491cee04dff8c7e, 0x40839fc983bfb4c0,
+ 0xaa531e44a0b704cd, 0x5e414f6d6ef73c73, 0x692e9a4464a0e6da, 0x9d3ccb6daae0de64,
+ 0x07f13016700f5388, 0xf3e3613fbe4f6b36, 0xc48cb416b418b19f, 0x309ee53f7a588921,
+ 0x2c58e19533147cb4, 0xd84ab0bcfd54440a, 0xef256595f7039ea3, 0x1b3734bc3943a61d,
+ 0x81facfc7e3ac2bf1, 0x75e89eee2dec134f, 0x42874bc727bbc9e6, 0xb6951aeee9fbf158,
+ 0x5c459b63caf34155, 0xa857ca4a04b379eb, 0x9f381f630ee4a342, 0x6b2a4e4ac0a49bfc,
+ 0xf1e7b5311a4b1610, 0x05f5e418d40b2eae, 0x329a3131de5cf407, 0xc6886018101cccb9,
+ 0xcc621478c0da0776, 0x387045510e9a3fc8, 0x0f1f907804cde561, 0xfb0dc151ca8ddddf,
+ 0x61c03a2a10625033, 0x95d26b03de22688d, 0xa2bdbe2ad475b224, 0x56afef031a358a9a,
+ 0xbc7f6e8e393d3a97, 0x486d3fa7f77d0229, 0x7f02ea8efd2ad880, 0x8b10bba7336ae03e,
+ 0x11dd40dce9856dd2, 0xe5cf11f527c5556c, 0xd2a0c4dc2d928fc5, 0x26b295f5e3d2b77b,
+ 0xc7742c1d8c1f185b, 0x33667d34425f20e5, 0x0409a81d4808fa4c, 0xf01bf9348648c2f2,
+ 0x6ad6024f5ca74f1e, 0x9ec4536692e777a0, 0xa9ab864f98b0ad09, 0x5db9d76656f095b7,
+ 0xb76956eb75f825ba, 0x437b07c2bbb81d04, 0x7414d2ebb1efc7ad, 0x800683c27fafff13,
+ 0x1acb78b9a54072ff, 0xeed929906b004a41, 0xd9b6fcb9615790e8, 0x2da4ad90af17a856,
+ 0x274ed9f07fd16399, 0xd35c88d9b1915b27, 0xe4335df0bbc6818e, 0x10210cd97586b930,
+ 0x8aecf7a2af6934dc, 0x7efea68b61290c62, 0x499173a26b7ed6cb, 0xbd83228ba53eee75,
+ 0x5753a30686365e78, 0xa341f22f487666c6, 0x942e27064221bc6f, 0x603c762f8c6184d1,
+ 0xfaf18d54568e093d, 0x0ee3dc7d98ce3183, 0x398c09549299eb2a, 0xcd9e587d5cd9d394
+ },
+ {
+ 0x0000000000000000, 0x8ce168638c796306, 0x329bf69440655567, 0xbe7a9ef7cc1c3661,
+ 0x6537ed2880caaace, 0xe9d6854b0cb3c9c8, 0x57ac1bbcc0afffa9, 0xdb4d73df4cd69caf,
+ 0xca6fda510195559c, 0x468eb2328dec369a, 0xf8f42cc541f000fb, 0x741544a6cd8963fd,
+ 0xaf583779815fff52, 0x23b95f1a0d269c54, 0x9dc3c1edc13aaa35, 0x1122a98e4d43c933,
+ 0xbf8692f15bbd3853, 0x3367fa92d7c45b55, 0x8d1d64651bd86d34, 0x01fc0c0697a10e32,
+ 0xdab17fd9db77929d, 0x565017ba570ef19b, 0xe82a894d9b12c7fa, 0x64cbe12e176ba4fc,
+ 0x75e948a05a286dcf, 0xf90820c3d6510ec9, 0x4772be341a4d38a8, 0xcb93d65796345bae,
+ 0x10dea588dae2c701, 0x9c3fcdeb569ba407, 0x2245531c9a879266, 0xaea43b7f16fef160,
+ 0x545403b1efede3cd, 0xd8b56bd2639480cb, 0x66cff525af88b6aa, 0xea2e9d4623f1d5ac,
+ 0x3163ee996f274903, 0xbd8286fae35e2a05, 0x03f8180d2f421c64, 0x8f19706ea33b7f62,
+ 0x9e3bd9e0ee78b651, 0x12dab1836201d557, 0xaca02f74ae1de336, 0x2041471722648030,
+ 0xfb0c34c86eb21c9f, 0x77ed5cabe2cb7f99, 0xc997c25c2ed749f8, 0x4576aa3fa2ae2afe,
+ 0xebd29140b450db9e, 0x6733f9233829b898, 0xd94967d4f4358ef9, 0x55a80fb7784cedff,
+ 0x8ee57c68349a7150, 0x0204140bb8e31256, 0xbc7e8afc74ff2437, 0x309fe29ff8864731,
+ 0x21bd4b11b5c58e02, 0xad5c237239bced04, 0x1326bd85f5a0db65, 0x9fc7d5e679d9b863,
+ 0x448aa639350f24cc, 0xc86bce5ab97647ca, 0x761150ad756a71ab, 0xfaf038cef91312ad,
+ 0xa8a80763dfdbc79a, 0x24496f0053a2a49c, 0x9a33f1f79fbe92fd, 0x16d2999413c7f1fb,
+ 0xcd9fea4b5f116d54, 0x417e8228d3680e52, 0xff041cdf1f743833, 0x73e574bc930d5b35,
+ 0x62c7dd32de4e9206, 0xee26b5515237f100, 0x505c2ba69e2bc761, 0xdcbd43c51252a467,
+ 0x07f0301a5e8438c8, 0x8b115879d2fd5bce, 0x356bc68e1ee16daf, 0xb98aaeed92980ea9,
+ 0x172e95928466ffc9, 0x9bcffdf1081f9ccf, 0x25b56306c403aaae, 0xa9540b65487ac9a8,
+ 0x721978ba04ac5507, 0xfef810d988d53601, 0x40828e2e44c90060, 0xcc63e64dc8b06366,
+ 0xdd414fc385f3aa55, 0x51a027a0098ac953, 0xefdab957c596ff32, 0x633bd13449ef9c34,
+ 0xb876a2eb0539009b, 0x3497ca888940639d, 0x8aed547f455c55fc, 0x060c3c1cc92536fa,
+ 0xfcfc04d230362457, 0x701d6cb1bc4f4751, 0xce67f24670537130, 0x42869a25fc2a1236,
+ 0x99cbe9fab0fc8e99, 0x152a81993c85ed9f, 0xab501f6ef099dbfe, 0x27b1770d7ce0b8f8,
+ 0x3693de8331a371cb, 0xba72b6e0bdda12cd, 0x0408281771c624ac, 0x88e94074fdbf47aa,
+ 0x53a433abb169db05, 0xdf455bc83d10b803, 0x613fc53ff10c8e62, 0xeddead5c7d75ed64,
+ 0x437a96236b8b1c04, 0xcf9bfe40e7f27f02, 0x71e160b72bee4963, 0xfd0008d4a7972a65,
+ 0x264d7b0beb41b6ca, 0xaaac13686738d5cc, 0x14d68d9fab24e3ad, 0x9837e5fc275d80ab,
+ 0x89154c726a1e4998, 0x05f42411e6672a9e, 0xbb8ebae62a7b1cff, 0x376fd285a6027ff9,
+ 0xec22a15aead4e356, 0x60c3c93966ad8050, 0xdeb957ceaab1b631, 0x52583fad26c8d537,
+ 0x7a092894e7201c5f, 0xf6e840f76b597f59, 0x4892de00a7454938, 0xc473b6632b3c2a3e,
+ 0x1f3ec5bc67eab691, 0x93dfaddfeb93d597, 0x2da53328278fe3f6, 0xa1445b4babf680f0,
+ 0xb066f2c5e6b549c3, 0x3c879aa66acc2ac5, 0x82fd0451a6d01ca4, 0x0e1c6c322aa97fa2,
+ 0xd5511fed667fe30d, 0x59b0778eea06800b, 0xe7cae979261ab66a, 0x6b2b811aaa63d56c,
+ 0xc58fba65bc9d240c, 0x496ed20630e4470a, 0xf7144cf1fcf8716b, 0x7bf524927081126d,
+ 0xa0b8574d3c578ec2, 0x2c593f2eb02eedc4, 0x9223a1d97c32dba5, 0x1ec2c9baf04bb8a3,
+ 0x0fe06034bd087190, 0x8301085731711296, 0x3d7b96a0fd6d24f7, 0xb19afec3711447f1,
+ 0x6ad78d1c3dc2db5e, 0xe636e57fb1bbb858, 0x584c7b887da78e39, 0xd4ad13ebf1deed3f,
+ 0x2e5d2b2508cdff92, 0xa2bc434684b49c94, 0x1cc6ddb148a8aaf5, 0x9027b5d2c4d1c9f3,
+ 0x4b6ac60d8807555c, 0xc78bae6e047e365a, 0x79f13099c862003b, 0xf51058fa441b633d,
+ 0xe432f1740958aa0e, 0x68d399178521c908, 0xd6a907e0493dff69, 0x5a486f83c5449c6f,
+ 0x81051c5c899200c0, 0x0de4743f05eb63c6, 0xb39eeac8c9f755a7, 0x3f7f82ab458e36a1,
+ 0x91dbb9d45370c7c1, 0x1d3ad1b7df09a4c7, 0xa3404f40131592a6, 0x2fa127239f6cf1a0,
+ 0xf4ec54fcd3ba6d0f, 0x780d3c9f5fc30e09, 0xc677a26893df3868, 0x4a96ca0b1fa65b6e,
+ 0x5bb4638552e5925d, 0xd7550be6de9cf15b, 0x692f95111280c73a, 0xe5cefd729ef9a43c,
+ 0x3e838eadd22f3893, 0xb262e6ce5e565b95, 0x0c187839924a6df4, 0x80f9105a1e330ef2,
+ 0xd2a12ff738fbdbc5, 0x5e404794b482b8c3, 0xe03ad963789e8ea2, 0x6cdbb100f4e7eda4,
+ 0xb796c2dfb831710b, 0x3b77aabc3448120d, 0x850d344bf854246c, 0x09ec5c28742d476a,
+ 0x18cef5a6396e8e59, 0x942f9dc5b517ed5f, 0x2a550332790bdb3e, 0xa6b46b51f572b838,
+ 0x7df9188eb9a42497, 0xf11870ed35dd4791, 0x4f62ee1af9c171f0, 0xc383867975b812f6,
+ 0x6d27bd066346e396, 0xe1c6d565ef3f8090, 0x5fbc4b922323b6f1, 0xd35d23f1af5ad5f7,
+ 0x0810502ee38c4958, 0x84f1384d6ff52a5e, 0x3a8ba6baa3e91c3f, 0xb66aced92f907f39,
+ 0xa748675762d3b60a, 0x2ba90f34eeaad50c, 0x95d391c322b6e36d, 0x1932f9a0aecf806b,
+ 0xc27f8a7fe2191cc4, 0x4e9ee21c6e607fc2, 0xf0e47ceba27c49a3, 0x7c0514882e052aa5,
+ 0x86f52c46d7163808, 0x0a1444255b6f5b0e, 0xb46edad297736d6f, 0x388fb2b11b0a0e69,
+ 0xe3c2c16e57dc92c6, 0x6f23a90ddba5f1c0, 0xd15937fa17b9c7a1, 0x5db85f999bc0a4a7,
+ 0x4c9af617d6836d94, 0xc07b9e745afa0e92, 0x7e01008396e638f3, 0xf2e068e01a9f5bf5,
+ 0x29ad1b3f5649c75a, 0xa54c735cda30a45c, 0x1b36edab162c923d, 0x97d785c89a55f13b,
+ 0x3973beb78cab005b, 0xb592d6d400d2635d, 0x0be84823ccce553c, 0x8709204040b7363a,
+ 0x5c44539f0c61aa95, 0xd0a53bfc8018c993, 0x6edfa50b4c04fff2, 0xe23ecd68c07d9cf4,
+ 0xf31c64e68d3e55c7, 0x7ffd0c85014736c1, 0xc1879272cd5b00a0, 0x4d66fa11412263a6,
+ 0x962b89ce0df4ff09, 0x1acae1ad818d9c0f, 0xa4b07f5a4d91aa6e, 0x28511739c1e8c968
+ },
+ {
+ 0x0000000000000000, 0x3504e58b9ba6dd1e, 0x6a09cb17374dba3c, 0x5f0d2e9caceb6722,
+ 0xd413962e6e9b7478, 0xe11773a5f53da966, 0xbe1a5d3959d6ce44, 0x8b1eb8b2c270135a,
+ 0x837e0a0f85a17b9b, 0xb67aef841e07a685, 0xe977c118b2ecc1a7, 0xdc732493294a1cb9,
+ 0x576d9c21eb3a0fe3, 0x626979aa709cd2fd, 0x3d645736dc77b5df, 0x0860b2bd47d168c1,
+ 0x2da5324c53d5645d, 0x18a1d7c7c873b943, 0x47acf95b6498de61, 0x72a81cd0ff3e037f,
+ 0xf9b6a4623d4e1025, 0xccb241e9a6e8cd3b, 0x93bf6f750a03aa19, 0xa6bb8afe91a57707,
+ 0xaedb3843d6741fc6, 0x9bdfddc84dd2c2d8, 0xc4d2f354e139a5fa, 0xf1d616df7a9f78e4,
+ 0x7ac8ae6db8ef6bbe, 0x4fcc4be62349b6a0, 0x10c1657a8fa2d182, 0x25c580f114040c9c,
+ 0x5b4a6498a7aac8ba, 0x6e4e81133c0c15a4, 0x3143af8f90e77286, 0x04474a040b41af98,
+ 0x8f59f2b6c931bcc2, 0xba5d173d529761dc, 0xe55039a1fe7c06fe, 0xd054dc2a65dadbe0,
+ 0xd8346e97220bb321, 0xed308b1cb9ad6e3f, 0xb23da5801546091d, 0x8739400b8ee0d403,
+ 0x0c27f8b94c90c759, 0x39231d32d7361a47, 0x662e33ae7bdd7d65, 0x532ad625e07ba07b,
+ 0x76ef56d4f47face7, 0x43ebb35f6fd971f9, 0x1ce69dc3c33216db, 0x29e278485894cbc5,
+ 0xa2fcc0fa9ae4d89f, 0x97f8257101420581, 0xc8f50bedada962a3, 0xfdf1ee66360fbfbd,
+ 0xf5915cdb71ded77c, 0xc095b950ea780a62, 0x9f9897cc46936d40, 0xaa9c7247dd35b05e,
+ 0x2182caf51f45a304, 0x14862f7e84e37e1a, 0x4b8b01e228081938, 0x7e8fe469b3aec426,
+ 0xb694c9314f559174, 0x83902cbad4f34c6a, 0xdc9d022678182b48, 0xe999e7ade3bef656,
+ 0x62875f1f21cee50c, 0x5783ba94ba683812, 0x088e940816835f30, 0x3d8a71838d25822e,
+ 0x35eac33ecaf4eaef, 0x00ee26b5515237f1, 0x5fe30829fdb950d3, 0x6ae7eda2661f8dcd,
+ 0xe1f95510a46f9e97, 0xd4fdb09b3fc94389, 0x8bf09e07932224ab, 0xbef47b8c0884f9b5,
+ 0x9b31fb7d1c80f529, 0xae351ef687262837, 0xf138306a2bcd4f15, 0xc43cd5e1b06b920b,
+ 0x4f226d53721b8151, 0x7a2688d8e9bd5c4f, 0x252ba64445563b6d, 0x102f43cfdef0e673,
+ 0x184ff17299218eb2, 0x2d4b14f9028753ac, 0x72463a65ae6c348e, 0x4742dfee35cae990,
+ 0xcc5c675cf7bafaca, 0xf95882d76c1c27d4, 0xa655ac4bc0f740f6, 0x935149c05b519de8,
+ 0xeddeada9e8ff59ce, 0xd8da4822735984d0, 0x87d766bedfb2e3f2, 0xb2d3833544143eec,
+ 0x39cd3b8786642db6, 0x0cc9de0c1dc2f0a8, 0x53c4f090b129978a, 0x66c0151b2a8f4a94,
+ 0x6ea0a7a66d5e2255, 0x5ba4422df6f8ff4b, 0x04a96cb15a139869, 0x31ad893ac1b54577,
+ 0xbab3318803c5562d, 0x8fb7d40398638b33, 0xd0bafa9f3488ec11, 0xe5be1f14af2e310f,
+ 0xc07b9fe5bb2a3d93, 0xf57f7a6e208ce08d, 0xaa7254f28c6787af, 0x9f76b17917c15ab1,
+ 0x146809cbd5b149eb, 0x216cec404e1794f5, 0x7e61c2dce2fcf3d7, 0x4b652757795a2ec9,
+ 0x430595ea3e8b4608, 0x76017061a52d9b16, 0x290c5efd09c6fc34, 0x1c08bb769260212a,
+ 0x971603c450103270, 0xa212e64fcbb6ef6e, 0xfd1fc8d3675d884c, 0xc81b2d58fcfb5552,
+ 0x4670b431c63cb183, 0x737451ba5d9a6c9d, 0x2c797f26f1710bbf, 0x197d9aad6ad7d6a1,
+ 0x9263221fa8a7c5fb, 0xa767c794330118e5, 0xf86ae9089fea7fc7, 0xcd6e0c83044ca2d9,
+ 0xc50ebe3e439dca18, 0xf00a5bb5d83b1706, 0xaf07752974d07024, 0x9a0390a2ef76ad3a,
+ 0x111d28102d06be60, 0x2419cd9bb6a0637e, 0x7b14e3071a4b045c, 0x4e10068c81edd942,
+ 0x6bd5867d95e9d5de, 0x5ed163f60e4f08c0, 0x01dc4d6aa2a46fe2, 0x34d8a8e13902b2fc,
+ 0xbfc61053fb72a1a6, 0x8ac2f5d860d47cb8, 0xd5cfdb44cc3f1b9a, 0xe0cb3ecf5799c684,
+ 0xe8ab8c721048ae45, 0xddaf69f98bee735b, 0x82a2476527051479, 0xb7a6a2eebca3c967,
+ 0x3cb81a5c7ed3da3d, 0x09bcffd7e5750723, 0x56b1d14b499e6001, 0x63b534c0d238bd1f,
+ 0x1d3ad0a961967939, 0x283e3522fa30a427, 0x77331bbe56dbc305, 0x4237fe35cd7d1e1b,
+ 0xc92946870f0d0d41, 0xfc2da30c94abd05f, 0xa3208d903840b77d, 0x9624681ba3e66a63,
+ 0x9e44daa6e43702a2, 0xab403f2d7f91dfbc, 0xf44d11b1d37ab89e, 0xc149f43a48dc6580,
+ 0x4a574c888aac76da, 0x7f53a903110aabc4, 0x205e879fbde1cce6, 0x155a6214264711f8,
+ 0x309fe2e532431d64, 0x059b076ea9e5c07a, 0x5a9629f2050ea758, 0x6f92cc799ea87a46,
+ 0xe48c74cb5cd8691c, 0xd1889140c77eb402, 0x8e85bfdc6b95d320, 0xbb815a57f0330e3e,
+ 0xb3e1e8eab7e266ff, 0x86e50d612c44bbe1, 0xd9e823fd80afdcc3, 0xececc6761b0901dd,
+ 0x67f27ec4d9791287, 0x52f69b4f42dfcf99, 0x0dfbb5d3ee34a8bb, 0x38ff5058759275a5,
+ 0xf0e47d00896920f7, 0xc5e0988b12cffde9, 0x9aedb617be249acb, 0xafe9539c258247d5,
+ 0x24f7eb2ee7f2548f, 0x11f30ea57c548991, 0x4efe2039d0bfeeb3, 0x7bfac5b24b1933ad,
+ 0x739a770f0cc85b6c, 0x469e9284976e8672, 0x1993bc183b85e150, 0x2c975993a0233c4e,
+ 0xa789e12162532f14, 0x928d04aaf9f5f20a, 0xcd802a36551e9528, 0xf884cfbdceb84836,
+ 0xdd414f4cdabc44aa, 0xe845aac7411a99b4, 0xb748845bedf1fe96, 0x824c61d076572388,
+ 0x0952d962b42730d2, 0x3c563ce92f81edcc, 0x635b1275836a8aee, 0x565ff7fe18cc57f0,
+ 0x5e3f45435f1d3f31, 0x6b3ba0c8c4bbe22f, 0x34368e546850850d, 0x01326bdff3f65813,
+ 0x8a2cd36d31864b49, 0xbf2836e6aa209657, 0xe025187a06cbf175, 0xd521fdf19d6d2c6b,
+ 0xabae19982ec3e84d, 0x9eaafc13b5653553, 0xc1a7d28f198e5271, 0xf4a3370482288f6f,
+ 0x7fbd8fb640589c35, 0x4ab96a3ddbfe412b, 0x15b444a177152609, 0x20b0a12aecb3fb17,
+ 0x28d01397ab6293d6, 0x1dd4f61c30c44ec8, 0x42d9d8809c2f29ea, 0x77dd3d0b0789f4f4,
+ 0xfcc385b9c5f9e7ae, 0xc9c760325e5f3ab0, 0x96ca4eaef2b45d92, 0xa3ceab256912808c,
+ 0x860b2bd47d168c10, 0xb30fce5fe6b0510e, 0xec02e0c34a5b362c, 0xd9060548d1fdeb32,
+ 0x5218bdfa138df868, 0x671c5871882b2576, 0x381176ed24c04254, 0x0d159366bf669f4a,
+ 0x057521dbf8b7f78b, 0x3071c45063112a95, 0x6f7ceacccffa4db7, 0x5a780f47545c90a9,
+ 0xd166b7f5962c83f3, 0xe462527e0d8a5eed, 0xbb6f7ce2a16139cf, 0x8e6b99693ac7e4d1
+ },
+ {
+ 0x0000000000000000, 0xe39d1389931b9354, 0xec6301407ea0b5c3, 0x0ffe12c9edbb2697,
+ 0xf39f24d3a5d6f8ed, 0x1002375a36cd6bb9, 0x1ffc2593db764d2e, 0xfc61361a486dde7a,
+ 0xcc676ff4133a62b1, 0x2ffa7c7d8021f1e5, 0x20046eb46d9ad772, 0xc3997d3dfe814426,
+ 0x3ff84b27b6ec9a5c, 0xdc6558ae25f70908, 0xd39b4a67c84c2f9f, 0x300659ee5b57bccb,
+ 0xb397f9bb7ee35609, 0x500aea32edf8c55d, 0x5ff4f8fb0043e3ca, 0xbc69eb729358709e,
+ 0x4008dd68db35aee4, 0xa395cee1482e3db0, 0xac6bdc28a5951b27, 0x4ff6cfa1368e8873,
+ 0x7ff0964f6dd934b8, 0x9c6d85c6fec2a7ec, 0x9393970f1379817b, 0x700e84868062122f,
+ 0x8c6fb29cc80fcc55, 0x6ff2a1155b145f01, 0x600cb3dcb6af7996, 0x8391a05525b4eac2,
+ 0x4c76d525a5513f79, 0xafebc6ac364aac2d, 0xa015d465dbf18aba, 0x4388c7ec48ea19ee,
+ 0xbfe9f1f60087c794, 0x5c74e27f939c54c0, 0x538af0b67e277257, 0xb017e33fed3ce103,
+ 0x8011bad1b66b5dc8, 0x638ca9582570ce9c, 0x6c72bb91c8cbe80b, 0x8fefa8185bd07b5f,
+ 0x738e9e0213bda525, 0x90138d8b80a63671, 0x9fed9f426d1d10e6, 0x7c708ccbfe0683b2,
+ 0xffe12c9edbb26970, 0x1c7c3f1748a9fa24, 0x13822ddea512dcb3, 0xf01f3e5736094fe7,
+ 0x0c7e084d7e64919d, 0xefe31bc4ed7f02c9, 0xe01d090d00c4245e, 0x03801a8493dfb70a,
+ 0x3386436ac8880bc1, 0xd01b50e35b939895, 0xdfe5422ab628be02, 0x3c7851a325332d56,
+ 0xc01967b96d5ef32c, 0x23847430fe456078, 0x2c7a66f913fe46ef, 0xcfe7757080e5d5bb,
+ 0x98edaa4b4aa27ef2, 0x7b70b9c2d9b9eda6, 0x748eab0b3402cb31, 0x9713b882a7195865,
+ 0x6b728e98ef74861f, 0x88ef9d117c6f154b, 0x87118fd891d433dc, 0x648c9c5102cfa088,
+ 0x548ac5bf59981c43, 0xb717d636ca838f17, 0xb8e9c4ff2738a980, 0x5b74d776b4233ad4,
+ 0xa715e16cfc4ee4ae, 0x4488f2e56f5577fa, 0x4b76e02c82ee516d, 0xa8ebf3a511f5c239,
+ 0x2b7a53f0344128fb, 0xc8e74079a75abbaf, 0xc71952b04ae19d38, 0x24844139d9fa0e6c,
+ 0xd8e577239197d016, 0x3b7864aa028c4342, 0x34867663ef3765d5, 0xd71b65ea7c2cf681,
+ 0xe71d3c04277b4a4a, 0x04802f8db460d91e, 0x0b7e3d4459dbff89, 0xe8e32ecdcac06cdd,
+ 0x148218d782adb2a7, 0xf71f0b5e11b621f3, 0xf8e11997fc0d0764, 0x1b7c0a1e6f169430,
+ 0xd49b7f6eeff3418b, 0x37066ce77ce8d2df, 0x38f87e2e9153f448, 0xdb656da70248671c,
+ 0x27045bbd4a25b966, 0xc4994834d93e2a32, 0xcb675afd34850ca5, 0x28fa4974a79e9ff1,
+ 0x18fc109afcc9233a, 0xfb6103136fd2b06e, 0xf49f11da826996f9, 0x17020253117205ad,
+ 0xeb633449591fdbd7, 0x08fe27c0ca044883, 0x0700350927bf6e14, 0xe49d2680b4a4fd40,
+ 0x670c86d591101782, 0x8491955c020b84d6, 0x8b6f8795efb0a241, 0x68f2941c7cab3115,
+ 0x9493a20634c6ef6f, 0x770eb18fa7dd7c3b, 0x78f0a3464a665aac, 0x9b6db0cfd97dc9f8,
+ 0xab6be921822a7533, 0x48f6faa81131e667, 0x4708e861fc8ac0f0, 0xa495fbe86f9153a4,
+ 0x58f4cdf227fc8dde, 0xbb69de7bb4e71e8a, 0xb497ccb2595c381d, 0x570adf3bca47ab49,
+ 0x1a8272c5cdd36e8f, 0xf91f614c5ec8fddb, 0xf6e17385b373db4c, 0x157c600c20684818,
+ 0xe91d561668059662, 0x0a80459ffb1e0536, 0x057e575616a523a1, 0xe6e344df85beb0f5,
+ 0xd6e51d31dee90c3e, 0x35780eb84df29f6a, 0x3a861c71a049b9fd, 0xd91b0ff833522aa9,
+ 0x257a39e27b3ff4d3, 0xc6e72a6be8246787, 0xc91938a2059f4110, 0x2a842b2b9684d244,
+ 0xa9158b7eb3303886, 0x4a8898f7202babd2, 0x45768a3ecd908d45, 0xa6eb99b75e8b1e11,
+ 0x5a8aafad16e6c06b, 0xb917bc2485fd533f, 0xb6e9aeed684675a8, 0x5574bd64fb5de6fc,
+ 0x6572e48aa00a5a37, 0x86eff7033311c963, 0x8911e5cadeaaeff4, 0x6a8cf6434db17ca0,
+ 0x96edc05905dca2da, 0x7570d3d096c7318e, 0x7a8ec1197b7c1719, 0x9913d290e867844d,
+ 0x56f4a7e0688251f6, 0xb569b469fb99c2a2, 0xba97a6a01622e435, 0x590ab52985397761,
+ 0xa56b8333cd54a91b, 0x46f690ba5e4f3a4f, 0x49088273b3f41cd8, 0xaa9591fa20ef8f8c,
+ 0x9a93c8147bb83347, 0x790edb9de8a3a013, 0x76f0c95405188684, 0x956ddadd960315d0,
+ 0x690cecc7de6ecbaa, 0x8a91ff4e4d7558fe, 0x856fed87a0ce7e69, 0x66f2fe0e33d5ed3d,
+ 0xe5635e5b166107ff, 0x06fe4dd2857a94ab, 0x09005f1b68c1b23c, 0xea9d4c92fbda2168,
+ 0x16fc7a88b3b7ff12, 0xf561690120ac6c46, 0xfa9f7bc8cd174ad1, 0x190268415e0cd985,
+ 0x290431af055b654e, 0xca9922269640f61a, 0xc56730ef7bfbd08d, 0x26fa2366e8e043d9,
+ 0xda9b157ca08d9da3, 0x390606f533960ef7, 0x36f8143cde2d2860, 0xd56507b54d36bb34,
+ 0x826fd88e8771107d, 0x61f2cb07146a8329, 0x6e0cd9cef9d1a5be, 0x8d91ca476aca36ea,
+ 0x71f0fc5d22a7e890, 0x926defd4b1bc7bc4, 0x9d93fd1d5c075d53, 0x7e0eee94cf1cce07,
+ 0x4e08b77a944b72cc, 0xad95a4f30750e198, 0xa26bb63aeaebc70f, 0x41f6a5b379f0545b,
+ 0xbd9793a9319d8a21, 0x5e0a8020a2861975, 0x51f492e94f3d3fe2, 0xb2698160dc26acb6,
+ 0x31f82135f9924674, 0xd26532bc6a89d520, 0xdd9b20758732f3b7, 0x3e0633fc142960e3,
+ 0xc26705e65c44be99, 0x21fa166fcf5f2dcd, 0x2e0404a622e40b5a, 0xcd99172fb1ff980e,
+ 0xfd9f4ec1eaa824c5, 0x1e025d4879b3b791, 0x11fc4f8194089106, 0xf2615c0807130252,
+ 0x0e006a124f7edc28, 0xed9d799bdc654f7c, 0xe2636b5231de69eb, 0x01fe78dba2c5fabf,
+ 0xce190dab22202f04, 0x2d841e22b13bbc50, 0x227a0ceb5c809ac7, 0xc1e71f62cf9b0993,
+ 0x3d86297887f6d7e9, 0xde1b3af114ed44bd, 0xd1e52838f956622a, 0x32783bb16a4df17e,
+ 0x027e625f311a4db5, 0xe1e371d6a201dee1, 0xee1d631f4fbaf876, 0x0d807096dca16b22,
+ 0xf1e1468c94ccb558, 0x127c550507d7260c, 0x1d8247ccea6c009b, 0xfe1f5445797793cf,
+ 0x7d8ef4105cc3790d, 0x9e13e799cfd8ea59, 0x91edf5502263ccce, 0x7270e6d9b1785f9a,
+ 0x8e11d0c3f91581e0, 0x6d8cc34a6a0e12b4, 0x6272d18387b53423, 0x81efc20a14aea777,
+ 0xb1e99be44ff91bbc, 0x5274886ddce288e8, 0x5d8a9aa43159ae7f, 0xbe17892da2423d2b,
+ 0x4276bf37ea2fe351, 0xa1ebacbe79347005, 0xae15be77948f5692, 0x4d88adfe0794c5c6
+ },
+ {
+ 0x0000000000000000, 0x62a95de6e302eff2, 0xc552bbcdc605dfe4, 0xa7fbe62b25073016,
+ 0xa1fc51c8d49c2ca3, 0xc3550c2e379ec351, 0x64aeea051299f347, 0x0607b7e3f19b1cb5,
+ 0x68a185c2f1afca2d, 0x0a08d82412ad25df, 0xadf33e0f37aa15c9, 0xcf5a63e9d4a8fa3b,
+ 0xc95dd40a2533e68e, 0xabf489ecc631097c, 0x0c0f6fc7e336396a, 0x6ea632210034d698,
+ 0xd1430b85e35f945a, 0xb3ea5663005d7ba8, 0x1411b048255a4bbe, 0x76b8edaec658a44c,
+ 0x70bf5a4d37c3b8f9, 0x121607abd4c1570b, 0xb5ede180f1c6671d, 0xd744bc6612c488ef,
+ 0xb9e28e4712f05e77, 0xdb4bd3a1f1f2b185, 0x7cb0358ad4f58193, 0x1e19686c37f76e61,
+ 0x181edf8fc66c72d4, 0x7ab78269256e9d26, 0xdd4c64420069ad30, 0xbfe539a4e36b42c2,
+ 0x89df31589e28bbdf, 0xeb766cbe7d2a542d, 0x4c8d8a95582d643b, 0x2e24d773bb2f8bc9,
+ 0x282360904ab4977c, 0x4a8a3d76a9b6788e, 0xed71db5d8cb14898, 0x8fd886bb6fb3a76a,
+ 0xe17eb49a6f8771f2, 0x83d7e97c8c859e00, 0x242c0f57a982ae16, 0x468552b14a8041e4,
+ 0x4082e552bb1b5d51, 0x222bb8b45819b2a3, 0x85d05e9f7d1e82b5, 0xe77903799e1c6d47,
+ 0x589c3add7d772f85, 0x3a35673b9e75c077, 0x9dce8110bb72f061, 0xff67dcf658701f93,
+ 0xf9606b15a9eb0326, 0x9bc936f34ae9ecd4, 0x3c32d0d86feedcc2, 0x5e9b8d3e8cec3330,
+ 0x303dbf1f8cd8e5a8, 0x5294e2f96fda0a5a, 0xf56f04d24add3a4c, 0x97c65934a9dfd5be,
+ 0x91c1eed75844c90b, 0xf368b331bb4626f9, 0x5493551a9e4116ef, 0x363a08fc7d43f91d,
+ 0x38e744e264c6e4d5, 0x5a4e190487c40b27, 0xfdb5ff2fa2c33b31, 0x9f1ca2c941c1d4c3,
+ 0x991b152ab05ac876, 0xfbb248cc53582784, 0x5c49aee7765f1792, 0x3ee0f301955df860,
+ 0x5046c12095692ef8, 0x32ef9cc6766bc10a, 0x95147aed536cf11c, 0xf7bd270bb06e1eee,
+ 0xf1ba90e841f5025b, 0x9313cd0ea2f7eda9, 0x34e82b2587f0ddbf, 0x564176c364f2324d,
+ 0xe9a44f678799708f, 0x8b0d1281649b9f7d, 0x2cf6f4aa419caf6b, 0x4e5fa94ca29e4099,
+ 0x48581eaf53055c2c, 0x2af14349b007b3de, 0x8d0aa562950083c8, 0xefa3f88476026c3a,
+ 0x8105caa57636baa2, 0xe3ac974395345550, 0x44577168b0336546, 0x26fe2c8e53318ab4,
+ 0x20f99b6da2aa9601, 0x4250c68b41a879f3, 0xe5ab20a064af49e5, 0x87027d4687ada617,
+ 0xb13875bafaee5f0a, 0xd391285c19ecb0f8, 0x746ace773ceb80ee, 0x16c39391dfe96f1c,
+ 0x10c424722e7273a9, 0x726d7994cd709c5b, 0xd5969fbfe877ac4d, 0xb73fc2590b7543bf,
+ 0xd999f0780b419527, 0xbb30ad9ee8437ad5, 0x1ccb4bb5cd444ac3, 0x7e6216532e46a531,
+ 0x7865a1b0dfddb984, 0x1accfc563cdf5676, 0xbd371a7d19d86660, 0xdf9e479bfada8992,
+ 0x607b7e3f19b1cb50, 0x02d223d9fab324a2, 0xa529c5f2dfb414b4, 0xc78098143cb6fb46,
+ 0xc1872ff7cd2de7f3, 0xa32e72112e2f0801, 0x04d5943a0b283817, 0x667cc9dce82ad7e5,
+ 0x08dafbfde81e017d, 0x6a73a61b0b1cee8f, 0xcd8840302e1bde99, 0xaf211dd6cd19316b,
+ 0xa926aa353c822dde, 0xcb8ff7d3df80c22c, 0x6c7411f8fa87f23a, 0x0edd4c1e19851dc8,
+ 0x71ce89c4c98dc9aa, 0x1367d4222a8f2658, 0xb49c32090f88164e, 0xd6356fefec8af9bc,
+ 0xd032d80c1d11e509, 0xb29b85eafe130afb, 0x156063c1db143aed, 0x77c93e273816d51f,
+ 0x196f0c0638220387, 0x7bc651e0db20ec75, 0xdc3db7cbfe27dc63, 0xbe94ea2d1d253391,
+ 0xb8935dceecbe2f24, 0xda3a00280fbcc0d6, 0x7dc1e6032abbf0c0, 0x1f68bbe5c9b91f32,
+ 0xa08d82412ad25df0, 0xc224dfa7c9d0b202, 0x65df398cecd78214, 0x0776646a0fd56de6,
+ 0x0171d389fe4e7153, 0x63d88e6f1d4c9ea1, 0xc4236844384baeb7, 0xa68a35a2db494145,
+ 0xc82c0783db7d97dd, 0xaa855a65387f782f, 0x0d7ebc4e1d784839, 0x6fd7e1a8fe7aa7cb,
+ 0x69d0564b0fe1bb7e, 0x0b790badece3548c, 0xac82ed86c9e4649a, 0xce2bb0602ae68b68,
+ 0xf811b89c57a57275, 0x9ab8e57ab4a79d87, 0x3d43035191a0ad91, 0x5fea5eb772a24263,
+ 0x59ede95483395ed6, 0x3b44b4b2603bb124, 0x9cbf5299453c8132, 0xfe160f7fa63e6ec0,
+ 0x90b03d5ea60ab858, 0xf21960b8450857aa, 0x55e28693600f67bc, 0x374bdb75830d884e,
+ 0x314c6c96729694fb, 0x53e5317091947b09, 0xf41ed75bb4934b1f, 0x96b78abd5791a4ed,
+ 0x2952b319b4fae62f, 0x4bfbeeff57f809dd, 0xec0008d472ff39cb, 0x8ea9553291fdd639,
+ 0x88aee2d16066ca8c, 0xea07bf378364257e, 0x4dfc591ca6631568, 0x2f5504fa4561fa9a,
+ 0x41f336db45552c02, 0x235a6b3da657c3f0, 0x84a18d168350f3e6, 0xe608d0f060521c14,
+ 0xe00f671391c900a1, 0x82a63af572cbef53, 0x255ddcde57ccdf45, 0x47f48138b4ce30b7,
+ 0x4929cd26ad4b2d7f, 0x2b8090c04e49c28d, 0x8c7b76eb6b4ef29b, 0xeed22b0d884c1d69,
+ 0xe8d59cee79d701dc, 0x8a7cc1089ad5ee2e, 0x2d872723bfd2de38, 0x4f2e7ac55cd031ca,
+ 0x218848e45ce4e752, 0x43211502bfe608a0, 0xe4daf3299ae138b6, 0x8673aecf79e3d744,
+ 0x8074192c8878cbf1, 0xe2dd44ca6b7a2403, 0x4526a2e14e7d1415, 0x278fff07ad7ffbe7,
+ 0x986ac6a34e14b925, 0xfac39b45ad1656d7, 0x5d387d6e881166c1, 0x3f9120886b138933,
+ 0x3996976b9a889586, 0x5b3fca8d798a7a74, 0xfcc42ca65c8d4a62, 0x9e6d7140bf8fa590,
+ 0xf0cb4361bfbb7308, 0x92621e875cb99cfa, 0x3599f8ac79beacec, 0x5730a54a9abc431e,
+ 0x513712a96b275fab, 0x339e4f4f8825b059, 0x9465a964ad22804f, 0xf6ccf4824e206fbd,
+ 0xc0f6fc7e336396a0, 0xa25fa198d0617952, 0x05a447b3f5664944, 0x670d1a551664a6b6,
+ 0x610aadb6e7ffba03, 0x03a3f05004fd55f1, 0xa458167b21fa65e7, 0xc6f14b9dc2f88a15,
+ 0xa85779bcc2cc5c8d, 0xcafe245a21ceb37f, 0x6d05c27104c98369, 0x0fac9f97e7cb6c9b,
+ 0x09ab28741650702e, 0x6b027592f5529fdc, 0xccf993b9d055afca, 0xae50ce5f33574038,
+ 0x11b5f7fbd03c02fa, 0x731caa1d333eed08, 0xd4e74c361639dd1e, 0xb64e11d0f53b32ec,
+ 0xb049a63304a02e59, 0xd2e0fbd5e7a2c1ab, 0x751b1dfec2a5f1bd, 0x17b2401821a71e4f,
+ 0x791472392193c8d7, 0x1bbd2fdfc2912725, 0xbc46c9f4e7961733, 0xdeef94120494f8c1,
+ 0xd8e823f1f50fe474, 0xba417e17160d0b86, 0x1dba983c330a3b90, 0x7f13c5dad008d462
+ },
+ {
+ 0x0000000000000000, 0x381d0015c96f4444, 0x703a002b92de8888, 0x4827003e5bb1cccc,
+ 0xe074005725bd1110, 0xd8690042ecd25554, 0x904e007cb7639998, 0xa85300697e0cdddc,
+ 0xebb126fd13edb14b, 0xd3ac26e8da82f50f, 0x9b8b26d6813339c3, 0xa39626c3485c7d87,
+ 0x0bc526aa3650a05b, 0x33d826bfff3fe41f, 0x7bff2681a48e28d3, 0x43e226946de16c97,
+ 0xfc3b6ba97f4cf1fd, 0xc4266bbcb623b5b9, 0x8c016b82ed927975, 0xb41c6b9724fd3d31,
+ 0x1c4f6bfe5af1e0ed, 0x24526beb939ea4a9, 0x6c756bd5c82f6865, 0x54686bc001402c21,
+ 0x178a4d546ca140b6, 0x2f974d41a5ce04f2, 0x67b04d7ffe7fc83e, 0x5fad4d6a37108c7a,
+ 0xf7fe4d03491c51a6, 0xcfe34d16807315e2, 0x87c44d28dbc2d92e, 0xbfd94d3d12ad9d6a,
+ 0xd32ff101a60e7091, 0xeb32f1146f6134d5, 0xa315f12a34d0f819, 0x9b08f13ffdbfbc5d,
+ 0x335bf15683b36181, 0x0b46f1434adc25c5, 0x4361f17d116de909, 0x7b7cf168d802ad4d,
+ 0x389ed7fcb5e3c1da, 0x0083d7e97c8c859e, 0x48a4d7d7273d4952, 0x70b9d7c2ee520d16,
+ 0xd8ead7ab905ed0ca, 0xe0f7d7be5931948e, 0xa8d0d78002805842, 0x90cdd795cbef1c06,
+ 0x2f149aa8d942816c, 0x17099abd102dc528, 0x5f2e9a834b9c09e4, 0x67339a9682f34da0,
+ 0xcf609afffcff907c, 0xf77d9aea3590d438, 0xbf5a9ad46e2118f4, 0x87479ac1a74e5cb0,
+ 0xc4a5bc55caaf3027, 0xfcb8bc4003c07463, 0xb49fbc7e5871b8af, 0x8c82bc6b911efceb,
+ 0x24d1bc02ef122137, 0x1cccbc17267d6573, 0x54ebbc297dcca9bf, 0x6cf6bc3cb4a3edfb,
+ 0x8d06c450148b7249, 0xb51bc445dde4360d, 0xfd3cc47b8655fac1, 0xc521c46e4f3abe85,
+ 0x6d72c40731366359, 0x556fc412f859271d, 0x1d48c42ca3e8ebd1, 0x2555c4396a87af95,
+ 0x66b7e2ad0766c302, 0x5eaae2b8ce098746, 0x168de28695b84b8a, 0x2e90e2935cd70fce,
+ 0x86c3e2fa22dbd212, 0xbedee2efebb49656, 0xf6f9e2d1b0055a9a, 0xcee4e2c4796a1ede,
+ 0x713daff96bc783b4, 0x4920afeca2a8c7f0, 0x0107afd2f9190b3c, 0x391aafc730764f78,
+ 0x9149afae4e7a92a4, 0xa954afbb8715d6e0, 0xe173af85dca41a2c, 0xd96eaf9015cb5e68,
+ 0x9a8c8904782a32ff, 0xa2918911b14576bb, 0xeab6892feaf4ba77, 0xd2ab893a239bfe33,
+ 0x7af889535d9723ef, 0x42e5894694f867ab, 0x0ac28978cf49ab67, 0x32df896d0626ef23,
+ 0x5e293551b28502d8, 0x663435447bea469c, 0x2e13357a205b8a50, 0x160e356fe934ce14,
+ 0xbe5d3506973813c8, 0x864035135e57578c, 0xce67352d05e69b40, 0xf67a3538cc89df04,
+ 0xb59813aca168b393, 0x8d8513b96807f7d7, 0xc5a2138733b63b1b, 0xfdbf1392fad97f5f,
+ 0x55ec13fb84d5a283, 0x6df113ee4dbae6c7, 0x25d613d0160b2a0b, 0x1dcb13c5df646e4f,
+ 0xa2125ef8cdc9f325, 0x9a0f5eed04a6b761, 0xd2285ed35f177bad, 0xea355ec696783fe9,
+ 0x42665eafe874e235, 0x7a7b5eba211ba671, 0x325c5e847aaa6abd, 0x0a415e91b3c52ef9,
+ 0x49a37805de24426e, 0x71be7810174b062a, 0x3999782e4cfacae6, 0x0184783b85958ea2,
+ 0xa9d77852fb99537e, 0x91ca784732f6173a, 0xd9ed78796947dbf6, 0xe1f0786ca0289fb2,
+ 0x3154aef3718177f9, 0x0949aee6b8ee33bd, 0x416eaed8e35fff71, 0x7973aecd2a30bb35,
+ 0xd120aea4543c66e9, 0xe93daeb19d5322ad, 0xa11aae8fc6e2ee61, 0x9907ae9a0f8daa25,
+ 0xdae5880e626cc6b2, 0xe2f8881bab0382f6, 0xaadf8825f0b24e3a, 0x92c2883039dd0a7e,
+ 0x3a91885947d1d7a2, 0x028c884c8ebe93e6, 0x4aab8872d50f5f2a, 0x72b688671c601b6e,
+ 0xcd6fc55a0ecd8604, 0xf572c54fc7a2c240, 0xbd55c5719c130e8c, 0x8548c564557c4ac8,
+ 0x2d1bc50d2b709714, 0x1506c518e21fd350, 0x5d21c526b9ae1f9c, 0x653cc53370c15bd8,
+ 0x26dee3a71d20374f, 0x1ec3e3b2d44f730b, 0x56e4e38c8ffebfc7, 0x6ef9e3994691fb83,
+ 0xc6aae3f0389d265f, 0xfeb7e3e5f1f2621b, 0xb690e3dbaa43aed7, 0x8e8de3ce632cea93,
+ 0xe27b5ff2d78f0768, 0xda665fe71ee0432c, 0x92415fd945518fe0, 0xaa5c5fcc8c3ecba4,
+ 0x020f5fa5f2321678, 0x3a125fb03b5d523c, 0x72355f8e60ec9ef0, 0x4a285f9ba983dab4,
+ 0x09ca790fc462b623, 0x31d7791a0d0df267, 0x79f0792456bc3eab, 0x41ed79319fd37aef,
+ 0xe9be7958e1dfa733, 0xd1a3794d28b0e377, 0x9984797373012fbb, 0xa1997966ba6e6bff,
+ 0x1e40345ba8c3f695, 0x265d344e61acb2d1, 0x6e7a34703a1d7e1d, 0x56673465f3723a59,
+ 0xfe34340c8d7ee785, 0xc62934194411a3c1, 0x8e0e34271fa06f0d, 0xb6133432d6cf2b49,
+ 0xf5f112a6bb2e47de, 0xcdec12b37241039a, 0x85cb128d29f0cf56, 0xbdd61298e09f8b12,
+ 0x158512f19e9356ce, 0x2d9812e457fc128a, 0x65bf12da0c4dde46, 0x5da212cfc5229a02,
+ 0xbc526aa3650a05b0, 0x844f6ab6ac6541f4, 0xcc686a88f7d48d38, 0xf4756a9d3ebbc97c,
+ 0x5c266af440b714a0, 0x643b6ae189d850e4, 0x2c1c6adfd2699c28, 0x14016aca1b06d86c,
+ 0x57e34c5e76e7b4fb, 0x6ffe4c4bbf88f0bf, 0x27d94c75e4393c73, 0x1fc44c602d567837,
+ 0xb7974c09535aa5eb, 0x8f8a4c1c9a35e1af, 0xc7ad4c22c1842d63, 0xffb04c3708eb6927,
+ 0x4069010a1a46f44d, 0x7874011fd329b009, 0x3053012188987cc5, 0x084e013441f73881,
+ 0xa01d015d3ffbe55d, 0x98000148f694a119, 0xd0270176ad256dd5, 0xe83a0163644a2991,
+ 0xabd827f709ab4506, 0x93c527e2c0c40142, 0xdbe227dc9b75cd8e, 0xe3ff27c9521a89ca,
+ 0x4bac27a02c165416, 0x73b127b5e5791052, 0x3b96278bbec8dc9e, 0x038b279e77a798da,
+ 0x6f7d9ba2c3047521, 0x57609bb70a6b3165, 0x1f479b8951dafda9, 0x275a9b9c98b5b9ed,
+ 0x8f099bf5e6b96431, 0xb7149be02fd62075, 0xff339bde7467ecb9, 0xc72e9bcbbd08a8fd,
+ 0x84ccbd5fd0e9c46a, 0xbcd1bd4a1986802e, 0xf4f6bd7442374ce2, 0xccebbd618b5808a6,
+ 0x64b8bd08f554d57a, 0x5ca5bd1d3c3b913e, 0x1482bd23678a5df2, 0x2c9fbd36aee519b6,
+ 0x9346f00bbc4884dc, 0xab5bf01e7527c098, 0xe37cf0202e960c54, 0xdb61f035e7f94810,
+ 0x7332f05c99f595cc, 0x4b2ff049509ad188, 0x0308f0770b2b1d44, 0x3b15f062c2445900,
+ 0x78f7d6f6afa53597, 0x40ead6e366ca71d3, 0x08cdd6dd3d7bbd1f, 0x30d0d6c8f414f95b,
+ 0x9883d6a18a182487, 0xa09ed6b4437760c3, 0xe8b9d68a18c6ac0f, 0xd0a4d69fd1a9e84b
+ },
+ };
+ }
+}
diff --git a/external/Java.Interop/src/Java.Interop.Tools.JavaCallableWrappers/Java.Interop.Tools.JavaCallableWrappers/Crc64.cs b/external/Java.Interop/src/Java.Interop.Tools.JavaCallableWrappers/Java.Interop.Tools.JavaCallableWrappers/Crc64.cs
new file mode 100644
index 00000000000..f3dabdc2f71
--- /dev/null
+++ b/external/Java.Interop/src/Java.Interop.Tools.JavaCallableWrappers/Java.Interop.Tools.JavaCallableWrappers/Crc64.cs
@@ -0,0 +1,63 @@
+/*
+ * Originally ported from: https://github.com/gityf/crc/blob/8045f50ba6e4193d4ee5d2539025fef26e613c9f/crc/crc64.c
+ *
+ * Copyright (c) 2012, Salvatore Sanfilippo
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Redis nor the names of its contributors may be used
+ * to endorse or promote products derived from this software without
+ * specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE. */
+
+using System;
+using System.Security.Cryptography;
+
+namespace Java.Interop.Tools.JavaCallableWrappers
+{
+ ///
+ /// CRC64 variant: crc-64-jones 64-bit
+ /// * Poly: 0xad93d23594c935a9
+ ///
+ /// Changes beyond initial implementation:
+ /// * Starting Value: ulong.MaxValue
+ /// * XOR length in HashFinal()
+ /// * Using spliced table for faster processing
+ ///
+ public partial class Crc64 : HashAlgorithm
+ {
+ ulong crc = ulong.MaxValue;
+ ulong length = 0;
+
+ public override void Initialize ()
+ {
+ crc = ulong.MaxValue;
+ length = 0;
+ }
+
+ protected override unsafe void HashCore (byte [] array, int ibStart, int cbSize)
+ {
+ Crc64Helper.HashCore (array, ibStart, cbSize, ref crc, ref length);
+ }
+
+ protected override byte [] HashFinal () => BitConverter.GetBytes (crc ^ length);
+ }
+}
diff --git a/external/Java.Interop/src/Java.Interop.Tools.JavaCallableWrappers/Java.Interop.Tools.JavaCallableWrappers/Crc64Helper.cs b/external/Java.Interop/src/Java.Interop.Tools.JavaCallableWrappers/Java.Interop.Tools.JavaCallableWrappers/Crc64Helper.cs
new file mode 100644
index 00000000000..82ab2a90bc8
--- /dev/null
+++ b/external/Java.Interop/src/Java.Interop.Tools.JavaCallableWrappers/Java.Interop.Tools.JavaCallableWrappers/Crc64Helper.cs
@@ -0,0 +1,91 @@
+/*
+ * Originally ported from: https://github.com/gityf/crc/blob/8045f50ba6e4193d4ee5d2539025fef26e613c9f/crc/crc64.c
+ *
+ * Copyright (c) 2012, Salvatore Sanfilippo
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Redis nor the names of its contributors may be used
+ * to endorse or promote products derived from this software without
+ * specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE. */
+
+using System;
+using System.Security.Cryptography;
+
+namespace Java.Interop.Tools.JavaCallableWrappers
+{
+ ///
+ /// CRC64 variant: crc-64-jones 64-bit
+ /// * Poly: 0xad93d23594c935a9
+ ///
+ /// Changes beyond initial implementation:
+ /// * Starting Value: ulong.MaxValue
+ /// * XOR length in HashFinal()
+ /// * Using spliced table for faster processing
+ ///
+ internal static partial class Crc64Helper
+ {
+
+ internal static byte [] Compute (byte [] array)
+ {
+ ulong crc = ulong.MaxValue;
+ ulong length = 0;
+
+ HashCore (array, 0, array.Length, ref crc, ref length);
+
+ return BitConverter.GetBytes (crc ^ length);
+ }
+
+ internal static unsafe void HashCore (byte [] array, int ibStart, int cbSize, ref ulong crc, ref ulong length)
+ {
+ int len = cbSize;
+ int idx = ibStart;
+
+ fixed (ulong* tptr = table) {
+ fixed (byte* aptr = array) {
+ while (len >= 8) {
+ crc ^= *((ulong*) (aptr + idx));
+ crc =
+ tptr [7 * 256 + (crc & 0xff)] ^
+ tptr [6 * 256 + ((crc >> 8) & 0xff)] ^
+ tptr [5 * 256 + ((crc >> 16) & 0xff)] ^
+ tptr [4 * 256 + ((crc >> 24) & 0xff)] ^
+ tptr [3 * 256 + ((crc >> 32) & 0xff)] ^
+ tptr [2 * 256 + ((crc >> 40) & 0xff)] ^
+ tptr [1 * 256 + ((crc >> 48) & 0xff)] ^
+ tptr [0 * 256 + (crc >> 56)];
+ idx += 8;
+ len -= 8;
+ }
+
+ while (len > 0) {
+ crc = tptr [0 * 256 + ((crc ^ aptr [idx]) & 0xff)] ^ (crc >> 8);
+ idx++;
+ len--;
+ }
+ }
+ }
+
+ length += (ulong) cbSize;
+ }
+ }
+}
diff --git a/external/Java.Interop/src/Java.Interop.Tools.JavaCallableWrappers/Java.Interop.Tools.JavaCallableWrappers/IdentifierValidator.cs b/external/Java.Interop/src/Java.Interop.Tools.JavaCallableWrappers/Java.Interop.Tools.JavaCallableWrappers/IdentifierValidator.cs
new file mode 100644
index 00000000000..daf4e6dd044
--- /dev/null
+++ b/external/Java.Interop/src/Java.Interop.Tools.JavaCallableWrappers/Java.Interop.Tools.JavaCallableWrappers/IdentifierValidator.cs
@@ -0,0 +1,54 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Text.RegularExpressions;
+using System.Threading.Tasks;
+
+namespace Java.Interop.Tools.JavaCallableWrappers
+{
+ public static class IdentifierValidator
+ {
+ // https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/language-specification/lexical-structure#identifiers
+ private const string FormattingCharacter = @"\p{Cf}";
+ private const string ConnectingCharacter = @"\p{Pc}";
+ private const string DecimalDigitCharacter = @"\p{Nd}";
+ private const string CombiningCharacter = @"\p{Mn}\p{Mc}";
+ private const string LetterCharacter = @"\p{Lu}\p{Ll}\p{Lt}\p{Lm}\p{Lo}\p{Nl}";
+
+ private const string IdentifierPartCharacter = LetterCharacter +
+ DecimalDigitCharacter +
+ ConnectingCharacter +
+ CombiningCharacter +
+ FormattingCharacter;
+
+ private const string IdentifierStartCharacter = "(" + LetterCharacter + "_)";
+
+ private const string Identifier = IdentifierStartCharacter + "(" + IdentifierPartCharacter + ")";
+
+ static Regex IsValidIdentifierRegex = new Regex ($"^[{IdentifierStartCharacter}][{IdentifierPartCharacter}]*$", RegexOptions.Compiled);
+
+ // We use [^ ...] to detect any character that is NOT a match.
+ static Regex validIdentifier = new Regex ($"[^{Identifier}]", RegexOptions.Compiled);
+
+ public static string CreateValidIdentifier (string? identifier, bool useEncodedReplacements = false)
+ {
+ if (identifier == null || string.IsNullOrWhiteSpace (identifier)) return string.Empty;
+
+ var normalizedIdentifier = identifier.Normalize ();
+
+ if (useEncodedReplacements)
+ return validIdentifier.Replace (normalizedIdentifier, new MatchEvaluator (EncodeReplacement));
+
+ return validIdentifier.Replace (normalizedIdentifier, "_");
+ }
+
+ public static bool IsValidIdentifier (string identifier)
+ {
+ return IsValidIdentifierRegex.IsMatch (identifier);
+ }
+
+ // Makes uglier but unique identifiers by encoding each invalid character with its character value
+ static string EncodeReplacement (Match match) => $"_x{(ushort) match.Value [0]}_";
+ }
+}
diff --git a/external/Java.Interop/src/Java.Interop.Tools.JavaCallableWrappers/Java.Interop.Tools.JavaCallableWrappers/JavaCallableMethodClassifier.cs b/external/Java.Interop/src/Java.Interop.Tools.JavaCallableWrappers/Java.Interop.Tools.JavaCallableWrappers/JavaCallableMethodClassifier.cs
new file mode 100644
index 00000000000..75e8061d6d4
--- /dev/null
+++ b/external/Java.Interop/src/Java.Interop.Tools.JavaCallableWrappers/Java.Interop.Tools.JavaCallableWrappers/JavaCallableMethodClassifier.cs
@@ -0,0 +1,9 @@
+using Mono.Cecil;
+
+namespace Java.Interop.Tools.JavaCallableWrappers
+{
+ public abstract class JavaCallableMethodClassifier
+ {
+ public abstract bool ShouldBeDynamicallyRegistered (TypeDefinition topType, MethodDefinition registeredMethod, MethodDefinition implementedMethod, CustomAttribute? registerAttribute);
+ }
+}
diff --git a/external/Java.Interop/src/Java.Interop.Tools.JavaCallableWrappers/Java.Interop.Tools.JavaCallableWrappers/JavaPeerStyle.cs b/external/Java.Interop/src/Java.Interop.Tools.JavaCallableWrappers/Java.Interop.Tools.JavaCallableWrappers/JavaPeerStyle.cs
new file mode 100644
index 00000000000..917196a1605
--- /dev/null
+++ b/external/Java.Interop/src/Java.Interop.Tools.JavaCallableWrappers/Java.Interop.Tools.JavaCallableWrappers/JavaPeerStyle.cs
@@ -0,0 +1,7 @@
+namespace Java.Interop.Tools.JavaCallableWrappers
+{
+ public enum JavaPeerStyle {
+ XAJavaInterop1,
+ JavaInterop1,
+ }
+}
diff --git a/external/Java.Interop/src/Java.Interop.Tools.JavaCallableWrappers/Java.Interop.Tools.JavaCallableWrappers/JavaTypeScanner.cs b/external/Java.Interop/src/Java.Interop.Tools.JavaCallableWrappers/Java.Interop.Tools.JavaCallableWrappers/JavaTypeScanner.cs
new file mode 100644
index 00000000000..638464335d8
--- /dev/null
+++ b/external/Java.Interop/src/Java.Interop.Tools.JavaCallableWrappers/Java.Interop.Tools.JavaCallableWrappers/JavaTypeScanner.cs
@@ -0,0 +1,121 @@
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Linq;
+using System.Text;
+using Mono.Cecil;
+
+using Java.Interop.Tools.Cecil;
+using Java.Interop.Tools.Diagnostics;
+using Java.Interop.Tools.TypeNameMappings;
+using Java.Interop.Tools.JavaCallableWrappers.Utilities;
+
+namespace Java.Interop.Tools.JavaCallableWrappers
+{
+ public class JavaTypeScanner
+ {
+ public Action Logger { get; private set; }
+ public bool ErrorOnCustomJavaObject { get; set; }
+
+ readonly IMetadataResolver cache;
+
+ [Obsolete ("Use the TypeDefinitionCache overload for better performance.", error: true)]
+ public JavaTypeScanner (Action logger) => throw new NotSupportedException ();
+
+ public JavaTypeScanner (Action logger, TypeDefinitionCache cache)
+ : this (logger, (IMetadataResolver) cache)
+ {
+ }
+
+ public JavaTypeScanner (Action logger, IMetadataResolver resolver)
+ {
+ if (logger == null)
+ throw new ArgumentNullException (nameof (logger));
+ Logger = logger;
+ this.cache = cache ?? new TypeDefinitionCache ();
+ }
+
+ public List GetJavaTypes (IEnumerable assemblies, IAssemblyResolver resolver)
+ {
+ var javaTypes = new List ();
+
+ foreach (var assembly in assemblies) {
+ var assm = resolver.GetAssembly (assembly);
+
+ foreach (ModuleDefinition md in assm.Modules) {
+ foreach (TypeDefinition td in md.Types) {
+ AddJavaTypes (javaTypes, td);
+ }
+ }
+ }
+
+ return javaTypes;
+ }
+
+ public List GetJavaTypes (AssemblyDefinition assembly)
+ {
+ var javaTypes = new List ();
+
+ foreach (ModuleDefinition md in assembly.Modules) {
+ foreach (TypeDefinition td in md.Types) {
+ AddJavaTypes (javaTypes, td);
+ }
+ }
+
+ return javaTypes;
+ }
+
+ void AddJavaTypes (List javaTypes, TypeDefinition type)
+ {
+ if (type.HasJavaPeer (cache)) {
+ javaTypes.Add (type);
+ } else if (type.IsClass && !type.IsSubclassOf ("System.Exception", cache) && type.ImplementsInterface ("Android.Runtime.IJavaObject", cache)) {
+ var level = ErrorOnCustomJavaObject ? TraceLevel.Error : TraceLevel.Warning;
+ var prefix = ErrorOnCustomJavaObject ? "error" : "warning";
+ Logger (
+ level,
+ $"{prefix} XA4212: Type `{type.FullName}` implements `Android.Runtime.IJavaObject` but does not inherit `Java.Lang.Object` or `Java.Lang.Throwable`. This is not supported.");
+ return;
+ }
+
+ if (!type.HasNestedTypes)
+ return;
+
+ foreach (TypeDefinition nested in type.NestedTypes)
+ AddJavaTypes (javaTypes, nested);
+ }
+
+ [Obsolete ("Use the TypeDefinitionCache overload for better performance.", error: true)]
+ public static bool ShouldSkipJavaCallableWrapperGeneration (TypeDefinition type) => throw new NotSupportedException ();
+
+ public static bool ShouldSkipJavaCallableWrapperGeneration (TypeDefinition type, TypeDefinitionCache cache) =>
+ ShouldSkipJavaCallableWrapperGeneration (type, (IMetadataResolver) cache);
+
+ public static bool ShouldSkipJavaCallableWrapperGeneration (TypeDefinition type, IMetadataResolver resolver)
+ {
+ if (JavaNativeTypeManager.IsNonStaticInnerClass (type, resolver))
+ return true;
+
+ foreach (var c in CecilExtensions.GetTypeRegistrationAttributes (type)) {
+ if (c.DoNotGenerateAcw) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ [Obsolete ("Use the TypeDefinitionCache overload for better performance.", error: true)]
+ public static List GetJavaTypes (IEnumerable assemblies, IAssemblyResolver resolver, Action log) => throw new NotSupportedException ();
+
+ // Returns all types for which we need to generate Java delegate types.
+ public static List GetJavaTypes (IEnumerable assemblies, IAssemblyResolver resolver, Action log, TypeDefinitionCache cache) =>
+ GetJavaTypes (assemblies, resolver, log, (IMetadataResolver) cache);
+
+ public static List GetJavaTypes (IEnumerable assemblies, IAssemblyResolver resolver, Action log, IMetadataResolver metadataResolver)
+ {
+ Action l = (level, value) => log ("{0}", new string [] { value });
+ return new JavaTypeScanner (l, metadataResolver).GetJavaTypes (assemblies, resolver);
+ }
+ }
+}
diff --git a/external/Java.Interop/src/Java.Interop.Tools.JavaCallableWrappers/Java.Interop.Tools.JavaCallableWrappers/TypeNameMapGenerator.cs b/external/Java.Interop/src/Java.Interop.Tools.JavaCallableWrappers/Java.Interop.Tools.JavaCallableWrappers/TypeNameMapGenerator.cs
new file mode 100644
index 00000000000..45164f6a29a
--- /dev/null
+++ b/external/Java.Interop/src/Java.Interop.Tools.JavaCallableWrappers/Java.Interop.Tools.JavaCallableWrappers/TypeNameMapGenerator.cs
@@ -0,0 +1,290 @@
+using System;
+using System.Diagnostics;
+using System.IO;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+using Mono.Cecil;
+
+using Java.Interop.Tools.Cecil;
+using Java.Interop.Tools.TypeNameMappings;
+
+namespace Java.Interop.Tools.JavaCallableWrappers {
+
+ /*
+ * TypeNameMapGenerator is responsible for generating a "mapping file" to
+ * support CPU-efficient mapping between Java types and Managed types
+ * (wherein "CPU-efficient" means "NO REFLECTION REQUIRED").
+ *
+ * This is done by storing the data in a form that can be easily passed
+ * to bsearch(3), allowing a binary search of the contents.
+ *
+ * The format of the file is:
+ *
+ * // header
+ * "version=" INT \0 (must be '1')
+ * "entry-count=" INT \0 (bsearch(3) `nel` value)
+ * "entry-len=" INT \0 (bsearch(3) `width` value)
+ * "value-offset=" INT \0 (offset to value within entry)
+ *
+ * ENTRIES
+ * \0
+ *
+ * The header consists of NUL-separated key=value string pairs, including
+ * the file format version ("1"). (Why strings? So I don't have to worry
+ * about byte-ordering concerns. Besides, the ENTRIES will be strings,
+ * and it makes viewing the file contents with strings(1) easy.)
+ *
+ * ENTRIES consists of rows that are `entry-len` bytes in length, containing
+ * a "key" and a "value". The "key" is NUL-padded so that the "value" starts
+ * at `value-offset` bytes into the row, and "value" is NUL-padded to ensure
+ * that the entire row length is `entry-len` bytes in length.
+ *
+ * After ENTRIES is a final terminating NUL.
+ *
+ * In string-form, a valid mapping would be:
+ *
+ * "version=1\u0000" +
+ * "entry-count=1\u0000" +
+ * "entry-len=10\u0000" +
+ * "value-offset=4\u0000" +
+ * "key\u0000value\u0000" +
+ * "\u0000"
+ *
+ * The rows MUST be sorted so that strcmp(3) can be used to compare keys
+ * values between rows
+ */
+ public class TypeNameMapGenerator : IDisposable {
+
+ Action Log;
+ List Types;
+ DirectoryAssemblyResolver? Resolver;
+ readonly IMetadataResolver Cache;
+
+ [Obsolete ("Use TypeNameMapGenerator(IEnumerable, Action, TypeDefinitionCache)")]
+ public TypeNameMapGenerator (IEnumerable assemblies, Action logMessage)
+ : this (assemblies, (TraceLevel level, string value) => logMessage?.Invoke ("{0}", new[]{value}), resolver: null)
+ {
+ if (logMessage == null)
+ throw new ArgumentNullException (nameof (logMessage));
+ }
+
+ [Obsolete ("Use TypeNameMapGenerator(IEnumerable, Action, TypeDefinitionCache)")]
+ public TypeNameMapGenerator (IEnumerable assemblies, Action logger)
+ : this (assemblies, logger, resolver: null)
+ { }
+
+ public TypeNameMapGenerator (IEnumerable assemblies, Action logger, TypeDefinitionCache? cache)
+ : this (assemblies, logger, (IMetadataResolver?) cache)
+ {
+ }
+
+ public TypeNameMapGenerator (IEnumerable assemblies, Action logger, IMetadataResolver? resolver)
+ {
+ if (assemblies == null)
+ throw new ArgumentNullException ("assemblies");
+ if (logger == null)
+ throw new ArgumentNullException (nameof (logger));
+
+ Cache = resolver ?? new TypeDefinitionCache ();
+ Log = logger;
+ var Assemblies = assemblies.ToList ();
+ var rp = new ReaderParameters ();
+
+ Resolver = new DirectoryAssemblyResolver (Log, loadDebugSymbols: true, loadReaderParameters: rp);
+ foreach (var assembly in Assemblies) {
+ var directory = Path.GetDirectoryName (assembly);
+ if (string.IsNullOrEmpty (directory))
+ continue;
+ if (!Resolver.SearchDirectories.Contains (directory))
+ Resolver.SearchDirectories.Add (directory);
+ }
+ foreach (var assembly in Assemblies) {
+ Resolver.Load (Path.GetFullPath (assembly));
+ }
+
+ var scanner = new JavaTypeScanner (Log, Cache) {
+ ErrorOnCustomJavaObject = false,
+ };
+ Types = scanner.GetJavaTypes (Assemblies, Resolver);
+ }
+
+ [Obsolete ("Use TypeNameMapGenerator(IEnumerable, Action, TypeDefinitionCache)")]
+ public TypeNameMapGenerator (IEnumerable types, Action logMessage)
+ : this (types, (TraceLevel level, string value) => logMessage?.Invoke ("{0}", new [] { value }), resolver: null)
+ {
+ if (logMessage == null)
+ throw new ArgumentNullException (nameof (logMessage));
+ }
+
+ [Obsolete ("Use TypeNameMapGenerator(IEnumerable, Action, TypeDefinitionCache)")]
+ public TypeNameMapGenerator (IEnumerable types, Action logger)
+ : this (types, logger, resolver: null)
+ { }
+
+ public TypeNameMapGenerator (IEnumerable types, Action logger, TypeDefinitionCache? cache)
+ : this (types, logger, (IMetadataResolver?) cache)
+ {
+ }
+
+ public TypeNameMapGenerator (IEnumerable types, Action logger, IMetadataResolver? resolver)
+ {
+ if (types == null)
+ throw new ArgumentNullException ("types");
+ if (logger == null)
+ throw new ArgumentNullException (nameof (logger));
+
+ Cache = resolver ?? new TypeDefinitionCache ();
+
+ Log = logger;
+ Types = types.ToList ();
+ }
+
+ public void Dispose ()
+ {
+ Dispose (true);
+ GC.SuppressFinalize (this);
+ }
+
+ protected virtual void Dispose (bool disposing)
+ {
+ if (!disposing || Resolver == null)
+ return;
+
+ Resolver.Dispose ();
+ Resolver = null;
+ }
+
+ public void WriteJavaToManaged (Stream output)
+ {
+ if (output == null)
+ throw new ArgumentNullException ("output");
+
+ var typeMap = GetTypeMapping (
+ t => t.IsInterface || t.HasGenericParameters,
+ JavaNativeTypeManager.ToJniName,
+ (t, c) => t.GetPartialAssemblyQualifiedName (c));
+
+ WriteBinaryMapping (output, typeMap);
+ }
+
+ Dictionary GetTypeMapping (Func skipType, Func key, Func value)
+ {
+ var typeMap = new Dictionary ();
+ var aliases = new Dictionary> ();
+ foreach (var type in Types) {
+ if (skipType (type))
+ continue;
+
+ var k = key (type, Cache);
+
+ TypeDefinition? e;
+ if (!typeMap.TryGetValue (k, out e)) {
+ typeMap.Add (k, type);
+ } else if (type.IsAbstract || type.IsInterface || e.IsAbstract || e.IsInterface) {
+ // Two separate types w/ the same key; a JavaToManaged issue.
+ // Prefer the base (abstract?) class over the invoker.
+ var b = e;
+ if (type.IsAssignableFrom (e, Cache))
+ b = type;
+ typeMap [k] = b;
+ } else {
+ List? a;
+ if (!aliases.TryGetValue (k, out a)) {
+ aliases.Add (k, a = new List ());
+ a.Add (value (e, Cache));
+ }
+ a.Add (value (type, Cache));
+ }
+ }
+ foreach (var e in aliases.OrderBy (e => e.Key)) {
+ Log (TraceLevel.Warning, $"Mapping for type '{e.Key}' is ambiguous between {e.Value.Count} types.");
+ Log (TraceLevel.Warning, $" Using: {e.Value.First ()}");
+ foreach (var o in e.Value.Skip (1)) {
+ Log (TraceLevel.Info, $" Ignoring: {o}");
+ }
+ }
+ return typeMap.ToDictionary (e => e.Key, e => value (e.Value, Cache));
+ }
+
+ static void WriteBinaryMapping (Stream o, Dictionary mapping)
+ {
+ var encoding = Encoding.UTF8;
+ var binary = ToBinary (mapping, encoding);
+
+ var keyLen = binary.Keys.Max (v => v?.Length) ?? 0;
+ var valueLen = binary.Values.Max (v => v?.Length) ?? 0;
+
+ WriteHeader (o, binary.Count, keyLen, valueLen, encoding);
+
+ foreach (var key in binary.Keys.OrderBy (k => k, new ArrayComparer