diff --git a/src/Java.Interop.Localization/Resources.Designer.cs b/src/Java.Interop.Localization/Resources.Designer.cs
index 76e8734a8..81ed44908 100644
--- a/src/Java.Interop.Localization/Resources.Designer.cs
+++ b/src/Java.Interop.Localization/Resources.Designer.cs
@@ -123,15 +123,6 @@ public static string Generator_BG4400 {
}
}
- ///
- /// Looks up a localized string similar to 'lang-features=default-interface-methods' is not compatible with 'codegen-target=xamarinandroid'..
- ///
- public static string Generator_BG4500 {
- get {
- return ResourceManager.GetString("Generator_BG4500", resourceCulture);
- }
- }
-
///
/// Looks up a localized string similar to Unexpected class child {0}..
///
diff --git a/src/Java.Interop.Localization/Resources.resx b/src/Java.Interop.Localization/Resources.resx
index 95a902004..69753f855 100644
--- a/src/Java.Interop.Localization/Resources.resx
+++ b/src/Java.Interop.Localization/Resources.resx
@@ -146,10 +146,6 @@ In this message, the term "constants" refers to class or interface members that
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.
-
- 'lang-features=default-interface-methods' is not compatible with 'codegen-target=xamarinandroid'.
- The following are literal command line arguments and should not be translated: 'lang-features=default-interface-methods', 'codegen-target=xamarinandroid'.
-
Unexpected class child {0}.
{0} - The unexpected child class.
diff --git a/src/Java.Interop.Tools.Generator/Utilities/Report.cs b/src/Java.Interop.Tools.Generator/Utilities/Report.cs
index 0ac90d9c7..76fa1bc74 100644
--- a/src/Java.Interop.Tools.Generator/Utilities/Report.cs
+++ b/src/Java.Interop.Tools.Generator/Utilities/Report.cs
@@ -33,7 +33,6 @@ public LocalizedMessage (int code, string value)
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 ErrorInvalidDIMArgument => new LocalizedMessage (0x4500, Localization.Resources.Generator_BG4500);
public static LocalizedMessage WarningUnexpectedChild => new LocalizedMessage (0x8101, Localization.Resources.Generator_BG8101);
public static LocalizedMessage WarningUnknownBaseType => new LocalizedMessage (0x8102, Localization.Resources.Generator_BG8102);
diff --git a/tests/generator-Tests/Integration-Tests/AccessModifiers.cs b/tests/generator-Tests/Integration-Tests/AccessModifiers.cs
index c749fb72c..1f0f8fb33 100644
--- a/tests/generator-Tests/Integration-Tests/AccessModifiers.cs
+++ b/tests/generator-Tests/Integration-Tests/AccessModifiers.cs
@@ -11,7 +11,7 @@ public void GeneratedOK ()
{
RunAllTargets (
outputRelativePath: "AccessModifiers",
- apiDescriptionFile: "expected/AccessModifiers/AccessModifiers.xml",
+ apiDescriptionFile: "expected.ji/AccessModifiers/AccessModifiers.xml",
expectedRelativePath: "AccessModifiers",
additionalSupportPaths: null);
}
diff --git a/tests/generator-Tests/Integration-Tests/Adapters.cs b/tests/generator-Tests/Integration-Tests/Adapters.cs
index e93e7688f..417ee3811 100644
--- a/tests/generator-Tests/Integration-Tests/Adapters.cs
+++ b/tests/generator-Tests/Integration-Tests/Adapters.cs
@@ -1,4 +1,4 @@
-using System;
+using System;
using NUnit.Framework;
namespace generatortests
@@ -13,9 +13,9 @@ public void GeneratedOK ()
{
RunAllTargets (
outputRelativePath: "Adapters",
- apiDescriptionFile: "expected/Adapters/Adapters.xml",
+ apiDescriptionFile: "expected.ji/Adapters/Adapters.xml",
expectedRelativePath: "Adapters",
- additionalSupportPaths: new[]{ "expected/Adapters/SupportFiles" });
+ additionalSupportPaths: new[]{ "expected.ji/Adapters/SupportFiles" });
}
}
}
diff --git a/tests/generator-Tests/Integration-Tests/Android_Graphics_Color.cs b/tests/generator-Tests/Integration-Tests/Android_Graphics_Color.cs
index 76323d70e..b3645bb9b 100644
--- a/tests/generator-Tests/Integration-Tests/Android_Graphics_Color.cs
+++ b/tests/generator-Tests/Integration-Tests/Android_Graphics_Color.cs
@@ -1,4 +1,4 @@
-using System;
+using System;
using NUnit.Framework;
namespace generatortests
@@ -11,7 +11,7 @@ public void GeneratedOK ()
{
RunAllTargets (
outputRelativePath: "Android.Graphics.Color",
- apiDescriptionFile: "expected/Android.Graphics.Color/Android.Graphics.Color.xml",
+ apiDescriptionFile: "expected.ji/Android.Graphics.Color/Android.Graphics.Color.xml",
expectedRelativePath: "Android.Graphics.Color");
}
}
diff --git a/tests/generator-Tests/Integration-Tests/Arrays.cs b/tests/generator-Tests/Integration-Tests/Arrays.cs
index 73e30baa3..651c03397 100644
--- a/tests/generator-Tests/Integration-Tests/Arrays.cs
+++ b/tests/generator-Tests/Integration-Tests/Arrays.cs
@@ -1,4 +1,4 @@
-using System;
+using System;
using NUnit.Framework;
namespace generatortests
@@ -11,7 +11,7 @@ public void GeneratedOK ()
{
RunAllTargets (
outputRelativePath: "Arrays",
- apiDescriptionFile: "expected/Arrays/Arrays.xml",
+ apiDescriptionFile: "expected.ji/Arrays/Arrays.xml",
expectedRelativePath: "Arrays");
}
}
diff --git a/tests/generator-Tests/Integration-Tests/BaseGeneratorTest.cs b/tests/generator-Tests/Integration-Tests/BaseGeneratorTest.cs
index 8de413537..55fe623b0 100644
--- a/tests/generator-Tests/Integration-Tests/BaseGeneratorTest.cs
+++ b/tests/generator-Tests/Integration-Tests/BaseGeneratorTest.cs
@@ -123,7 +123,6 @@ private byte[] ReadAllBytesIgnoringLineEndings (string path)
protected void RunAllTargets (string outputRelativePath, string apiDescriptionFile, string expectedRelativePath, string[] additionalSupportPaths = null, string enumFieldsMapFile = null, string enumMethodMapFile = null, string metadataFile = null)
{
- Run (CodeGenerationTarget.XamarinAndroid, Path.Combine ("out", outputRelativePath), apiDescriptionFile, Path.Combine ("expected", expectedRelativePath), additionalSupportPaths, enumFieldsMapFile, enumMethodMapFile, metadataFile);
Run (CodeGenerationTarget.XAJavaInterop1, Path.Combine ("out.xaji", outputRelativePath), apiDescriptionFile, Path.Combine ("expected.xaji", expectedRelativePath), additionalSupportPaths, enumFieldsMapFile, enumMethodMapFile, metadataFile);
#if NET
if (TryJavaInterop1) {
diff --git a/tests/generator-Tests/Integration-Tests/CSharpKeywords.cs b/tests/generator-Tests/Integration-Tests/CSharpKeywords.cs
index c874da492..ab7333b54 100644
--- a/tests/generator-Tests/Integration-Tests/CSharpKeywords.cs
+++ b/tests/generator-Tests/Integration-Tests/CSharpKeywords.cs
@@ -11,7 +11,7 @@ public void GeneratedOK ()
{
RunAllTargets (
outputRelativePath: "CSharpKeywords",
- apiDescriptionFile: "expected/CSharpKeywords/CSharpKeywords.xml",
+ apiDescriptionFile: "expected.ji/CSharpKeywords/CSharpKeywords.xml",
expectedRelativePath: "CSharpKeywords");
}
}
diff --git a/tests/generator-Tests/Integration-Tests/Constructors.cs b/tests/generator-Tests/Integration-Tests/Constructors.cs
index 2847f46fe..4882f4720 100644
--- a/tests/generator-Tests/Integration-Tests/Constructors.cs
+++ b/tests/generator-Tests/Integration-Tests/Constructors.cs
@@ -1,4 +1,4 @@
-using System;
+using System;
using NUnit.Framework;
namespace generatortests
@@ -11,7 +11,7 @@ public void GeneratedOK ()
{
RunAllTargets (
outputRelativePath: "Constructors",
- apiDescriptionFile: "expected/Constructors/Constructors.xml",
+ apiDescriptionFile: "expected.ji/Constructors/Constructors.xml",
expectedRelativePath: "Constructors");
}
}
diff --git a/tests/generator-Tests/Integration-Tests/Core_ClassParse.cs b/tests/generator-Tests/Integration-Tests/Core_ClassParse.cs
index 3f4b9af17..8954c5649 100644
--- a/tests/generator-Tests/Integration-Tests/Core_ClassParse.cs
+++ b/tests/generator-Tests/Integration-Tests/Core_ClassParse.cs
@@ -13,9 +13,9 @@ public void GeneratedOK ()
RunAllTargets (
outputRelativePath: "Core_ClassParse",
- apiDescriptionFile: "expected/Core_ClassParse/api.xml",
+ apiDescriptionFile: "expected.ji/Core_ClassParse/api.xml",
expectedRelativePath: "Core_ClassParse",
- metadataFile: FullPath ("expected/Core_ClassParse/metadata.xml"));
+ metadataFile: FullPath ("expected.ji/Core_ClassParse/metadata.xml"));
}
}
}
diff --git a/tests/generator-Tests/Integration-Tests/Core_Jar2Xml.cs b/tests/generator-Tests/Integration-Tests/Core_Jar2Xml.cs
index 49d3aa81f..3ec77c2e6 100644
--- a/tests/generator-Tests/Integration-Tests/Core_Jar2Xml.cs
+++ b/tests/generator-Tests/Integration-Tests/Core_Jar2Xml.cs
@@ -15,10 +15,10 @@ public void GeneratedOK ()
RunAllTargets (
outputRelativePath: "Core_Jar2Xml",
- apiDescriptionFile: "expected/Core_Jar2Xml/api.xml",
+ apiDescriptionFile: "expected.ji/Core_Jar2Xml/api.xml",
expectedRelativePath: "Core_Jar2Xml",
- enumFieldsMapFile: "expected/Core_Jar2Xml/fields.xml",
- enumMethodMapFile: "expected/Core_Jar2Xml/methods.xml"
+ enumFieldsMapFile: "expected.ji/Core_Jar2Xml/fields.xml",
+ enumMethodMapFile: "expected.ji/Core_Jar2Xml/methods.xml"
);
}
}
diff --git a/tests/generator-Tests/Integration-Tests/Enumerations.cs b/tests/generator-Tests/Integration-Tests/Enumerations.cs
deleted file mode 100644
index 8a9563ca6..000000000
--- a/tests/generator-Tests/Integration-Tests/Enumerations.cs
+++ /dev/null
@@ -1,26 +0,0 @@
-using System;
-using System.IO;
-using NUnit.Framework;
-
-namespace generatortests
-{
- [TestFixture]
- public class Enumerations : BaseGeneratorTest
- {
- [Test]
- public void FixedUp_OK ()
- {
- Cleanup ("out/EnumerationFixup");
- Options.ApiDescriptionFile = FullPath ("expected/EnumerationFixup/EnumerationFixup.xml");
- Options.EnumFieldsMapFile = FullPath ("expected/EnumerationFixup/EnumerationFixupMap.xml");
- Options.EnumOutputDirectory = Options.ManagedCallableWrapperSourceOutputDirectory = FullPath ("out/EnumerationFixup");
- Options.EnumMetadataOutputFile = Path.Combine (Options.EnumOutputDirectory, "enummetadata");
- Execute ();
- Options.EnumFieldsMapFile = "";
- Options.EnumOutputDirectory = "";
- CompareOutputs ("expected/EnumerationFixup", "out/EnumerationFixup");
- }
-
- }
-}
-
diff --git a/tests/generator-Tests/Integration-Tests/GenericArguments.cs b/tests/generator-Tests/Integration-Tests/GenericArguments.cs
index 87b8f63b4..de97f10bf 100644
--- a/tests/generator-Tests/Integration-Tests/GenericArguments.cs
+++ b/tests/generator-Tests/Integration-Tests/GenericArguments.cs
@@ -1,4 +1,4 @@
-using System;
+using System;
using NUnit.Framework;
namespace generatortests
@@ -13,7 +13,7 @@ public void GeneratedOK ()
{
RunAllTargets (
outputRelativePath: "GenericArguments",
- apiDescriptionFile: "expected/GenericArguments/GenericArguments.xml",
+ apiDescriptionFile: "expected.ji/GenericArguments/GenericArguments.xml",
expectedRelativePath: "GenericArguments",
additionalSupportPaths: null);
}
diff --git a/tests/generator-Tests/Integration-Tests/InterfaceMethodsConflict.cs b/tests/generator-Tests/Integration-Tests/InterfaceMethodsConflict.cs
index 36b5c9b95..c5dda3916 100644
--- a/tests/generator-Tests/Integration-Tests/InterfaceMethodsConflict.cs
+++ b/tests/generator-Tests/Integration-Tests/InterfaceMethodsConflict.cs
@@ -1,4 +1,4 @@
-using System;
+using System;
using NUnit.Framework;
namespace generatortests
@@ -11,7 +11,7 @@ public void GeneratedOK ()
{
RunAllTargets (
outputRelativePath: "InterfaceMethodsConflict",
- apiDescriptionFile: "expected/InterfaceMethodsConflict/InterfaceMethodsConflict.xml",
+ apiDescriptionFile: "expected.ji/InterfaceMethodsConflict/InterfaceMethodsConflict.xml",
expectedRelativePath: "InterfaceMethodsConflict");
}
}
diff --git a/tests/generator-Tests/Integration-Tests/Interfaces.cs b/tests/generator-Tests/Integration-Tests/Interfaces.cs
index 06d5f4917..2e3074bff 100644
--- a/tests/generator-Tests/Integration-Tests/Interfaces.cs
+++ b/tests/generator-Tests/Integration-Tests/Interfaces.cs
@@ -1,4 +1,4 @@
-using System;
+using System;
using NUnit.Framework;
namespace generatortests
@@ -13,7 +13,7 @@ public void Generated_OK ()
{
RunAllTargets (
outputRelativePath: "TestInterface",
- apiDescriptionFile: "expected/TestInterface/TestInterface.xml",
+ apiDescriptionFile: "expected.ji/TestInterface/TestInterface.xml",
expectedRelativePath: "TestInterface");
}
}
diff --git a/tests/generator-Tests/Integration-Tests/Java_Lang_Enum.cs b/tests/generator-Tests/Integration-Tests/Java_Lang_Enum.cs
index 52467ba64..2155e3beb 100644
--- a/tests/generator-Tests/Integration-Tests/Java_Lang_Enum.cs
+++ b/tests/generator-Tests/Integration-Tests/Java_Lang_Enum.cs
@@ -13,7 +13,7 @@ public void Generated_OK ()
{
RunAllTargets (
outputRelativePath: "java.lang.Enum",
- apiDescriptionFile: "expected/java.lang.Enum/Java.Lang.Enum.xml",
+ apiDescriptionFile: "expected.ji/java.lang.Enum/Java.Lang.Enum.xml",
expectedRelativePath: "java.lang.Enum");
}
}
diff --git a/tests/generator-Tests/Integration-Tests/Java_Lang_Object.cs b/tests/generator-Tests/Integration-Tests/Java_Lang_Object.cs
index 40fa28126..7aeff7b15 100644
--- a/tests/generator-Tests/Integration-Tests/Java_Lang_Object.cs
+++ b/tests/generator-Tests/Integration-Tests/Java_Lang_Object.cs
@@ -12,21 +12,9 @@ public class Java_Lang_Object : BaseGeneratorTest
[Test]
public void Generated_OK ()
{
- Run (target: Xamarin.Android.Binder.CodeGenerationTarget.XamarinAndroid,
- outputPath: "out/java.lang.Object",
- apiDescriptionFile: "expected/java.lang.Object/java.lang.Object.xml",
- expectedPath: "expected/java.lang.Object");
-
- var javaLangObject = BuiltAssembly.GetType ("Java.Lang.Object");
-
- Assert.IsNotNull (javaLangObject);
- Assert.IsTrue (javaLangObject.IsPublic);
- Assert.IsTrue (javaLangObject.FullName == "Java.Lang.Object");
- Assert.IsTrue (javaLangObject.GetCustomAttributes (false).Any (x => x.GetType ().Name == "RegisterAttribute"));
-
Run (target: Xamarin.Android.Binder.CodeGenerationTarget.JavaInterop1,
outputPath: "out.ji/java.lang.Object",
- apiDescriptionFile: "expected/java.lang.Object/java.lang.Object.xml",
+ apiDescriptionFile: "expected.ji/java.lang.Object/java.lang.Object.xml",
expectedPath: "expected.ji/java.lang.Object");
}
}
diff --git a/tests/generator-Tests/Integration-Tests/Java_Util_List.cs b/tests/generator-Tests/Integration-Tests/Java_Util_List.cs
index 05fe04fbc..eca1ac785 100644
--- a/tests/generator-Tests/Integration-Tests/Java_Util_List.cs
+++ b/tests/generator-Tests/Integration-Tests/Java_Util_List.cs
@@ -13,7 +13,7 @@ public void GeneratedOK ()
{
RunAllTargets (
outputRelativePath: "java.util.List",
- apiDescriptionFile: "expected/java.util.List/java.util.List.xml",
+ apiDescriptionFile: "expected.ji/java.util.List/java.util.List.xml",
expectedRelativePath: "java.util.List");
}
}
diff --git a/tests/generator-Tests/Integration-Tests/NestedTypes.cs b/tests/generator-Tests/Integration-Tests/NestedTypes.cs
index 07c42efb9..df954e74c 100644
--- a/tests/generator-Tests/Integration-Tests/NestedTypes.cs
+++ b/tests/generator-Tests/Integration-Tests/NestedTypes.cs
@@ -13,7 +13,7 @@ public void GeneratedOK ()
{
RunAllTargets (
outputRelativePath: "NestedTypes",
- apiDescriptionFile: "expected/NestedTypes/NestedTypes.xml",
+ apiDescriptionFile: "expected.ji/NestedTypes/NestedTypes.xml",
expectedRelativePath: "NestedTypes");
}
}
diff --git a/tests/generator-Tests/Integration-Tests/NonStaticFields.cs b/tests/generator-Tests/Integration-Tests/NonStaticFields.cs
index 06ddf2139..bd56d4d4c 100644
--- a/tests/generator-Tests/Integration-Tests/NonStaticFields.cs
+++ b/tests/generator-Tests/Integration-Tests/NonStaticFields.cs
@@ -11,7 +11,7 @@ public void GeneratedOK ()
{
RunAllTargets (
outputRelativePath: "NonStaticFields",
- apiDescriptionFile: "expected/NonStaticFields/NonStaticField.xml",
+ apiDescriptionFile: "expected.ji/NonStaticFields/NonStaticField.xml",
expectedRelativePath: "NonStaticFields");
}
}
diff --git a/tests/generator-Tests/Integration-Tests/NormalMethods.cs b/tests/generator-Tests/Integration-Tests/NormalMethods.cs
index 5fbd5ed84..a30350685 100644
--- a/tests/generator-Tests/Integration-Tests/NormalMethods.cs
+++ b/tests/generator-Tests/Integration-Tests/NormalMethods.cs
@@ -13,7 +13,7 @@ public void GeneratedOK ()
{
RunAllTargets (
outputRelativePath: "NormalMethods",
- apiDescriptionFile: "expected/NormalMethods/NormalMethods.xml",
+ apiDescriptionFile: "expected.ji/NormalMethods/NormalMethods.xml",
expectedRelativePath: "NormalMethods");
}
}
diff --git a/tests/generator-Tests/Integration-Tests/NormalProperties.cs b/tests/generator-Tests/Integration-Tests/NormalProperties.cs
index 9a45365b6..97e973b3f 100644
--- a/tests/generator-Tests/Integration-Tests/NormalProperties.cs
+++ b/tests/generator-Tests/Integration-Tests/NormalProperties.cs
@@ -11,7 +11,7 @@ public void GeneratedOK ()
{
RunAllTargets (
outputRelativePath: "NormalProperties",
- apiDescriptionFile: "expected/NormalProperties/NormalProperties.xml",
+ apiDescriptionFile: "expected.ji/NormalProperties/NormalProperties.xml",
expectedRelativePath: "NormalProperties");
}
}
diff --git a/tests/generator-Tests/Integration-Tests/PamareterXPath.cs b/tests/generator-Tests/Integration-Tests/PamareterXPath.cs
index b2cb00282..d590ce562 100644
--- a/tests/generator-Tests/Integration-Tests/PamareterXPath.cs
+++ b/tests/generator-Tests/Integration-Tests/PamareterXPath.cs
@@ -13,7 +13,7 @@ public void GeneratedOK ()
{
RunAllTargets (
outputRelativePath: "ParameterXPath",
- apiDescriptionFile: "expected/ParameterXPath/ParameterXPath.xml",
+ apiDescriptionFile: "expected.ji/ParameterXPath/ParameterXPath.xml",
expectedRelativePath: "ParameterXPath");
}
}
diff --git a/tests/generator-Tests/Integration-Tests/StaticFields.cs b/tests/generator-Tests/Integration-Tests/StaticFields.cs
index 4e3837772..ecb22dac6 100644
--- a/tests/generator-Tests/Integration-Tests/StaticFields.cs
+++ b/tests/generator-Tests/Integration-Tests/StaticFields.cs
@@ -11,7 +11,7 @@ public void GeneratedOK ()
{
RunAllTargets (
outputRelativePath: "StaticFields",
- apiDescriptionFile: "expected/StaticFields/StaticField.xml",
+ apiDescriptionFile: "expected.ji/StaticFields/StaticField.xml",
expectedRelativePath: "StaticFields");
}
}
diff --git a/tests/generator-Tests/Integration-Tests/StaticMethods.cs b/tests/generator-Tests/Integration-Tests/StaticMethods.cs
index d3044c71b..cb33ce955 100644
--- a/tests/generator-Tests/Integration-Tests/StaticMethods.cs
+++ b/tests/generator-Tests/Integration-Tests/StaticMethods.cs
@@ -11,7 +11,7 @@ public void GeneratedOK ()
{
RunAllTargets (
outputRelativePath: "StaticMethods",
- apiDescriptionFile: "expected/StaticMethods/StaticMethod.xml",
+ apiDescriptionFile: "expected.ji/StaticMethods/StaticMethod.xml",
expectedRelativePath: "StaticMethods");
}
}
diff --git a/tests/generator-Tests/Integration-Tests/StaticProperties.cs b/tests/generator-Tests/Integration-Tests/StaticProperties.cs
index 2ea369113..0e25b3fe4 100644
--- a/tests/generator-Tests/Integration-Tests/StaticProperties.cs
+++ b/tests/generator-Tests/Integration-Tests/StaticProperties.cs
@@ -11,7 +11,7 @@ public void GeneratedOK ()
{
RunAllTargets (
outputRelativePath: "StaticProperties",
- apiDescriptionFile: "expected/StaticProperties/StaticProperties.xml",
+ apiDescriptionFile: "expected.ji/StaticProperties/StaticProperties.xml",
expectedRelativePath: "StaticProperties");
}
}
diff --git a/tests/generator-Tests/Integration-Tests/Streams.cs b/tests/generator-Tests/Integration-Tests/Streams.cs
index 948743cca..e27cfc3d6 100644
--- a/tests/generator-Tests/Integration-Tests/Streams.cs
+++ b/tests/generator-Tests/Integration-Tests/Streams.cs
@@ -11,9 +11,9 @@ public void GeneratedOK ()
{
RunAllTargets (
outputRelativePath: "Streams",
- apiDescriptionFile: "expected/Streams/Streams.xml",
+ apiDescriptionFile: "expected.ji/Streams/Streams.xml",
expectedRelativePath: "Streams",
- additionalSupportPaths: new[]{ "expected/Streams/SupportFiles" });
+ additionalSupportPaths: new[]{ "expected.ji/Streams/SupportFiles" });
}
}
}
diff --git a/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/Common/WriteCharSequenceEnumerator.txt b/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/Common/WriteCharSequenceEnumerator.txt
deleted file mode 100644
index 0a27a4a22..000000000
--- a/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/Common/WriteCharSequenceEnumerator.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator ()
-{
- return GetEnumerator ();
-}
-
-public System.Collections.Generic.IEnumerator GetEnumerator ()
-{
- for (int i = 0; i < Length(); i++)
- yield return CharAt (i);
-}
-
diff --git a/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/Common/WriteClassAbstractMembers.txt b/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/Common/WriteClassAbstractMembers.txt
deleted file mode 100644
index e69de29bb..000000000
diff --git a/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/Common/WriteInterfaceEventArgs.txt b/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/Common/WriteInterfaceEventArgs.txt
deleted file mode 100644
index 135abf81e..000000000
--- a/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/Common/WriteInterfaceEventArgs.txt
+++ /dev/null
@@ -1,2 +0,0 @@
-public delegate int MyIGetCountForKeyHandler (string key);
-
diff --git a/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/Common/WriteInterfaceEventArgsWithParamArray.txt b/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/Common/WriteInterfaceEventArgsWithParamArray.txt
deleted file mode 100644
index c937a0439..000000000
--- a/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/Common/WriteInterfaceEventArgsWithParamArray.txt
+++ /dev/null
@@ -1,14 +0,0 @@
-// event args for com.xamarin.android.MyListener.onDoSomething
-public partial class MyEventArgs : global::System.EventArgs {
-
- public MyEventArgs (params Java.Lang.Object[] args)
- {
- this.args = args;
- }
-
- Java.Lang.Object[] args;
- public Java.Lang.Object[] Args {
- get { return args; }
- }
-}
-
diff --git a/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/Common/WriteInterfaceEventHandler.txt b/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/Common/WriteInterfaceEventHandler.txt
deleted file mode 100644
index e69de29bb..000000000
diff --git a/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/Common/WriteInterfaceEventHandlerImpl.txt b/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/Common/WriteInterfaceEventHandlerImpl.txt
deleted file mode 100644
index b231fdf90..000000000
--- a/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/Common/WriteInterfaceEventHandlerImpl.txt
+++ /dev/null
@@ -1,59 +0,0 @@
-[global::Android.Runtime.Register ("mono/java/code/IMyInterfaceImplementor")]
-internal sealed partial class IMyInterfaceImplementor : global::Java.Lang.Object, IMyInterface {
-
- object sender;
-
- public IMyInterfaceImplementor (object sender)
- : base (
- global::Android.Runtime.JNIEnv.StartCreateInstance ("mono/java/code/IMyInterfaceImplementor", "()V"),
- JniHandleOwnership.TransferLocalRef)
- {
- global::Android.Runtime.JNIEnv.FinishCreateInstance (((global::Java.Lang.Object) this).Handle, "()V");
- this.sender = sender;
- }
-
-#pragma warning disable 0649
- public MyIGetCountForKeyHandler GetCountForKeyHandler;
-#pragma warning restore 0649
-
- public int GetCountForKey (string key)
- {
- var __h = GetCountForKeyHandler;
- return __h != null ? __h (key) : default (int);
- }
-#pragma warning disable 0649
- public MyIKeyHandler KeyHandler;
-#pragma warning restore 0649
-
- public string Key ()
- {
- var __h = KeyHandler;
- return __h != null ? __h () : default (string);
- }
-#pragma warning disable 0649
- public EventHandler StaticMethodHandler;
-#pragma warning restore 0649
-
- public void StaticMethod ()
- {
- var __h = StaticMethodHandler;
- if (__h != null)
- __h (sender, new EventArgs ());
- }
-#pragma warning disable 0649
- public EventHandler AbstractMethodHandler;
-#pragma warning restore 0649
-
- public void AbstractMethod ()
- {
- var __h = AbstractMethodHandler;
- if (__h != null)
- __h (sender, new EventArgs ());
- }
-
- internal static bool __IsEmpty (IMyInterfaceImplementor value)
- {
- return value.GetCountForKeyHandler == null && value.KeyHandler == null && value.StaticMethodHandler == null && value.AbstractMethodHandler == null;
- }
-}
-
diff --git a/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/Common/WriteInterfaceEventHandlerImplContent.txt b/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/Common/WriteInterfaceEventHandlerImplContent.txt
deleted file mode 100644
index a190fc776..000000000
--- a/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/Common/WriteInterfaceEventHandlerImplContent.txt
+++ /dev/null
@@ -1,9 +0,0 @@
-#pragma warning disable 0649
- public MyIGetCountForKeyHandler GetCountForKeyHandler;
-#pragma warning restore 0649
-
- public int GetCountForKey (string key)
- {
- var __h = GetCountForKeyHandler;
- return __h != null ? __h (key) : default (int);
- }
diff --git a/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/Common/WriteInterfaceExtensionMethods.txt b/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/Common/WriteInterfaceExtensionMethods.txt
deleted file mode 100644
index e69de29bb..000000000
diff --git a/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/Common/WritePropertyAbstractDeclaration.txt b/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/Common/WritePropertyAbstractDeclaration.txt
deleted file mode 100644
index ba0d8f006..000000000
--- a/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/Common/WritePropertyAbstractDeclaration.txt
+++ /dev/null
@@ -1,39 +0,0 @@
-static Delegate cb_get_MyProperty;
-#pragma warning disable 0169
-static Delegate Getget_MyPropertyHandler ()
-{
- if (cb_get_MyProperty == null)
- cb_get_MyProperty = JNINativeWrapper.CreateDelegate ((_JniMarshal_PP_I) n_get_MyProperty);
- return cb_get_MyProperty;
-}
-
-static int n_get_MyProperty (IntPtr jnienv, IntPtr native__this)
-{
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- return __this.MyProperty;
-}
-#pragma warning restore 0169
-
-static Delegate cb_set_MyProperty_I;
-#pragma warning disable 0169
-static Delegate Getset_MyProperty_IHandler ()
-{
- if (cb_set_MyProperty_I == null)
- cb_set_MyProperty_I = JNINativeWrapper.CreateDelegate ((_JniMarshal_PPI_V) n_set_MyProperty_I);
- return cb_set_MyProperty_I;
-}
-
-static void n_set_MyProperty_I (IntPtr jnienv, IntPtr native__this, int value)
-{
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- __this.MyProperty = value;
-}
-#pragma warning restore 0169
-
-public abstract int MyProperty {
- // Metadata.xml XPath method reference: path="/api/package[@name='com.mypackage']/class[@name='foo']/method[@name='get_MyProperty' and count(parameter)=0]"
- [Register ("get_MyProperty", "()I", "Getget_MyPropertyHandler")] get;
- // Metadata.xml XPath method reference: path="/api/package[@name='com.mypackage']/class[@name='foo']/method[@name='set_MyProperty' and count(parameter)=1 and parameter[1][@type='int']]"
- [Register ("set_MyProperty", "(I)V", "Getset_MyProperty_IHandler")] set;
-}
-
diff --git a/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/Common/WritePropertyCallbacks.txt b/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/Common/WritePropertyCallbacks.txt
deleted file mode 100644
index 3ee57d568..000000000
--- a/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/Common/WritePropertyCallbacks.txt
+++ /dev/null
@@ -1,32 +0,0 @@
-static Delegate cb_get_MyProperty;
-#pragma warning disable 0169
-static Delegate Getget_MyPropertyHandler ()
-{
- if (cb_get_MyProperty == null)
- cb_get_MyProperty = JNINativeWrapper.CreateDelegate ((_JniMarshal_PP_I) n_get_MyProperty);
- return cb_get_MyProperty;
-}
-
-static int n_get_MyProperty (IntPtr jnienv, IntPtr native__this)
-{
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- return __this.MyProperty;
-}
-#pragma warning restore 0169
-
-static Delegate cb_set_MyProperty_I;
-#pragma warning disable 0169
-static Delegate Getset_MyProperty_IHandler ()
-{
- if (cb_set_MyProperty_I == null)
- cb_set_MyProperty_I = JNINativeWrapper.CreateDelegate ((_JniMarshal_PPI_V) n_set_MyProperty_I);
- return cb_set_MyProperty_I;
-}
-
-static void n_set_MyProperty_I (IntPtr jnienv, IntPtr native__this, int value)
-{
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- __this.MyProperty = value;
-}
-#pragma warning restore 0169
-
diff --git a/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/Common/WritePropertyDeclaration.txt b/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/Common/WritePropertyDeclaration.txt
deleted file mode 100644
index d23bc113c..000000000
--- a/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/Common/WritePropertyDeclaration.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-int MyProperty {
- // Metadata.xml XPath method reference: path="/api/package[@name='com.mypackage']/class[@name='foo']/method[@name='get_MyProperty' and count(parameter)=0]"
- [Register ("get_MyProperty", "()I", "Getget_MyPropertyHandler:ObjectAdapter, ")] get;
- // Metadata.xml XPath method reference: path="/api/package[@name='com.mypackage']/class[@name='foo']/method[@name='set_MyProperty' and count(parameter)=1 and parameter[1][@type='int']]"
- [Register ("set_MyProperty", "(I)V", "Getset_MyProperty_IHandler:ObjectAdapter, ")] set;
-}
-
diff --git a/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/Common/WritePropertyInvoker.txt b/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/Common/WritePropertyInvoker.txt
deleted file mode 100644
index bb1e9939f..000000000
--- a/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/Common/WritePropertyInvoker.txt
+++ /dev/null
@@ -1,49 +0,0 @@
-static Delegate cb_get_MyProperty;
-#pragma warning disable 0169
-static Delegate Getget_MyPropertyHandler ()
-{
- if (cb_get_MyProperty == null)
- cb_get_MyProperty = JNINativeWrapper.CreateDelegate ((_JniMarshal_PP_I) n_get_MyProperty);
- return cb_get_MyProperty;
-}
-
-static int n_get_MyProperty (IntPtr jnienv, IntPtr native__this)
-{
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- return __this.MyProperty;
-}
-#pragma warning restore 0169
-
-static Delegate cb_set_MyProperty_I;
-#pragma warning disable 0169
-static Delegate Getset_MyProperty_IHandler ()
-{
- if (cb_set_MyProperty_I == null)
- cb_set_MyProperty_I = JNINativeWrapper.CreateDelegate ((_JniMarshal_PPI_V) n_set_MyProperty_I);
- return cb_set_MyProperty_I;
-}
-
-static void n_set_MyProperty_I (IntPtr jnienv, IntPtr native__this, int value)
-{
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- __this.MyProperty = value;
-}
-#pragma warning restore 0169
-
-IntPtr id_get_MyProperty;
-IntPtr id_set_MyProperty_I;
-public unsafe int MyProperty {
- get {
- if (id_get_MyProperty == IntPtr.Zero)
- id_get_MyProperty = JNIEnv.GetMethodID (class_ref, "get_MyProperty", "()I");
- return JNIEnv.CallIntMethod (((global::Java.Lang.Object) this).Handle, id_get_MyProperty);
- }
- set {
- if (id_set_MyProperty_I == IntPtr.Zero)
- id_set_MyProperty_I = JNIEnv.GetMethodID (class_ref, "set_MyProperty", "(I)V");
- JValue* __args = stackalloc JValue [1];
- __args [0] = new JValue (value);
- JNIEnv.CallVoidMethod (((global::Java.Lang.Object) this).Handle, id_set_MyProperty_I, __args);
- }
-}
-
diff --git a/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/Common/WritePropertyStringVariant.txt b/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/Common/WritePropertyStringVariant.txt
deleted file mode 100644
index 639a5fc22..000000000
--- a/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/Common/WritePropertyStringVariant.txt
+++ /dev/null
@@ -1,9 +0,0 @@
-public string MyProperty {
- get { return MyProperty == null ? null : MyProperty.ToString (); }
- set {
- var jls = value == null ? null : new global::Java.Lang.String (value);
- MyProperty = jls;
- if (jls != null) jls.Dispose ();
- }
-}
-
diff --git a/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XAJavaInterop1/WriteConstSugarInterfaceFields.txt b/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XAJavaInterop1/WriteConstSugarInterfaceFields.txt
index fe8fb5d7e..25e31bc37 100644
--- a/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XAJavaInterop1/WriteConstSugarInterfaceFields.txt
+++ b/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XAJavaInterop1/WriteConstSugarInterfaceFields.txt
@@ -1,5 +1,8 @@
-// Metadata.xml XPath interface reference: path="/api/package[@name='java.code']/interface[@name='IMyInterface']"
-public partial interface IMyInterface {
+[Register ("java/code/IMyInterface", DoNotGenerateAcw=true)]
+public abstract class MyInterface : Java.Lang.Object {
+ internal MyInterface ()
+ {
+ }
// Metadata.xml XPath field reference: path="/api/package[@name='java.code']/interface[@name='IMyInterface']/field[@name='MyConstantField']"
[Register ("MyConstantField")]
@@ -11,8 +14,51 @@ public partial interface IMyInterface {
// Metadata.xml XPath field reference: path="/api/package[@name='java.code']/interface[@name='IMyInterface']/field[@name='MyDeprecatedField']"
[Register ("MyDeprecatedField")]
- [Obsolete ("")]
+ [global::System.Obsolete]
public const int MyDeprecatedField = (int) 7;
+ // Metadata.xml XPath field reference: path="/api/package[@name='java.code']/interface[@name='IMyInterface']/field[@name='MyDeprecatedEnumField']"
+ [Register ("MyDeprecatedEnumField")]
+ [global::System.Obsolete (@"This constant will be removed in the future version.")]
+ public const int MyDeprecatedEnumField = (int) MyEnumValue;
+
+
+ // Metadata.xml XPath field reference: path="/api/package[@name='java.code']/interface[@name='IMyInterface']/field[@name='MyStaticField']"
+ [Register ("MyStaticField")]
+ public static int MyStaticField {
+ get {
+ const string __id = "MyStaticField.I";
+
+ var __v = _members.StaticFields.GetInt32Value (__id);
+ return __v;
+ }
+ set {
+ const string __id = "MyStaticField.I";
+
+ try {
+ _members.StaticFields.SetValue (__id, value);
+ } finally {
+ }
+ }
+ }
+
+ static readonly JniPeerMembers _members = new XAPeerMembers ("java/code/IMyInterface", typeof (MyInterface));
+
}
+// Metadata.xml XPath interface reference: path="/api/package[@name='java.code']/interface[@name='IMyInterface']"
+public partial interface IMyInterface {
+ // Metadata.xml XPath field reference: path="/api/package[@name='java.code']/interface[@name='IMyInterface']/field[@name='MyConstantField']"
+ [Register ("MyConstantField")]
+ public const int MyConstantField = (int) 7;
+
+ // Metadata.xml XPath field reference: path="/api/package[@name='java.code']/interface[@name='IMyInterface']/field[@name='MyConstantStringField']"
+ [Register ("MyConstantStringField")]
+ public const string MyConstantStringField = (string) "hello";
+
+ // Metadata.xml XPath field reference: path="/api/package[@name='java.code']/interface[@name='IMyInterface']/field[@name='MyDeprecatedField']"
+ [Register ("MyDeprecatedField")]
+ [global::System.Obsolete]
+ public const int MyDeprecatedField = (int) 7;
+
+}
diff --git a/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteClass.txt b/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteClass.txt
deleted file mode 100644
index 453570e07..000000000
--- a/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteClass.txt
+++ /dev/null
@@ -1,384 +0,0 @@
-// Metadata.xml XPath class reference: path="/api/package[@name='java.code']/class[@name='MyClass']"
-[global::Android.Runtime.Register ("java/code/MyClass", DoNotGenerateAcw=true)]
-public partial class MyClass {
-
- internal static IntPtr java_class_handle;
- internal static IntPtr class_ref {
- get {
- return JNIEnv.FindClass ("java/code/MyClass", ref java_class_handle);
- }
- }
-
- protected MyClass (IntPtr javaReference, JniHandleOwnership transfer) : base (javaReference, transfer) {}
-
- static IntPtr id_ctor;
- // Metadata.xml XPath constructor reference: path="/api/package[@name='java.code']/class[@name='MyClass']/constructor[@name='MyClass' and count(parameter)=0]"
- [Register (".ctor", "()V", "")]
- unsafe MyClass ()
- : base (IntPtr.Zero, JniHandleOwnership.DoNotTransfer)
- {
- if (((global::Java.Lang.Object) this).Handle != IntPtr.Zero)
- return;
-
- try {
- if (((object) this).GetType () != typeof (MyClass)) {
- SetHandle (
- global::Android.Runtime.JNIEnv.StartCreateInstance (((object) this).GetType (), "()V"),
- JniHandleOwnership.TransferLocalRef);
- global::Android.Runtime.JNIEnv.FinishCreateInstance (((global::Java.Lang.Object) this).Handle, "()V");
- return;
- }
-
- if (id_ctor == IntPtr.Zero)
- id_ctor = JNIEnv.GetMethodID (class_ref, "", "()V");
- SetHandle (
- global::Android.Runtime.JNIEnv.StartCreateInstance (class_ref, id_ctor),
- JniHandleOwnership.TransferLocalRef);
- JNIEnv.FinishCreateInstance (((global::Java.Lang.Object) this).Handle, class_ref, id_ctor);
- } finally {
- }
- }
-
- static IntPtr id_ctor_Ljava_lang_String_;
- // Metadata.xml XPath constructor reference: path="/api/package[@name='java.code']/class[@name='MyClass']/constructor[@name='MyClass' and count(parameter)=1 and parameter[1][@type='java.lang.String']]"
- [Register (".ctor", "(Ljava/lang/String;)V", "")]
- unsafe MyClass (string p0)
- : base (IntPtr.Zero, JniHandleOwnership.DoNotTransfer)
- {
- if (((global::Java.Lang.Object) this).Handle != IntPtr.Zero)
- return;
-
- IntPtr native_p0 = JNIEnv.NewString ((string)p0);
- try {
- JValue* __args = stackalloc JValue [1];
- __args [0] = new JValue (native_p0);
- if (((object) this).GetType () != typeof (MyClass)) {
- SetHandle (
- global::Android.Runtime.JNIEnv.StartCreateInstance (((object) this).GetType (), "(Ljava/lang/String;)V", __args),
- JniHandleOwnership.TransferLocalRef);
- global::Android.Runtime.JNIEnv.FinishCreateInstance (((global::Java.Lang.Object) this).Handle, "(Ljava/lang/String;)V", __args);
- return;
- }
-
- if (id_ctor_Ljava_lang_String_ == IntPtr.Zero)
- id_ctor_Ljava_lang_String_ = JNIEnv.GetMethodID (class_ref, "", "(Ljava/lang/String;)V");
- SetHandle (
- global::Android.Runtime.JNIEnv.StartCreateInstance (class_ref, id_ctor_Ljava_lang_String_, __args),
- JniHandleOwnership.TransferLocalRef);
- JNIEnv.FinishCreateInstance (((global::Java.Lang.Object) this).Handle, class_ref, id_ctor_Ljava_lang_String_, __args);
- } finally {
- JNIEnv.DeleteLocalRef (native_p0);
- }
- }
-
- static Delegate cb_get_Count;
-#pragma warning disable 0169
- static Delegate Getget_CountHandler ()
- {
- if (cb_get_Count == null)
- cb_get_Count = JNINativeWrapper.CreateDelegate ((_JniMarshal_PP_I) n_get_Count);
- return cb_get_Count;
- }
-
- static int n_get_Count (IntPtr jnienv, IntPtr native__this)
- {
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- return __this.Count;
- }
-#pragma warning restore 0169
-
- static Delegate cb_set_Count_I;
-#pragma warning disable 0169
- static Delegate Getset_Count_IHandler ()
- {
- if (cb_set_Count_I == null)
- cb_set_Count_I = JNINativeWrapper.CreateDelegate ((_JniMarshal_PPI_V) n_set_Count_I);
- return cb_set_Count_I;
- }
-
- static void n_set_Count_I (IntPtr jnienv, IntPtr native__this, int value)
- {
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- __this.Count = value;
- }
-#pragma warning restore 0169
-
- static IntPtr id_get_Count;
- static IntPtr id_set_Count_I;
- public virtual unsafe int Count {
- // Metadata.xml XPath method reference: path="/api/package[@name='java.code']/class[@name='MyClass']/method[@name='get_Count' and count(parameter)=0]"
- [Register ("get_Count", "()I", "Getget_CountHandler")]
- get {
- if (id_get_Count == IntPtr.Zero)
- id_get_Count = JNIEnv.GetMethodID (class_ref, "get_Count", "()I");
- try {
-
- if (((object) this).GetType () == ThresholdType)
- return JNIEnv.CallIntMethod (((global::Java.Lang.Object) this).Handle, id_get_Count);
- else
- return JNIEnv.CallNonvirtualIntMethod (((global::Java.Lang.Object) this).Handle, ThresholdClass, JNIEnv.GetMethodID (ThresholdClass, "get_Count", "()I"));
- } finally {
- }
- }
- // Metadata.xml XPath method reference: path="/api/package[@name='java.code']/class[@name='MyClass']/method[@name='set_Count' and count(parameter)=1 and parameter[1][@type='int']]"
- [Register ("set_Count", "(I)V", "Getset_Count_IHandler")]
- set {
- if (id_set_Count_I == IntPtr.Zero)
- id_set_Count_I = JNIEnv.GetMethodID (class_ref, "set_Count", "(I)V");
- try {
- JValue* __args = stackalloc JValue [1];
- __args [0] = new JValue (value);
-
- if (((object) this).GetType () == ThresholdType)
- JNIEnv.CallVoidMethod (((global::Java.Lang.Object) this).Handle, id_set_Count_I, __args);
- else
- JNIEnv.CallNonvirtualVoidMethod (((global::Java.Lang.Object) this).Handle, ThresholdClass, JNIEnv.GetMethodID (ThresholdClass, "set_Count", "(I)V"), __args);
- } finally {
- }
- }
- }
-
- static Delegate cb_get_Key;
-#pragma warning disable 0169
- static Delegate Getget_KeyHandler ()
- {
- if (cb_get_Key == null)
- cb_get_Key = JNINativeWrapper.CreateDelegate ((_JniMarshal_PP_L) n_get_Key);
- return cb_get_Key;
- }
-
- static IntPtr n_get_Key (IntPtr jnienv, IntPtr native__this)
- {
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- return JNIEnv.NewString (__this.Key);
- }
-#pragma warning restore 0169
-
- static Delegate cb_set_Key_Ljava_lang_String_;
-#pragma warning disable 0169
- static Delegate Getset_Key_Ljava_lang_String_Handler ()
- {
- if (cb_set_Key_Ljava_lang_String_ == null)
- cb_set_Key_Ljava_lang_String_ = JNINativeWrapper.CreateDelegate ((_JniMarshal_PPL_V) n_set_Key_Ljava_lang_String_);
- return cb_set_Key_Ljava_lang_String_;
- }
-
- static void n_set_Key_Ljava_lang_String_ (IntPtr jnienv, IntPtr native__this, IntPtr native_value)
- {
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- var value = JNIEnv.GetString (native_value, JniHandleOwnership.DoNotTransfer);
- __this.Key = value;
- }
-#pragma warning restore 0169
-
- static IntPtr id_get_Key;
- static IntPtr id_set_Key_Ljava_lang_String_;
- public virtual unsafe string Key {
- // Metadata.xml XPath method reference: path="/api/package[@name='java.code']/class[@name='MyClass']/method[@name='get_Key' and count(parameter)=0]"
- [Register ("get_Key", "()Ljava/lang/String;", "Getget_KeyHandler")]
- get {
- if (id_get_Key == IntPtr.Zero)
- id_get_Key = JNIEnv.GetMethodID (class_ref, "get_Key", "()Ljava/lang/String;");
- try {
-
- if (((object) this).GetType () == ThresholdType)
- return JNIEnv.GetString (JNIEnv.CallObjectMethod (((global::Java.Lang.Object) this).Handle, id_get_Key), JniHandleOwnership.TransferLocalRef);
- else
- return JNIEnv.GetString (JNIEnv.CallNonvirtualObjectMethod (((global::Java.Lang.Object) this).Handle, ThresholdClass, JNIEnv.GetMethodID (ThresholdClass, "get_Key", "()Ljava/lang/String;")), JniHandleOwnership.TransferLocalRef);
- } finally {
- }
- }
- // Metadata.xml XPath method reference: path="/api/package[@name='java.code']/class[@name='MyClass']/method[@name='set_Key' and count(parameter)=1 and parameter[1][@type='java.lang.String']]"
- [Register ("set_Key", "(Ljava/lang/String;)V", "Getset_Key_Ljava_lang_String_Handler")]
- set {
- if (id_set_Key_Ljava_lang_String_ == IntPtr.Zero)
- id_set_Key_Ljava_lang_String_ = JNIEnv.GetMethodID (class_ref, "set_Key", "(Ljava/lang/String;)V");
- IntPtr native_value = JNIEnv.NewString ((string)value);
- try {
- JValue* __args = stackalloc JValue [1];
- __args [0] = new JValue (native_value);
-
- if (((object) this).GetType () == ThresholdType)
- JNIEnv.CallVoidMethod (((global::Java.Lang.Object) this).Handle, id_set_Key_Ljava_lang_String_, __args);
- else
- JNIEnv.CallNonvirtualVoidMethod (((global::Java.Lang.Object) this).Handle, ThresholdClass, JNIEnv.GetMethodID (ThresholdClass, "set_Key", "(Ljava/lang/String;)V"), __args);
- } finally {
- JNIEnv.DeleteLocalRef (native_value);
- }
- }
- }
-
- static IntPtr id_get_StaticCount;
- static IntPtr id_set_StaticCount_I;
- public static unsafe int StaticCount {
- // Metadata.xml XPath method reference: path="/api/package[@name='java.code']/class[@name='MyClass']/method[@name='get_StaticCount' and count(parameter)=0]"
- [Register ("get_StaticCount", "()I", "")]
- get {
- if (id_get_StaticCount == IntPtr.Zero)
- id_get_StaticCount = JNIEnv.GetStaticMethodID (class_ref, "get_StaticCount", "()I");
- try {
- return JNIEnv.CallStaticIntMethod (class_ref, id_get_StaticCount);
- } finally {
- }
- }
- // Metadata.xml XPath method reference: path="/api/package[@name='java.code']/class[@name='MyClass']/method[@name='set_StaticCount' and count(parameter)=1 and parameter[1][@type='int']]"
- [Register ("set_StaticCount", "(I)V", "")]
- set {
- if (id_set_StaticCount_I == IntPtr.Zero)
- id_set_StaticCount_I = JNIEnv.GetStaticMethodID (class_ref, "set_StaticCount", "(I)V");
- try {
- JValue* __args = stackalloc JValue [1];
- __args [0] = new JValue (value);
- JNIEnv.CallStaticVoidMethod (class_ref, id_set_StaticCount_I, __args);
- } finally {
- }
- }
- }
-
- static Delegate cb_get_AbstractCount;
-#pragma warning disable 0169
- static Delegate Getget_AbstractCountHandler ()
- {
- if (cb_get_AbstractCount == null)
- cb_get_AbstractCount = JNINativeWrapper.CreateDelegate ((_JniMarshal_PP_I) n_get_AbstractCount);
- return cb_get_AbstractCount;
- }
-
- static int n_get_AbstractCount (IntPtr jnienv, IntPtr native__this)
- {
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- return __this.AbstractCount;
- }
-#pragma warning restore 0169
-
- static Delegate cb_set_AbstractCount_I;
-#pragma warning disable 0169
- static Delegate Getset_AbstractCount_IHandler ()
- {
- if (cb_set_AbstractCount_I == null)
- cb_set_AbstractCount_I = JNINativeWrapper.CreateDelegate ((_JniMarshal_PPI_V) n_set_AbstractCount_I);
- return cb_set_AbstractCount_I;
- }
-
- static void n_set_AbstractCount_I (IntPtr jnienv, IntPtr native__this, int value)
- {
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- __this.AbstractCount = value;
- }
-#pragma warning restore 0169
-
- public abstract int AbstractCount {
- // Metadata.xml XPath method reference: path="/api/package[@name='java.code']/class[@name='MyClass']/method[@name='get_AbstractCount' and count(parameter)=0]"
- [Register ("get_AbstractCount", "()I", "Getget_AbstractCountHandler")] get;
- // Metadata.xml XPath method reference: path="/api/package[@name='java.code']/class[@name='MyClass']/method[@name='set_AbstractCount' and count(parameter)=1 and parameter[1][@type='int']]"
- [Register ("set_AbstractCount", "(I)V", "Getset_AbstractCount_IHandler")] set;
- }
-
- static Delegate cb_GetCountForKey_Ljava_lang_String_;
-#pragma warning disable 0169
- static Delegate GetGetCountForKey_Ljava_lang_String_Handler ()
- {
- if (cb_GetCountForKey_Ljava_lang_String_ == null)
- cb_GetCountForKey_Ljava_lang_String_ = JNINativeWrapper.CreateDelegate ((_JniMarshal_PPL_I) n_GetCountForKey_Ljava_lang_String_);
- return cb_GetCountForKey_Ljava_lang_String_;
- }
-
- static int n_GetCountForKey_Ljava_lang_String_ (IntPtr jnienv, IntPtr native__this, IntPtr native_key)
- {
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- var key = JNIEnv.GetString (native_key, JniHandleOwnership.DoNotTransfer);
- int __ret = __this.GetCountForKey (key);
- return __ret;
- }
-#pragma warning restore 0169
-
- static IntPtr id_GetCountForKey_Ljava_lang_String_;
- // Metadata.xml XPath method reference: path="/api/package[@name='java.code']/class[@name='MyClass']/method[@name='GetCountForKey' and count(parameter)=1 and parameter[1][@type='java.lang.String']]"
- [Register ("GetCountForKey", "(Ljava/lang/String;)I", "GetGetCountForKey_Ljava_lang_String_Handler")]
- public virtual unsafe int GetCountForKey (string key)
- {
- if (id_GetCountForKey_Ljava_lang_String_ == IntPtr.Zero)
- id_GetCountForKey_Ljava_lang_String_ = JNIEnv.GetMethodID (class_ref, "GetCountForKey", "(Ljava/lang/String;)I");
- IntPtr native_key = JNIEnv.NewString ((string)key);
- try {
- JValue* __args = stackalloc JValue [1];
- __args [0] = new JValue (native_key);
-
- int __ret;
- if (((object) this).GetType () == ThresholdType)
- __ret = JNIEnv.CallIntMethod (((global::Java.Lang.Object) this).Handle, id_GetCountForKey_Ljava_lang_String_, __args);
- else
- __ret = JNIEnv.CallNonvirtualIntMethod (((global::Java.Lang.Object) this).Handle, ThresholdClass, JNIEnv.GetMethodID (ThresholdClass, "GetCountForKey", "(Ljava/lang/String;)I"), __args);
- return __ret;
- } finally {
- JNIEnv.DeleteLocalRef (native_key);
- }
- }
-
- static Delegate cb_Key;
-#pragma warning disable 0169
- static Delegate GetKeyHandler ()
- {
- if (cb_Key == null)
- cb_Key = JNINativeWrapper.CreateDelegate ((_JniMarshal_PP_L) n_Key);
- return cb_Key;
- }
-
- static IntPtr n_Key (IntPtr jnienv, IntPtr native__this)
- {
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- return JNIEnv.NewString (__this.Key ());
- }
-#pragma warning restore 0169
-
- static IntPtr id_Key;
- // Metadata.xml XPath method reference: path="/api/package[@name='java.code']/class[@name='MyClass']/method[@name='Key' and count(parameter)=0]"
- [Register ("Key", "()Ljava/lang/String;", "GetKeyHandler")]
- public virtual unsafe string Key ()
- {
- if (id_Key == IntPtr.Zero)
- id_Key = JNIEnv.GetMethodID (class_ref, "Key", "()Ljava/lang/String;");
- try {
-
- if (((object) this).GetType () == ThresholdType)
- return JNIEnv.GetString (JNIEnv.CallObjectMethod (((global::Java.Lang.Object) this).Handle, id_Key), JniHandleOwnership.TransferLocalRef);
- else
- return JNIEnv.GetString (JNIEnv.CallNonvirtualObjectMethod (((global::Java.Lang.Object) this).Handle, ThresholdClass, JNIEnv.GetMethodID (ThresholdClass, "Key", "()Ljava/lang/String;")), JniHandleOwnership.TransferLocalRef);
- } finally {
- }
- }
-
- static IntPtr id_StaticMethod;
- // Metadata.xml XPath method reference: path="/api/package[@name='java.code']/class[@name='MyClass']/method[@name='StaticMethod' and count(parameter)=0]"
- [Register ("StaticMethod", "()V", "")]
- public static unsafe void StaticMethod ()
- {
- if (id_StaticMethod == IntPtr.Zero)
- id_StaticMethod = JNIEnv.GetStaticMethodID (class_ref, "StaticMethod", "()V");
- try {
- JNIEnv.CallStaticVoidMethod (class_ref, id_StaticMethod);
- } finally {
- }
- }
-
- static Delegate cb_AbstractMethod;
-#pragma warning disable 0169
- static Delegate GetAbstractMethodHandler ()
- {
- if (cb_AbstractMethod == null)
- cb_AbstractMethod = JNINativeWrapper.CreateDelegate ((_JniMarshal_PP_V) n_AbstractMethod);
- return cb_AbstractMethod;
- }
-
- static void n_AbstractMethod (IntPtr jnienv, IntPtr native__this)
- {
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- __this.AbstractMethod ();
- }
-#pragma warning restore 0169
-
- // Metadata.xml XPath method reference: path="/api/package[@name='java.code']/class[@name='MyClass']/method[@name='AbstractMethod' and count(parameter)=0]"
- [Register ("AbstractMethod", "()V", "GetAbstractMethodHandler")]
- public abstract void AbstractMethod ();
-
-}
diff --git a/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteClassConstructors.txt b/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteClassConstructors.txt
deleted file mode 100644
index 02a4b382c..000000000
--- a/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteClassConstructors.txt
+++ /dev/null
@@ -1,62 +0,0 @@
-protected MyClass (IntPtr javaReference, JniHandleOwnership transfer) : base (javaReference, transfer) {}
-
-static IntPtr id_ctor;
-// Metadata.xml XPath constructor reference: path="/api/package[@name='java.code']/class[@name='MyClass']/constructor[@name='MyClass' and count(parameter)=0]"
-[Register (".ctor", "()V", "")]
- unsafe MyClass ()
- : base (IntPtr.Zero, JniHandleOwnership.DoNotTransfer)
-{
- if (((global::Java.Lang.Object) this).Handle != IntPtr.Zero)
- return;
-
- try {
- if (((object) this).GetType () != typeof (MyClass)) {
- SetHandle (
- global::Android.Runtime.JNIEnv.StartCreateInstance (((object) this).GetType (), "()V"),
- JniHandleOwnership.TransferLocalRef);
- global::Android.Runtime.JNIEnv.FinishCreateInstance (((global::Java.Lang.Object) this).Handle, "()V");
- return;
- }
-
- if (id_ctor == IntPtr.Zero)
- id_ctor = JNIEnv.GetMethodID (class_ref, "", "()V");
- SetHandle (
- global::Android.Runtime.JNIEnv.StartCreateInstance (class_ref, id_ctor),
- JniHandleOwnership.TransferLocalRef);
- JNIEnv.FinishCreateInstance (((global::Java.Lang.Object) this).Handle, class_ref, id_ctor);
- } finally {
- }
-}
-
-static IntPtr id_ctor_Ljava_lang_String_;
-// Metadata.xml XPath constructor reference: path="/api/package[@name='java.code']/class[@name='MyClass']/constructor[@name='MyClass' and count(parameter)=1 and parameter[1][@type='java.lang.String']]"
-[Register (".ctor", "(Ljava/lang/String;)V", "")]
- unsafe MyClass (string p0)
- : base (IntPtr.Zero, JniHandleOwnership.DoNotTransfer)
-{
- if (((global::Java.Lang.Object) this).Handle != IntPtr.Zero)
- return;
-
- IntPtr native_p0 = JNIEnv.NewString ((string)p0);
- try {
- JValue* __args = stackalloc JValue [1];
- __args [0] = new JValue (native_p0);
- if (((object) this).GetType () != typeof (MyClass)) {
- SetHandle (
- global::Android.Runtime.JNIEnv.StartCreateInstance (((object) this).GetType (), "(Ljava/lang/String;)V", __args),
- JniHandleOwnership.TransferLocalRef);
- global::Android.Runtime.JNIEnv.FinishCreateInstance (((global::Java.Lang.Object) this).Handle, "(Ljava/lang/String;)V", __args);
- return;
- }
-
- if (id_ctor_Ljava_lang_String_ == IntPtr.Zero)
- id_ctor_Ljava_lang_String_ = JNIEnv.GetMethodID (class_ref, "", "(Ljava/lang/String;)V");
- SetHandle (
- global::Android.Runtime.JNIEnv.StartCreateInstance (class_ref, id_ctor_Ljava_lang_String_, __args),
- JniHandleOwnership.TransferLocalRef);
- JNIEnv.FinishCreateInstance (((global::Java.Lang.Object) this).Handle, class_ref, id_ctor_Ljava_lang_String_, __args);
- } finally {
- JNIEnv.DeleteLocalRef (native_p0);
- }
-}
-
diff --git a/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteClassHandle.txt b/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteClassHandle.txt
deleted file mode 100644
index 7e06aa56f..000000000
--- a/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteClassHandle.txt
+++ /dev/null
@@ -1,7 +0,0 @@
- internal static IntPtr java_class_handle;
- internal static IntPtr class_ref {
- get {
- return JNIEnv.FindClass ("com/mypackage/foo", ref java_class_handle);
- }
- }
-
diff --git a/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteClassInvoker.txt b/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteClassInvoker.txt
deleted file mode 100644
index 3296dbbed..000000000
--- a/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteClassInvoker.txt
+++ /dev/null
@@ -1,51 +0,0 @@
-[global::Android.Runtime.Register ("java/code/MyClass", DoNotGenerateAcw=true)]
-internal partial class MyClassInvoker : MyClass {
-
- public MyClassInvoker (IntPtr handle, JniHandleOwnership transfer) : base (handle, transfer) {}
-
- protected override global::System.Type ThresholdType {
- get { return typeof (MyClassInvoker); }
- }
-
- static IntPtr id_get_AbstractCount;
- static IntPtr id_set_AbstractCount_I;
- public override unsafe int AbstractCount {
- // Metadata.xml XPath method reference: path="/api/package[@name='java.code']/class[@name='MyClass']/method[@name='get_AbstractCount' and count(parameter)=0]"
- [Register ("get_AbstractCount", "()I", "Getget_AbstractCountHandler")]
- get {
- if (id_get_AbstractCount == IntPtr.Zero)
- id_get_AbstractCount = JNIEnv.GetMethodID (class_ref, "get_AbstractCount", "()I");
- try {
- return JNIEnv.CallIntMethod (((global::Java.Lang.Object) this).Handle, id_get_AbstractCount);
- } finally {
- }
- }
- // Metadata.xml XPath method reference: path="/api/package[@name='java.code']/class[@name='MyClass']/method[@name='set_AbstractCount' and count(parameter)=1 and parameter[1][@type='int']]"
- [Register ("set_AbstractCount", "(I)V", "Getset_AbstractCount_IHandler")]
- set {
- if (id_set_AbstractCount_I == IntPtr.Zero)
- id_set_AbstractCount_I = JNIEnv.GetMethodID (class_ref, "set_AbstractCount", "(I)V");
- try {
- JValue* __args = stackalloc JValue [1];
- __args [0] = new JValue (value);
- JNIEnv.CallVoidMethod (((global::Java.Lang.Object) this).Handle, id_set_AbstractCount_I, __args);
- } finally {
- }
- }
- }
-
- static IntPtr id_AbstractMethod;
- // Metadata.xml XPath method reference: path="/api/package[@name='java.code']/class[@name='MyClass']/method[@name='AbstractMethod' and count(parameter)=0]"
- [Register ("AbstractMethod", "()V", "GetAbstractMethodHandler")]
- public override unsafe void AbstractMethod ()
- {
- if (id_AbstractMethod == IntPtr.Zero)
- id_AbstractMethod = JNIEnv.GetMethodID (class_ref, "AbstractMethod", "()V");
- try {
- JNIEnv.CallVoidMethod (((global::Java.Lang.Object) this).Handle, id_AbstractMethod);
- } finally {
- }
- }
-
-}
-
diff --git a/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteClassInvokerHandle.txt b/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteClassInvokerHandle.txt
deleted file mode 100644
index 0ec403601..000000000
--- a/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteClassInvokerHandle.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-protected override global::System.Type ThresholdType {
- get { return typeof (Com.MyPackage.Foo); }
-}
-
diff --git a/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteClassInvokerMembers.txt b/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteClassInvokerMembers.txt
deleted file mode 100644
index 68c8676a3..000000000
--- a/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteClassInvokerMembers.txt
+++ /dev/null
@@ -1,40 +0,0 @@
-static IntPtr id_get_AbstractCount;
-static IntPtr id_set_AbstractCount_I;
-public override unsafe int AbstractCount {
- // Metadata.xml XPath method reference: path="/api/package[@name='java.code']/class[@name='MyClass']/method[@name='get_AbstractCount' and count(parameter)=0]"
- [Register ("get_AbstractCount", "()I", "Getget_AbstractCountHandler")]
- get {
- if (id_get_AbstractCount == IntPtr.Zero)
- id_get_AbstractCount = JNIEnv.GetMethodID (class_ref, "get_AbstractCount", "()I");
- try {
- return JNIEnv.CallIntMethod (((global::Java.Lang.Object) this).Handle, id_get_AbstractCount);
- } finally {
- }
- }
- // Metadata.xml XPath method reference: path="/api/package[@name='java.code']/class[@name='MyClass']/method[@name='set_AbstractCount' and count(parameter)=1 and parameter[1][@type='int']]"
- [Register ("set_AbstractCount", "(I)V", "Getset_AbstractCount_IHandler")]
- set {
- if (id_set_AbstractCount_I == IntPtr.Zero)
- id_set_AbstractCount_I = JNIEnv.GetMethodID (class_ref, "set_AbstractCount", "(I)V");
- try {
- JValue* __args = stackalloc JValue [1];
- __args [0] = new JValue (value);
- JNIEnv.CallVoidMethod (((global::Java.Lang.Object) this).Handle, id_set_AbstractCount_I, __args);
- } finally {
- }
- }
-}
-
-static IntPtr id_AbstractMethod;
-// Metadata.xml XPath method reference: path="/api/package[@name='java.code']/class[@name='MyClass']/method[@name='AbstractMethod' and count(parameter)=0]"
-[Register ("AbstractMethod", "()V", "GetAbstractMethodHandler")]
-public override unsafe void AbstractMethod ()
-{
- if (id_AbstractMethod == IntPtr.Zero)
- id_AbstractMethod = JNIEnv.GetMethodID (class_ref, "AbstractMethod", "()V");
- try {
- JNIEnv.CallVoidMethod (((global::Java.Lang.Object) this).Handle, id_AbstractMethod);
- } finally {
- }
-}
-
diff --git a/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteClassMethodInvokers.txt b/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteClassMethodInvokers.txt
deleted file mode 100644
index ac99a7980..000000000
--- a/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteClassMethodInvokers.txt
+++ /dev/null
@@ -1,13 +0,0 @@
-static IntPtr id_AbstractMethod;
-// Metadata.xml XPath method reference: path="/api/package[@name='java.code']/class[@name='MyClass']/method[@name='AbstractMethod' and count(parameter)=0]"
-[Register ("AbstractMethod", "()V", "GetAbstractMethodHandler")]
-public override unsafe void AbstractMethod ()
-{
- if (id_AbstractMethod == IntPtr.Zero)
- id_AbstractMethod = JNIEnv.GetMethodID (class_ref, "AbstractMethod", "()V");
- try {
- JNIEnv.CallVoidMethod (((global::Java.Lang.Object) this).Handle, id_AbstractMethod);
- } finally {
- }
-}
-
diff --git a/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteClassMethodInvokersWithSkips.txt b/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteClassMethodInvokersWithSkips.txt
deleted file mode 100644
index ac99a7980..000000000
--- a/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteClassMethodInvokersWithSkips.txt
+++ /dev/null
@@ -1,13 +0,0 @@
-static IntPtr id_AbstractMethod;
-// Metadata.xml XPath method reference: path="/api/package[@name='java.code']/class[@name='MyClass']/method[@name='AbstractMethod' and count(parameter)=0]"
-[Register ("AbstractMethod", "()V", "GetAbstractMethodHandler")]
-public override unsafe void AbstractMethod ()
-{
- if (id_AbstractMethod == IntPtr.Zero)
- id_AbstractMethod = JNIEnv.GetMethodID (class_ref, "AbstractMethod", "()V");
- try {
- JNIEnv.CallVoidMethod (((global::Java.Lang.Object) this).Handle, id_AbstractMethod);
- } finally {
- }
-}
-
diff --git a/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteClassMethods.txt b/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteClassMethods.txt
deleted file mode 100644
index 01ed620c5..000000000
--- a/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteClassMethods.txt
+++ /dev/null
@@ -1,107 +0,0 @@
-static Delegate cb_GetCountForKey_Ljava_lang_String_;
-#pragma warning disable 0169
-static Delegate GetGetCountForKey_Ljava_lang_String_Handler ()
-{
- if (cb_GetCountForKey_Ljava_lang_String_ == null)
- cb_GetCountForKey_Ljava_lang_String_ = JNINativeWrapper.CreateDelegate ((_JniMarshal_PPL_I) n_GetCountForKey_Ljava_lang_String_);
- return cb_GetCountForKey_Ljava_lang_String_;
-}
-
-static int n_GetCountForKey_Ljava_lang_String_ (IntPtr jnienv, IntPtr native__this, IntPtr native_key)
-{
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- var key = JNIEnv.GetString (native_key, JniHandleOwnership.DoNotTransfer);
- int __ret = __this.GetCountForKey (key);
- return __ret;
-}
-#pragma warning restore 0169
-
-static IntPtr id_GetCountForKey_Ljava_lang_String_;
-// Metadata.xml XPath method reference: path="/api/package[@name='java.code']/class[@name='MyClass']/method[@name='GetCountForKey' and count(parameter)=1 and parameter[1][@type='java.lang.String']]"
-[Register ("GetCountForKey", "(Ljava/lang/String;)I", "GetGetCountForKey_Ljava_lang_String_Handler")]
-public virtual unsafe int GetCountForKey (string key)
-{
- if (id_GetCountForKey_Ljava_lang_String_ == IntPtr.Zero)
- id_GetCountForKey_Ljava_lang_String_ = JNIEnv.GetMethodID (class_ref, "GetCountForKey", "(Ljava/lang/String;)I");
- IntPtr native_key = JNIEnv.NewString ((string)key);
- try {
- JValue* __args = stackalloc JValue [1];
- __args [0] = new JValue (native_key);
-
- int __ret;
- if (((object) this).GetType () == ThresholdType)
- __ret = JNIEnv.CallIntMethod (((global::Java.Lang.Object) this).Handle, id_GetCountForKey_Ljava_lang_String_, __args);
- else
- __ret = JNIEnv.CallNonvirtualIntMethod (((global::Java.Lang.Object) this).Handle, ThresholdClass, JNIEnv.GetMethodID (ThresholdClass, "GetCountForKey", "(Ljava/lang/String;)I"), __args);
- return __ret;
- } finally {
- JNIEnv.DeleteLocalRef (native_key);
- }
-}
-
-static Delegate cb_Key;
-#pragma warning disable 0169
-static Delegate GetKeyHandler ()
-{
- if (cb_Key == null)
- cb_Key = JNINativeWrapper.CreateDelegate ((_JniMarshal_PP_L) n_Key);
- return cb_Key;
-}
-
-static IntPtr n_Key (IntPtr jnienv, IntPtr native__this)
-{
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- return JNIEnv.NewString (__this.Key ());
-}
-#pragma warning restore 0169
-
-static IntPtr id_Key;
-// Metadata.xml XPath method reference: path="/api/package[@name='java.code']/class[@name='MyClass']/method[@name='Key' and count(parameter)=0]"
-[Register ("Key", "()Ljava/lang/String;", "GetKeyHandler")]
-public virtual unsafe string Key ()
-{
- if (id_Key == IntPtr.Zero)
- id_Key = JNIEnv.GetMethodID (class_ref, "Key", "()Ljava/lang/String;");
- try {
-
- if (((object) this).GetType () == ThresholdType)
- return JNIEnv.GetString (JNIEnv.CallObjectMethod (((global::Java.Lang.Object) this).Handle, id_Key), JniHandleOwnership.TransferLocalRef);
- else
- return JNIEnv.GetString (JNIEnv.CallNonvirtualObjectMethod (((global::Java.Lang.Object) this).Handle, ThresholdClass, JNIEnv.GetMethodID (ThresholdClass, "Key", "()Ljava/lang/String;")), JniHandleOwnership.TransferLocalRef);
- } finally {
- }
-}
-
-static IntPtr id_StaticMethod;
-// Metadata.xml XPath method reference: path="/api/package[@name='java.code']/class[@name='MyClass']/method[@name='StaticMethod' and count(parameter)=0]"
-[Register ("StaticMethod", "()V", "")]
-public static unsafe void StaticMethod ()
-{
- if (id_StaticMethod == IntPtr.Zero)
- id_StaticMethod = JNIEnv.GetStaticMethodID (class_ref, "StaticMethod", "()V");
- try {
- JNIEnv.CallStaticVoidMethod (class_ref, id_StaticMethod);
- } finally {
- }
-}
-
-static Delegate cb_AbstractMethod;
-#pragma warning disable 0169
-static Delegate GetAbstractMethodHandler ()
-{
- if (cb_AbstractMethod == null)
- cb_AbstractMethod = JNINativeWrapper.CreateDelegate ((_JniMarshal_PP_V) n_AbstractMethod);
- return cb_AbstractMethod;
-}
-
-static void n_AbstractMethod (IntPtr jnienv, IntPtr native__this)
-{
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- __this.AbstractMethod ();
-}
-#pragma warning restore 0169
-
-// Metadata.xml XPath method reference: path="/api/package[@name='java.code']/class[@name='MyClass']/method[@name='AbstractMethod' and count(parameter)=0]"
-[Register ("AbstractMethod", "()V", "GetAbstractMethodHandler")]
-public abstract void AbstractMethod ();
-
diff --git a/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteClassProperties.txt b/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteClassProperties.txt
deleted file mode 100644
index 0774dda29..000000000
--- a/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteClassProperties.txt
+++ /dev/null
@@ -1,203 +0,0 @@
-static Delegate cb_get_Count;
-#pragma warning disable 0169
-static Delegate Getget_CountHandler ()
-{
- if (cb_get_Count == null)
- cb_get_Count = JNINativeWrapper.CreateDelegate ((_JniMarshal_PP_I) n_get_Count);
- return cb_get_Count;
-}
-
-static int n_get_Count (IntPtr jnienv, IntPtr native__this)
-{
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- return __this.Count;
-}
-#pragma warning restore 0169
-
-static Delegate cb_set_Count_I;
-#pragma warning disable 0169
-static Delegate Getset_Count_IHandler ()
-{
- if (cb_set_Count_I == null)
- cb_set_Count_I = JNINativeWrapper.CreateDelegate ((_JniMarshal_PPI_V) n_set_Count_I);
- return cb_set_Count_I;
-}
-
-static void n_set_Count_I (IntPtr jnienv, IntPtr native__this, int value)
-{
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- __this.Count = value;
-}
-#pragma warning restore 0169
-
-static IntPtr id_get_Count;
-static IntPtr id_set_Count_I;
-public virtual unsafe int Count {
- // Metadata.xml XPath method reference: path="/api/package[@name='java.code']/class[@name='MyClass']/method[@name='get_Count' and count(parameter)=0]"
- [Register ("get_Count", "()I", "Getget_CountHandler")]
- get {
- if (id_get_Count == IntPtr.Zero)
- id_get_Count = JNIEnv.GetMethodID (class_ref, "get_Count", "()I");
- try {
-
- if (((object) this).GetType () == ThresholdType)
- return JNIEnv.CallIntMethod (((global::Java.Lang.Object) this).Handle, id_get_Count);
- else
- return JNIEnv.CallNonvirtualIntMethod (((global::Java.Lang.Object) this).Handle, ThresholdClass, JNIEnv.GetMethodID (ThresholdClass, "get_Count", "()I"));
- } finally {
- }
- }
- // Metadata.xml XPath method reference: path="/api/package[@name='java.code']/class[@name='MyClass']/method[@name='set_Count' and count(parameter)=1 and parameter[1][@type='int']]"
- [Register ("set_Count", "(I)V", "Getset_Count_IHandler")]
- set {
- if (id_set_Count_I == IntPtr.Zero)
- id_set_Count_I = JNIEnv.GetMethodID (class_ref, "set_Count", "(I)V");
- try {
- JValue* __args = stackalloc JValue [1];
- __args [0] = new JValue (value);
-
- if (((object) this).GetType () == ThresholdType)
- JNIEnv.CallVoidMethod (((global::Java.Lang.Object) this).Handle, id_set_Count_I, __args);
- else
- JNIEnv.CallNonvirtualVoidMethod (((global::Java.Lang.Object) this).Handle, ThresholdClass, JNIEnv.GetMethodID (ThresholdClass, "set_Count", "(I)V"), __args);
- } finally {
- }
- }
-}
-
-static Delegate cb_get_Key;
-#pragma warning disable 0169
-static Delegate Getget_KeyHandler ()
-{
- if (cb_get_Key == null)
- cb_get_Key = JNINativeWrapper.CreateDelegate ((_JniMarshal_PP_L) n_get_Key);
- return cb_get_Key;
-}
-
-static IntPtr n_get_Key (IntPtr jnienv, IntPtr native__this)
-{
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- return JNIEnv.NewString (__this.Key);
-}
-#pragma warning restore 0169
-
-static Delegate cb_set_Key_Ljava_lang_String_;
-#pragma warning disable 0169
-static Delegate Getset_Key_Ljava_lang_String_Handler ()
-{
- if (cb_set_Key_Ljava_lang_String_ == null)
- cb_set_Key_Ljava_lang_String_ = JNINativeWrapper.CreateDelegate ((_JniMarshal_PPL_V) n_set_Key_Ljava_lang_String_);
- return cb_set_Key_Ljava_lang_String_;
-}
-
-static void n_set_Key_Ljava_lang_String_ (IntPtr jnienv, IntPtr native__this, IntPtr native_value)
-{
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- var value = JNIEnv.GetString (native_value, JniHandleOwnership.DoNotTransfer);
- __this.Key = value;
-}
-#pragma warning restore 0169
-
-static IntPtr id_get_Key;
-static IntPtr id_set_Key_Ljava_lang_String_;
-public virtual unsafe string Key {
- // Metadata.xml XPath method reference: path="/api/package[@name='java.code']/class[@name='MyClass']/method[@name='get_Key' and count(parameter)=0]"
- [Register ("get_Key", "()Ljava/lang/String;", "Getget_KeyHandler")]
- get {
- if (id_get_Key == IntPtr.Zero)
- id_get_Key = JNIEnv.GetMethodID (class_ref, "get_Key", "()Ljava/lang/String;");
- try {
-
- if (((object) this).GetType () == ThresholdType)
- return JNIEnv.GetString (JNIEnv.CallObjectMethod (((global::Java.Lang.Object) this).Handle, id_get_Key), JniHandleOwnership.TransferLocalRef);
- else
- return JNIEnv.GetString (JNIEnv.CallNonvirtualObjectMethod (((global::Java.Lang.Object) this).Handle, ThresholdClass, JNIEnv.GetMethodID (ThresholdClass, "get_Key", "()Ljava/lang/String;")), JniHandleOwnership.TransferLocalRef);
- } finally {
- }
- }
- // Metadata.xml XPath method reference: path="/api/package[@name='java.code']/class[@name='MyClass']/method[@name='set_Key' and count(parameter)=1 and parameter[1][@type='java.lang.String']]"
- [Register ("set_Key", "(Ljava/lang/String;)V", "Getset_Key_Ljava_lang_String_Handler")]
- set {
- if (id_set_Key_Ljava_lang_String_ == IntPtr.Zero)
- id_set_Key_Ljava_lang_String_ = JNIEnv.GetMethodID (class_ref, "set_Key", "(Ljava/lang/String;)V");
- IntPtr native_value = JNIEnv.NewString ((string)value);
- try {
- JValue* __args = stackalloc JValue [1];
- __args [0] = new JValue (native_value);
-
- if (((object) this).GetType () == ThresholdType)
- JNIEnv.CallVoidMethod (((global::Java.Lang.Object) this).Handle, id_set_Key_Ljava_lang_String_, __args);
- else
- JNIEnv.CallNonvirtualVoidMethod (((global::Java.Lang.Object) this).Handle, ThresholdClass, JNIEnv.GetMethodID (ThresholdClass, "set_Key", "(Ljava/lang/String;)V"), __args);
- } finally {
- JNIEnv.DeleteLocalRef (native_value);
- }
- }
-}
-
-static IntPtr id_get_StaticCount;
-static IntPtr id_set_StaticCount_I;
-public static unsafe int StaticCount {
- // Metadata.xml XPath method reference: path="/api/package[@name='java.code']/class[@name='MyClass']/method[@name='get_StaticCount' and count(parameter)=0]"
- [Register ("get_StaticCount", "()I", "")]
- get {
- if (id_get_StaticCount == IntPtr.Zero)
- id_get_StaticCount = JNIEnv.GetStaticMethodID (class_ref, "get_StaticCount", "()I");
- try {
- return JNIEnv.CallStaticIntMethod (class_ref, id_get_StaticCount);
- } finally {
- }
- }
- // Metadata.xml XPath method reference: path="/api/package[@name='java.code']/class[@name='MyClass']/method[@name='set_StaticCount' and count(parameter)=1 and parameter[1][@type='int']]"
- [Register ("set_StaticCount", "(I)V", "")]
- set {
- if (id_set_StaticCount_I == IntPtr.Zero)
- id_set_StaticCount_I = JNIEnv.GetStaticMethodID (class_ref, "set_StaticCount", "(I)V");
- try {
- JValue* __args = stackalloc JValue [1];
- __args [0] = new JValue (value);
- JNIEnv.CallStaticVoidMethod (class_ref, id_set_StaticCount_I, __args);
- } finally {
- }
- }
-}
-
-static Delegate cb_get_AbstractCount;
-#pragma warning disable 0169
-static Delegate Getget_AbstractCountHandler ()
-{
- if (cb_get_AbstractCount == null)
- cb_get_AbstractCount = JNINativeWrapper.CreateDelegate ((_JniMarshal_PP_I) n_get_AbstractCount);
- return cb_get_AbstractCount;
-}
-
-static int n_get_AbstractCount (IntPtr jnienv, IntPtr native__this)
-{
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- return __this.AbstractCount;
-}
-#pragma warning restore 0169
-
-static Delegate cb_set_AbstractCount_I;
-#pragma warning disable 0169
-static Delegate Getset_AbstractCount_IHandler ()
-{
- if (cb_set_AbstractCount_I == null)
- cb_set_AbstractCount_I = JNINativeWrapper.CreateDelegate ((_JniMarshal_PPI_V) n_set_AbstractCount_I);
- return cb_set_AbstractCount_I;
-}
-
-static void n_set_AbstractCount_I (IntPtr jnienv, IntPtr native__this, int value)
-{
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- __this.AbstractCount = value;
-}
-#pragma warning restore 0169
-
-public abstract int AbstractCount {
- // Metadata.xml XPath method reference: path="/api/package[@name='java.code']/class[@name='MyClass']/method[@name='get_AbstractCount' and count(parameter)=0]"
- [Register ("get_AbstractCount", "()I", "Getget_AbstractCountHandler")] get;
- // Metadata.xml XPath method reference: path="/api/package[@name='java.code']/class[@name='MyClass']/method[@name='set_AbstractCount' and count(parameter)=1 and parameter[1][@type='int']]"
- [Register ("set_AbstractCount", "(I)V", "Getset_AbstractCount_IHandler")] set;
-}
-
diff --git a/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteClassPropertyInvokers.txt b/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteClassPropertyInvokers.txt
deleted file mode 100644
index 06dcb4711..000000000
--- a/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteClassPropertyInvokers.txt
+++ /dev/null
@@ -1,27 +0,0 @@
-static IntPtr id_get_AbstractCount;
-static IntPtr id_set_AbstractCount_I;
-public override unsafe int AbstractCount {
- // Metadata.xml XPath method reference: path="/api/package[@name='java.code']/class[@name='MyClass']/method[@name='get_AbstractCount' and count(parameter)=0]"
- [Register ("get_AbstractCount", "()I", "Getget_AbstractCountHandler")]
- get {
- if (id_get_AbstractCount == IntPtr.Zero)
- id_get_AbstractCount = JNIEnv.GetMethodID (class_ref, "get_AbstractCount", "()I");
- try {
- return JNIEnv.CallIntMethod (((global::Java.Lang.Object) this).Handle, id_get_AbstractCount);
- } finally {
- }
- }
- // Metadata.xml XPath method reference: path="/api/package[@name='java.code']/class[@name='MyClass']/method[@name='set_AbstractCount' and count(parameter)=1 and parameter[1][@type='int']]"
- [Register ("set_AbstractCount", "(I)V", "Getset_AbstractCount_IHandler")]
- set {
- if (id_set_AbstractCount_I == IntPtr.Zero)
- id_set_AbstractCount_I = JNIEnv.GetMethodID (class_ref, "set_AbstractCount", "(I)V");
- try {
- JValue* __args = stackalloc JValue [1];
- __args [0] = new JValue (value);
- JNIEnv.CallVoidMethod (((global::Java.Lang.Object) this).Handle, id_set_AbstractCount_I, __args);
- } finally {
- }
- }
-}
-
diff --git a/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteClassPropertyInvokersWithSkips.txt b/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteClassPropertyInvokersWithSkips.txt
deleted file mode 100644
index 06dcb4711..000000000
--- a/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteClassPropertyInvokersWithSkips.txt
+++ /dev/null
@@ -1,27 +0,0 @@
-static IntPtr id_get_AbstractCount;
-static IntPtr id_set_AbstractCount_I;
-public override unsafe int AbstractCount {
- // Metadata.xml XPath method reference: path="/api/package[@name='java.code']/class[@name='MyClass']/method[@name='get_AbstractCount' and count(parameter)=0]"
- [Register ("get_AbstractCount", "()I", "Getget_AbstractCountHandler")]
- get {
- if (id_get_AbstractCount == IntPtr.Zero)
- id_get_AbstractCount = JNIEnv.GetMethodID (class_ref, "get_AbstractCount", "()I");
- try {
- return JNIEnv.CallIntMethod (((global::Java.Lang.Object) this).Handle, id_get_AbstractCount);
- } finally {
- }
- }
- // Metadata.xml XPath method reference: path="/api/package[@name='java.code']/class[@name='MyClass']/method[@name='set_AbstractCount' and count(parameter)=1 and parameter[1][@type='int']]"
- [Register ("set_AbstractCount", "(I)V", "Getset_AbstractCount_IHandler")]
- set {
- if (id_set_AbstractCount_I == IntPtr.Zero)
- id_set_AbstractCount_I = JNIEnv.GetMethodID (class_ref, "set_AbstractCount", "(I)V");
- try {
- JValue* __args = stackalloc JValue [1];
- __args [0] = new JValue (value);
- JNIEnv.CallVoidMethod (((global::Java.Lang.Object) this).Handle, id_set_AbstractCount_I, __args);
- } finally {
- }
- }
-}
-
diff --git a/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteConstSugarInterfaceFields.txt b/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteConstSugarInterfaceFields.txt
deleted file mode 100644
index fe8fb5d7e..000000000
--- a/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteConstSugarInterfaceFields.txt
+++ /dev/null
@@ -1,18 +0,0 @@
-// Metadata.xml XPath interface reference: path="/api/package[@name='java.code']/interface[@name='IMyInterface']"
-public partial interface IMyInterface {
-
- // Metadata.xml XPath field reference: path="/api/package[@name='java.code']/interface[@name='IMyInterface']/field[@name='MyConstantField']"
- [Register ("MyConstantField")]
- public const int MyConstantField = (int) 7;
-
- // Metadata.xml XPath field reference: path="/api/package[@name='java.code']/interface[@name='IMyInterface']/field[@name='MyConstantStringField']"
- [Register ("MyConstantStringField")]
- public const string MyConstantStringField = (string) "hello";
-
- // Metadata.xml XPath field reference: path="/api/package[@name='java.code']/interface[@name='IMyInterface']/field[@name='MyDeprecatedField']"
- [Register ("MyDeprecatedField")]
- [Obsolete ("")]
- public const int MyDeprecatedField = (int) 7;
-
-}
-
diff --git a/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteCtor.txt b/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteCtor.txt
deleted file mode 100644
index a5259f4c6..000000000
--- a/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteCtor.txt
+++ /dev/null
@@ -1,28 +0,0 @@
-static IntPtr id_ctor;
-// Metadata.xml XPath constructor reference: path="/api/package[@name='com.mypackage']/class[@name='foo']/constructor[@name='foo' and count(parameter)=0]"
-[Register (".ctor", "", "")]
- unsafe Object ()
- : base (IntPtr.Zero, JniHandleOwnership.DoNotTransfer)
-{
- if (((global::Java.Lang.Object) this).Handle != IntPtr.Zero)
- return;
-
- try {
- if (((object) this).GetType () != typeof (Object)) {
- SetHandle (
- global::Android.Runtime.JNIEnv.StartCreateInstance (((object) this).GetType (), ""),
- JniHandleOwnership.TransferLocalRef);
- global::Android.Runtime.JNIEnv.FinishCreateInstance (((global::Java.Lang.Object) this).Handle, "");
- return;
- }
-
- if (id_ctor == IntPtr.Zero)
- id_ctor = JNIEnv.GetMethodID (class_ref, "", "");
- SetHandle (
- global::Android.Runtime.JNIEnv.StartCreateInstance (class_ref, id_ctor),
- JniHandleOwnership.TransferLocalRef);
- JNIEnv.FinishCreateInstance (((global::Java.Lang.Object) this).Handle, class_ref, id_ctor);
- } finally {
- }
-}
-
diff --git a/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteCtorDeprecated.txt b/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteCtorDeprecated.txt
deleted file mode 100644
index de93a253a..000000000
--- a/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteCtorDeprecated.txt
+++ /dev/null
@@ -1,31 +0,0 @@
-static IntPtr id_ctor;
-// Metadata.xml XPath constructor reference: path="/api/package[@name='com.mypackage']/class[@name='foo']/constructor[@name='foo' and count(parameter)=0]"
-[Register (".ctor", "", "")]
-[Obsolete (@"This constructor is obsolete")]
-[MyAttribute]
-[global::Android.Runtime.IntDefinition (null, JniField = "xamarin/test/SomeObject.SOME_VALUE")]
- unsafe Object ()
- : base (IntPtr.Zero, JniHandleOwnership.DoNotTransfer)
-{
- if (((global::Java.Lang.Object) this).Handle != IntPtr.Zero)
- return;
-
- try {
- if (((object) this).GetType () != typeof (Object)) {
- SetHandle (
- global::Android.Runtime.JNIEnv.StartCreateInstance (((object) this).GetType (), ""),
- JniHandleOwnership.TransferLocalRef);
- global::Android.Runtime.JNIEnv.FinishCreateInstance (((global::Java.Lang.Object) this).Handle, "");
- return;
- }
-
- if (id_ctor == IntPtr.Zero)
- id_ctor = JNIEnv.GetMethodID (class_ref, "", "");
- SetHandle (
- global::Android.Runtime.JNIEnv.StartCreateInstance (class_ref, id_ctor),
- JniHandleOwnership.TransferLocalRef);
- JNIEnv.FinishCreateInstance (((global::Java.Lang.Object) this).Handle, class_ref, id_ctor);
- } finally {
- }
-}
-
diff --git a/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteCtorWithStringOverload.txt b/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteCtorWithStringOverload.txt
deleted file mode 100644
index cb1bddef9..000000000
--- a/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteCtorWithStringOverload.txt
+++ /dev/null
@@ -1,62 +0,0 @@
-static IntPtr id_ctor_Ljava_lang_CharSequence_;
-// Metadata.xml XPath constructor reference: path="/api/package[@name='com.mypackage']/class[@name='foo']/constructor[@name='foo' and count(parameter)=1 and parameter[1][@type='java.lang.CharSequence']]"
-[Register (".ctor", "(Ljava/lang/CharSequence;)V", "")]
- unsafe Object (Java.Lang.ICharSequence mystring)
- : base (IntPtr.Zero, JniHandleOwnership.DoNotTransfer)
-{
- if (((global::Java.Lang.Object) this).Handle != IntPtr.Zero)
- return;
-
- IntPtr native_mystring = CharSequence.ToLocalJniHandle (mystring);
- try {
- JValue* __args = stackalloc JValue [1];
- __args [0] = new JValue (native_mystring);
- if (((object) this).GetType () != typeof (Object)) {
- SetHandle (
- global::Android.Runtime.JNIEnv.StartCreateInstance (((object) this).GetType (), "(Ljava/lang/CharSequence;)V", __args),
- JniHandleOwnership.TransferLocalRef);
- global::Android.Runtime.JNIEnv.FinishCreateInstance (((global::Java.Lang.Object) this).Handle, "(Ljava/lang/CharSequence;)V", __args);
- return;
- }
-
- if (id_ctor_Ljava_lang_CharSequence_ == IntPtr.Zero)
- id_ctor_Ljava_lang_CharSequence_ = JNIEnv.GetMethodID (class_ref, "", "(Ljava/lang/CharSequence;)V");
- SetHandle (
- global::Android.Runtime.JNIEnv.StartCreateInstance (class_ref, id_ctor_Ljava_lang_CharSequence_, __args),
- JniHandleOwnership.TransferLocalRef);
- JNIEnv.FinishCreateInstance (((global::Java.Lang.Object) this).Handle, class_ref, id_ctor_Ljava_lang_CharSequence_, __args);
- } finally {
- JNIEnv.DeleteLocalRef (native_mystring);
- }
-}
-
-[Register (".ctor", "(Ljava/lang/CharSequence;)V", "")]
- unsafe Object (string mystring)
- : base (IntPtr.Zero, JniHandleOwnership.DoNotTransfer)
-{
- if (((global::Java.Lang.Object) this).Handle != IntPtr.Zero)
- return;
-
- IntPtr native_mystring = CharSequence.ToLocalJniHandle (mystring);
- try {
- JValue* __args = stackalloc JValue [1];
- __args [0] = new JValue (native_mystring);
- if (((object) this).GetType () != typeof (Object)) {
- SetHandle (
- global::Android.Runtime.JNIEnv.StartCreateInstance (((object) this).GetType (), "(Ljava/lang/CharSequence;)V", __args),
- JniHandleOwnership.TransferLocalRef);
- global::Android.Runtime.JNIEnv.FinishCreateInstance (((global::Java.Lang.Object) this).Handle, "(Ljava/lang/CharSequence;)V", __args);
- return;
- }
-
- if (id_ctor_Ljava_lang_CharSequence_ == IntPtr.Zero)
- id_ctor_Ljava_lang_CharSequence_ = JNIEnv.GetMethodID (class_ref, "", "(Ljava/lang/CharSequence;)V");
- SetHandle (
- global::Android.Runtime.JNIEnv.StartCreateInstance (class_ref, id_ctor_Ljava_lang_CharSequence_, __args),
- JniHandleOwnership.TransferLocalRef);
- JNIEnv.FinishCreateInstance (((global::Java.Lang.Object) this).Handle, class_ref, id_ctor_Ljava_lang_CharSequence_, __args);
- } finally {
- JNIEnv.DeleteLocalRef (native_mystring);
- }
-}
-
diff --git a/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteFieldConstant.txt b/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteFieldConstant.txt
deleted file mode 100644
index 2606c5621..000000000
--- a/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteFieldConstant.txt
+++ /dev/null
@@ -1,12 +0,0 @@
-static IntPtr bar_jfieldId;
-
-// Metadata.xml XPath field reference: path="/api/package[@name='com.mypackage']/class[@name='foo']/field[@name='bar']"
-[Register ("bar")]
-public static string bar {
- get {
- if (bar_jfieldId == IntPtr.Zero)
- bar_jfieldId = JNIEnv.GetStaticFieldID (class_ref, "bar", "Ljava/lang/String;");
- IntPtr __ret = JNIEnv.GetStaticObjectField (class_ref, bar_jfieldId);
- return JNIEnv.GetString (__ret, JniHandleOwnership.TransferLocalRef);
- }
-}
diff --git a/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteFieldConstantWithIntValue.txt b/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteFieldConstantWithIntValue.txt
deleted file mode 100644
index a1f3257f0..000000000
--- a/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteFieldConstantWithIntValue.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-// Metadata.xml XPath field reference: path="/api/package[@name='com.mypackage']/class[@name='foo']/field[@name='bar']"
-[Register ("bar")]
-public const int bar = (int) 1234;
diff --git a/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteFieldConstantWithStringValue.txt b/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteFieldConstantWithStringValue.txt
deleted file mode 100644
index 1e7186b00..000000000
--- a/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteFieldConstantWithStringValue.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-// Metadata.xml XPath field reference: path="/api/package[@name='com.mypackage']/class[@name='foo']/field[@name='bar']"
-[Register ("bar")]
-public const string bar = (string) "hello";
diff --git a/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteFieldGetBody.txt b/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteFieldGetBody.txt
deleted file mode 100644
index f80140f8f..000000000
--- a/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteFieldGetBody.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-if (bar_jfieldId == IntPtr.Zero)
- bar_jfieldId = JNIEnv.GetFieldID (class_ref, "bar", "Ljava/lang/String;");
-IntPtr __ret = JNIEnv.GetObjectField (((global::Java.Lang.Object) this).Handle, bar_jfieldId);
-return JNIEnv.GetString (__ret, JniHandleOwnership.TransferLocalRef);
diff --git a/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteFieldIdField.txt b/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteFieldIdField.txt
deleted file mode 100644
index a4d61e9bd..000000000
--- a/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteFieldIdField.txt
+++ /dev/null
@@ -1 +0,0 @@
-static IntPtr bar_jfieldId;
diff --git a/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteFieldInt.txt b/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteFieldInt.txt
deleted file mode 100644
index 3715acfa8..000000000
--- a/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteFieldInt.txt
+++ /dev/null
@@ -1,19 +0,0 @@
-static IntPtr bar_jfieldId;
-
-// Metadata.xml XPath field reference: path="/api/package[@name='com.mypackage']/class[@name='foo']/field[@name='bar']"
-[Register ("bar")]
-public int bar {
- get {
- if (bar_jfieldId == IntPtr.Zero)
- bar_jfieldId = JNIEnv.GetFieldID (class_ref, "bar", "I");
- return JNIEnv.GetIntField (((global::Java.Lang.Object) this).Handle, bar_jfieldId);
- }
- set {
- if (bar_jfieldId == IntPtr.Zero)
- bar_jfieldId = JNIEnv.GetFieldID (class_ref, "bar", "I");
- try {
- JNIEnv.SetField (((global::Java.Lang.Object) this).Handle, bar_jfieldId, value);
- } finally {
- }
- }
-}
diff --git a/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteFieldSetBody.txt b/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteFieldSetBody.txt
deleted file mode 100644
index bf10c288b..000000000
--- a/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteFieldSetBody.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-if (bar_jfieldId == IntPtr.Zero)
- bar_jfieldId = JNIEnv.GetFieldID (class_ref, "bar", "Ljava/lang/String;");
-IntPtr native_value = JNIEnv.NewString ((string)value);
-try {
- JNIEnv.SetField (((global::Java.Lang.Object) this).Handle, bar_jfieldId, native_value);
-} finally {
- JNIEnv.DeleteLocalRef (native_value);
-}
diff --git a/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteFieldString.txt b/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteFieldString.txt
deleted file mode 100644
index 62e2046b2..000000000
--- a/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteFieldString.txt
+++ /dev/null
@@ -1,22 +0,0 @@
-static IntPtr bar_jfieldId;
-
-// Metadata.xml XPath field reference: path="/api/package[@name='com.mypackage']/class[@name='foo']/field[@name='bar']"
-[Register ("bar")]
-public string bar {
- get {
- if (bar_jfieldId == IntPtr.Zero)
- bar_jfieldId = JNIEnv.GetFieldID (class_ref, "bar", "Ljava/lang/String;");
- IntPtr __ret = JNIEnv.GetObjectField (((global::Java.Lang.Object) this).Handle, bar_jfieldId);
- return JNIEnv.GetString (__ret, JniHandleOwnership.TransferLocalRef);
- }
- set {
- if (bar_jfieldId == IntPtr.Zero)
- bar_jfieldId = JNIEnv.GetFieldID (class_ref, "bar", "Ljava/lang/String;");
- IntPtr native_value = JNIEnv.NewString ((string)value);
- try {
- JNIEnv.SetField (((global::Java.Lang.Object) this).Handle, bar_jfieldId, native_value);
- } finally {
- JNIEnv.DeleteLocalRef (native_value);
- }
- }
-}
diff --git a/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteInterface.txt b/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteInterface.txt
deleted file mode 100644
index cff9a6b9b..000000000
--- a/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteInterface.txt
+++ /dev/null
@@ -1,345 +0,0 @@
-[Register ("java/code/IMyInterface", DoNotGenerateAcw=true)]
-public abstract class MyInterface : Java.Lang.Object {
-
- internal MyInterface ()
- {
- }
- static IntPtr id_StaticMethod;
- // Metadata.xml XPath method reference: path="/api/package[@name='java.code']/interface[@name='IMyInterface']/method[@name='StaticMethod' and count(parameter)=0]"
- [Register ("StaticMethod", "()V", "")]
- public static unsafe void StaticMethod ()
- {
- if (id_StaticMethod == IntPtr.Zero)
- id_StaticMethod = JNIEnv.GetStaticMethodID (class_ref, "StaticMethod", "()V");
- try {
- JNIEnv.CallStaticVoidMethod (class_ref, id_StaticMethod);
- } finally {
- }
- }
-
-
- new static IntPtr class_ref = JNIEnv.FindClass ("java/code/IMyInterface");
-}
-
-[Register ("java/code/IMyInterface", DoNotGenerateAcw=true)]
-[global::System.Obsolete ("Use the 'MyInterface' type. This type will be removed in a future release.", error: true)]
-public abstract class MyInterfaceConsts : MyInterface {
-
- private MyInterfaceConsts ()
- {
- }
-}
-
-// Metadata.xml XPath interface reference: path="/api/package[@name='java.code']/interface[@name='IMyInterface']"
-[Register ("java/code/IMyInterface", "", "java.code.IMyInterfaceInvoker")]
-public partial interface IMyInterface : IJavaObject {
-
- int Count {
- // Metadata.xml XPath method reference: path="/api/package[@name='java.code']/interface[@name='IMyInterface']/method[@name='get_Count' and count(parameter)=0]"
- [Register ("get_Count", "()I", "Getget_CountHandler:java.code.IMyInterfaceInvoker, ")] get;
- // Metadata.xml XPath method reference: path="/api/package[@name='java.code']/interface[@name='IMyInterface']/method[@name='set_Count' and count(parameter)=1 and parameter[1][@type='int']]"
- [Register ("set_Count", "(I)V", "Getset_Count_IHandler:java.code.IMyInterfaceInvoker, ")] set;
- }
-
- string Key {
- // Metadata.xml XPath method reference: path="/api/package[@name='java.code']/interface[@name='IMyInterface']/method[@name='get_Key' and count(parameter)=0]"
- [Register ("get_Key", "()Ljava/lang/String;", "Getget_KeyHandler:java.code.IMyInterfaceInvoker, ")] get;
- // Metadata.xml XPath method reference: path="/api/package[@name='java.code']/interface[@name='IMyInterface']/method[@name='set_Key' and count(parameter)=1 and parameter[1][@type='java.lang.String']]"
- [Register ("set_Key", "(Ljava/lang/String;)V", "Getset_Key_Ljava_lang_String_Handler:java.code.IMyInterfaceInvoker, ")] set;
- }
-
- int AbstractCount {
- // Metadata.xml XPath method reference: path="/api/package[@name='java.code']/interface[@name='IMyInterface']/method[@name='get_AbstractCount' and count(parameter)=0]"
- [Register ("get_AbstractCount", "()I", "Getget_AbstractCountHandler:java.code.IMyInterfaceInvoker, ")] get;
- // Metadata.xml XPath method reference: path="/api/package[@name='java.code']/interface[@name='IMyInterface']/method[@name='set_AbstractCount' and count(parameter)=1 and parameter[1][@type='int']]"
- [Register ("set_AbstractCount", "(I)V", "Getset_AbstractCount_IHandler:java.code.IMyInterfaceInvoker, ")] set;
- }
-
- // Metadata.xml XPath method reference: path="/api/package[@name='java.code']/interface[@name='IMyInterface']/method[@name='GetCountForKey' and count(parameter)=1 and parameter[1][@type='java.lang.String']]"
- [Register ("GetCountForKey", "(Ljava/lang/String;)I", "GetGetCountForKey_Ljava_lang_String_Handler:java.code.IMyInterfaceInvoker, ")]
- int GetCountForKey (string key);
-
- // Metadata.xml XPath method reference: path="/api/package[@name='java.code']/interface[@name='IMyInterface']/method[@name='Key' and count(parameter)=0]"
- [Register ("Key", "()Ljava/lang/String;", "GetKeyHandler:java.code.IMyInterfaceInvoker, ")]
- string Key ();
-
- // Metadata.xml XPath method reference: path="/api/package[@name='java.code']/interface[@name='IMyInterface']/method[@name='AbstractMethod' and count(parameter)=0]"
- [Register ("AbstractMethod", "()V", "GetAbstractMethodHandler:java.code.IMyInterfaceInvoker, ")]
- void AbstractMethod ();
-
-}
-
-[global::Android.Runtime.Register ("java/code/IMyInterface", DoNotGenerateAcw=true)]
-internal partial class IMyInterfaceInvoker : global::Java.Lang.Object, IMyInterface {
-
- static IntPtr java_class_ref = JNIEnv.FindClass ("java/code/IMyInterface");
-
- protected override IntPtr ThresholdClass {
- get { return class_ref; }
- }
-
- protected override global::System.Type ThresholdType {
- get { return typeof (IMyInterfaceInvoker); }
- }
-
- IntPtr class_ref;
-
- public static IMyInterface GetObject (IntPtr handle, JniHandleOwnership transfer)
- {
- return global::Java.Lang.Object.GetObject (handle, transfer);
- }
-
- static IntPtr Validate (IntPtr handle)
- {
- if (!JNIEnv.IsInstanceOf (handle, java_class_ref))
- throw new InvalidCastException (string.Format ("Unable to convert instance of type '{0}' to type '{1}'.",
- JNIEnv.GetClassNameFromInstance (handle), "java.code.IMyInterface"));
- return handle;
- }
-
- protected override void Dispose (bool disposing)
- {
- if (this.class_ref != IntPtr.Zero)
- JNIEnv.DeleteGlobalRef (this.class_ref);
- this.class_ref = IntPtr.Zero;
- base.Dispose (disposing);
- }
-
- public IMyInterfaceInvoker (IntPtr handle, JniHandleOwnership transfer) : base (Validate (handle), transfer)
- {
- IntPtr local_ref = JNIEnv.GetObjectClass (((global::Java.Lang.Object) this).Handle);
- this.class_ref = JNIEnv.NewGlobalRef (local_ref);
- JNIEnv.DeleteLocalRef (local_ref);
- }
-
- static Delegate cb_get_Count;
-#pragma warning disable 0169
- static Delegate Getget_CountHandler ()
- {
- if (cb_get_Count == null)
- cb_get_Count = JNINativeWrapper.CreateDelegate ((_JniMarshal_PP_I) n_get_Count);
- return cb_get_Count;
- }
-
- static int n_get_Count (IntPtr jnienv, IntPtr native__this)
- {
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- return __this.Count;
- }
-#pragma warning restore 0169
-
- static Delegate cb_set_Count_I;
-#pragma warning disable 0169
- static Delegate Getset_Count_IHandler ()
- {
- if (cb_set_Count_I == null)
- cb_set_Count_I = JNINativeWrapper.CreateDelegate ((_JniMarshal_PPI_V) n_set_Count_I);
- return cb_set_Count_I;
- }
-
- static void n_set_Count_I (IntPtr jnienv, IntPtr native__this, int value)
- {
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- __this.Count = value;
- }
-#pragma warning restore 0169
-
- IntPtr id_get_Count;
- IntPtr id_set_Count_I;
- public unsafe int Count {
- get {
- if (id_get_Count == IntPtr.Zero)
- id_get_Count = JNIEnv.GetMethodID (class_ref, "get_Count", "()I");
- return JNIEnv.CallIntMethod (((global::Java.Lang.Object) this).Handle, id_get_Count);
- }
- set {
- if (id_set_Count_I == IntPtr.Zero)
- id_set_Count_I = JNIEnv.GetMethodID (class_ref, "set_Count", "(I)V");
- JValue* __args = stackalloc JValue [1];
- __args [0] = new JValue (value);
- JNIEnv.CallVoidMethod (((global::Java.Lang.Object) this).Handle, id_set_Count_I, __args);
- }
- }
-
- static Delegate cb_get_Key;
-#pragma warning disable 0169
- static Delegate Getget_KeyHandler ()
- {
- if (cb_get_Key == null)
- cb_get_Key = JNINativeWrapper.CreateDelegate ((_JniMarshal_PP_L) n_get_Key);
- return cb_get_Key;
- }
-
- static IntPtr n_get_Key (IntPtr jnienv, IntPtr native__this)
- {
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- return JNIEnv.NewString (__this.Key);
- }
-#pragma warning restore 0169
-
- static Delegate cb_set_Key_Ljava_lang_String_;
-#pragma warning disable 0169
- static Delegate Getset_Key_Ljava_lang_String_Handler ()
- {
- if (cb_set_Key_Ljava_lang_String_ == null)
- cb_set_Key_Ljava_lang_String_ = JNINativeWrapper.CreateDelegate ((_JniMarshal_PPL_V) n_set_Key_Ljava_lang_String_);
- return cb_set_Key_Ljava_lang_String_;
- }
-
- static void n_set_Key_Ljava_lang_String_ (IntPtr jnienv, IntPtr native__this, IntPtr native_value)
- {
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- var value = JNIEnv.GetString (native_value, JniHandleOwnership.DoNotTransfer);
- __this.Key = value;
- }
-#pragma warning restore 0169
-
- IntPtr id_get_Key;
- IntPtr id_set_Key_Ljava_lang_String_;
- public unsafe string Key {
- get {
- if (id_get_Key == IntPtr.Zero)
- id_get_Key = JNIEnv.GetMethodID (class_ref, "get_Key", "()Ljava/lang/String;");
- return JNIEnv.GetString (JNIEnv.CallObjectMethod (((global::Java.Lang.Object) this).Handle, id_get_Key), JniHandleOwnership.TransferLocalRef);
- }
- set {
- if (id_set_Key_Ljava_lang_String_ == IntPtr.Zero)
- id_set_Key_Ljava_lang_String_ = JNIEnv.GetMethodID (class_ref, "set_Key", "(Ljava/lang/String;)V");
- IntPtr native_value = JNIEnv.NewString ((string)value);
- JValue* __args = stackalloc JValue [1];
- __args [0] = new JValue (native_value);
- JNIEnv.CallVoidMethod (((global::Java.Lang.Object) this).Handle, id_set_Key_Ljava_lang_String_, __args);
- JNIEnv.DeleteLocalRef (native_value);
- }
- }
-
- static Delegate cb_get_AbstractCount;
-#pragma warning disable 0169
- static Delegate Getget_AbstractCountHandler ()
- {
- if (cb_get_AbstractCount == null)
- cb_get_AbstractCount = JNINativeWrapper.CreateDelegate ((_JniMarshal_PP_I) n_get_AbstractCount);
- return cb_get_AbstractCount;
- }
-
- static int n_get_AbstractCount (IntPtr jnienv, IntPtr native__this)
- {
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- return __this.AbstractCount;
- }
-#pragma warning restore 0169
-
- static Delegate cb_set_AbstractCount_I;
-#pragma warning disable 0169
- static Delegate Getset_AbstractCount_IHandler ()
- {
- if (cb_set_AbstractCount_I == null)
- cb_set_AbstractCount_I = JNINativeWrapper.CreateDelegate ((_JniMarshal_PPI_V) n_set_AbstractCount_I);
- return cb_set_AbstractCount_I;
- }
-
- static void n_set_AbstractCount_I (IntPtr jnienv, IntPtr native__this, int value)
- {
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- __this.AbstractCount = value;
- }
-#pragma warning restore 0169
-
- IntPtr id_get_AbstractCount;
- IntPtr id_set_AbstractCount_I;
- public unsafe int AbstractCount {
- get {
- if (id_get_AbstractCount == IntPtr.Zero)
- id_get_AbstractCount = JNIEnv.GetMethodID (class_ref, "get_AbstractCount", "()I");
- return JNIEnv.CallIntMethod (((global::Java.Lang.Object) this).Handle, id_get_AbstractCount);
- }
- set {
- if (id_set_AbstractCount_I == IntPtr.Zero)
- id_set_AbstractCount_I = JNIEnv.GetMethodID (class_ref, "set_AbstractCount", "(I)V");
- JValue* __args = stackalloc JValue [1];
- __args [0] = new JValue (value);
- JNIEnv.CallVoidMethod (((global::Java.Lang.Object) this).Handle, id_set_AbstractCount_I, __args);
- }
- }
-
- static Delegate cb_GetCountForKey_Ljava_lang_String_;
-#pragma warning disable 0169
- static Delegate GetGetCountForKey_Ljava_lang_String_Handler ()
- {
- if (cb_GetCountForKey_Ljava_lang_String_ == null)
- cb_GetCountForKey_Ljava_lang_String_ = JNINativeWrapper.CreateDelegate ((_JniMarshal_PPL_I) n_GetCountForKey_Ljava_lang_String_);
- return cb_GetCountForKey_Ljava_lang_String_;
- }
-
- static int n_GetCountForKey_Ljava_lang_String_ (IntPtr jnienv, IntPtr native__this, IntPtr native_key)
- {
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- var key = JNIEnv.GetString (native_key, JniHandleOwnership.DoNotTransfer);
- int __ret = __this.GetCountForKey (key);
- return __ret;
- }
-#pragma warning restore 0169
-
- IntPtr id_GetCountForKey_Ljava_lang_String_;
- public unsafe int GetCountForKey (string key)
- {
- if (id_GetCountForKey_Ljava_lang_String_ == IntPtr.Zero)
- id_GetCountForKey_Ljava_lang_String_ = JNIEnv.GetMethodID (class_ref, "GetCountForKey", "(Ljava/lang/String;)I");
- IntPtr native_key = JNIEnv.NewString ((string)key);
- JValue* __args = stackalloc JValue [1];
- __args [0] = new JValue (native_key);
- var __ret = JNIEnv.CallIntMethod (((global::Java.Lang.Object) this).Handle, id_GetCountForKey_Ljava_lang_String_, __args);
- JNIEnv.DeleteLocalRef (native_key);
- return __ret;
- }
-
- static Delegate cb_Key;
-#pragma warning disable 0169
- static Delegate GetKeyHandler ()
- {
- if (cb_Key == null)
- cb_Key = JNINativeWrapper.CreateDelegate ((_JniMarshal_PP_L) n_Key);
- return cb_Key;
- }
-
- static IntPtr n_Key (IntPtr jnienv, IntPtr native__this)
- {
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- return JNIEnv.NewString (__this.Key ());
- }
-#pragma warning restore 0169
-
- IntPtr id_Key;
- public unsafe string Key ()
- {
- if (id_Key == IntPtr.Zero)
- id_Key = JNIEnv.GetMethodID (class_ref, "Key", "()Ljava/lang/String;");
- return JNIEnv.GetString (JNIEnv.CallObjectMethod (((global::Java.Lang.Object) this).Handle, id_Key), JniHandleOwnership.TransferLocalRef);
- }
-
- static Delegate cb_AbstractMethod;
-#pragma warning disable 0169
- static Delegate GetAbstractMethodHandler ()
- {
- if (cb_AbstractMethod == null)
- cb_AbstractMethod = JNINativeWrapper.CreateDelegate ((_JniMarshal_PP_V) n_AbstractMethod);
- return cb_AbstractMethod;
- }
-
- static void n_AbstractMethod (IntPtr jnienv, IntPtr native__this)
- {
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- __this.AbstractMethod ();
- }
-#pragma warning restore 0169
-
- IntPtr id_AbstractMethod;
- public unsafe void AbstractMethod ()
- {
- if (id_AbstractMethod == IntPtr.Zero)
- id_AbstractMethod = JNIEnv.GetMethodID (class_ref, "AbstractMethod", "()V");
- JNIEnv.CallVoidMethod (((global::Java.Lang.Object) this).Handle, id_AbstractMethod);
- }
-
-}
-
diff --git a/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteInterfaceDeclaration.txt b/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteInterfaceDeclaration.txt
deleted file mode 100644
index fb079e879..000000000
--- a/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteInterfaceDeclaration.txt
+++ /dev/null
@@ -1,39 +0,0 @@
-// Metadata.xml XPath interface reference: path="/api/package[@name='java.code']/interface[@name='IMyInterface']"
-[Register ("java/code/IMyInterface", "", "java.code.IMyInterfaceInvoker")]
-public partial interface IMyInterface : IJavaObject {
-
- int Count {
- // Metadata.xml XPath method reference: path="/api/package[@name='java.code']/interface[@name='IMyInterface']/method[@name='get_Count' and count(parameter)=0]"
- [Register ("get_Count", "()I", "Getget_CountHandler:java.code.IMyInterfaceInvoker, ")] get;
- // Metadata.xml XPath method reference: path="/api/package[@name='java.code']/interface[@name='IMyInterface']/method[@name='set_Count' and count(parameter)=1 and parameter[1][@type='int']]"
- [Register ("set_Count", "(I)V", "Getset_Count_IHandler:java.code.IMyInterfaceInvoker, ")] set;
- }
-
- string Key {
- // Metadata.xml XPath method reference: path="/api/package[@name='java.code']/interface[@name='IMyInterface']/method[@name='get_Key' and count(parameter)=0]"
- [Register ("get_Key", "()Ljava/lang/String;", "Getget_KeyHandler:java.code.IMyInterfaceInvoker, ")] get;
- // Metadata.xml XPath method reference: path="/api/package[@name='java.code']/interface[@name='IMyInterface']/method[@name='set_Key' and count(parameter)=1 and parameter[1][@type='java.lang.String']]"
- [Register ("set_Key", "(Ljava/lang/String;)V", "Getset_Key_Ljava_lang_String_Handler:java.code.IMyInterfaceInvoker, ")] set;
- }
-
- int AbstractCount {
- // Metadata.xml XPath method reference: path="/api/package[@name='java.code']/interface[@name='IMyInterface']/method[@name='get_AbstractCount' and count(parameter)=0]"
- [Register ("get_AbstractCount", "()I", "Getget_AbstractCountHandler:java.code.IMyInterfaceInvoker, ")] get;
- // Metadata.xml XPath method reference: path="/api/package[@name='java.code']/interface[@name='IMyInterface']/method[@name='set_AbstractCount' and count(parameter)=1 and parameter[1][@type='int']]"
- [Register ("set_AbstractCount", "(I)V", "Getset_AbstractCount_IHandler:java.code.IMyInterfaceInvoker, ")] set;
- }
-
- // Metadata.xml XPath method reference: path="/api/package[@name='java.code']/interface[@name='IMyInterface']/method[@name='GetCountForKey' and count(parameter)=1 and parameter[1][@type='java.lang.String']]"
- [Register ("GetCountForKey", "(Ljava/lang/String;)I", "GetGetCountForKey_Ljava_lang_String_Handler:java.code.IMyInterfaceInvoker, ")]
- int GetCountForKey (string key);
-
- // Metadata.xml XPath method reference: path="/api/package[@name='java.code']/interface[@name='IMyInterface']/method[@name='Key' and count(parameter)=0]"
- [Register ("Key", "()Ljava/lang/String;", "GetKeyHandler:java.code.IMyInterfaceInvoker, ")]
- string Key ();
-
- // Metadata.xml XPath method reference: path="/api/package[@name='java.code']/interface[@name='IMyInterface']/method[@name='AbstractMethod' and count(parameter)=0]"
- [Register ("AbstractMethod", "()V", "GetAbstractMethodHandler:java.code.IMyInterfaceInvoker, ")]
- void AbstractMethod ();
-
-}
-
diff --git a/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteInterfaceFields.txt b/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteInterfaceFields.txt
deleted file mode 100644
index 085ad91e2..000000000
--- a/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteInterfaceFields.txt
+++ /dev/null
@@ -1,14 +0,0 @@
-// Metadata.xml XPath interface reference: path="/api/package[@name='java.code']/interface[@name='IMyInterface']"
-[Register ("java/code/IMyInterface", "", "java.code.IMyInterfaceInvoker")]
-public partial interface IMyInterface : IJavaObject {
-
- // Metadata.xml XPath field reference: path="/api/package[@name='java.code']/interface[@name='IMyInterface']/field[@name='MyConstantField']"
- [Register ("MyConstantField")]
- public const int MyConstantField = (int) 7;
-
- // Metadata.xml XPath method reference: path="/api/package[@name='java.code']/interface[@name='IMyInterface']/method[@name='DoSomething' and count(parameter)=0]"
- [Register ("DoSomething", "()V", "GetDoSomethingHandler:java.code.IMyInterfaceInvoker, ")]
- void DoSomething ();
-
-}
-
diff --git a/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteInterfaceInvoker.txt b/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteInterfaceInvoker.txt
deleted file mode 100644
index 2929e5b33..000000000
--- a/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteInterfaceInvoker.txt
+++ /dev/null
@@ -1,274 +0,0 @@
-[global::Android.Runtime.Register ("java/code/IMyInterface", DoNotGenerateAcw=true)]
-internal partial class IMyInterfaceInvoker : global::Java.Lang.Object, IMyInterface {
-
- static IntPtr java_class_ref = JNIEnv.FindClass ("java/code/IMyInterface");
-
- protected override IntPtr ThresholdClass {
- get { return class_ref; }
- }
-
- protected override global::System.Type ThresholdType {
- get { return typeof (IMyInterfaceInvoker); }
- }
-
- IntPtr class_ref;
-
- public static IMyInterface GetObject (IntPtr handle, JniHandleOwnership transfer)
- {
- return global::Java.Lang.Object.GetObject (handle, transfer);
- }
-
- static IntPtr Validate (IntPtr handle)
- {
- if (!JNIEnv.IsInstanceOf (handle, java_class_ref))
- throw new InvalidCastException (string.Format ("Unable to convert instance of type '{0}' to type '{1}'.",
- JNIEnv.GetClassNameFromInstance (handle), "java.code.IMyInterface"));
- return handle;
- }
-
- protected override void Dispose (bool disposing)
- {
- if (this.class_ref != IntPtr.Zero)
- JNIEnv.DeleteGlobalRef (this.class_ref);
- this.class_ref = IntPtr.Zero;
- base.Dispose (disposing);
- }
-
- public IMyInterfaceInvoker (IntPtr handle, JniHandleOwnership transfer) : base (Validate (handle), transfer)
- {
- IntPtr local_ref = JNIEnv.GetObjectClass (((global::Java.Lang.Object) this).Handle);
- this.class_ref = JNIEnv.NewGlobalRef (local_ref);
- JNIEnv.DeleteLocalRef (local_ref);
- }
-
- static Delegate cb_get_Count;
-#pragma warning disable 0169
- static Delegate Getget_CountHandler ()
- {
- if (cb_get_Count == null)
- cb_get_Count = JNINativeWrapper.CreateDelegate ((_JniMarshal_PP_I) n_get_Count);
- return cb_get_Count;
- }
-
- static int n_get_Count (IntPtr jnienv, IntPtr native__this)
- {
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- return __this.Count;
- }
-#pragma warning restore 0169
-
- static Delegate cb_set_Count_I;
-#pragma warning disable 0169
- static Delegate Getset_Count_IHandler ()
- {
- if (cb_set_Count_I == null)
- cb_set_Count_I = JNINativeWrapper.CreateDelegate ((_JniMarshal_PPI_V) n_set_Count_I);
- return cb_set_Count_I;
- }
-
- static void n_set_Count_I (IntPtr jnienv, IntPtr native__this, int value)
- {
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- __this.Count = value;
- }
-#pragma warning restore 0169
-
- IntPtr id_get_Count;
- IntPtr id_set_Count_I;
- public unsafe int Count {
- get {
- if (id_get_Count == IntPtr.Zero)
- id_get_Count = JNIEnv.GetMethodID (class_ref, "get_Count", "()I");
- return JNIEnv.CallIntMethod (((global::Java.Lang.Object) this).Handle, id_get_Count);
- }
- set {
- if (id_set_Count_I == IntPtr.Zero)
- id_set_Count_I = JNIEnv.GetMethodID (class_ref, "set_Count", "(I)V");
- JValue* __args = stackalloc JValue [1];
- __args [0] = new JValue (value);
- JNIEnv.CallVoidMethod (((global::Java.Lang.Object) this).Handle, id_set_Count_I, __args);
- }
- }
-
- static Delegate cb_get_Key;
-#pragma warning disable 0169
- static Delegate Getget_KeyHandler ()
- {
- if (cb_get_Key == null)
- cb_get_Key = JNINativeWrapper.CreateDelegate ((_JniMarshal_PP_L) n_get_Key);
- return cb_get_Key;
- }
-
- static IntPtr n_get_Key (IntPtr jnienv, IntPtr native__this)
- {
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- return JNIEnv.NewString (__this.Key);
- }
-#pragma warning restore 0169
-
- static Delegate cb_set_Key_Ljava_lang_String_;
-#pragma warning disable 0169
- static Delegate Getset_Key_Ljava_lang_String_Handler ()
- {
- if (cb_set_Key_Ljava_lang_String_ == null)
- cb_set_Key_Ljava_lang_String_ = JNINativeWrapper.CreateDelegate ((_JniMarshal_PPL_V) n_set_Key_Ljava_lang_String_);
- return cb_set_Key_Ljava_lang_String_;
- }
-
- static void n_set_Key_Ljava_lang_String_ (IntPtr jnienv, IntPtr native__this, IntPtr native_value)
- {
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- var value = JNIEnv.GetString (native_value, JniHandleOwnership.DoNotTransfer);
- __this.Key = value;
- }
-#pragma warning restore 0169
-
- IntPtr id_get_Key;
- IntPtr id_set_Key_Ljava_lang_String_;
- public unsafe string Key {
- get {
- if (id_get_Key == IntPtr.Zero)
- id_get_Key = JNIEnv.GetMethodID (class_ref, "get_Key", "()Ljava/lang/String;");
- return JNIEnv.GetString (JNIEnv.CallObjectMethod (((global::Java.Lang.Object) this).Handle, id_get_Key), JniHandleOwnership.TransferLocalRef);
- }
- set {
- if (id_set_Key_Ljava_lang_String_ == IntPtr.Zero)
- id_set_Key_Ljava_lang_String_ = JNIEnv.GetMethodID (class_ref, "set_Key", "(Ljava/lang/String;)V");
- IntPtr native_value = JNIEnv.NewString ((string)value);
- JValue* __args = stackalloc JValue [1];
- __args [0] = new JValue (native_value);
- JNIEnv.CallVoidMethod (((global::Java.Lang.Object) this).Handle, id_set_Key_Ljava_lang_String_, __args);
- JNIEnv.DeleteLocalRef (native_value);
- }
- }
-
- static Delegate cb_get_AbstractCount;
-#pragma warning disable 0169
- static Delegate Getget_AbstractCountHandler ()
- {
- if (cb_get_AbstractCount == null)
- cb_get_AbstractCount = JNINativeWrapper.CreateDelegate ((_JniMarshal_PP_I) n_get_AbstractCount);
- return cb_get_AbstractCount;
- }
-
- static int n_get_AbstractCount (IntPtr jnienv, IntPtr native__this)
- {
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- return __this.AbstractCount;
- }
-#pragma warning restore 0169
-
- static Delegate cb_set_AbstractCount_I;
-#pragma warning disable 0169
- static Delegate Getset_AbstractCount_IHandler ()
- {
- if (cb_set_AbstractCount_I == null)
- cb_set_AbstractCount_I = JNINativeWrapper.CreateDelegate ((_JniMarshal_PPI_V) n_set_AbstractCount_I);
- return cb_set_AbstractCount_I;
- }
-
- static void n_set_AbstractCount_I (IntPtr jnienv, IntPtr native__this, int value)
- {
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- __this.AbstractCount = value;
- }
-#pragma warning restore 0169
-
- IntPtr id_get_AbstractCount;
- IntPtr id_set_AbstractCount_I;
- public unsafe int AbstractCount {
- get {
- if (id_get_AbstractCount == IntPtr.Zero)
- id_get_AbstractCount = JNIEnv.GetMethodID (class_ref, "get_AbstractCount", "()I");
- return JNIEnv.CallIntMethod (((global::Java.Lang.Object) this).Handle, id_get_AbstractCount);
- }
- set {
- if (id_set_AbstractCount_I == IntPtr.Zero)
- id_set_AbstractCount_I = JNIEnv.GetMethodID (class_ref, "set_AbstractCount", "(I)V");
- JValue* __args = stackalloc JValue [1];
- __args [0] = new JValue (value);
- JNIEnv.CallVoidMethod (((global::Java.Lang.Object) this).Handle, id_set_AbstractCount_I, __args);
- }
- }
-
- static Delegate cb_GetCountForKey_Ljava_lang_String_;
-#pragma warning disable 0169
- static Delegate GetGetCountForKey_Ljava_lang_String_Handler ()
- {
- if (cb_GetCountForKey_Ljava_lang_String_ == null)
- cb_GetCountForKey_Ljava_lang_String_ = JNINativeWrapper.CreateDelegate ((_JniMarshal_PPL_I) n_GetCountForKey_Ljava_lang_String_);
- return cb_GetCountForKey_Ljava_lang_String_;
- }
-
- static int n_GetCountForKey_Ljava_lang_String_ (IntPtr jnienv, IntPtr native__this, IntPtr native_key)
- {
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- var key = JNIEnv.GetString (native_key, JniHandleOwnership.DoNotTransfer);
- int __ret = __this.GetCountForKey (key);
- return __ret;
- }
-#pragma warning restore 0169
-
- IntPtr id_GetCountForKey_Ljava_lang_String_;
- public unsafe int GetCountForKey (string key)
- {
- if (id_GetCountForKey_Ljava_lang_String_ == IntPtr.Zero)
- id_GetCountForKey_Ljava_lang_String_ = JNIEnv.GetMethodID (class_ref, "GetCountForKey", "(Ljava/lang/String;)I");
- IntPtr native_key = JNIEnv.NewString ((string)key);
- JValue* __args = stackalloc JValue [1];
- __args [0] = new JValue (native_key);
- var __ret = JNIEnv.CallIntMethod (((global::Java.Lang.Object) this).Handle, id_GetCountForKey_Ljava_lang_String_, __args);
- JNIEnv.DeleteLocalRef (native_key);
- return __ret;
- }
-
- static Delegate cb_Key;
-#pragma warning disable 0169
- static Delegate GetKeyHandler ()
- {
- if (cb_Key == null)
- cb_Key = JNINativeWrapper.CreateDelegate ((_JniMarshal_PP_L) n_Key);
- return cb_Key;
- }
-
- static IntPtr n_Key (IntPtr jnienv, IntPtr native__this)
- {
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- return JNIEnv.NewString (__this.Key ());
- }
-#pragma warning restore 0169
-
- IntPtr id_Key;
- public unsafe string Key ()
- {
- if (id_Key == IntPtr.Zero)
- id_Key = JNIEnv.GetMethodID (class_ref, "Key", "()Ljava/lang/String;");
- return JNIEnv.GetString (JNIEnv.CallObjectMethod (((global::Java.Lang.Object) this).Handle, id_Key), JniHandleOwnership.TransferLocalRef);
- }
-
- static Delegate cb_AbstractMethod;
-#pragma warning disable 0169
- static Delegate GetAbstractMethodHandler ()
- {
- if (cb_AbstractMethod == null)
- cb_AbstractMethod = JNINativeWrapper.CreateDelegate ((_JniMarshal_PP_V) n_AbstractMethod);
- return cb_AbstractMethod;
- }
-
- static void n_AbstractMethod (IntPtr jnienv, IntPtr native__this)
- {
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- __this.AbstractMethod ();
- }
-#pragma warning restore 0169
-
- IntPtr id_AbstractMethod;
- public unsafe void AbstractMethod ()
- {
- if (id_AbstractMethod == IntPtr.Zero)
- id_AbstractMethod = JNIEnv.GetMethodID (class_ref, "AbstractMethod", "()V");
- JNIEnv.CallVoidMethod (((global::Java.Lang.Object) this).Handle, id_AbstractMethod);
- }
-
-}
-
diff --git a/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteMethodAbstractWithVoidReturn.txt b/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteMethodAbstractWithVoidReturn.txt
deleted file mode 100644
index cece31ea1..000000000
--- a/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteMethodAbstractWithVoidReturn.txt
+++ /dev/null
@@ -1,29 +0,0 @@
-static Delegate cb_bar;
-#pragma warning disable 0169
-static Delegate GetbarHandler ()
-{
- if (cb_bar == null)
- cb_bar = JNINativeWrapper.CreateDelegate ((_JniMarshal_PP_V) n_bar);
- return cb_bar;
-}
-
-static void n_bar (IntPtr jnienv, IntPtr native__this)
-{
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- __this.bar ();
-}
-#pragma warning restore 0169
-
-static IntPtr id_bar;
-// Metadata.xml XPath method reference: path="/api/package[@name='com.mypackage']/class[@name='foo']/method[@name='bar' and count(parameter)=0]"
-[Register ("bar", "()V", "GetbarHandler")]
-public virtual unsafe void bar ()
-{
- if (id_bar == IntPtr.Zero)
- id_bar = JNIEnv.GetMethodID (class_ref, "bar", "()V");
- try {
- JNIEnv.CallVoidMethod (((global::Java.Lang.Object) this).Handle, id_bar);
- } finally {
- }
-}
-
diff --git a/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteMethodAsyncifiedWithIntReturn.txt b/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteMethodAsyncifiedWithIntReturn.txt
deleted file mode 100644
index 0bbf890bb..000000000
--- a/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteMethodAsyncifiedWithIntReturn.txt
+++ /dev/null
@@ -1,38 +0,0 @@
-static Delegate cb_bar;
-#pragma warning disable 0169
-static Delegate GetbarHandler ()
-{
- if (cb_bar == null)
- cb_bar = JNINativeWrapper.CreateDelegate ((_JniMarshal_PP_I) n_bar);
- return cb_bar;
-}
-
-static int n_bar (IntPtr jnienv, IntPtr native__this)
-{
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- return __this.bar ();
-}
-#pragma warning restore 0169
-
-static IntPtr id_bar;
-// Metadata.xml XPath method reference: path="/api/package[@name='com.mypackage']/class[@name='foo']/method[@name='bar' and count(parameter)=0]"
-[Register ("bar", "()I", "GetbarHandler")]
-public virtual unsafe int bar ()
-{
- if (id_bar == IntPtr.Zero)
- id_bar = JNIEnv.GetMethodID (class_ref, "bar", "()I");
- try {
-
- if (((object) this).GetType () == ThresholdType)
- return JNIEnv.CallIntMethod (((global::Java.Lang.Object) this).Handle, id_bar);
- else
- return JNIEnv.CallNonvirtualIntMethod (((global::Java.Lang.Object) this).Handle, ThresholdClass, JNIEnv.GetMethodID (ThresholdClass, "bar", "()I"));
- } finally {
- }
-}
-
-public global::System.Threading.Tasks.Task barAsync ()
-{
- return global::System.Threading.Tasks.Task.Run (() => bar ());
-}
-
diff --git a/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteMethodAsyncifiedWithVoidReturn.txt b/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteMethodAsyncifiedWithVoidReturn.txt
deleted file mode 100644
index 75007ea61..000000000
--- a/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteMethodAsyncifiedWithVoidReturn.txt
+++ /dev/null
@@ -1,38 +0,0 @@
-static Delegate cb_bar;
-#pragma warning disable 0169
-static Delegate GetbarHandler ()
-{
- if (cb_bar == null)
- cb_bar = JNINativeWrapper.CreateDelegate ((_JniMarshal_PP_V) n_bar);
- return cb_bar;
-}
-
-static void n_bar (IntPtr jnienv, IntPtr native__this)
-{
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- __this.bar ();
-}
-#pragma warning restore 0169
-
-static IntPtr id_bar;
-// Metadata.xml XPath method reference: path="/api/package[@name='com.mypackage']/class[@name='foo']/method[@name='bar' and count(parameter)=0]"
-[Register ("bar", "()V", "GetbarHandler")]
-public virtual unsafe void bar ()
-{
- if (id_bar == IntPtr.Zero)
- id_bar = JNIEnv.GetMethodID (class_ref, "bar", "()V");
- try {
-
- if (((object) this).GetType () == ThresholdType)
- JNIEnv.CallVoidMethod (((global::Java.Lang.Object) this).Handle, id_bar);
- else
- JNIEnv.CallNonvirtualVoidMethod (((global::Java.Lang.Object) this).Handle, ThresholdClass, JNIEnv.GetMethodID (ThresholdClass, "bar", "()V"));
- } finally {
- }
-}
-
-public global::System.Threading.Tasks.Task barAsync ()
-{
- return global::System.Threading.Tasks.Task.Run (() => bar ());
-}
-
diff --git a/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteMethodBody.txt b/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteMethodBody.txt
deleted file mode 100644
index a17b1861a..000000000
--- a/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteMethodBody.txt
+++ /dev/null
@@ -1,10 +0,0 @@
-if (id_bar == IntPtr.Zero)
- id_bar = JNIEnv.GetMethodID (class_ref, "bar", "()V");
-try {
-
- if (((object) this).GetType () == ThresholdType)
- JNIEnv.CallVoidMethod (((global::Java.Lang.Object) this).Handle, id_bar);
- else
- JNIEnv.CallNonvirtualVoidMethod (((global::Java.Lang.Object) this).Handle, ThresholdClass, JNIEnv.GetMethodID (ThresholdClass, "bar", "()V"));
-} finally {
-}
diff --git a/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteMethodFinalWithVoidReturn.txt b/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteMethodFinalWithVoidReturn.txt
deleted file mode 100644
index a69c7a4f1..000000000
--- a/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteMethodFinalWithVoidReturn.txt
+++ /dev/null
@@ -1,13 +0,0 @@
-static IntPtr id_bar;
-// Metadata.xml XPath method reference: path="/api/package[@name='com.mypackage']/class[@name='foo']/method[@name='bar' and count(parameter)=0]"
-[Register ("bar", "()V", "")]
-public unsafe void bar ()
-{
- if (id_bar == IntPtr.Zero)
- id_bar = JNIEnv.GetMethodID (class_ref, "bar", "()V");
- try {
- JNIEnv.CallVoidMethod (((global::Java.Lang.Object) this).Handle, id_bar);
- } finally {
- }
-}
-
diff --git a/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteMethodIdField.txt b/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteMethodIdField.txt
deleted file mode 100644
index d3296250d..000000000
--- a/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteMethodIdField.txt
+++ /dev/null
@@ -1 +0,0 @@
-static IntPtr id_bar;
diff --git a/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteMethodProtected.txt b/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteMethodProtected.txt
deleted file mode 100644
index ea87148b8..000000000
--- a/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteMethodProtected.txt
+++ /dev/null
@@ -1,33 +0,0 @@
-static Delegate cb_bar;
-#pragma warning disable 0169
-static Delegate GetbarHandler ()
-{
- if (cb_bar == null)
- cb_bar = JNINativeWrapper.CreateDelegate ((_JniMarshal_PP_V) n_bar);
- return cb_bar;
-}
-
-static void n_bar (IntPtr jnienv, IntPtr native__this)
-{
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- __this.bar ();
-}
-#pragma warning restore 0169
-
-static IntPtr id_bar;
-// Metadata.xml XPath method reference: path="/api/package[@name='com.mypackage']/class[@name='foo']/method[@name='bar' and count(parameter)=0]"
-[Register ("bar", "()V", "GetbarHandler")]
-protected virtual unsafe void bar ()
-{
- if (id_bar == IntPtr.Zero)
- id_bar = JNIEnv.GetMethodID (class_ref, "bar", "()V");
- try {
-
- if (((object) this).GetType () == ThresholdType)
- JNIEnv.CallVoidMethod (((global::Java.Lang.Object) this).Handle, id_bar);
- else
- JNIEnv.CallNonvirtualVoidMethod (((global::Java.Lang.Object) this).Handle, ThresholdClass, JNIEnv.GetMethodID (ThresholdClass, "bar", "()V"));
- } finally {
- }
-}
-
diff --git a/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteMethodStaticWithVoidReturn.txt b/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteMethodStaticWithVoidReturn.txt
deleted file mode 100644
index 52b51df85..000000000
--- a/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteMethodStaticWithVoidReturn.txt
+++ /dev/null
@@ -1,13 +0,0 @@
-static IntPtr id_bar;
-// Metadata.xml XPath method reference: path="/api/package[@name='com.mypackage']/class[@name='foo']/method[@name='bar' and count(parameter)=0]"
-[Register ("bar", "()V", "")]
-public static unsafe void bar ()
-{
- if (id_bar == IntPtr.Zero)
- id_bar = JNIEnv.GetStaticMethodID (class_ref, "bar", "()V");
- try {
- JNIEnv.CallStaticVoidMethod (class_ref, id_bar);
- } finally {
- }
-}
-
diff --git a/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteMethodWithCharSequenceArrays.txt b/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteMethodWithCharSequenceArrays.txt
deleted file mode 100644
index fa4246b66..000000000
--- a/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteMethodWithCharSequenceArrays.txt
+++ /dev/null
@@ -1,77 +0,0 @@
-// Metadata.xml XPath class reference: path="/api/package[@name='com.example']/class[@name='MyClass']"
-[global::Android.Runtime.Register ("com/example/MyClass", DoNotGenerateAcw=true)]
-public partial class MyClass : Java.Lang.Object {
-
- internal static new IntPtr java_class_handle;
- internal static new IntPtr class_ref {
- get {
- return JNIEnv.FindClass ("com/example/MyClass", ref java_class_handle);
- }
- }
-
- protected override IntPtr ThresholdClass {
- get { return class_ref; }
- }
-
- protected override global::System.Type ThresholdType {
- get { return typeof (MyClass); }
- }
-
- protected MyClass (IntPtr javaReference, JniHandleOwnership transfer) : base (javaReference, transfer) {}
-
- static Delegate cb_echo_arrayLjava_lang_CharSequence_;
-#pragma warning disable 0169
- static Delegate GetEcho_arrayLjava_lang_CharSequence_Handler ()
- {
- if (cb_echo_arrayLjava_lang_CharSequence_ == null)
- cb_echo_arrayLjava_lang_CharSequence_ = JNINativeWrapper.CreateDelegate ((_JniMarshal_PPL_L) n_Echo_arrayLjava_lang_CharSequence_);
- return cb_echo_arrayLjava_lang_CharSequence_;
- }
-
- static IntPtr n_Echo_arrayLjava_lang_CharSequence_ (IntPtr jnienv, IntPtr native__this, IntPtr native_messages)
- {
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- var messages = (Java.Lang.ICharSequence[]) JNIEnv.GetArray (native_messages, JniHandleOwnership.DoNotTransfer, typeof (Java.Lang.ICharSequence));
- IntPtr __ret = JNIEnv.NewArray (__this.EchoFormatted (messages));
- if (messages != null)
- JNIEnv.CopyArray (messages, native_messages);
- return __ret;
- }
-#pragma warning restore 0169
-
- static IntPtr id_echo_arrayLjava_lang_CharSequence_;
- // Metadata.xml XPath method reference: path="/api/package[@name='com.example']/class[@name='MyClass']/method[@name='echo' and count(parameter)=1 and parameter[1][@type='java.lang.CharSequence[]']]"
- [Register ("echo", "([Ljava/lang/CharSequence;)[Ljava/lang/CharSequence;", "GetEcho_arrayLjava_lang_CharSequence_Handler")]
- public virtual unsafe Java.Lang.ICharSequence[] EchoFormatted (Java.Lang.ICharSequence[] messages)
- {
- if (id_echo_arrayLjava_lang_CharSequence_ == IntPtr.Zero)
- id_echo_arrayLjava_lang_CharSequence_ = JNIEnv.GetMethodID (class_ref, "echo", "([Ljava/lang/CharSequence;)[Ljava/lang/CharSequence;");
- IntPtr native_messages = JNIEnv.NewArray (messages);
- try {
- JValue* __args = stackalloc JValue [1];
- __args [0] = new JValue (native_messages);
-
- Java.Lang.ICharSequence[] __ret;
- if (((object) this).GetType () == ThresholdType)
- __ret = (Java.Lang.ICharSequence[]) JNIEnv.GetArray (JNIEnv.CallObjectMethod (((global::Java.Lang.Object) this).Handle, id_echo_arrayLjava_lang_CharSequence_, __args), JniHandleOwnership.TransferLocalRef, typeof (Java.Lang.ICharSequence));
- else
- __ret = (Java.Lang.ICharSequence[]) JNIEnv.GetArray (JNIEnv.CallNonvirtualObjectMethod (((global::Java.Lang.Object) this).Handle, ThresholdClass, JNIEnv.GetMethodID (ThresholdClass, "echo", "([Ljava/lang/CharSequence;)[Ljava/lang/CharSequence;"), __args), JniHandleOwnership.TransferLocalRef, typeof (Java.Lang.ICharSequence));
- return __ret;
- } finally {
- if (messages != null) {
- JNIEnv.CopyArray (native_messages, messages);
- JNIEnv.DeleteLocalRef (native_messages);
- }
- }
- }
-
- public string[] Echo (string[] messages)
- {
- var jlca_messages = CharSequence.ArrayFromStringArray(messages);
- Java.Lang.ICharSequence[] __result = EchoFormatted (jlca_messages);
- var __rsval = CharSequence.ArrayToStringArray (__result);
- if (jlca_messages != null) foreach (var s in jlca_messages) s?.Dispose ();
- return __rsval;
- }
-
-}
diff --git a/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteMethodWithIntReturn.txt b/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteMethodWithIntReturn.txt
deleted file mode 100644
index 15de7ed1f..000000000
--- a/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteMethodWithIntReturn.txt
+++ /dev/null
@@ -1,33 +0,0 @@
-static Delegate cb_bar;
-#pragma warning disable 0169
-static Delegate GetbarHandler ()
-{
- if (cb_bar == null)
- cb_bar = JNINativeWrapper.CreateDelegate ((_JniMarshal_PP_I) n_bar);
- return cb_bar;
-}
-
-static int n_bar (IntPtr jnienv, IntPtr native__this)
-{
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- return __this.bar ();
-}
-#pragma warning restore 0169
-
-static IntPtr id_bar;
-// Metadata.xml XPath method reference: path="/api/package[@name='com.mypackage']/class[@name='foo']/method[@name='bar' and count(parameter)=0]"
-[Register ("bar", "()I", "GetbarHandler")]
-public virtual unsafe int bar ()
-{
- if (id_bar == IntPtr.Zero)
- id_bar = JNIEnv.GetMethodID (class_ref, "bar", "()I");
- try {
-
- if (((object) this).GetType () == ThresholdType)
- return JNIEnv.CallIntMethod (((global::Java.Lang.Object) this).Handle, id_bar);
- else
- return JNIEnv.CallNonvirtualIntMethod (((global::Java.Lang.Object) this).Handle, ThresholdClass, JNIEnv.GetMethodID (ThresholdClass, "bar", "()I"));
- } finally {
- }
-}
-
diff --git a/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteMethodWithStringReturn.txt b/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteMethodWithStringReturn.txt
deleted file mode 100644
index 61a711b00..000000000
--- a/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteMethodWithStringReturn.txt
+++ /dev/null
@@ -1,33 +0,0 @@
-static Delegate cb_bar;
-#pragma warning disable 0169
-static Delegate GetbarHandler ()
-{
- if (cb_bar == null)
- cb_bar = JNINativeWrapper.CreateDelegate ((_JniMarshal_PP_L) n_bar);
- return cb_bar;
-}
-
-static IntPtr n_bar (IntPtr jnienv, IntPtr native__this)
-{
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- return JNIEnv.NewString (__this.bar ());
-}
-#pragma warning restore 0169
-
-static IntPtr id_bar;
-// Metadata.xml XPath method reference: path="/api/package[@name='com.mypackage']/class[@name='foo']/method[@name='bar' and count(parameter)=0]"
-[Register ("bar", "()Ljava/lang/String;", "GetbarHandler")]
-public virtual unsafe string bar ()
-{
- if (id_bar == IntPtr.Zero)
- id_bar = JNIEnv.GetMethodID (class_ref, "bar", "()Ljava/lang/String;");
- try {
-
- if (((object) this).GetType () == ThresholdType)
- return JNIEnv.GetString (JNIEnv.CallObjectMethod (((global::Java.Lang.Object) this).Handle, id_bar), JniHandleOwnership.TransferLocalRef);
- else
- return JNIEnv.GetString (JNIEnv.CallNonvirtualObjectMethod (((global::Java.Lang.Object) this).Handle, ThresholdClass, JNIEnv.GetMethodID (ThresholdClass, "bar", "()Ljava/lang/String;")), JniHandleOwnership.TransferLocalRef);
- } finally {
- }
-}
-
diff --git a/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteMethodWithVoidReturn.txt b/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteMethodWithVoidReturn.txt
deleted file mode 100644
index ec83f3d74..000000000
--- a/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteMethodWithVoidReturn.txt
+++ /dev/null
@@ -1,33 +0,0 @@
-static Delegate cb_bar;
-#pragma warning disable 0169
-static Delegate GetbarHandler ()
-{
- if (cb_bar == null)
- cb_bar = JNINativeWrapper.CreateDelegate ((_JniMarshal_PP_V) n_bar);
- return cb_bar;
-}
-
-static void n_bar (IntPtr jnienv, IntPtr native__this)
-{
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- __this.bar ();
-}
-#pragma warning restore 0169
-
-static IntPtr id_bar;
-// Metadata.xml XPath method reference: path="/api/package[@name='com.mypackage']/class[@name='foo']/method[@name='bar' and count(parameter)=0]"
-[Register ("bar", "()V", "GetbarHandler")]
-public virtual unsafe void bar ()
-{
- if (id_bar == IntPtr.Zero)
- id_bar = JNIEnv.GetMethodID (class_ref, "bar", "()V");
- try {
-
- if (((object) this).GetType () == ThresholdType)
- JNIEnv.CallVoidMethod (((global::Java.Lang.Object) this).Handle, id_bar);
- else
- JNIEnv.CallNonvirtualVoidMethod (((global::Java.Lang.Object) this).Handle, ThresholdClass, JNIEnv.GetMethodID (ThresholdClass, "bar", "()V"));
- } finally {
- }
-}
-
diff --git a/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteObjectField.txt b/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteObjectField.txt
deleted file mode 100644
index 6380d20f4..000000000
--- a/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteObjectField.txt
+++ /dev/null
@@ -1,37 +0,0 @@
-// Metadata.xml XPath class reference: path="/api/package[@name='java.code']/class[@name='MyClass']"
-[global::Android.Runtime.Register ("java/code/MyClass", DoNotGenerateAcw=true)]
-public partial class MyClass {
-
-
- static IntPtr field_jfieldId;
-
- // Metadata.xml XPath field reference: path="/api/package[@name='java.code']/class[@name='MyClass']/field[@name='field']"
- [Register ("field")]
- public java.code.Example field {
- get {
- if (field_jfieldId == IntPtr.Zero)
- field_jfieldId = JNIEnv.GetFieldID (class_ref, "field", "Ljava/code/Example;");
- IntPtr __ret = JNIEnv.GetObjectField (((global::Java.Lang.Object) this).Handle, field_jfieldId);
- return global::Java.Lang.Object.GetObject (__ret, JniHandleOwnership.TransferLocalRef);
- }
- set {
- if (field_jfieldId == IntPtr.Zero)
- field_jfieldId = JNIEnv.GetFieldID (class_ref, "field", "Ljava/code/Example;");
- IntPtr native_value = JNIEnv.ToLocalJniHandle (value);
- try {
- JNIEnv.SetField (((global::Java.Lang.Object) this).Handle, field_jfieldId, native_value);
- } finally {
- JNIEnv.DeleteLocalRef (native_value);
- }
- }
- }
- internal static IntPtr java_class_handle;
- internal static IntPtr class_ref {
- get {
- return JNIEnv.FindClass ("java/code/MyClass", ref java_class_handle);
- }
- }
-
- protected MyClass (IntPtr javaReference, JniHandleOwnership transfer) : base (javaReference, transfer) {}
-
-}
diff --git a/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteParameterListCallArgs.txt b/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteParameterListCallArgs.txt
deleted file mode 100644
index 1506c62aa..000000000
--- a/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteParameterListCallArgs.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-JValue* __args = stackalloc JValue [3];
-__args [0] = new JValue (value);
-__args [1] = new JValue (native_str);
-__args [2] = new JValue (flag);
diff --git a/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteParameterListCallArgsForInvoker.txt b/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteParameterListCallArgsForInvoker.txt
deleted file mode 100644
index 1506c62aa..000000000
--- a/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteParameterListCallArgsForInvoker.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-JValue* __args = stackalloc JValue [3];
-__args [0] = new JValue (value);
-__args [1] = new JValue (native_str);
-__args [2] = new JValue (flag);
diff --git a/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteProperty.txt b/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteProperty.txt
deleted file mode 100644
index 3d6fdb31e..000000000
--- a/tests/generator-Tests/Unit-Tests/CodeGeneratorExpectedResults/XamarinAndroid/WriteProperty.txt
+++ /dev/null
@@ -1,67 +0,0 @@
-static Delegate cb_get_MyProperty;
-#pragma warning disable 0169
-static Delegate Getget_MyPropertyHandler ()
-{
- if (cb_get_MyProperty == null)
- cb_get_MyProperty = JNINativeWrapper.CreateDelegate ((_JniMarshal_PP_I) n_get_MyProperty);
- return cb_get_MyProperty;
-}
-
-static int n_get_MyProperty (IntPtr jnienv, IntPtr native__this)
-{
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- return __this.MyProperty;
-}
-#pragma warning restore 0169
-
-static Delegate cb_set_MyProperty_I;
-#pragma warning disable 0169
-static Delegate Getset_MyProperty_IHandler ()
-{
- if (cb_set_MyProperty_I == null)
- cb_set_MyProperty_I = JNINativeWrapper.CreateDelegate ((_JniMarshal_PPI_V) n_set_MyProperty_I);
- return cb_set_MyProperty_I;
-}
-
-static void n_set_MyProperty_I (IntPtr jnienv, IntPtr native__this, int value)
-{
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- __this.MyProperty = value;
-}
-#pragma warning restore 0169
-
-static IntPtr id_get_MyProperty;
-static IntPtr id_set_MyProperty_I;
-public virtual unsafe int MyProperty {
- // Metadata.xml XPath method reference: path="/api/package[@name='com.mypackage']/class[@name='foo']/method[@name='get_MyProperty' and count(parameter)=0]"
- [Register ("get_MyProperty", "()I", "Getget_MyPropertyHandler")]
- get {
- if (id_get_MyProperty == IntPtr.Zero)
- id_get_MyProperty = JNIEnv.GetMethodID (class_ref, "get_MyProperty", "()I");
- try {
-
- if (((object) this).GetType () == ThresholdType)
- return JNIEnv.CallIntMethod (((global::Java.Lang.Object) this).Handle, id_get_MyProperty);
- else
- return JNIEnv.CallNonvirtualIntMethod (((global::Java.Lang.Object) this).Handle, ThresholdClass, JNIEnv.GetMethodID (ThresholdClass, "get_MyProperty", "()I"));
- } finally {
- }
- }
- // Metadata.xml XPath method reference: path="/api/package[@name='com.mypackage']/class[@name='foo']/method[@name='set_MyProperty' and count(parameter)=1 and parameter[1][@type='int']]"
- [Register ("set_MyProperty", "(I)V", "Getset_MyProperty_IHandler")]
- set {
- if (id_set_MyProperty_I == IntPtr.Zero)
- id_set_MyProperty_I = JNIEnv.GetMethodID (class_ref, "set_MyProperty", "(I)V");
- try {
- JValue* __args = stackalloc JValue [1];
- __args [0] = new JValue (value);
-
- if (((object) this).GetType () == ThresholdType)
- JNIEnv.CallVoidMethod (((global::Java.Lang.Object) this).Handle, id_set_MyProperty_I, __args);
- else
- JNIEnv.CallNonvirtualVoidMethod (((global::Java.Lang.Object) this).Handle, ThresholdClass, JNIEnv.GetMethodID (ThresholdClass, "set_MyProperty", "(I)V"), __args);
- } finally {
- }
- }
-}
-
diff --git a/tests/generator-Tests/Unit-Tests/CodeGeneratorTestBase.cs b/tests/generator-Tests/Unit-Tests/CodeGeneratorTestBase.cs
index 69fb3964f..a54dc94a6 100644
--- a/tests/generator-Tests/Unit-Tests/CodeGeneratorTestBase.cs
+++ b/tests/generator-Tests/Unit-Tests/CodeGeneratorTestBase.cs
@@ -12,7 +12,7 @@ namespace generatortests
{
abstract class CodeGeneratorTestBase
{
- protected CodeGenerator generator;
+ protected JavaInteropCodeGenerator generator;
protected StringBuilder builder;
protected StringWriter writer;
protected CodeGenerationOptions options;
diff --git a/tests/generator-Tests/Unit-Tests/CodeGeneratorTests.cs b/tests/generator-Tests/Unit-Tests/CodeGeneratorTests.cs
index 7104fc477..c242eb3f3 100644
--- a/tests/generator-Tests/Unit-Tests/CodeGeneratorTests.cs
+++ b/tests/generator-Tests/Unit-Tests/CodeGeneratorTests.cs
@@ -1343,695 +1343,8 @@ public void StringPropertyOverride ([Values ("true", "false")] string final)
}
}
- [TestFixture]
- class XamarinAndroidCodeGeneratorTests : CodeGeneratorTests
- {
- protected override CodeGenerationTarget Target => CodeGenerationTarget.XamarinAndroid;
-
- [Test]
- public void WriteClassConstructors ()
- {
- var @class = SupportTypeBuilder.CreateClass ("java.code.MyClass", options);
-
- generator.Context.ContextTypes.Push (@class);
- generator.WriteClassConstructors (@class, string.Empty);
- generator.Context.ContextTypes.Pop ();
-
- AssertTargetedExpected (nameof (WriteClassConstructors), writer.ToString ());
- }
-
- [Test]
- public void WriteClassHandle ()
- {
- var @class = new TestClass ("java.lang.Object", "com.mypackage.foo");
-
- generator.WriteClassHandle (@class, string.Empty, false);
-
- AssertTargetedExpected (nameof (WriteClassHandle), writer.ToString ());
- }
-
- [Test]
- public void WriteClassInvoker ()
- {
- var @class = SupportTypeBuilder.CreateClass ("java.code.MyClass", options);
-
- generator.Context.ContextTypes.Push (@class);
- generator.WriteClassInvoker (@class, string.Empty);
- generator.Context.ContextTypes.Pop ();
-
- AssertTargetedExpected (nameof (WriteClassInvoker), writer.ToString ());
- }
-
- [Test]
- public void WriteClassInvokerHandle ()
- {
- var @class = new TestClass ("java.lang.Object", "com.mypackage.foo");
-
- generator.WriteClassInvokerHandle (@class, string.Empty, "Com.MyPackage.Foo");
-
- AssertTargetedExpected (nameof (WriteClassInvokerHandle), writer.ToString ());
- }
-
- [Test]
- public void WriteClassInvokerMembers ()
- {
- // This test should generate all the members (members is empty)
- var @class = SupportTypeBuilder.CreateClass ("java.code.MyClass", options);
- var members = new HashSet ();
-
- generator.Context.ContextTypes.Push (@class);
- generator.WriteClassInvokerMembers (@class, string.Empty, members);
- generator.Context.ContextTypes.Pop ();
-
- AssertTargetedExpected (nameof (WriteClassInvokerMembers), writer.ToString ());
- }
-
- [Test]
- public void WriteClassMethodInvokers ()
- {
- // This test should generate all the methods (members is empty)
- var @class = SupportTypeBuilder.CreateClass ("java.code.MyClass", options);
- var members = new HashSet ();
-
- generator.Context.ContextTypes.Push (@class);
- generator.WriteClassMethodInvokers (@class, @class.Methods, string.Empty, members, null);
- generator.Context.ContextTypes.Pop ();
-
- AssertTargetedExpected (nameof (WriteClassMethodInvokers), writer.ToString ());
- }
-
- [Test]
- public void WriteClassMethodInvokersWithSkips ()
- {
- // This test should skip the first Method because members contains the Method
- var @class = SupportTypeBuilder.CreateClass ("java.code.MyClass", options);
- var members = new HashSet (new [] { @class.Methods [0].Name });
-
- generator.Context.ContextTypes.Push (@class);
- generator.WriteClassMethodInvokers (@class, @class.Methods, string.Empty, members, null);
- generator.Context.ContextTypes.Pop ();
-
- AssertTargetedExpected (nameof (WriteClassMethodInvokersWithSkips), writer.ToString ());
- }
-
- [Test]
- public void WriteClassMethods ()
- {
- var @class = SupportTypeBuilder.CreateClass ("java.code.MyClass", options);
-
- generator.Context.ContextTypes.Push (@class);
- generator.WriteClassMethods (@class, string.Empty);
- generator.Context.ContextTypes.Pop ();
-
- AssertTargetedExpected (nameof (WriteClassMethods), writer.ToString ());
- }
-
- [Test]
- public void WriteClassProperties ()
- {
- var @class = SupportTypeBuilder.CreateClass ("java.code.MyClass", options);
-
- generator.Context.ContextTypes.Push (@class);
- generator.WriteImplementedProperties (@class.Properties, string.Empty, @class.IsFinal, @class);
- generator.Context.ContextTypes.Pop ();
-
- AssertTargetedExpected (nameof (WriteClassProperties), writer.ToString ());
- }
-
- [Test]
- public void WriteClassPropertyInvokers ()
- {
- // This test should generate all the properties (members is empty)
- var @class = SupportTypeBuilder.CreateClass ("java.code.MyClass", options);
- var members = new HashSet ();
-
- generator.Context.ContextTypes.Push (@class);
- generator.WriteClassPropertyInvokers (@class, @class.Properties, string.Empty, members);
- generator.Context.ContextTypes.Pop ();
-
- AssertTargetedExpected (nameof (WriteClassPropertyInvokers), writer.ToString ());
- }
-
- [Test]
- public void WriteClassPropertyInvokersWithSkips ()
- {
- // This test should skip the first Property because members contains the Property
- var @class = SupportTypeBuilder.CreateClass ("java.code.MyClass", options);
- var members = new HashSet (new [] { @class.Properties [0].Name });
-
- generator.Context.ContextTypes.Push (@class);
- generator.WriteClassPropertyInvokers (@class, @class.Properties, string.Empty, members);
- generator.Context.ContextTypes.Pop ();
-
- AssertTargetedExpected (nameof (WriteClassPropertyInvokersWithSkips), writer.ToString ());
- }
-
- [Test]
- public void WriteCtor ()
- {
- var @class = new TestClass ("java.lang.Object", "com.mypackage.foo");
- var ctor = new TestCtor (@class, "Object");
-
- generator.Context.ContextTypes.Push (@class);
- generator.WriteConstructor (ctor, string.Empty, true, @class);
- generator.Context.ContextTypes.Pop ();
-
- AssertTargetedExpected (nameof (WriteCtor), writer.ToString ());
- }
-
- [Test]
- public void WriteCtorDeprecated ()
- {
- var @class = new TestClass ("java.lang.Object", "com.mypackage.foo");
- var ctor = new TestCtor (@class, "Object")
- .SetDeprecated ("This constructor is obsolete")
- .SetCustomAttributes ("[MyAttribute]")
- .SetAnnotation ("[global::Android.Runtime.IntDefinition (null, JniField = \"xamarin/test/SomeObject.SOME_VALUE\")]");
-
- generator.Context.ContextTypes.Push (@class);
- generator.WriteConstructor (ctor, string.Empty, true, @class);
- generator.Context.ContextTypes.Pop ();
-
- AssertTargetedExpected (nameof (WriteCtorDeprecated), writer.ToString ());
- }
-
- [Test]
- public void WriteCtorWithStringOverload ()
- {
- var @class = new TestClass ("java.lang.Object", "com.mypackage.foo");
- var ctor = new TestCtor (@class, "Object");
-
- ctor.Parameters.Add (new Parameter ("mystring", "java.lang.CharSequence", "Java.Lang.ICharSequence", false));
- ctor.Validate (options, null, new CodeGeneratorContext ());
-
- generator.Context.ContextTypes.Push (@class);
- generator.WriteConstructor (ctor, string.Empty, true, @class);
- generator.Context.ContextTypes.Pop ();
-
- AssertTargetedExpected (nameof (WriteCtorWithStringOverload), writer.ToString ());
- }
-
- [Test]
- public void WriteEnumifiedField ()
- {
- var @class = new TestClass ("java.lang.Object", "com.mypackage.foo");
- var field = new TestField ("int", "bar").SetEnumified ();
- Assert.IsTrue (field.Validate (options, new GenericParameterDefinitionList (), new CodeGeneratorContext ()), "field.Validate failed!");
- generator.WriteField (field, string.Empty, @class);
-
- StringAssert.Contains ("[global::Android.Runtime.GeneratedEnum]", builder.ToString (), "Should contain GeneratedEnumAttribute!");
- }
-
- [Test]
- public void WriteDeprecatedField ()
- {
- var comment = "Don't use this!";
- var @class = new TestClass ("java.lang.Object", "com.mypackage.foo");
- var field = new TestField ("int", "bar").SetConstant ("1234").SetDeprecated (comment, true);
- Assert.IsTrue (field.Validate (options, new GenericParameterDefinitionList (), new CodeGeneratorContext ()), "field.Validate failed!");
- generator.WriteField (field, string.Empty, @class);
-
- StringAssert.Contains ($"[Obsolete (\"{comment}\", error: true)]", builder.ToString (), "Should contain ObsoleteAttribute!");
- }
-
- [Test]
- public void WriteProtectedField ()
- {
- var @class = new TestClass ("java.lang.Object", "com.mypackage.foo");
- var field = new TestField ("int", "bar").SetVisibility ("protected");
- Assert.IsTrue (field.Validate (options, new GenericParameterDefinitionList (), new CodeGeneratorContext ()), "field.Validate failed!");
- generator.WriteField (field, string.Empty, @class);
-
- StringAssert.Contains ("protected int bar {", builder.ToString (), "Property should be protected!");
- }
-
- [Test]
- public void WriteFieldConstant ()
- {
- var @class = new TestClass ("java.lang.Object", "com.mypackage.foo");
- var field = new TestField ("java.lang.String", "bar").SetConstant ();
-
- Assert.IsTrue (field.Validate (options, new GenericParameterDefinitionList (), new CodeGeneratorContext ()), "field.Validate failed!");
- generator.WriteField (field, string.Empty, @class);
-
- AssertTargetedExpected (nameof (WriteFieldConstant), writer.ToString ());
- }
-
- [Test]
- public void WriteFieldConstantWithIntValue ()
- {
- var @class = new TestClass ("java.lang.Object", "com.mypackage.foo");
- var field = new TestField ("int", "bar").SetConstant ("1234");
-
- Assert.IsTrue (field.Validate (options, new GenericParameterDefinitionList (), new CodeGeneratorContext ()), "field.Validate failed!");
- generator.WriteField (field, string.Empty, @class);
-
- AssertTargetedExpected (nameof (WriteFieldConstantWithIntValue), writer.ToString ());
- }
-
- [Test]
- public void WriteFieldConstantWithStringValue ()
- {
- var @class = new TestClass ("java.lang.Object", "com.mypackage.foo");
- var field = new TestField ("java.lang.String", "bar").SetConstant ("\"hello\"");
-
- Assert.IsTrue (field.Validate (options, new GenericParameterDefinitionList (), new CodeGeneratorContext ()), "field.Validate failed!");
- generator.WriteField (field, string.Empty, @class);
-
- AssertTargetedExpected (nameof (WriteFieldConstantWithStringValue), writer.ToString ());
- }
-
- [Test]
- public void WriteFieldGetBody ()
- {
- var @class = new TestClass ("java.lang.Object", "com.mypackage.foo");
- var field = new TestField ("java.lang.String", "bar");
-
- Assert.IsTrue (field.Validate (options, new GenericParameterDefinitionList (), new CodeGeneratorContext ()), "field.Validate failed!");
- generator.WriteFieldGetBody (field, string.Empty, @class);
-
- AssertTargetedExpected (nameof (WriteFieldGetBody), writer.ToString ());
- }
-
- [Test]
- public void WriteFieldIdField ()
- {
- var field = new TestField ("java.lang.String", "bar");
-
- generator.WriteFieldIdField (field, string.Empty);
-
- AssertTargetedExpected (nameof (WriteFieldIdField), writer.ToString ());
- }
-
- [Test]
- public void WriteFieldInt ()
- {
- var @class = new TestClass ("java.lang.Object", "com.mypackage.foo");
- var field = new TestField ("int", "bar");
-
- Assert.IsTrue (field.Validate (options, new GenericParameterDefinitionList (), new CodeGeneratorContext ()), "field.Validate failed!");
- generator.WriteField (field, string.Empty, @class);
-
- AssertTargetedExpected (nameof (WriteFieldInt), writer.ToString ());
- }
-
- [Test]
- public void WriteFieldSetBody ()
- {
- var @class = new TestClass ("java.lang.Object", "com.mypackage.foo");
- var field = new TestField ("java.lang.String", "bar");
-
- Assert.IsTrue (field.Validate (options, new GenericParameterDefinitionList (), new CodeGeneratorContext ()), "field.Validate failed!");
- generator.WriteFieldSetBody (field, string.Empty, @class);
-
- AssertTargetedExpected (nameof (WriteFieldSetBody), writer.ToString ());
- }
-
- [Test]
- public void WriteFieldString ()
- {
- var @class = new TestClass ("java.lang.Object", "com.mypackage.foo");
- var field = new TestField ("java.lang.String", "bar");
-
- Assert.IsTrue (field.Validate (options, new GenericParameterDefinitionList (), new CodeGeneratorContext ()), "field.Validate failed!");
- generator.WriteField (field, string.Empty, @class);
-
- AssertTargetedExpected (nameof (WriteFieldString), writer.ToString ());
- }
-
- [Test]
- public void WriteDeprecatedMethod ()
- {
- var comment = "Don't use this!";
- var @class = new TestClass ("java.lang.Object", "com.mypackage.foo");
- var method = new TestMethod (@class, "bar").SetDeprecated (comment);
- Assert.IsTrue (method.Validate (options, new GenericParameterDefinitionList (), new CodeGeneratorContext ()), "method.Validate failed!");
- generator.WriteMethod (method, string.Empty, @class, true);
-
- StringAssert.Contains ($"[Obsolete (@\"{comment}\")]", builder.ToString (), "Should contain ObsoleteAttribute!");
- }
-
- [Test]
- public void WritedMethodWithManagedReturn ()
- {
- var @class = new TestClass ("java.lang.Object", "com.mypackage.foo");
- var method = new TestMethod (@class, "bar", @return: "int").SetManagedReturn ("long");
- Assert.IsTrue (method.Validate (options, new GenericParameterDefinitionList (), new CodeGeneratorContext ()), "method.Validate failed!");
- generator.WriteMethod (method, string.Empty, @class, true);
-
- StringAssert.Contains ("public virtual unsafe long bar ()", builder.ToString (), "Should contain return long!");
- }
-
- [Test]
- public void WritedMethodWithEnumifiedReturn ()
- {
- var @class = new TestClass ("java.lang.Object", "com.mypackage.foo");
- var method = new TestMethod (@class, "bar", @return: "int").SetManagedReturn ("int").SetReturnEnumified ();
- Assert.IsTrue (method.Validate (options, new GenericParameterDefinitionList (), new CodeGeneratorContext ()), "method.Validate failed!");
- generator.WriteMethod (method, string.Empty, @class, true);
-
- StringAssert.Contains ("[return:global::Android.Runtime.GeneratedEnum]", builder.ToString (), "Should contain GeneratedEnumAttribute!");
- }
-
- [Test]
- public void WriteInterfaceInvoker ()
- {
- var iface = SupportTypeBuilder.CreateInterface ("java.code.IMyInterface", options);
-
- generator.Context.ContextTypes.Push (iface);
- generator.WriteInterfaceInvoker (iface, string.Empty);
- generator.Context.ContextTypes.Pop ();
-
- AssertTargetedExpected (nameof (WriteInterfaceInvoker), writer.ToString ());
- }
-
- [Test]
- public void WriteInterfaceListenerEvent ()
- {
- var iface = SupportTypeBuilder.CreateInterface ("java.code.IMyInterface", options);
-
- generator.Context.ContextTypes.Push (iface);
- generator.WriteInterfaceListenerEvent (iface, string.Empty, "MyName", "MyNameSpec", "MyMethodName", "MyFullDelegateName", true, "MyWrefSuffix", "Add", "Remove");
- generator.Context.ContextTypes.Pop ();
-
- AssertOriginalExpected (nameof (WriteInterfaceListenerEvent), writer.ToString ());
- }
-
- [Test]
- public void WriteInterfaceListenerEventWithHandlerArgument ()
- {
- var iface = SupportTypeBuilder.CreateInterface ("java.code.IMyInterface", options);
-
- generator.Context.ContextTypes.Push (iface);
- generator.WriteInterfaceListenerEvent (iface, string.Empty, "MyName", "MyNameSpec", "MyMethodName", "MyFullDelegateName", true, "MyWrefSuffix", "AddMyName", "RemoveMyName", true);
- generator.Context.ContextTypes.Pop ();
-
- AssertOriginalExpected (nameof (WriteInterfaceListenerEventWithHandlerArgument), writer.ToString ());
- }
-
- [Test]
- public void WriteInterfaceListenerProperty ()
- {
- var iface = SupportTypeBuilder.CreateInterface ("java.code.IMyInterface", options);
-
- generator.Context.ContextTypes.Push (iface);
- generator.WriteInterfaceListenerProperty (iface, string.Empty, "MyName", "MyNameSpec", "MyMethodName", "MyConnectorFmt", "MyFullDelegateName");
- generator.Context.ContextTypes.Pop ();
-
- AssertOriginalExpected (nameof (WriteInterfaceListenerProperty), writer.ToString ());
- }
-
- [Test]
- public void WriteInterfaceMethodInvokers ()
- {
- // This test should generate all the methods (members is empty)
- var iface = SupportTypeBuilder.CreateInterface ("java.code.IMyInterface", options);
- var members = new HashSet ();
-
- generator.Context.ContextTypes.Push (iface);
- generator.WriteInterfaceMethodInvokers (iface, iface.Methods, string.Empty, members);
- generator.Context.ContextTypes.Pop ();
-
- AssertOriginalExpected (nameof (WriteInterfaceMethodInvokers), writer.ToString ());
- }
-
- [Test]
- public void WriteInterfaceMethodInvokersWithSkips ()
- {
- // This test should skip the first Method because members contains the Method
- var iface = SupportTypeBuilder.CreateInterface ("java.code.IMyInterface", options);
- var members = new HashSet (new [] { iface.Methods [0].Name });
-
- generator.Context.ContextTypes.Push (iface);
- generator.WriteInterfaceMethodInvokers (iface, iface.Methods, string.Empty, members);
- generator.Context.ContextTypes.Pop ();
-
- AssertOriginalExpected (nameof (WriteInterfaceMethodInvokersWithSkips), writer.ToString ());
- }
-
- [Test]
- public void WriteInterfaceMethods ()
- {
- var iface = SupportTypeBuilder.CreateInterface ("java.code.IMyInterface", options);
-
- generator.Context.ContextTypes.Push (iface);
- generator.WriteInterfaceMethods (iface, string.Empty);
- generator.Context.ContextTypes.Pop ();
-
- AssertOriginalExpected (nameof (WriteInterfaceMethods), writer.ToString ());
- }
-
- [Test]
- public void WriteInterfaceProperties ()
- {
- var iface = SupportTypeBuilder.CreateInterface ("java.code.IMyInterface", options);
-
- generator.Context.ContextTypes.Push (iface);
- generator.WriteInterfaceProperties (iface, string.Empty);
- generator.Context.ContextTypes.Pop ();
-
- AssertOriginalExpected (nameof (WriteInterfaceProperties), writer.ToString ());
- }
-
- [Test]
- public void WriteInterfacePropertyInvokers ()
- {
- // This test should generate all the properties (members is empty)
- var iface = SupportTypeBuilder.CreateInterface ("java.code.IMyInterface", options);
- var members = new HashSet ();
-
- generator.Context.ContextTypes.Push (iface);
- generator.WriteInterfacePropertyInvokers (iface, iface.Properties, string.Empty, members);
- generator.Context.ContextTypes.Pop ();
-
- AssertOriginalExpected (nameof (WriteInterfacePropertyInvokers), writer.ToString ());
- }
-
- [Test]
- public void WriteInterfacePropertyInvokersWithSkips ()
- {
- // This test should skip the first Property because members contains the Property
- var iface = SupportTypeBuilder.CreateInterface ("java.code.IMyInterface", options);
- var members = new HashSet (new [] { iface.Properties [0].Name });
-
- generator.Context.ContextTypes.Push (iface);
- generator.WriteInterfacePropertyInvokers (iface, iface.Properties, string.Empty, members);
- generator.Context.ContextTypes.Pop ();
-
- AssertOriginalExpected (nameof (WriteInterfacePropertyInvokersWithSkips), writer.ToString ());
- }
-
- [Test]
- public void WriteMethodAbstractWithVoidReturn ()
- {
- var @class = new TestClass ("java.lang.Object", "com.mypackage.foo");
- var method = new TestMethod (@class, "bar").SetAbstract ();
-
- Assert.IsTrue (method.Validate (options, new GenericParameterDefinitionList (), new CodeGeneratorContext ()), "method.Validate failed!");
- generator.WriteMethod (method, string.Empty, @class, true);
-
- AssertTargetedExpected (nameof (WriteMethodAbstractWithVoidReturn), writer.ToString ());
- }
-
- [Test]
- public void WriteMethodAsyncifiedWithIntReturn ()
- {
- var @class = new TestClass ("java.lang.Object", "com.mypackage.foo");
- var method = new TestMethod (@class, "bar", @return: "int").SetAsyncify ();
-
- Assert.IsTrue (method.Validate (options, new GenericParameterDefinitionList (), new CodeGeneratorContext ()), "method.Validate failed!");
- generator.WriteMethod (method, string.Empty, @class, true);
-
- AssertTargetedExpected (nameof (WriteMethodAsyncifiedWithIntReturn), writer.ToString ());
- }
-
- [Test]
- public void WriteMethodAsyncifiedWithVoidReturn ()
- {
- var @class = new TestClass ("java.lang.Object", "com.mypackage.foo");
- var method = new TestMethod (@class, "bar").SetAsyncify ();
-
- Assert.IsTrue (method.Validate (options, new GenericParameterDefinitionList (), new CodeGeneratorContext ()), "method.Validate failed!");
- generator.WriteMethod (method, string.Empty, @class, true);
-
- AssertTargetedExpected (nameof (WriteMethodAsyncifiedWithVoidReturn), writer.ToString ());
- }
-
- [Test]
- public void WriteMethodBody ()
- {
- var @class = new TestClass ("java.lang.Object", "com.mypackage.foo");
- var method = new TestMethod (@class, "bar");
-
- Assert.IsTrue (method.Validate (options, new GenericParameterDefinitionList (), new CodeGeneratorContext ()), "method.Validate failed!");
- generator.WriteMethodBody (method, string.Empty, @class);
-
- AssertTargetedExpected (nameof (WriteMethodBody), writer.ToString ());
- }
-
- [Test]
- public void WriteMethodFinalWithVoidReturn ()
- {
- var @class = new TestClass ("java.lang.Object", "com.mypackage.foo");
- var method = new TestMethod (@class, "bar").SetFinal ();
-
- Assert.IsTrue (method.Validate (options, new GenericParameterDefinitionList (), new CodeGeneratorContext ()), "method.Validate failed!");
- generator.WriteMethod (method, string.Empty, @class, true);
-
- AssertTargetedExpected (nameof (WriteMethodFinalWithVoidReturn), writer.ToString ());
- }
-
- [Test]
- public void WriteMethodIdField ()
- {
- var @class = new TestClass ("java.lang.Object", "com.mypackage.foo");
- var method = new TestMethod (@class, "bar");
-
- generator.WriteMethodIdField (method, string.Empty);
-
- AssertTargetedExpected (nameof (WriteMethodIdField), writer.ToString ());
- }
-
- [Test]
- public void WriteMethodProtected ()
- {
- var @class = new TestClass ("java.lang.Object", "com.mypackage.foo");
- var method = new TestMethod (@class, "bar").SetVisibility ("protected");
-
- Assert.IsTrue (method.Validate (options, new GenericParameterDefinitionList (), new CodeGeneratorContext ()), "method.Validate failed!");
- generator.WriteMethod (method, string.Empty, @class, true);
-
- AssertTargetedExpected (nameof (WriteMethodProtected), writer.ToString ());
- }
-
- [Test]
- public void WriteMethodStaticWithVoidReturn ()
- {
- var @class = new TestClass ("java.lang.Object", "com.mypackage.foo");
- var method = new TestMethod (@class, "bar").SetStatic ();
-
- Assert.IsTrue (method.Validate (options, new GenericParameterDefinitionList (), new CodeGeneratorContext ()), "method.Validate failed!");
- generator.WriteMethod (method, string.Empty, @class, true);
-
- AssertTargetedExpected (nameof (WriteMethodStaticWithVoidReturn), writer.ToString ());
- }
-
- [Test]
- public void WriteMethodWithIntReturn ()
- {
- var @class = new TestClass ("java.lang.Object", "com.mypackage.foo");
- var method = new TestMethod (@class, "bar", @return: "int");
-
- Assert.IsTrue (method.Validate (options, new GenericParameterDefinitionList (), new CodeGeneratorContext ()), "method.Validate failed!");
- generator.WriteMethod (method, string.Empty, @class, true);
-
- AssertTargetedExpected (nameof (WriteMethodWithIntReturn), writer.ToString ());
- }
-
- [Test]
- public void WriteMethodWithStringReturn ()
- {
- var @class = new TestClass ("java.lang.Object", "com.mypackage.foo");
- var method = new TestMethod (@class, "bar", @return: "java.lang.String");
-
- Assert.IsTrue (method.Validate (options, new GenericParameterDefinitionList (), new CodeGeneratorContext ()), "method.Validate failed!");
- generator.WriteMethod (method, string.Empty, @class, true);
-
- AssertTargetedExpected (nameof (WriteMethodWithStringReturn), writer.ToString ());
- }
-
- [Test]
- public void WriteMethodWithVoidReturn ()
- {
- var @class = new TestClass ("java.lang.Object", "com.mypackage.foo");
- var method = new TestMethod (@class, "bar");
-
- Assert.IsTrue (method.Validate (options, new GenericParameterDefinitionList (), new CodeGeneratorContext ()), "method.Validate failed!");
- generator.WriteMethod (method, string.Empty, @class, true);
-
- AssertTargetedExpected (nameof (WriteMethodWithVoidReturn), writer.ToString ());
- }
-
- [Test]
- public void WriteMethodWithInvalidJavaName ()
- {
- var @class = new TestClass ("java.lang.Object", "com.mypackage.foo");
- var method = new TestMethod (@class, "has-hyp$hen");
-
- method.Name = "nohyphen";
-
- Assert.IsTrue (method.Validate (options, new GenericParameterDefinitionList (), new CodeGeneratorContext ()), "method.Validate failed!");
- generator.WriteMethod (method, string.Empty, @class, true);
-
- var result = writer.ToString ().NormalizeLineEndings ();
-
- // Ensure we escape hyphens/dollar signs in callback names
- Assert.False (result.Contains ("cb_has-hyp$hen"));
- Assert.True (result.Contains ("cb_has_x45_hyp_x36_hen"));
- }
-
- [Test]
- public void WriteMethodWithInvalidParameterName ()
- {
- var @class = new TestClass ("java.lang.Object", "com.mypackage.foo");
- var method = new TestMethod (@class, "DoStuff");
-
- method.Parameters.Add (new Parameter ("$this", "byte[]", "byte[]", false));
-
- Assert.IsTrue (method.Validate (options, new GenericParameterDefinitionList (), new CodeGeneratorContext ()), "method.Validate failed!");
- generator.WriteMethod (method, string.Empty, @class, true);
-
- var result = writer.ToString ().NormalizeLineEndings ();
-
- // Ensure we escape dollar signs
- Assert.False (result.Contains ("$this"));
- }
-
- [Test]
- public void WriteInterfaceExtensionsDeclaration ()
- {
- var iface = SupportTypeBuilder.CreateInterface ("java.code.IMyInterface", options);
-
- generator.Context.ContextTypes.Push (iface);
- generator.WriteInterfaceExtensionsDeclaration (iface, string.Empty, "java.code.DeclaringType");
- generator.Context.ContextTypes.Pop ();
-
- Assert.AreEqual (GetExpected (nameof (WriteInterfaceExtensionsDeclaration)), writer.ToString ().NormalizeLineEndings ());
- }
-
- [Test]
- public void WriteInterfaceDeclaration ()
- {
- var iface = SupportTypeBuilder.CreateInterface ("java.code.IMyInterface", options);
-
- generator.Context.ContextTypes.Push (iface);
- generator.WriteInterfaceDeclaration (iface, string.Empty, new GenerationInfo (null, null, null));
- generator.Context.ContextTypes.Pop ();
-
- AssertTargetedExpected (nameof (WriteInterfaceDeclaration), writer.ToString ());
- }
-
- [Test]
- public void WriteProperty ()
- {
- var @class = SupportTypeBuilder.CreateClassWithProperty ("java.lang.Object", "com.mypackage.foo", "MyProperty", "int", options);
-
- generator.WriteProperty (@class.Properties.First (), @class, string.Empty);
-
- AssertTargetedExpected (nameof (WriteProperty), writer.ToString ());
- }
- }
-
abstract class CodeGeneratorTests : CodeGeneratorTestBase
{
- [Test]
- public void WriteCharSequenceEnumerator ()
- {
- generator.WriteCharSequenceEnumerator (string.Empty);
-
- Assert.AreEqual (GetExpected (nameof (WriteCharSequenceEnumerator)), writer.ToString ().NormalizeLineEndings ());
- }
-
[Test]
public void WriteClass ()
{
@@ -2044,18 +1357,6 @@ public void WriteClass ()
AssertTargetedExpected (nameof (WriteClass), writer.ToString ());
}
- [Test]
- public void WriteClassAbstractMembers ()
- {
- var @class = SupportTypeBuilder.CreateClass ("java.code.MyClass", options);
-
- generator.Context.ContextTypes.Push (@class);
- generator.WriteClassAbstractMembers (@class, string.Empty);
- generator.Context.ContextTypes.Pop ();
-
- Assert.AreEqual (GetExpected (nameof (WriteClassAbstractMembers)), writer.ToString ().NormalizeLineEndings ());
- }
-
[Test]
public void WriteObjectField ()
{
@@ -2089,99 +1390,6 @@ public void WriteInterface ()
AssertTargetedExpected (nameof (WriteInterface), writer.ToString ());
}
- [Test]
- public void WriteInterfaceExtensionMethods ()
- {
- var iface = SupportTypeBuilder.CreateInterface ("java.code.IMyInterface", options);
-
- generator.Context.ContextTypes.Push (iface);
- generator.WriteInterfaceExtensionMethods (iface, string.Empty);
- generator.Context.ContextTypes.Pop ();
-
- Assert.AreEqual (GetExpected (nameof (WriteInterfaceExtensionMethods)), writer.ToString ().NormalizeLineEndings ());
- }
-
- [Test]
- public void WriteInterfaceEventArgs ()
- {
- var iface = SupportTypeBuilder.CreateInterface ("java.code.IMyInterface", options);
-
- generator.Context.ContextTypes.Push (iface);
- generator.WriteInterfaceEventArgs (iface, iface.Methods [0], string.Empty);
- generator.Context.ContextTypes.Pop ();
-
- WriteActualContents (nameof (WriteInterfaceEventArgs), writer.ToString ());
-
- Assert.AreEqual (GetExpected (nameof (WriteInterfaceEventArgs)), writer.ToString ().NormalizeLineEndings ());
- }
-
- [Test]
- public void WriteInterfaceEventArgsWithParamArray ()
- {
- var xml = @"
-
-
-
-
-
-
-
-
-
-
- ";
-
- var gens = ParseApiDefinition (xml);
- var iface = gens.Single (g => g.Name == "IMyListener");
-
- generator.Context.ContextTypes.Push (iface);
- generator.WriteInterfaceEventArgs (iface as InterfaceGen, iface.Methods [0], string.Empty);
- generator.Context.ContextTypes.Pop ();
-
- WriteActualContents (nameof (WriteInterfaceEventArgsWithParamArray), writer.ToString ());
-
- Assert.AreEqual (GetExpected (nameof (WriteInterfaceEventArgsWithParamArray)), writer.ToString ().NormalizeLineEndings ());
- }
-
- [Test]
- public void WriteInterfaceEventHandler ()
- {
- var iface = SupportTypeBuilder.CreateInterface ("java.code.IMyInterface", options);
-
- generator.Context.ContextTypes.Push (iface);
- generator.WriteInterfaceEventHandler (iface, string.Empty);
- generator.Context.ContextTypes.Pop ();
-
- AssertOriginalExpected (nameof (WriteInterfaceEventHandler), writer.ToString ());
- }
-
- [Test]
- public void WriteInterfaceEventHandlerImpl ()
- {
- var iface = SupportTypeBuilder.CreateInterface ("java.code.IMyInterface", options);
-
- generator.Context.ContextTypes.Push (iface);
- generator.WriteInterfaceEventHandlerImpl (iface, string.Empty);
- generator.Context.ContextTypes.Pop ();
-
- AssertOriginalExpected (nameof (WriteInterfaceEventHandlerImpl), writer.ToString ());
- }
-
- [Test]
- public void WriteInterfaceEventHandlerImplContent ()
- {
- var iface = SupportTypeBuilder.CreateInterface ("java.code.IMyInterface", options);
- var handlers = new List ();
-
- generator.Context.ContextTypes.Push (iface);
- generator.WriteInterfaceEventHandlerImplContent (iface, iface.Methods [0], string.Empty, true, string.Empty, handlers);
- generator.Context.ContextTypes.Pop ();
-
- Assert.AreEqual (1, handlers.Count);
- Assert.AreEqual ("GetCountForKey", handlers [0]);
- AssertOriginalExpected (nameof (WriteInterfaceEventHandlerImplContent), writer.ToString ());
- }
-
[Test]
public void WriteMethodWithCharSequenceArrays ()
{
@@ -2209,78 +1417,6 @@ public void WriteMethodWithCharSequenceArrays ()
AssertOriginalTargetExpected (nameof (WriteMethodWithCharSequenceArrays), writer.ToString ());
}
- [Test]
- public void WriteParameterListCallArgs ()
- {
- var list = SupportTypeBuilder.CreateParameterList (options);
-
- generator.WriteParameterListCallArgs (list, string.Empty, false);
-
- AssertTargetedExpected (nameof (WriteParameterListCallArgs), writer.ToString ());
- }
-
- [Test]
- public void WriteParameterListCallArgsForInvoker ()
- {
- var list = SupportTypeBuilder.CreateParameterList (options);
-
- generator.WriteParameterListCallArgs (list, string.Empty, true);
-
- AssertTargetedExpected (nameof (WriteParameterListCallArgsForInvoker), writer.ToString ());
- }
-
- [Test]
- public void WritePropertyAbstractDeclaration ()
- {
- var @class = SupportTypeBuilder.CreateClassWithProperty ("java.lang.Object", "com.mypackage.foo", "MyProperty", "int", options);
-
- generator.WritePropertyAbstractDeclaration (@class.Properties.First (), string.Empty, @class);
-
- AssertOriginalExpected (nameof (WritePropertyAbstractDeclaration), writer.ToString ());
- }
-
- [Test]
- public void WritePropertyCallbacks ()
- {
- var @class = SupportTypeBuilder.CreateClassWithProperty ("java.lang.Object", "com.mypackage.foo", "MyProperty", "int", options);
-
- generator.WritePropertyCallbacks (@class.Properties.First (), string.Empty, @class);
-
- AssertOriginalExpected (nameof (WritePropertyCallbacks), writer.ToString ());
- }
-
- [Test]
- public void WritePropertyDeclaration ()
- {
- var @class = SupportTypeBuilder.CreateClassWithProperty ("java.lang.Object", "com.mypackage.foo", "MyProperty", "int", options);
-
- generator.WritePropertyDeclaration (@class.Properties.First (), string.Empty, @class, "ObjectAdapter");
-
- AssertOriginalExpected (nameof (WritePropertyDeclaration), writer.ToString ());
- }
-
- [Test]
- public void WritePropertyStringVariant ()
- {
- var @class = SupportTypeBuilder.CreateClassWithProperty ("java.lang.Object", "com.mypackage.foo", "MyProperty", "int", options);
-
- generator.WritePropertyStringVariant (@class.Properties.First (), string.Empty);
-
- AssertOriginalExpected (nameof (WritePropertyStringVariant), writer.ToString ());
- }
-
- [Test]
- public void WritePropertyInvoker ()
- {
- var @class = SupportTypeBuilder.CreateClassWithProperty ("java.lang.Object", "com.mypackage.foo", "MyProperty", "int", options);
-
- generator.Context.ContextTypes.Push (@class);
- generator.WritePropertyInvoker (@class.Properties.First (), string.Empty, @class);
- generator.Context.ContextTypes.Pop ();
-
- AssertOriginalExpected (nameof (WritePropertyInvoker), writer.ToString ());
- }
-
[Test]
public void WritePropertyExplicitInterfaceParameterName ()
{
diff --git a/tests/generator-Tests/Unit-Tests/EnumGeneratorExpectedResults/WriteBasicEnum.txt b/tests/generator-Tests/Unit-Tests/EnumGeneratorExpectedResults/WriteBasicEnum.txt
index 61405949e..7ec7750b8 100644
--- a/tests/generator-Tests/Unit-Tests/EnumGeneratorExpectedResults/WriteBasicEnum.txt
+++ b/tests/generator-Tests/Unit-Tests/EnumGeneratorExpectedResults/WriteBasicEnum.txt
@@ -1,8 +1,13 @@
-namespace Android.App {
- public enum RecentTaskFlags {
- [global::Android.Runtime.IntDefinition (null, JniField = "android/app/ActivityManager.RECENT_IGNORE_UNAVAILABLE")]
- WithExcluded = 1,
- [global::Android.Runtime.IntDefinition (null, JniField = "android/app/ActivityManager.RECENT_WITH_EXCLUDED")]
- IgnoreUnavailable = 2,
- }
+namespace Android.App
+{
+public enum RecentTaskFlags
+{
+ [global::Android.Runtime.IntDefinition (null, JniField = "android/app/ActivityManager.RECENT_IGNORE_UNAVAILABLE")]
+ [global::System.Runtime.Versioning.SupportedOSPlatformAttribute ("android30.0")]
+ WithExcluded = 1,
+
+ [global::Android.Runtime.IntDefinition (null, JniField = "android/app/ActivityManager.RECENT_WITH_EXCLUDED")]
+ IgnoreUnavailable = 2,
+
+}
}
diff --git a/tests/generator-Tests/Unit-Tests/EnumGeneratorExpectedResults/WriteEnumWithGens.txt b/tests/generator-Tests/Unit-Tests/EnumGeneratorExpectedResults/WriteEnumWithGens.txt
index 3981363fb..5d437326f 100644
--- a/tests/generator-Tests/Unit-Tests/EnumGeneratorExpectedResults/WriteEnumWithGens.txt
+++ b/tests/generator-Tests/Unit-Tests/EnumGeneratorExpectedResults/WriteEnumWithGens.txt
@@ -1,8 +1,13 @@
-namespace Android.App {
- public enum RecentTaskFlags {
- [global::Android.Runtime.IntDefinition ("android.app.ActivityManager.RECENT_IGNORE_UNAVAILABLE", JniField = "android/app/ActivityManager.RECENT_IGNORE_UNAVAILABLE")]
- WithExcluded = 1,
- [global::Android.Runtime.IntDefinition (null, JniField = "android/app/ActivityManager.RECENT_WITH_EXCLUDED")]
- IgnoreUnavailable = 2,
- }
+namespace Android.App
+{
+public enum RecentTaskFlags
+{
+ [global::Android.Runtime.IntDefinition ("android.app.ActivityManager.RECENT_IGNORE_UNAVAILABLE", JniField = "android/app/ActivityManager.RECENT_IGNORE_UNAVAILABLE")]
+ [global::System.Runtime.Versioning.SupportedOSPlatformAttribute ("android30.0")]
+ WithExcluded = 1,
+
+ [global::Android.Runtime.IntDefinition (null, JniField = "android/app/ActivityManager.RECENT_WITH_EXCLUDED")]
+ IgnoreUnavailable = 2,
+
+}
}
diff --git a/tests/generator-Tests/Unit-Tests/EnumGeneratorExpectedResults/WriteFlagsEnum.txt b/tests/generator-Tests/Unit-Tests/EnumGeneratorExpectedResults/WriteFlagsEnum.txt
index cab0c3822..6f6bbc154 100644
--- a/tests/generator-Tests/Unit-Tests/EnumGeneratorExpectedResults/WriteFlagsEnum.txt
+++ b/tests/generator-Tests/Unit-Tests/EnumGeneratorExpectedResults/WriteFlagsEnum.txt
@@ -1,9 +1,14 @@
-namespace Android.App {
- [System.Flags]
- public enum RecentTaskFlags {
- [global::Android.Runtime.IntDefinition (null, JniField = "android/app/ActivityManager.RECENT_IGNORE_UNAVAILABLE")]
- WithExcluded = 1,
- [global::Android.Runtime.IntDefinition (null, JniField = "android/app/ActivityManager.RECENT_WITH_EXCLUDED")]
- IgnoreUnavailable = 2,
- }
+namespace Android.App
+{
+[System.Flags]
+public enum RecentTaskFlags
+{
+ [global::Android.Runtime.IntDefinition (null, JniField = "android/app/ActivityManager.RECENT_IGNORE_UNAVAILABLE")]
+ [global::System.Runtime.Versioning.SupportedOSPlatformAttribute ("android30.0")]
+ WithExcluded = 1,
+
+ [global::Android.Runtime.IntDefinition (null, JniField = "android/app/ActivityManager.RECENT_WITH_EXCLUDED")]
+ IgnoreUnavailable = 2,
+
+}
}
diff --git a/tests/generator-Tests/Unit-Tests/InterfaceConstantsTests.cs b/tests/generator-Tests/Unit-Tests/InterfaceConstantsTests.cs
index c03a818dd..0b3124b31 100644
--- a/tests/generator-Tests/Unit-Tests/InterfaceConstantsTests.cs
+++ b/tests/generator-Tests/Unit-Tests/InterfaceConstantsTests.cs
@@ -10,30 +10,6 @@ class XAJavaInteropInterfaceConstantsTests : InterfaceConstantsTests
protected override Xamarin.Android.Binder.CodeGenerationTarget Target => Xamarin.Android.Binder.CodeGenerationTarget.XAJavaInterop1;
}
- [TestFixture]
- class XamarinAndroidInterfaceConstantsTests : InterfaceConstantsTests
- {
- protected override Xamarin.Android.Binder.CodeGenerationTarget Target => Xamarin.Android.Binder.CodeGenerationTarget.XamarinAndroid;
-
- [Test]
- public void WriteInterfaceFields ()
- {
- // This is an interface that has both fields and method declarations
- var iface = SupportTypeBuilder.CreateEmptyInterface ("java.code.IMyInterface");
-
- iface.Fields.Add (new TestField ("int", "MyConstantField").SetConstant ().SetValue ("7"));
- iface.Methods.Add (new TestMethod (iface, "DoSomething").SetAbstract ());
-
- iface.Validate (options, new GenericParameterDefinitionList (), new CodeGeneratorContext ());
-
- generator.Context.ContextTypes.Push (iface);
- generator.WriteInterfaceDeclaration (iface, string.Empty, new GenerationInfo (null, null, null));
- generator.Context.ContextTypes.Pop ();
-
- Assert.AreEqual (GetTargetedExpected (nameof (WriteInterfaceFields)), writer.ToString ().NormalizeLineEndings ());
- }
- }
-
abstract class InterfaceConstantsTests : CodeGeneratorTestBase
{
protected override CodeGenerationOptions CreateOptions ()
@@ -71,7 +47,7 @@ public void WriteConstSugarInterfaceFields ()
iface.Validate (options, new GenericParameterDefinitionList (), new CodeGeneratorContext ());
generator.Context.ContextTypes.Push (iface);
- generator.WriteInterfaceDeclaration (iface, string.Empty, new GenerationInfo (null, null, null));
+ generator.WriteType (iface, string.Empty, new GenerationInfo (null, null, null));
generator.Context.ContextTypes.Pop ();
Assert.AreEqual (GetTargetedExpected (nameof (WriteConstSugarInterfaceFields)), writer.ToString ().NormalizeLineEndings ());
diff --git a/tests/generator-Tests/Unit-Tests/SourceWriters/PeerMembersFieldTests.cs b/tests/generator-Tests/Unit-Tests/SourceWriters/PeerMembersFieldTests.cs
index d194f4963..947ae59be 100644
--- a/tests/generator-Tests/Unit-Tests/SourceWriters/PeerMembersFieldTests.cs
+++ b/tests/generator-Tests/Unit-Tests/SourceWriters/PeerMembersFieldTests.cs
@@ -11,7 +11,7 @@ public class PeerMembersFieldTests : SourceWritersTestBase
[Test]
public void PeerMembersField_Class ()
{
- var field = new PeerMembersField (new CodeGenerationOptions (), "B", "MyJavaType", false);
+ var field = new PeerMembersField (new CodeGenerationOptions { CodeGenerationTarget = CodeGenerationTarget.JavaInterop1 }, "B", "MyJavaType", false);
Assert.AreEqual ("static readonly JniPeerMembers _members = new JniPeerMembers (\"B\", typeof (MyJavaType));", GetOutput (field).Trim ());
}
diff --git a/tests/generator-Tests/expected/AccessModifiers/AccessModifiers.xml b/tests/generator-Tests/expected.ji/AccessModifiers/AccessModifiers.xml
similarity index 100%
rename from tests/generator-Tests/expected/AccessModifiers/AccessModifiers.xml
rename to tests/generator-Tests/expected.ji/AccessModifiers/AccessModifiers.xml
diff --git a/tests/generator-Tests/expected/Adapters/Adapters.xml b/tests/generator-Tests/expected.ji/Adapters/Adapters.xml
similarity index 100%
rename from tests/generator-Tests/expected/Adapters/Adapters.xml
rename to tests/generator-Tests/expected.ji/Adapters/Adapters.xml
diff --git a/tests/generator-Tests/expected/Adapters/SupportFiles/AdapterView.cs b/tests/generator-Tests/expected.ji/Adapters/SupportFiles/AdapterView.cs
similarity index 100%
rename from tests/generator-Tests/expected/Adapters/SupportFiles/AdapterView.cs
rename to tests/generator-Tests/expected.ji/Adapters/SupportFiles/AdapterView.cs
diff --git a/tests/generator-Tests/expected/Android.Graphics.Color/Android.Graphics.Color.xml b/tests/generator-Tests/expected.ji/Android.Graphics.Color/Android.Graphics.Color.xml
similarity index 100%
rename from tests/generator-Tests/expected/Android.Graphics.Color/Android.Graphics.Color.xml
rename to tests/generator-Tests/expected.ji/Android.Graphics.Color/Android.Graphics.Color.xml
diff --git a/tests/generator-Tests/expected/Arrays/Arrays.xml b/tests/generator-Tests/expected.ji/Arrays/Arrays.xml
similarity index 100%
rename from tests/generator-Tests/expected/Arrays/Arrays.xml
rename to tests/generator-Tests/expected.ji/Arrays/Arrays.xml
diff --git a/tests/generator-Tests/expected.ji/CSharpKeywords/CSharpKeywords.xml b/tests/generator-Tests/expected.ji/CSharpKeywords/CSharpKeywords.xml
index 52d6f43cd..9ceb7d5b7 100644
--- a/tests/generator-Tests/expected.ji/CSharpKeywords/CSharpKeywords.xml
+++ b/tests/generator-Tests/expected.ji/CSharpKeywords/CSharpKeywords.xml
@@ -9,10 +9,12 @@
-
+
-
-
+
+
+
+
diff --git a/tests/generator-Tests/expected/Constructors/Constructors.xml b/tests/generator-Tests/expected.ji/Constructors/Constructors.xml
similarity index 100%
rename from tests/generator-Tests/expected/Constructors/Constructors.xml
rename to tests/generator-Tests/expected.ji/Constructors/Constructors.xml
diff --git a/tests/generator-Tests/expected/Core_ClassParse/api.xml b/tests/generator-Tests/expected.ji/Core_ClassParse/api.xml
similarity index 100%
rename from tests/generator-Tests/expected/Core_ClassParse/api.xml
rename to tests/generator-Tests/expected.ji/Core_ClassParse/api.xml
diff --git a/tests/generator-Tests/expected/Core_ClassParse/metadata.xml b/tests/generator-Tests/expected.ji/Core_ClassParse/metadata.xml
similarity index 100%
rename from tests/generator-Tests/expected/Core_ClassParse/metadata.xml
rename to tests/generator-Tests/expected.ji/Core_ClassParse/metadata.xml
diff --git a/tests/generator-Tests/expected/Core_Jar2Xml/api.xml b/tests/generator-Tests/expected.ji/Core_Jar2Xml/api.xml
similarity index 100%
rename from tests/generator-Tests/expected/Core_Jar2Xml/api.xml
rename to tests/generator-Tests/expected.ji/Core_Jar2Xml/api.xml
diff --git a/tests/generator-Tests/expected/Core_Jar2Xml/fields.xml b/tests/generator-Tests/expected.ji/Core_Jar2Xml/fields.xml
similarity index 100%
rename from tests/generator-Tests/expected/Core_Jar2Xml/fields.xml
rename to tests/generator-Tests/expected.ji/Core_Jar2Xml/fields.xml
diff --git a/tests/generator-Tests/expected/Core_Jar2Xml/methods.xml b/tests/generator-Tests/expected.ji/Core_Jar2Xml/methods.xml
similarity index 100%
rename from tests/generator-Tests/expected/Core_Jar2Xml/methods.xml
rename to tests/generator-Tests/expected.ji/Core_Jar2Xml/methods.xml
diff --git a/tests/generator-Tests/expected.ji/InterfaceMethodsConflict/InterfaceMethodsConflict.xml b/tests/generator-Tests/expected.ji/InterfaceMethodsConflict/InterfaceMethodsConflict.xml
index 703f91b24..e83a6e37a 100644
--- a/tests/generator-Tests/expected.ji/InterfaceMethodsConflict/InterfaceMethodsConflict.xml
+++ b/tests/generator-Tests/expected.ji/InterfaceMethodsConflict/InterfaceMethodsConflict.xml
@@ -1,9 +1,9 @@
-
-
+
+
-
+
@@ -13,10 +13,20 @@
-
+
+
+
+
+
+
+
+
+
diff --git a/tests/generator-Tests/expected/NestedTypes/NestedTypes.xml b/tests/generator-Tests/expected.ji/NestedTypes/NestedTypes.xml
similarity index 100%
rename from tests/generator-Tests/expected/NestedTypes/NestedTypes.xml
rename to tests/generator-Tests/expected.ji/NestedTypes/NestedTypes.xml
diff --git a/tests/generator-Tests/expected/NonStaticFields/NonStaticField.xml b/tests/generator-Tests/expected.ji/NonStaticFields/NonStaticField.xml
similarity index 100%
rename from tests/generator-Tests/expected/NonStaticFields/NonStaticField.xml
rename to tests/generator-Tests/expected.ji/NonStaticFields/NonStaticField.xml
diff --git a/tests/generator-Tests/expected/NormalMethods/NormalMethods.xml b/tests/generator-Tests/expected.ji/NormalMethods/NormalMethods.xml
similarity index 100%
rename from tests/generator-Tests/expected/NormalMethods/NormalMethods.xml
rename to tests/generator-Tests/expected.ji/NormalMethods/NormalMethods.xml
diff --git a/tests/generator-Tests/expected/NormalProperties/NormalProperties.xml b/tests/generator-Tests/expected.ji/NormalProperties/NormalProperties.xml
similarity index 100%
rename from tests/generator-Tests/expected/NormalProperties/NormalProperties.xml
rename to tests/generator-Tests/expected.ji/NormalProperties/NormalProperties.xml
diff --git a/tests/generator-Tests/expected/ParameterXPath/ParameterXPath.xml b/tests/generator-Tests/expected.ji/ParameterXPath/ParameterXPath.xml
similarity index 100%
rename from tests/generator-Tests/expected/ParameterXPath/ParameterXPath.xml
rename to tests/generator-Tests/expected.ji/ParameterXPath/ParameterXPath.xml
diff --git a/tests/generator-Tests/expected/StaticFields/StaticField.xml b/tests/generator-Tests/expected.ji/StaticFields/StaticField.xml
similarity index 100%
rename from tests/generator-Tests/expected/StaticFields/StaticField.xml
rename to tests/generator-Tests/expected.ji/StaticFields/StaticField.xml
diff --git a/tests/generator-Tests/expected/StaticMethods/StaticMethod.xml b/tests/generator-Tests/expected.ji/StaticMethods/StaticMethod.xml
similarity index 100%
rename from tests/generator-Tests/expected/StaticMethods/StaticMethod.xml
rename to tests/generator-Tests/expected.ji/StaticMethods/StaticMethod.xml
diff --git a/tests/generator-Tests/expected/StaticProperties/StaticProperties.xml b/tests/generator-Tests/expected.ji/StaticProperties/StaticProperties.xml
similarity index 100%
rename from tests/generator-Tests/expected/StaticProperties/StaticProperties.xml
rename to tests/generator-Tests/expected.ji/StaticProperties/StaticProperties.xml
diff --git a/tests/generator-Tests/expected/Streams/Streams.xml b/tests/generator-Tests/expected.ji/Streams/Streams.xml
similarity index 100%
rename from tests/generator-Tests/expected/Streams/Streams.xml
rename to tests/generator-Tests/expected.ji/Streams/Streams.xml
diff --git a/tests/generator-Tests/expected/Streams/SupportFiles/InputStreamAdapter.cs b/tests/generator-Tests/expected.ji/Streams/SupportFiles/InputStreamAdapter.cs
similarity index 100%
rename from tests/generator-Tests/expected/Streams/SupportFiles/InputStreamAdapter.cs
rename to tests/generator-Tests/expected.ji/Streams/SupportFiles/InputStreamAdapter.cs
diff --git a/tests/generator-Tests/expected/Streams/SupportFiles/InputStreamInvoker.cs b/tests/generator-Tests/expected.ji/Streams/SupportFiles/InputStreamInvoker.cs
similarity index 100%
rename from tests/generator-Tests/expected/Streams/SupportFiles/InputStreamInvoker.cs
rename to tests/generator-Tests/expected.ji/Streams/SupportFiles/InputStreamInvoker.cs
diff --git a/tests/generator-Tests/expected/Streams/SupportFiles/OutputStreamAdapter.cs b/tests/generator-Tests/expected.ji/Streams/SupportFiles/OutputStreamAdapter.cs
similarity index 100%
rename from tests/generator-Tests/expected/Streams/SupportFiles/OutputStreamAdapter.cs
rename to tests/generator-Tests/expected.ji/Streams/SupportFiles/OutputStreamAdapter.cs
diff --git a/tests/generator-Tests/expected/Streams/SupportFiles/OutputStreamInvoker.cs b/tests/generator-Tests/expected.ji/Streams/SupportFiles/OutputStreamInvoker.cs
similarity index 100%
rename from tests/generator-Tests/expected/Streams/SupportFiles/OutputStreamInvoker.cs
rename to tests/generator-Tests/expected.ji/Streams/SupportFiles/OutputStreamInvoker.cs
diff --git a/tests/generator-Tests/expected/TestInterface/TestInterface.xml b/tests/generator-Tests/expected.ji/TestInterface/TestInterface.xml
similarity index 100%
rename from tests/generator-Tests/expected/TestInterface/TestInterface.xml
rename to tests/generator-Tests/expected.ji/TestInterface/TestInterface.xml
diff --git a/tests/generator-Tests/expected/java.lang.Enum/Java.Lang.Enum.xml b/tests/generator-Tests/expected.ji/java.lang.Enum/Java.Lang.Enum.xml
similarity index 100%
rename from tests/generator-Tests/expected/java.lang.Enum/Java.Lang.Enum.xml
rename to tests/generator-Tests/expected.ji/java.lang.Enum/Java.Lang.Enum.xml
diff --git a/tests/generator-Tests/expected/java.lang.Object/java.lang.Object.xml b/tests/generator-Tests/expected.ji/java.lang.Object/java.lang.Object.xml
similarity index 100%
rename from tests/generator-Tests/expected/java.lang.Object/java.lang.Object.xml
rename to tests/generator-Tests/expected.ji/java.lang.Object/java.lang.Object.xml
diff --git a/tests/generator-Tests/expected/java.util.List/java.util.List.xml b/tests/generator-Tests/expected.ji/java.util.List/java.util.List.xml
similarity index 100%
rename from tests/generator-Tests/expected/java.util.List/java.util.List.xml
rename to tests/generator-Tests/expected.ji/java.util.List/java.util.List.xml
diff --git a/tests/generator-Tests/expected/AccessModifiers/Mono.Android.projitems b/tests/generator-Tests/expected/AccessModifiers/Mono.Android.projitems
deleted file mode 100644
index 8202bce47..000000000
--- a/tests/generator-Tests/expected/AccessModifiers/Mono.Android.projitems
+++ /dev/null
@@ -1,20 +0,0 @@
-
-
-
- $(DefineConstants);ANDROID_1;ANDROID_2;ANDROID_3;ANDROID_4
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/tests/generator-Tests/expected/AccessModifiers/Xamarin.Test.BasePublicClass.cs b/tests/generator-Tests/expected/AccessModifiers/Xamarin.Test.BasePublicClass.cs
deleted file mode 100644
index 59cd62440..000000000
--- a/tests/generator-Tests/expected/AccessModifiers/Xamarin.Test.BasePublicClass.cs
+++ /dev/null
@@ -1,72 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#nullable restore
-using System;
-using System.Collections.Generic;
-using Android.Runtime;
-
-namespace Xamarin.Test {
-
- // Metadata.xml XPath class reference: path="/api/package[@name='xamarin.test']/class[@name='BasePublicClass']"
- [global::Android.Runtime.Register ("xamarin/test/BasePublicClass", DoNotGenerateAcw=true)]
- public partial class BasePublicClass : global::Java.Lang.Object {
-
- internal static new IntPtr java_class_handle;
- internal static new IntPtr class_ref {
- get {
- return JNIEnv.FindClass ("xamarin/test/BasePublicClass", ref java_class_handle);
- }
- }
-
- protected override IntPtr ThresholdClass {
- get { return class_ref; }
- }
-
- protected override global::System.Type ThresholdType {
- get { return typeof (BasePublicClass); }
- }
-
- protected BasePublicClass (IntPtr javaReference, JniHandleOwnership transfer) : base (javaReference, transfer) {}
-
- static Delegate cb_baseMethod;
-#pragma warning disable 0169
- static Delegate GetBaseMethodHandler ()
- {
- if (cb_baseMethod == null)
- cb_baseMethod = JNINativeWrapper.CreateDelegate ((_JniMarshal_PP_V) n_BaseMethod);
- return cb_baseMethod;
- }
-
- static void n_BaseMethod (IntPtr jnienv, IntPtr native__this)
- {
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- __this.BaseMethod ();
- }
-#pragma warning restore 0169
-
- static IntPtr id_baseMethod;
- // Metadata.xml XPath method reference: path="/api/package[@name='xamarin.test']/class[@name='BasePublicClass']/method[@name='baseMethod' and count(parameter)=0]"
- [Register ("baseMethod", "()V", "GetBaseMethodHandler")]
- public virtual unsafe void BaseMethod ()
- {
- if (id_baseMethod == IntPtr.Zero)
- id_baseMethod = JNIEnv.GetMethodID (class_ref, "baseMethod", "()V");
- try {
-
- if (((object) this).GetType () == ThresholdType)
- JNIEnv.CallVoidMethod (((global::Java.Lang.Object) this).Handle, id_baseMethod);
- else
- JNIEnv.CallNonvirtualVoidMethod (((global::Java.Lang.Object) this).Handle, ThresholdClass, JNIEnv.GetMethodID (ThresholdClass, "baseMethod", "()V"));
- } finally {
- }
- }
-
- }
-}
diff --git a/tests/generator-Tests/expected/AccessModifiers/Xamarin.Test.ExtendPublicClass.cs b/tests/generator-Tests/expected/AccessModifiers/Xamarin.Test.ExtendPublicClass.cs
deleted file mode 100644
index 51133e38b..000000000
--- a/tests/generator-Tests/expected/AccessModifiers/Xamarin.Test.ExtendPublicClass.cs
+++ /dev/null
@@ -1,100 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#nullable restore
-using System;
-using System.Collections.Generic;
-using Android.Runtime;
-
-namespace Xamarin.Test {
-
- // Metadata.xml XPath class reference: path="/api/package[@name='xamarin.test']/class[@name='ExtendPublicClass']"
- [global::Android.Runtime.Register ("xamarin/test/ExtendPublicClass", DoNotGenerateAcw=true)]
- public partial class ExtendPublicClass : global::Java.Lang.Object {
-
- internal static new IntPtr java_class_handle;
- internal static new IntPtr class_ref {
- get {
- return JNIEnv.FindClass ("xamarin/test/ExtendPublicClass", ref java_class_handle);
- }
- }
-
- protected override IntPtr ThresholdClass {
- get { return class_ref; }
- }
-
- protected override global::System.Type ThresholdType {
- get { return typeof (ExtendPublicClass); }
- }
-
- protected ExtendPublicClass (IntPtr javaReference, JniHandleOwnership transfer) : base (javaReference, transfer) {}
-
- static IntPtr id_ctor;
- // Metadata.xml XPath constructor reference: path="/api/package[@name='xamarin.test']/class[@name='ExtendPublicClass']/constructor[@name='ExtendPublicClass' and count(parameter)=0]"
- [Register (".ctor", "()V", "")]
- public unsafe ExtendPublicClass ()
- : base (IntPtr.Zero, JniHandleOwnership.DoNotTransfer)
- {
- if (((global::Java.Lang.Object) this).Handle != IntPtr.Zero)
- return;
-
- try {
- if (((object) this).GetType () != typeof (ExtendPublicClass)) {
- SetHandle (
- global::Android.Runtime.JNIEnv.StartCreateInstance (((object) this).GetType (), "()V"),
- JniHandleOwnership.TransferLocalRef);
- global::Android.Runtime.JNIEnv.FinishCreateInstance (((global::Java.Lang.Object) this).Handle, "()V");
- return;
- }
-
- if (id_ctor == IntPtr.Zero)
- id_ctor = JNIEnv.GetMethodID (class_ref, "", "()V");
- SetHandle (
- global::Android.Runtime.JNIEnv.StartCreateInstance (class_ref, id_ctor),
- JniHandleOwnership.TransferLocalRef);
- JNIEnv.FinishCreateInstance (((global::Java.Lang.Object) this).Handle, class_ref, id_ctor);
- } finally {
- }
- }
-
- static Delegate cb_foo;
-#pragma warning disable 0169
- static Delegate GetFooHandler ()
- {
- if (cb_foo == null)
- cb_foo = JNINativeWrapper.CreateDelegate ((_JniMarshal_PP_V) n_Foo);
- return cb_foo;
- }
-
- static void n_Foo (IntPtr jnienv, IntPtr native__this)
- {
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- __this.Foo ();
- }
-#pragma warning restore 0169
-
- static IntPtr id_foo;
- // Metadata.xml XPath method reference: path="/api/package[@name='xamarin.test']/class[@name='ExtendPublicClass']/method[@name='foo' and count(parameter)=0]"
- [Register ("foo", "()V", "GetFooHandler")]
- public virtual unsafe void Foo ()
- {
- if (id_foo == IntPtr.Zero)
- id_foo = JNIEnv.GetMethodID (class_ref, "foo", "()V");
- try {
-
- if (((object) this).GetType () == ThresholdType)
- JNIEnv.CallVoidMethod (((global::Java.Lang.Object) this).Handle, id_foo);
- else
- JNIEnv.CallNonvirtualVoidMethod (((global::Java.Lang.Object) this).Handle, ThresholdClass, JNIEnv.GetMethodID (ThresholdClass, "foo", "()V"));
- } finally {
- }
- }
-
- }
-}
diff --git a/tests/generator-Tests/expected/AccessModifiers/Xamarin.Test.IExtendedInterface.cs b/tests/generator-Tests/expected/AccessModifiers/Xamarin.Test.IExtendedInterface.cs
deleted file mode 100644
index 404c7be9b..000000000
--- a/tests/generator-Tests/expected/AccessModifiers/Xamarin.Test.IExtendedInterface.cs
+++ /dev/null
@@ -1,114 +0,0 @@
-using System;
-using System.Collections.Generic;
-using Android.Runtime;
-
-namespace Xamarin.Test {
-
- // Metadata.xml XPath interface reference: path="/api/package[@name='xamarin.test']/interface[@name='ExtendedInterface']"
- [Register ("xamarin/test/ExtendedInterface", "", "Xamarin.Test.IExtendedInterfaceInvoker")]
- public partial interface IExtendedInterface : IJavaObject {
-
- // Metadata.xml XPath method reference: path="/api/package[@name='xamarin.test']/interface[@name='ExtendedInterface']/method[@name='extendedMethod' and count(parameter)=0]"
- [Register ("extendedMethod", "()V", "GetExtendedMethodHandler:Xamarin.Test.IExtendedInterfaceInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
- void ExtendedMethod ();
-
- // Metadata.xml XPath method reference: path="/api/package[@name='xamarin.test']/interface[@name='BaseInterface']/method[@name='baseMethod' and count(parameter)=0]"
- [Register ("baseMethod", "()V", "GetBaseMethodHandler:Xamarin.Test.IExtendedInterfaceInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
- void BaseMethod ();
-
- }
-
- [global::Android.Runtime.Register ("xamarin/test/ExtendedInterface", DoNotGenerateAcw=true)]
- internal partial class IExtendedInterfaceInvoker : global::Java.Lang.Object, IExtendedInterface {
-
- static IntPtr java_class_ref = JNIEnv.FindClass ("xamarin/test/ExtendedInterface");
-
- protected override IntPtr ThresholdClass {
- get { return class_ref; }
- }
-
- protected override global::System.Type ThresholdType {
- get { return typeof (IExtendedInterfaceInvoker); }
- }
-
- new IntPtr class_ref;
-
- public static IExtendedInterface GetObject (IntPtr handle, JniHandleOwnership transfer)
- {
- return global::Java.Lang.Object.GetObject (handle, transfer);
- }
-
- static IntPtr Validate (IntPtr handle)
- {
- if (!JNIEnv.IsInstanceOf (handle, java_class_ref))
- throw new InvalidCastException (string.Format ("Unable to convert instance of type '{0}' to type '{1}'.",
- JNIEnv.GetClassNameFromInstance (handle), "xamarin.test.ExtendedInterface"));
- return handle;
- }
-
- protected override void Dispose (bool disposing)
- {
- if (this.class_ref != IntPtr.Zero)
- JNIEnv.DeleteGlobalRef (this.class_ref);
- this.class_ref = IntPtr.Zero;
- base.Dispose (disposing);
- }
-
- public IExtendedInterfaceInvoker (IntPtr handle, JniHandleOwnership transfer) : base (Validate (handle), transfer)
- {
- IntPtr local_ref = JNIEnv.GetObjectClass (((global::Java.Lang.Object) this).Handle);
- this.class_ref = JNIEnv.NewGlobalRef (local_ref);
- JNIEnv.DeleteLocalRef (local_ref);
- }
-
- static Delegate cb_extendedMethod;
-#pragma warning disable 0169
- static Delegate GetExtendedMethodHandler ()
- {
- if (cb_extendedMethod == null)
- cb_extendedMethod = JNINativeWrapper.CreateDelegate ((_JniMarshal_PP_V) n_ExtendedMethod);
- return cb_extendedMethod;
- }
-
- static void n_ExtendedMethod (IntPtr jnienv, IntPtr native__this)
- {
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- __this.ExtendedMethod ();
- }
-#pragma warning restore 0169
-
- IntPtr id_extendedMethod;
- public unsafe void ExtendedMethod ()
- {
- if (id_extendedMethod == IntPtr.Zero)
- id_extendedMethod = JNIEnv.GetMethodID (class_ref, "extendedMethod", "()V");
- JNIEnv.CallVoidMethod (((global::Java.Lang.Object) this).Handle, id_extendedMethod);
- }
-
- static Delegate cb_baseMethod;
-#pragma warning disable 0169
- static Delegate GetBaseMethodHandler ()
- {
- if (cb_baseMethod == null)
- cb_baseMethod = JNINativeWrapper.CreateDelegate ((_JniMarshal_PP_V) n_BaseMethod);
- return cb_baseMethod;
- }
-
- static void n_BaseMethod (IntPtr jnienv, IntPtr native__this)
- {
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- __this.BaseMethod ();
- }
-#pragma warning restore 0169
-
- IntPtr id_baseMethod;
- public unsafe void BaseMethod ()
- {
- if (id_baseMethod == IntPtr.Zero)
- id_baseMethod = JNIEnv.GetMethodID (class_ref, "baseMethod", "()V");
- JNIEnv.CallVoidMethod (((global::Java.Lang.Object) this).Handle, id_baseMethod);
- }
-
- }
-
-}
diff --git a/tests/generator-Tests/expected/AccessModifiers/Xamarin.Test.PublicClass.cs b/tests/generator-Tests/expected/AccessModifiers/Xamarin.Test.PublicClass.cs
deleted file mode 100644
index 75ce4d378..000000000
--- a/tests/generator-Tests/expected/AccessModifiers/Xamarin.Test.PublicClass.cs
+++ /dev/null
@@ -1,180 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#nullable restore
-using System;
-using System.Collections.Generic;
-using Android.Runtime;
-
-namespace Xamarin.Test {
-
- // Metadata.xml XPath class reference: path="/api/package[@name='xamarin.test']/class[@name='PublicClass']"
- [global::Android.Runtime.Register ("xamarin/test/PublicClass", DoNotGenerateAcw=true)]
- public partial class PublicClass : global::Java.Lang.Object {
-
- // Metadata.xml XPath interface reference: path="/api/package[@name='xamarin.test']/interface[@name='PublicClass.ProtectedInterface']"
- [Register ("xamarin/test/PublicClass$ProtectedInterface", "", "Xamarin.Test.PublicClass/IProtectedInterfaceInvoker")]
- protected internal partial interface IProtectedInterface : IJavaObject {
-
- // Metadata.xml XPath method reference: path="/api/package[@name='xamarin.test']/interface[@name='PublicClass.ProtectedInterface']/method[@name='foo' and count(parameter)=0]"
- [Register ("foo", "()V", "GetFooHandler:Xamarin.Test.PublicClass/IProtectedInterfaceInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
- void Foo ();
-
- }
-
- [global::Android.Runtime.Register ("xamarin/test/PublicClass$ProtectedInterface", DoNotGenerateAcw=true)]
- internal partial class IProtectedInterfaceInvoker : global::Java.Lang.Object, IProtectedInterface {
-
- static IntPtr java_class_ref = JNIEnv.FindClass ("xamarin/test/PublicClass$ProtectedInterface");
-
- protected override IntPtr ThresholdClass {
- get { return class_ref; }
- }
-
- protected override global::System.Type ThresholdType {
- get { return typeof (IProtectedInterfaceInvoker); }
- }
-
- new IntPtr class_ref;
-
- public static IProtectedInterface GetObject (IntPtr handle, JniHandleOwnership transfer)
- {
- return global::Java.Lang.Object.GetObject (handle, transfer);
- }
-
- static IntPtr Validate (IntPtr handle)
- {
- if (!JNIEnv.IsInstanceOf (handle, java_class_ref))
- throw new InvalidCastException (string.Format ("Unable to convert instance of type '{0}' to type '{1}'.",
- JNIEnv.GetClassNameFromInstance (handle), "xamarin.test.PublicClass.ProtectedInterface"));
- return handle;
- }
-
- protected override void Dispose (bool disposing)
- {
- if (this.class_ref != IntPtr.Zero)
- JNIEnv.DeleteGlobalRef (this.class_ref);
- this.class_ref = IntPtr.Zero;
- base.Dispose (disposing);
- }
-
- public IProtectedInterfaceInvoker (IntPtr handle, JniHandleOwnership transfer) : base (Validate (handle), transfer)
- {
- IntPtr local_ref = JNIEnv.GetObjectClass (((global::Java.Lang.Object) this).Handle);
- this.class_ref = JNIEnv.NewGlobalRef (local_ref);
- JNIEnv.DeleteLocalRef (local_ref);
- }
-
- static Delegate cb_foo;
-#pragma warning disable 0169
- static Delegate GetFooHandler ()
- {
- if (cb_foo == null)
- cb_foo = JNINativeWrapper.CreateDelegate ((_JniMarshal_PP_V) n_Foo);
- return cb_foo;
- }
-
- static void n_Foo (IntPtr jnienv, IntPtr native__this)
- {
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- __this.Foo ();
- }
-#pragma warning restore 0169
-
- IntPtr id_foo;
- public unsafe void Foo ()
- {
- if (id_foo == IntPtr.Zero)
- id_foo = JNIEnv.GetMethodID (class_ref, "foo", "()V");
- JNIEnv.CallVoidMethod (((global::Java.Lang.Object) this).Handle, id_foo);
- }
-
- }
-
-
- internal static new IntPtr java_class_handle;
- internal static new IntPtr class_ref {
- get {
- return JNIEnv.FindClass ("xamarin/test/PublicClass", ref java_class_handle);
- }
- }
-
- protected override IntPtr ThresholdClass {
- get { return class_ref; }
- }
-
- protected override global::System.Type ThresholdType {
- get { return typeof (PublicClass); }
- }
-
- protected PublicClass (IntPtr javaReference, JniHandleOwnership transfer) : base (javaReference, transfer) {}
-
- static IntPtr id_ctor;
- // Metadata.xml XPath constructor reference: path="/api/package[@name='xamarin.test']/class[@name='PublicClass']/constructor[@name='PublicClass' and count(parameter)=0]"
- [Register (".ctor", "()V", "")]
- public unsafe PublicClass ()
- : base (IntPtr.Zero, JniHandleOwnership.DoNotTransfer)
- {
- if (((global::Java.Lang.Object) this).Handle != IntPtr.Zero)
- return;
-
- try {
- if (((object) this).GetType () != typeof (PublicClass)) {
- SetHandle (
- global::Android.Runtime.JNIEnv.StartCreateInstance (((object) this).GetType (), "()V"),
- JniHandleOwnership.TransferLocalRef);
- global::Android.Runtime.JNIEnv.FinishCreateInstance (((global::Java.Lang.Object) this).Handle, "()V");
- return;
- }
-
- if (id_ctor == IntPtr.Zero)
- id_ctor = JNIEnv.GetMethodID (class_ref, "", "()V");
- SetHandle (
- global::Android.Runtime.JNIEnv.StartCreateInstance (class_ref, id_ctor),
- JniHandleOwnership.TransferLocalRef);
- JNIEnv.FinishCreateInstance (((global::Java.Lang.Object) this).Handle, class_ref, id_ctor);
- } finally {
- }
- }
-
- static Delegate cb_foo;
-#pragma warning disable 0169
- static Delegate GetFooHandler ()
- {
- if (cb_foo == null)
- cb_foo = JNINativeWrapper.CreateDelegate ((_JniMarshal_PP_V) n_Foo);
- return cb_foo;
- }
-
- static void n_Foo (IntPtr jnienv, IntPtr native__this)
- {
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- __this.Foo ();
- }
-#pragma warning restore 0169
-
- static IntPtr id_foo;
- // Metadata.xml XPath method reference: path="/api/package[@name='xamarin.test']/class[@name='PublicClass']/method[@name='foo' and count(parameter)=0]"
- [Register ("foo", "()V", "GetFooHandler")]
- public virtual unsafe void Foo ()
- {
- if (id_foo == IntPtr.Zero)
- id_foo = JNIEnv.GetMethodID (class_ref, "foo", "()V");
- try {
-
- if (((object) this).GetType () == ThresholdType)
- JNIEnv.CallVoidMethod (((global::Java.Lang.Object) this).Handle, id_foo);
- else
- JNIEnv.CallNonvirtualVoidMethod (((global::Java.Lang.Object) this).Handle, ThresholdClass, JNIEnv.GetMethodID (ThresholdClass, "foo", "()V"));
- } finally {
- }
- }
-
- }
-}
diff --git a/tests/generator-Tests/expected/AccessModifiers/Xamarin.Test.PublicFinalClass.cs b/tests/generator-Tests/expected/AccessModifiers/Xamarin.Test.PublicFinalClass.cs
deleted file mode 100644
index 9e89768d5..000000000
--- a/tests/generator-Tests/expected/AccessModifiers/Xamarin.Test.PublicFinalClass.cs
+++ /dev/null
@@ -1,78 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#nullable restore
-using System;
-using System.Collections.Generic;
-using Android.Runtime;
-
-namespace Xamarin.Test {
-
- // Metadata.xml XPath class reference: path="/api/package[@name='xamarin.test']/class[@name='PublicFinalClass']"
- [global::Android.Runtime.Register ("xamarin/test/PublicFinalClass", DoNotGenerateAcw=true)]
- public sealed partial class PublicFinalClass : global::Xamarin.Test.BasePublicClass {
-
- internal static new IntPtr java_class_handle;
- internal static new IntPtr class_ref {
- get {
- return JNIEnv.FindClass ("xamarin/test/PublicFinalClass", ref java_class_handle);
- }
- }
-
- protected override IntPtr ThresholdClass {
- get { return class_ref; }
- }
-
- protected override global::System.Type ThresholdType {
- get { return typeof (PublicFinalClass); }
- }
-
- internal PublicFinalClass (IntPtr javaReference, JniHandleOwnership transfer) : base (javaReference, transfer) {}
-
- static IntPtr id_publicMethod;
- // Metadata.xml XPath method reference: path="/api/package[@name='xamarin.test']/class[@name='PublicFinalClass']/method[@name='publicMethod' and count(parameter)=0]"
- [Register ("publicMethod", "()V", "")]
- public unsafe void PublicMethod ()
- {
- if (id_publicMethod == IntPtr.Zero)
- id_publicMethod = JNIEnv.GetMethodID (class_ref, "publicMethod", "()V");
- try {
- JNIEnv.CallVoidMethod (((global::Java.Lang.Object) this).Handle, id_publicMethod);
- } finally {
- }
- }
-
- static IntPtr id_packageMethodB;
- // Metadata.xml XPath method reference: path="/api/package[@name='xamarin.test']/class[@name='PublicFinalClass']/method[@name='packageMethodB' and count(parameter)=0]"
- [Register ("packageMethodB", "()V", "")]
- public unsafe void PackageMethodB ()
- {
- if (id_packageMethodB == IntPtr.Zero)
- id_packageMethodB = JNIEnv.GetMethodID (class_ref, "packageMethodB", "()V");
- try {
- JNIEnv.CallVoidMethod (((global::Java.Lang.Object) this).Handle, id_packageMethodB);
- } finally {
- }
- }
-
- static IntPtr id_packageMethodA;
- // Metadata.xml XPath method reference: path="/api/package[@name='xamarin.test']/class[@name='PublicFinalClass']/method[@name='packageMethodA' and count(parameter)=0]"
- [Register ("packageMethodA", "()V", "")]
- public unsafe void PackageMethodA ()
- {
- if (id_packageMethodA == IntPtr.Zero)
- id_packageMethodA = JNIEnv.GetMethodID (class_ref, "packageMethodA", "()V");
- try {
- JNIEnv.CallVoidMethod (((global::Java.Lang.Object) this).Handle, id_packageMethodA);
- } finally {
- }
- }
-
- }
-}
diff --git a/tests/generator-Tests/expected/AccessModifiers/Xamarin.Test.TestClass.cs b/tests/generator-Tests/expected/AccessModifiers/Xamarin.Test.TestClass.cs
deleted file mode 100644
index f86a9a12d..000000000
--- a/tests/generator-Tests/expected/AccessModifiers/Xamarin.Test.TestClass.cs
+++ /dev/null
@@ -1,100 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#nullable restore
-using System;
-using System.Collections.Generic;
-using Android.Runtime;
-
-namespace Xamarin.Test {
-
- // Metadata.xml XPath class reference: path="/api/package[@name='xamarin.test']/class[@name='TestClass']"
- [global::Android.Runtime.Register ("xamarin/test/TestClass", DoNotGenerateAcw=true)]
- public partial class TestClass : global::Java.Lang.Object {
-
- internal static new IntPtr java_class_handle;
- internal static new IntPtr class_ref {
- get {
- return JNIEnv.FindClass ("xamarin/test/TestClass", ref java_class_handle);
- }
- }
-
- protected override IntPtr ThresholdClass {
- get { return class_ref; }
- }
-
- protected override global::System.Type ThresholdType {
- get { return typeof (TestClass); }
- }
-
- protected TestClass (IntPtr javaReference, JniHandleOwnership transfer) : base (javaReference, transfer) {}
-
- static IntPtr id_ctor;
- // Metadata.xml XPath constructor reference: path="/api/package[@name='xamarin.test']/class[@name='TestClass']/constructor[@name='TestClass' and count(parameter)=0]"
- [Register (".ctor", "()V", "")]
- public unsafe TestClass ()
- : base (IntPtr.Zero, JniHandleOwnership.DoNotTransfer)
- {
- if (((global::Java.Lang.Object) this).Handle != IntPtr.Zero)
- return;
-
- try {
- if (((object) this).GetType () != typeof (TestClass)) {
- SetHandle (
- global::Android.Runtime.JNIEnv.StartCreateInstance (((object) this).GetType (), "()V"),
- JniHandleOwnership.TransferLocalRef);
- global::Android.Runtime.JNIEnv.FinishCreateInstance (((global::Java.Lang.Object) this).Handle, "()V");
- return;
- }
-
- if (id_ctor == IntPtr.Zero)
- id_ctor = JNIEnv.GetMethodID (class_ref, "", "()V");
- SetHandle (
- global::Android.Runtime.JNIEnv.StartCreateInstance (class_ref, id_ctor),
- JniHandleOwnership.TransferLocalRef);
- JNIEnv.FinishCreateInstance (((global::Java.Lang.Object) this).Handle, class_ref, id_ctor);
- } finally {
- }
- }
-
- static Delegate cb_baseMethod;
-#pragma warning disable 0169
- static Delegate GetBaseMethodHandler ()
- {
- if (cb_baseMethod == null)
- cb_baseMethod = JNINativeWrapper.CreateDelegate ((_JniMarshal_PP_V) n_BaseMethod);
- return cb_baseMethod;
- }
-
- static void n_BaseMethod (IntPtr jnienv, IntPtr native__this)
- {
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- __this.BaseMethod ();
- }
-#pragma warning restore 0169
-
- static IntPtr id_baseMethod;
- // Metadata.xml XPath method reference: path="/api/package[@name='xamarin.test']/class[@name='TestClass']/method[@name='baseMethod' and count(parameter)=0]"
- [Register ("baseMethod", "()V", "GetBaseMethodHandler")]
- public virtual unsafe void BaseMethod ()
- {
- if (id_baseMethod == IntPtr.Zero)
- id_baseMethod = JNIEnv.GetMethodID (class_ref, "baseMethod", "()V");
- try {
-
- if (((object) this).GetType () == ThresholdType)
- JNIEnv.CallVoidMethod (((global::Java.Lang.Object) this).Handle, id_baseMethod);
- else
- JNIEnv.CallNonvirtualVoidMethod (((global::Java.Lang.Object) this).Handle, ThresholdClass, JNIEnv.GetMethodID (ThresholdClass, "baseMethod", "()V"));
- } finally {
- }
- }
-
- }
-}
diff --git a/tests/generator-Tests/expected/Adapters/Mono.Android.projitems b/tests/generator-Tests/expected/Adapters/Mono.Android.projitems
deleted file mode 100644
index 4e6987503..000000000
--- a/tests/generator-Tests/expected/Adapters/Mono.Android.projitems
+++ /dev/null
@@ -1,19 +0,0 @@
-
-
-
- $(DefineConstants);ANDROID_1;ANDROID_2;ANDROID_3;ANDROID_4
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/tests/generator-Tests/expected/Adapters/Xamarin.Test.AbsSpinner.cs b/tests/generator-Tests/expected/Adapters/Xamarin.Test.AbsSpinner.cs
deleted file mode 100644
index 5f7fc9ad0..000000000
--- a/tests/generator-Tests/expected/Adapters/Xamarin.Test.AbsSpinner.cs
+++ /dev/null
@@ -1,148 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#nullable restore
-using System;
-using System.Collections.Generic;
-using Android.Runtime;
-
-namespace Xamarin.Test {
-
- // Metadata.xml XPath class reference: path="/api/package[@name='xamarin.test']/class[@name='AbsSpinner']"
- [global::Android.Runtime.Register ("xamarin/test/AbsSpinner", DoNotGenerateAcw=true)]
- public abstract partial class AbsSpinner : Xamarin.Test.AdapterView {
-
- internal static new IntPtr java_class_handle;
- internal static new IntPtr class_ref {
- get {
- return JNIEnv.FindClass ("xamarin/test/AbsSpinner", ref java_class_handle);
- }
- }
-
- protected override IntPtr ThresholdClass {
- get { return class_ref; }
- }
-
- protected override global::System.Type ThresholdType {
- get { return typeof (AbsSpinner); }
- }
-
- protected AbsSpinner (IntPtr javaReference, JniHandleOwnership transfer) : base (javaReference, transfer) {}
-
- static Delegate cb_getAdapter;
-#pragma warning disable 0169
- static Delegate GetGetAdapterHandler ()
- {
- if (cb_getAdapter == null)
- cb_getAdapter = JNINativeWrapper.CreateDelegate ((_JniMarshal_PP_L) n_GetAdapter);
- return cb_getAdapter;
- }
-
- static IntPtr n_GetAdapter (IntPtr jnienv, IntPtr native__this)
- {
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- return JNIEnv.ToLocalJniHandle (__this.Adapter);
- }
-#pragma warning restore 0169
-
- static Delegate cb_setAdapter_Lxamarin_test_SpinnerAdapter_;
-#pragma warning disable 0169
- static Delegate GetSetAdapter_Lxamarin_test_SpinnerAdapter_Handler ()
- {
- if (cb_setAdapter_Lxamarin_test_SpinnerAdapter_ == null)
- cb_setAdapter_Lxamarin_test_SpinnerAdapter_ = JNINativeWrapper.CreateDelegate ((_JniMarshal_PPL_V) n_SetAdapter_Lxamarin_test_SpinnerAdapter_);
- return cb_setAdapter_Lxamarin_test_SpinnerAdapter_;
- }
-
- static void n_SetAdapter_Lxamarin_test_SpinnerAdapter_ (IntPtr jnienv, IntPtr native__this, IntPtr native_adapter)
- {
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- var adapter = (global::Xamarin.Test.ISpinnerAdapter)global::Java.Lang.Object.GetObject (native_adapter, JniHandleOwnership.DoNotTransfer);
- __this.Adapter = adapter;
- }
-#pragma warning restore 0169
-
- static IntPtr id_getAdapter;
- static IntPtr id_setAdapter_Lxamarin_test_SpinnerAdapter_;
- public override unsafe global::Xamarin.Test.ISpinnerAdapter Adapter {
- // Metadata.xml XPath method reference: path="/api/package[@name='xamarin.test']/class[@name='AbsSpinner']/method[@name='getAdapter' and count(parameter)=0]"
- [Register ("getAdapter", "()Lxamarin/test/SpinnerAdapter;", "GetGetAdapterHandler")]
- get {
- if (id_getAdapter == IntPtr.Zero)
- id_getAdapter = JNIEnv.GetMethodID (class_ref, "getAdapter", "()Lxamarin/test/SpinnerAdapter;");
- try {
-
- if (((object) this).GetType () == ThresholdType)
- return global::Java.Lang.Object.GetObject (JNIEnv.CallObjectMethod (((global::Java.Lang.Object) this).Handle, id_getAdapter), JniHandleOwnership.TransferLocalRef);
- else
- return global::Java.Lang.Object.GetObject (JNIEnv.CallNonvirtualObjectMethod (((global::Java.Lang.Object) this).Handle, ThresholdClass, JNIEnv.GetMethodID (ThresholdClass, "getAdapter", "()Lxamarin/test/SpinnerAdapter;")), JniHandleOwnership.TransferLocalRef);
- } finally {
- }
- }
- // Metadata.xml XPath method reference: path="/api/package[@name='xamarin.test']/class[@name='AbsSpinner']/method[@name='setAdapter' and count(parameter)=1 and parameter[1][@type='xamarin.test.SpinnerAdapter']]"
- [Register ("setAdapter", "(Lxamarin/test/SpinnerAdapter;)V", "GetSetAdapter_Lxamarin_test_SpinnerAdapter_Handler")]
- set {
- if (id_setAdapter_Lxamarin_test_SpinnerAdapter_ == IntPtr.Zero)
- id_setAdapter_Lxamarin_test_SpinnerAdapter_ = JNIEnv.GetMethodID (class_ref, "setAdapter", "(Lxamarin/test/SpinnerAdapter;)V");
- try {
- JValue* __args = stackalloc JValue [1];
- __args [0] = new JValue (value);
-
- if (((object) this).GetType () == ThresholdType)
- JNIEnv.CallVoidMethod (((global::Java.Lang.Object) this).Handle, id_setAdapter_Lxamarin_test_SpinnerAdapter_, __args);
- else
- JNIEnv.CallNonvirtualVoidMethod (((global::Java.Lang.Object) this).Handle, ThresholdClass, JNIEnv.GetMethodID (ThresholdClass, "setAdapter", "(Lxamarin/test/SpinnerAdapter;)V"), __args);
- } finally {
- }
- }
- }
-
- }
-
- [global::Android.Runtime.Register ("xamarin/test/AbsSpinner", DoNotGenerateAcw=true)]
- internal partial class AbsSpinnerInvoker : AbsSpinner {
-
- public AbsSpinnerInvoker (IntPtr handle, JniHandleOwnership transfer) : base (handle, transfer) {}
-
- protected override global::System.Type ThresholdType {
- get { return typeof (AbsSpinnerInvoker); }
- }
-
- static IntPtr id_getAdapter;
- static IntPtr id_setAdapter_Lxamarin_test_Adapter_;
- protected override unsafe global::Java.Lang.Object RawAdapter {
- // Metadata.xml XPath method reference: path="/api/package[@name='xamarin.test']/class[@name='AdapterView']/method[@name='getAdapter' and count(parameter)=0]"
- [Register ("getAdapter", "()Lxamarin/test/Adapter;", "GetGetAdapterHandler")]
- get {
- if (id_getAdapter == IntPtr.Zero)
- id_getAdapter = JNIEnv.GetMethodID (class_ref, "getAdapter", "()Lxamarin/test/Adapter;");
- try {
- return (global::Java.Lang.Object) global::Java.Lang.Object.GetObject (JNIEnv.CallObjectMethod (((global::Java.Lang.Object) this).Handle, id_getAdapter), JniHandleOwnership.TransferLocalRef);
- } finally {
- }
- }
- // Metadata.xml XPath method reference: path="/api/package[@name='xamarin.test']/class[@name='AdapterView']/method[@name='setAdapter' and count(parameter)=1 and parameter[1][@type='T']]"
- [Register ("setAdapter", "(Lxamarin/test/Adapter;)V", "GetSetAdapter_Lxamarin_test_Adapter_Handler")]
- set {
- if (id_setAdapter_Lxamarin_test_Adapter_ == IntPtr.Zero)
- id_setAdapter_Lxamarin_test_Adapter_ = JNIEnv.GetMethodID (class_ref, "setAdapter", "(Lxamarin/test/Adapter;)V");
- IntPtr native_value = JNIEnv.ToLocalJniHandle (value);
- try {
- JValue* __args = stackalloc JValue [1];
- __args [0] = new JValue (native_value);
- JNIEnv.CallVoidMethod (((global::Java.Lang.Object) this).Handle, id_setAdapter_Lxamarin_test_Adapter_, __args);
- } finally {
- JNIEnv.DeleteLocalRef (native_value);
- }
- }
- }
-
- }
-
-}
diff --git a/tests/generator-Tests/expected/Adapters/Xamarin.Test.AdapterView.cs b/tests/generator-Tests/expected/Adapters/Xamarin.Test.AdapterView.cs
deleted file mode 100644
index bede35ee7..000000000
--- a/tests/generator-Tests/expected/Adapters/Xamarin.Test.AdapterView.cs
+++ /dev/null
@@ -1,121 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#nullable restore
-using System;
-using System.Collections.Generic;
-using Android.Runtime;
-
-namespace Xamarin.Test {
-
- // Metadata.xml XPath class reference: path="/api/package[@name='xamarin.test']/class[@name='AdapterView']"
- [global::Android.Runtime.Register ("xamarin/test/AdapterView", DoNotGenerateAcw=true)]
- [global::Java.Interop.JavaTypeParameters (new string [] {"T extends xamarin.test.Adapter"})]
- public abstract partial class AdapterView : global::Java.Lang.Object {
-
- internal static new IntPtr java_class_handle;
- internal static new IntPtr class_ref {
- get {
- return JNIEnv.FindClass ("xamarin/test/AdapterView", ref java_class_handle);
- }
- }
-
- protected override IntPtr ThresholdClass {
- get { return class_ref; }
- }
-
- protected override global::System.Type ThresholdType {
- get { return typeof (AdapterView); }
- }
-
- protected AdapterView (IntPtr javaReference, JniHandleOwnership transfer) : base (javaReference, transfer) {}
-
- static Delegate cb_getAdapter;
-#pragma warning disable 0169
- static Delegate GetGetAdapterHandler ()
- {
- if (cb_getAdapter == null)
- cb_getAdapter = JNINativeWrapper.CreateDelegate ((_JniMarshal_PP_L) n_GetAdapter);
- return cb_getAdapter;
- }
-
- static IntPtr n_GetAdapter (IntPtr jnienv, IntPtr native__this)
- {
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- return JNIEnv.ToLocalJniHandle (__this.RawAdapter);
- }
-#pragma warning restore 0169
-
- static Delegate cb_setAdapter_Lxamarin_test_Adapter_;
-#pragma warning disable 0169
- static Delegate GetSetAdapter_Lxamarin_test_Adapter_Handler ()
- {
- if (cb_setAdapter_Lxamarin_test_Adapter_ == null)
- cb_setAdapter_Lxamarin_test_Adapter_ = JNINativeWrapper.CreateDelegate ((_JniMarshal_PPL_V) n_SetAdapter_Lxamarin_test_Adapter_);
- return cb_setAdapter_Lxamarin_test_Adapter_;
- }
-
- static void n_SetAdapter_Lxamarin_test_Adapter_ (IntPtr jnienv, IntPtr native__this, IntPtr native_adapter)
- {
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- var adapter = global::Java.Lang.Object.GetObject (native_adapter, JniHandleOwnership.DoNotTransfer);
- __this.RawAdapter = adapter;
- }
-#pragma warning restore 0169
-
- protected abstract global::Java.Lang.Object RawAdapter {
- // Metadata.xml XPath method reference: path="/api/package[@name='xamarin.test']/class[@name='AdapterView']/method[@name='getAdapter' and count(parameter)=0]"
- [Register ("getAdapter", "()Lxamarin/test/Adapter;", "GetGetAdapterHandler")] get;
- // Metadata.xml XPath method reference: path="/api/package[@name='xamarin.test']/class[@name='AdapterView']/method[@name='setAdapter' and count(parameter)=1 and parameter[1][@type='T']]"
- [Register ("setAdapter", "(Lxamarin/test/Adapter;)V", "GetSetAdapter_Lxamarin_test_Adapter_Handler")] set;
- }
-
- }
-
- [global::Android.Runtime.Register ("xamarin/test/AdapterView", DoNotGenerateAcw=true)]
- internal partial class AdapterViewInvoker : AdapterView {
-
- public AdapterViewInvoker (IntPtr handle, JniHandleOwnership transfer) : base (handle, transfer) {}
-
- protected override global::System.Type ThresholdType {
- get { return typeof (AdapterViewInvoker); }
- }
-
- static IntPtr id_getAdapter;
- static IntPtr id_setAdapter_Lxamarin_test_Adapter_;
- protected override unsafe global::Java.Lang.Object RawAdapter {
- // Metadata.xml XPath method reference: path="/api/package[@name='xamarin.test']/class[@name='AdapterView']/method[@name='getAdapter' and count(parameter)=0]"
- [Register ("getAdapter", "()Lxamarin/test/Adapter;", "GetGetAdapterHandler")]
- get {
- if (id_getAdapter == IntPtr.Zero)
- id_getAdapter = JNIEnv.GetMethodID (class_ref, "getAdapter", "()Lxamarin/test/Adapter;");
- try {
- return (global::Java.Lang.Object) global::Java.Lang.Object.GetObject (JNIEnv.CallObjectMethod (((global::Java.Lang.Object) this).Handle, id_getAdapter), JniHandleOwnership.TransferLocalRef);
- } finally {
- }
- }
- // Metadata.xml XPath method reference: path="/api/package[@name='xamarin.test']/class[@name='AdapterView']/method[@name='setAdapter' and count(parameter)=1 and parameter[1][@type='T']]"
- [Register ("setAdapter", "(Lxamarin/test/Adapter;)V", "GetSetAdapter_Lxamarin_test_Adapter_Handler")]
- set {
- if (id_setAdapter_Lxamarin_test_Adapter_ == IntPtr.Zero)
- id_setAdapter_Lxamarin_test_Adapter_ = JNIEnv.GetMethodID (class_ref, "setAdapter", "(Lxamarin/test/Adapter;)V");
- IntPtr native_value = JNIEnv.ToLocalJniHandle (value);
- try {
- JValue* __args = stackalloc JValue [1];
- __args [0] = new JValue (native_value);
- JNIEnv.CallVoidMethod (((global::Java.Lang.Object) this).Handle, id_setAdapter_Lxamarin_test_Adapter_, __args);
- } finally {
- JNIEnv.DeleteLocalRef (native_value);
- }
- }
- }
-
- }
-
-}
diff --git a/tests/generator-Tests/expected/Adapters/Xamarin.Test.GenericReturnObject.cs b/tests/generator-Tests/expected/Adapters/Xamarin.Test.GenericReturnObject.cs
deleted file mode 100644
index 60d2863f6..000000000
--- a/tests/generator-Tests/expected/Adapters/Xamarin.Test.GenericReturnObject.cs
+++ /dev/null
@@ -1,72 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#nullable restore
-using System;
-using System.Collections.Generic;
-using Android.Runtime;
-
-namespace Xamarin.Test {
-
- // Metadata.xml XPath class reference: path="/api/package[@name='xamarin.test']/class[@name='GenericReturnObject']"
- [global::Android.Runtime.Register ("xamarin/test/GenericReturnObject", DoNotGenerateAcw=true)]
- public partial class GenericReturnObject : global::Java.Lang.Object {
-
- internal static new IntPtr java_class_handle;
- internal static new IntPtr class_ref {
- get {
- return JNIEnv.FindClass ("xamarin/test/GenericReturnObject", ref java_class_handle);
- }
- }
-
- protected override IntPtr ThresholdClass {
- get { return class_ref; }
- }
-
- protected override global::System.Type ThresholdType {
- get { return typeof (GenericReturnObject); }
- }
-
- protected GenericReturnObject (IntPtr javaReference, JniHandleOwnership transfer) : base (javaReference, transfer) {}
-
- static Delegate cb_GenericReturn;
-#pragma warning disable 0169
- static Delegate GetGenericReturnHandler ()
- {
- if (cb_GenericReturn == null)
- cb_GenericReturn = JNINativeWrapper.CreateDelegate ((_JniMarshal_PP_L) n_GenericReturn);
- return cb_GenericReturn;
- }
-
- static IntPtr n_GenericReturn (IntPtr jnienv, IntPtr native__this)
- {
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- return JNIEnv.ToLocalJniHandle (__this.GenericReturn ());
- }
-#pragma warning restore 0169
-
- static IntPtr id_GenericReturn;
- // Metadata.xml XPath method reference: path="/api/package[@name='xamarin.test']/class[@name='GenericReturnObject']/method[@name='GenericReturn' and count(parameter)=0]"
- [Register ("GenericReturn", "()Lxamarin/test/AdapterView;", "GetGenericReturnHandler")]
- public virtual unsafe global::Xamarin.Test.AdapterView GenericReturn ()
- {
- if (id_GenericReturn == IntPtr.Zero)
- id_GenericReturn = JNIEnv.GetMethodID (class_ref, "GenericReturn", "()Lxamarin/test/AdapterView;");
- try {
-
- if (((object) this).GetType () == ThresholdType)
- return global::Java.Lang.Object.GetObject (JNIEnv.CallObjectMethod (((global::Java.Lang.Object) this).Handle, id_GenericReturn), JniHandleOwnership.TransferLocalRef);
- else
- return global::Java.Lang.Object.GetObject (JNIEnv.CallNonvirtualObjectMethod (((global::Java.Lang.Object) this).Handle, ThresholdClass, JNIEnv.GetMethodID (ThresholdClass, "GenericReturn", "()Lxamarin/test/AdapterView;")), JniHandleOwnership.TransferLocalRef);
- } finally {
- }
- }
-
- }
-}
diff --git a/tests/generator-Tests/expected/Adapters/Xamarin.Test.IAdapter.cs b/tests/generator-Tests/expected/Adapters/Xamarin.Test.IAdapter.cs
deleted file mode 100644
index b1ad7cfba..000000000
--- a/tests/generator-Tests/expected/Adapters/Xamarin.Test.IAdapter.cs
+++ /dev/null
@@ -1,58 +0,0 @@
-using System;
-using System.Collections.Generic;
-using Android.Runtime;
-
-namespace Xamarin.Test {
-
- // Metadata.xml XPath interface reference: path="/api/package[@name='xamarin.test']/interface[@name='Adapter']"
- [Register ("xamarin/test/Adapter", "", "Xamarin.Test.IAdapterInvoker")]
- public partial interface IAdapter : IJavaObject {
-
- }
-
- [global::Android.Runtime.Register ("xamarin/test/Adapter", DoNotGenerateAcw=true)]
- internal partial class IAdapterInvoker : global::Java.Lang.Object, IAdapter {
-
- static IntPtr java_class_ref = JNIEnv.FindClass ("xamarin/test/Adapter");
-
- protected override IntPtr ThresholdClass {
- get { return class_ref; }
- }
-
- protected override global::System.Type ThresholdType {
- get { return typeof (IAdapterInvoker); }
- }
-
- new IntPtr class_ref;
-
- public static IAdapter GetObject (IntPtr handle, JniHandleOwnership transfer)
- {
- return global::Java.Lang.Object.GetObject (handle, transfer);
- }
-
- static IntPtr Validate (IntPtr handle)
- {
- if (!JNIEnv.IsInstanceOf (handle, java_class_ref))
- throw new InvalidCastException (string.Format ("Unable to convert instance of type '{0}' to type '{1}'.",
- JNIEnv.GetClassNameFromInstance (handle), "xamarin.test.Adapter"));
- return handle;
- }
-
- protected override void Dispose (bool disposing)
- {
- if (this.class_ref != IntPtr.Zero)
- JNIEnv.DeleteGlobalRef (this.class_ref);
- this.class_ref = IntPtr.Zero;
- base.Dispose (disposing);
- }
-
- public IAdapterInvoker (IntPtr handle, JniHandleOwnership transfer) : base (Validate (handle), transfer)
- {
- IntPtr local_ref = JNIEnv.GetObjectClass (((global::Java.Lang.Object) this).Handle);
- this.class_ref = JNIEnv.NewGlobalRef (local_ref);
- JNIEnv.DeleteLocalRef (local_ref);
- }
-
- }
-
-}
diff --git a/tests/generator-Tests/expected/Adapters/Xamarin.Test.ISpinnerAdapter.cs b/tests/generator-Tests/expected/Adapters/Xamarin.Test.ISpinnerAdapter.cs
deleted file mode 100644
index dace2f2bc..000000000
--- a/tests/generator-Tests/expected/Adapters/Xamarin.Test.ISpinnerAdapter.cs
+++ /dev/null
@@ -1,58 +0,0 @@
-using System;
-using System.Collections.Generic;
-using Android.Runtime;
-
-namespace Xamarin.Test {
-
- // Metadata.xml XPath interface reference: path="/api/package[@name='xamarin.test']/interface[@name='SpinnerAdapter']"
- [Register ("xamarin/test/SpinnerAdapter", "", "Xamarin.Test.ISpinnerAdapterInvoker")]
- public partial interface ISpinnerAdapter : global::Xamarin.Test.IAdapter {
-
- }
-
- [global::Android.Runtime.Register ("xamarin/test/SpinnerAdapter", DoNotGenerateAcw=true)]
- internal partial class ISpinnerAdapterInvoker : global::Java.Lang.Object, ISpinnerAdapter {
-
- static IntPtr java_class_ref = JNIEnv.FindClass ("xamarin/test/SpinnerAdapter");
-
- protected override IntPtr ThresholdClass {
- get { return class_ref; }
- }
-
- protected override global::System.Type ThresholdType {
- get { return typeof (ISpinnerAdapterInvoker); }
- }
-
- new IntPtr class_ref;
-
- public static ISpinnerAdapter GetObject (IntPtr handle, JniHandleOwnership transfer)
- {
- return global::Java.Lang.Object.GetObject (handle, transfer);
- }
-
- static IntPtr Validate (IntPtr handle)
- {
- if (!JNIEnv.IsInstanceOf (handle, java_class_ref))
- throw new InvalidCastException (string.Format ("Unable to convert instance of type '{0}' to type '{1}'.",
- JNIEnv.GetClassNameFromInstance (handle), "xamarin.test.SpinnerAdapter"));
- return handle;
- }
-
- protected override void Dispose (bool disposing)
- {
- if (this.class_ref != IntPtr.Zero)
- JNIEnv.DeleteGlobalRef (this.class_ref);
- this.class_ref = IntPtr.Zero;
- base.Dispose (disposing);
- }
-
- public ISpinnerAdapterInvoker (IntPtr handle, JniHandleOwnership transfer) : base (Validate (handle), transfer)
- {
- IntPtr local_ref = JNIEnv.GetObjectClass (((global::Java.Lang.Object) this).Handle);
- this.class_ref = JNIEnv.NewGlobalRef (local_ref);
- JNIEnv.DeleteLocalRef (local_ref);
- }
-
- }
-
-}
diff --git a/tests/generator-Tests/expected/Android.Graphics.Color/Mono.Android.projitems b/tests/generator-Tests/expected/Android.Graphics.Color/Mono.Android.projitems
deleted file mode 100644
index 066be1dd1..000000000
--- a/tests/generator-Tests/expected/Android.Graphics.Color/Mono.Android.projitems
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-
- $(DefineConstants);ANDROID_1;ANDROID_2;ANDROID_3;ANDROID_4
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/tests/generator-Tests/expected/Android.Graphics.Color/Xamarin.Test.SomeObject.cs b/tests/generator-Tests/expected/Android.Graphics.Color/Xamarin.Test.SomeObject.cs
deleted file mode 100644
index 7b3131682..000000000
--- a/tests/generator-Tests/expected/Android.Graphics.Color/Xamarin.Test.SomeObject.cs
+++ /dev/null
@@ -1,139 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#nullable restore
-using System;
-using System.Collections.Generic;
-using Android.Runtime;
-
-namespace Xamarin.Test {
-
- // Metadata.xml XPath class reference: path="/api/package[@name='xamarin.test']/class[@name='SomeObject']"
- [global::Android.Runtime.Register ("xamarin/test/SomeObject", DoNotGenerateAcw=true)]
- public abstract partial class SomeObject : global::Java.Lang.Object {
-
-
- static IntPtr backColor_jfieldId;
-
- // Metadata.xml XPath field reference: path="/api/package[@name='xamarin.test']/class[@name='SomeObject']/field[@name='backColor']"
- [Register ("backColor")]
- public global::Android.Graphics.Color BackColor {
- get {
- if (backColor_jfieldId == IntPtr.Zero)
- backColor_jfieldId = JNIEnv.GetFieldID (class_ref, "backColor", "I");
- int __ret = JNIEnv.GetIntField (((global::Java.Lang.Object) this).Handle, backColor_jfieldId);
- return new global::Android.Graphics.Color (__ret);
- }
- set {
- if (backColor_jfieldId == IntPtr.Zero)
- backColor_jfieldId = JNIEnv.GetFieldID (class_ref, "backColor", "I");
- try {
- JNIEnv.SetField (((global::Java.Lang.Object) this).Handle, backColor_jfieldId, value.ToArgb ());
- } finally {
- }
- }
- }
- internal static new IntPtr java_class_handle;
- internal static new IntPtr class_ref {
- get {
- return JNIEnv.FindClass ("xamarin/test/SomeObject", ref java_class_handle);
- }
- }
-
- protected override IntPtr ThresholdClass {
- get { return class_ref; }
- }
-
- protected override global::System.Type ThresholdType {
- get { return typeof (SomeObject); }
- }
-
- protected SomeObject (IntPtr javaReference, JniHandleOwnership transfer) : base (javaReference, transfer) {}
-
- static Delegate cb_getSomeColor;
-#pragma warning disable 0169
- static Delegate GetGetSomeColorHandler ()
- {
- if (cb_getSomeColor == null)
- cb_getSomeColor = JNINativeWrapper.CreateDelegate ((_JniMarshal_PP_I) n_GetSomeColor);
- return cb_getSomeColor;
- }
-
- static int n_GetSomeColor (IntPtr jnienv, IntPtr native__this)
- {
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- return __this.SomeColor.ToArgb ();
- }
-#pragma warning restore 0169
-
- static Delegate cb_setSomeColor_I;
-#pragma warning disable 0169
- static Delegate GetSetSomeColor_IHandler ()
- {
- if (cb_setSomeColor_I == null)
- cb_setSomeColor_I = JNINativeWrapper.CreateDelegate ((_JniMarshal_PPI_V) n_SetSomeColor_I);
- return cb_setSomeColor_I;
- }
-
- static void n_SetSomeColor_I (IntPtr jnienv, IntPtr native__this, int native_newvalue)
- {
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- var newvalue = new global::Android.Graphics.Color (native_newvalue);
- __this.SomeColor = newvalue;
- }
-#pragma warning restore 0169
-
- public abstract global::Android.Graphics.Color SomeColor {
- // Metadata.xml XPath method reference: path="/api/package[@name='xamarin.test']/class[@name='SomeObject']/method[@name='getSomeColor' and count(parameter)=0]"
- [Register ("getSomeColor", "()I", "GetGetSomeColorHandler")] get;
- // Metadata.xml XPath method reference: path="/api/package[@name='xamarin.test']/class[@name='SomeObject']/method[@name='setSomeColor' and count(parameter)=1 and parameter[1][@type='Android.Graphics.Color']]"
- [Register ("setSomeColor", "(I)V", "GetSetSomeColor_IHandler")] set;
- }
-
- }
-
- [global::Android.Runtime.Register ("xamarin/test/SomeObject", DoNotGenerateAcw=true)]
- internal partial class SomeObjectInvoker : SomeObject {
-
- public SomeObjectInvoker (IntPtr handle, JniHandleOwnership transfer) : base (handle, transfer) {}
-
- protected override global::System.Type ThresholdType {
- get { return typeof (SomeObjectInvoker); }
- }
-
- static IntPtr id_getSomeColor;
- static IntPtr id_setSomeColor_I;
- public override unsafe global::Android.Graphics.Color SomeColor {
- // Metadata.xml XPath method reference: path="/api/package[@name='xamarin.test']/class[@name='SomeObject']/method[@name='getSomeColor' and count(parameter)=0]"
- [Register ("getSomeColor", "()I", "GetGetSomeColorHandler")]
- get {
- if (id_getSomeColor == IntPtr.Zero)
- id_getSomeColor = JNIEnv.GetMethodID (class_ref, "getSomeColor", "()I");
- try {
- return new global::Android.Graphics.Color (JNIEnv.CallIntMethod (((global::Java.Lang.Object) this).Handle, id_getSomeColor));
- } finally {
- }
- }
- // Metadata.xml XPath method reference: path="/api/package[@name='xamarin.test']/class[@name='SomeObject']/method[@name='setSomeColor' and count(parameter)=1 and parameter[1][@type='Android.Graphics.Color']]"
- [Register ("setSomeColor", "(I)V", "GetSetSomeColor_IHandler")]
- set {
- if (id_setSomeColor_I == IntPtr.Zero)
- id_setSomeColor_I = JNIEnv.GetMethodID (class_ref, "setSomeColor", "(I)V");
- try {
- JValue* __args = stackalloc JValue [1];
- __args [0] = new JValue (value.ToArgb ());
- JNIEnv.CallVoidMethod (((global::Java.Lang.Object) this).Handle, id_setSomeColor_I, __args);
- } finally {
- }
- }
- }
-
- }
-
-}
diff --git a/tests/generator-Tests/expected/Arrays/Mono.Android.projitems b/tests/generator-Tests/expected/Arrays/Mono.Android.projitems
deleted file mode 100644
index 066be1dd1..000000000
--- a/tests/generator-Tests/expected/Arrays/Mono.Android.projitems
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-
- $(DefineConstants);ANDROID_1;ANDROID_2;ANDROID_3;ANDROID_4
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/tests/generator-Tests/expected/Arrays/Xamarin.Test.SomeObject.cs b/tests/generator-Tests/expected/Arrays/Xamarin.Test.SomeObject.cs
deleted file mode 100644
index 4dd713069..000000000
--- a/tests/generator-Tests/expected/Arrays/Xamarin.Test.SomeObject.cs
+++ /dev/null
@@ -1,193 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#nullable restore
-using System;
-using System.Collections.Generic;
-using Android.Runtime;
-
-namespace Xamarin.Test {
-
- // Metadata.xml XPath class reference: path="/api/package[@name='xamarin.test']/class[@name='SomeObject']"
- [global::Android.Runtime.Register ("xamarin/test/SomeObject", DoNotGenerateAcw=true)]
- public partial class SomeObject : global::Java.Lang.Object {
-
-
- static IntPtr myStrings_jfieldId;
-
- // Metadata.xml XPath field reference: path="/api/package[@name='xamarin.test']/class[@name='SomeObject']/field[@name='myStrings']"
- [Register ("myStrings")]
- public IList MyStrings {
- get {
- if (myStrings_jfieldId == IntPtr.Zero)
- myStrings_jfieldId = JNIEnv.GetFieldID (class_ref, "myStrings", "[Ljava/lang/String;");
- return global::Android.Runtime.JavaArray.FromJniHandle (JNIEnv.GetObjectField (((global::Java.Lang.Object) this).Handle, myStrings_jfieldId), JniHandleOwnership.TransferLocalRef);
- }
- set {
- if (myStrings_jfieldId == IntPtr.Zero)
- myStrings_jfieldId = JNIEnv.GetFieldID (class_ref, "myStrings", "[Ljava/lang/String;");
- IntPtr native_value = global::Android.Runtime.JavaArray.ToLocalJniHandle (value);
- try {
- JNIEnv.SetField (((global::Java.Lang.Object) this).Handle, myStrings_jfieldId, native_value);
- } finally {
- JNIEnv.DeleteLocalRef (native_value);
- }
- }
- }
-
- static IntPtr myInts_jfieldId;
-
- // Metadata.xml XPath field reference: path="/api/package[@name='xamarin.test']/class[@name='SomeObject']/field[@name='myInts']"
- [Register ("myInts")]
- public IList MyInts {
- get {
- if (myInts_jfieldId == IntPtr.Zero)
- myInts_jfieldId = JNIEnv.GetFieldID (class_ref, "myInts", "[I");
- return global::Android.Runtime.JavaArray.FromJniHandle (JNIEnv.GetObjectField (((global::Java.Lang.Object) this).Handle, myInts_jfieldId), JniHandleOwnership.TransferLocalRef);
- }
- set {
- if (myInts_jfieldId == IntPtr.Zero)
- myInts_jfieldId = JNIEnv.GetFieldID (class_ref, "myInts", "[I");
- IntPtr native_value = global::Android.Runtime.JavaArray.ToLocalJniHandle (value);
- try {
- JNIEnv.SetField (((global::Java.Lang.Object) this).Handle, myInts_jfieldId, native_value);
- } finally {
- JNIEnv.DeleteLocalRef (native_value);
- }
- }
- }
-
- static IntPtr mybools_jfieldId;
-
- // Metadata.xml XPath field reference: path="/api/package[@name='xamarin.test']/class[@name='SomeObject']/field[@name='mybools']"
- [Register ("mybools")]
- public IList Mybools {
- get {
- if (mybools_jfieldId == IntPtr.Zero)
- mybools_jfieldId = JNIEnv.GetFieldID (class_ref, "mybools", "[Z");
- return global::Android.Runtime.JavaArray.FromJniHandle (JNIEnv.GetObjectField (((global::Java.Lang.Object) this).Handle, mybools_jfieldId), JniHandleOwnership.TransferLocalRef);
- }
- set {
- if (mybools_jfieldId == IntPtr.Zero)
- mybools_jfieldId = JNIEnv.GetFieldID (class_ref, "mybools", "[Z");
- IntPtr native_value = global::Android.Runtime.JavaArray.ToLocalJniHandle (value);
- try {
- JNIEnv.SetField (((global::Java.Lang.Object) this).Handle, mybools_jfieldId, native_value);
- } finally {
- JNIEnv.DeleteLocalRef (native_value);
- }
- }
- }
-
- static IntPtr myObjects_jfieldId;
-
- // Metadata.xml XPath field reference: path="/api/package[@name='xamarin.test']/class[@name='SomeObject']/field[@name='myObjects']"
- [Register ("myObjects")]
- public IList MyObjects {
- get {
- if (myObjects_jfieldId == IntPtr.Zero)
- myObjects_jfieldId = JNIEnv.GetFieldID (class_ref, "myObjects", "[Ljava/lang/Object;");
- return global::Android.Runtime.JavaArray.FromJniHandle (JNIEnv.GetObjectField (((global::Java.Lang.Object) this).Handle, myObjects_jfieldId), JniHandleOwnership.TransferLocalRef);
- }
- set {
- if (myObjects_jfieldId == IntPtr.Zero)
- myObjects_jfieldId = JNIEnv.GetFieldID (class_ref, "myObjects", "[Ljava/lang/Object;");
- IntPtr native_value = global::Android.Runtime.JavaArray.ToLocalJniHandle (value);
- try {
- JNIEnv.SetField (((global::Java.Lang.Object) this).Handle, myObjects_jfieldId, native_value);
- } finally {
- JNIEnv.DeleteLocalRef (native_value);
- }
- }
- }
-
- static IntPtr myfloats_jfieldId;
-
- // Metadata.xml XPath field reference: path="/api/package[@name='xamarin.test']/class[@name='SomeObject']/field[@name='myfloats']"
- [Register ("myfloats")]
- public IList Myfloats {
- get {
- if (myfloats_jfieldId == IntPtr.Zero)
- myfloats_jfieldId = JNIEnv.GetFieldID (class_ref, "myfloats", "[F");
- return global::Android.Runtime.JavaArray.FromJniHandle (JNIEnv.GetObjectField (((global::Java.Lang.Object) this).Handle, myfloats_jfieldId), JniHandleOwnership.TransferLocalRef);
- }
- set {
- if (myfloats_jfieldId == IntPtr.Zero)
- myfloats_jfieldId = JNIEnv.GetFieldID (class_ref, "myfloats", "[F");
- IntPtr native_value = global::Android.Runtime.JavaArray.ToLocalJniHandle (value);
- try {
- JNIEnv.SetField (((global::Java.Lang.Object) this).Handle, myfloats_jfieldId, native_value);
- } finally {
- JNIEnv.DeleteLocalRef (native_value);
- }
- }
- }
-
- static IntPtr mydoubles_jfieldId;
-
- // Metadata.xml XPath field reference: path="/api/package[@name='xamarin.test']/class[@name='SomeObject']/field[@name='mydoubles']"
- [Register ("mydoubles")]
- public IList Mydoubles {
- get {
- if (mydoubles_jfieldId == IntPtr.Zero)
- mydoubles_jfieldId = JNIEnv.GetFieldID (class_ref, "mydoubles", "[D");
- return global::Android.Runtime.JavaArray.FromJniHandle (JNIEnv.GetObjectField (((global::Java.Lang.Object) this).Handle, mydoubles_jfieldId), JniHandleOwnership.TransferLocalRef);
- }
- set {
- if (mydoubles_jfieldId == IntPtr.Zero)
- mydoubles_jfieldId = JNIEnv.GetFieldID (class_ref, "mydoubles", "[D");
- IntPtr native_value = global::Android.Runtime.JavaArray.ToLocalJniHandle (value);
- try {
- JNIEnv.SetField (((global::Java.Lang.Object) this).Handle, mydoubles_jfieldId, native_value);
- } finally {
- JNIEnv.DeleteLocalRef (native_value);
- }
- }
- }
-
- static IntPtr mylongs_jfieldId;
-
- // Metadata.xml XPath field reference: path="/api/package[@name='xamarin.test']/class[@name='SomeObject']/field[@name='mylongs']"
- [Register ("mylongs")]
- public IList Mylongs {
- get {
- if (mylongs_jfieldId == IntPtr.Zero)
- mylongs_jfieldId = JNIEnv.GetFieldID (class_ref, "mylongs", "[J");
- return global::Android.Runtime.JavaArray.FromJniHandle (JNIEnv.GetObjectField (((global::Java.Lang.Object) this).Handle, mylongs_jfieldId), JniHandleOwnership.TransferLocalRef);
- }
- set {
- if (mylongs_jfieldId == IntPtr.Zero)
- mylongs_jfieldId = JNIEnv.GetFieldID (class_ref, "mylongs", "[J");
- IntPtr native_value = global::Android.Runtime.JavaArray.ToLocalJniHandle (value);
- try {
- JNIEnv.SetField (((global::Java.Lang.Object) this).Handle, mylongs_jfieldId, native_value);
- } finally {
- JNIEnv.DeleteLocalRef (native_value);
- }
- }
- }
- internal static new IntPtr java_class_handle;
- internal static new IntPtr class_ref {
- get {
- return JNIEnv.FindClass ("xamarin/test/SomeObject", ref java_class_handle);
- }
- }
-
- protected override IntPtr ThresholdClass {
- get { return class_ref; }
- }
-
- protected override global::System.Type ThresholdType {
- get { return typeof (SomeObject); }
- }
-
- protected SomeObject (IntPtr javaReference, JniHandleOwnership transfer) : base (javaReference, transfer) {}
-
- }
-}
diff --git a/tests/generator-Tests/expected/CSharpKeywords/CSharpKeywords.xml b/tests/generator-Tests/expected/CSharpKeywords/CSharpKeywords.xml
deleted file mode 100644
index 9ceb7d5b7..000000000
--- a/tests/generator-Tests/expected/CSharpKeywords/CSharpKeywords.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/tests/generator-Tests/expected/CSharpKeywords/Mono.Android.projitems b/tests/generator-Tests/expected/CSharpKeywords/Mono.Android.projitems
deleted file mode 100644
index 1e80d027f..000000000
--- a/tests/generator-Tests/expected/CSharpKeywords/Mono.Android.projitems
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
- $(DefineConstants);ANDROID_1;ANDROID_2;ANDROID_3;ANDROID_4
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/tests/generator-Tests/expected/CSharpKeywords/Xamarin.Test.CSharpKeywords.cs b/tests/generator-Tests/expected/CSharpKeywords/Xamarin.Test.CSharpKeywords.cs
deleted file mode 100644
index 00a561164..000000000
--- a/tests/generator-Tests/expected/CSharpKeywords/Xamarin.Test.CSharpKeywords.cs
+++ /dev/null
@@ -1,92 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#nullable restore
-using System;
-using System.Collections.Generic;
-using Android.Runtime;
-
-namespace Xamarin.Test {
-
- // Metadata.xml XPath class reference: path="/api/package[@name='xamarin.test']/class[@name='CSharpKeywords']"
- [global::Android.Runtime.Register ("xamarin/test/CSharpKeywords", DoNotGenerateAcw=true)]
- public partial class CSharpKeywords : global::Java.Lang.Object {
-
- internal static new IntPtr java_class_handle;
- internal static new IntPtr class_ref {
- get {
- return JNIEnv.FindClass ("xamarin/test/CSharpKeywords", ref java_class_handle);
- }
- }
-
- protected override IntPtr ThresholdClass {
- get { return class_ref; }
- }
-
- protected override global::System.Type ThresholdType {
- get { return typeof (CSharpKeywords); }
- }
-
- protected CSharpKeywords (IntPtr javaReference, JniHandleOwnership transfer) : base (javaReference, transfer) {}
-
- static Delegate cb_usePartial_I;
-#pragma warning disable 0169
- static Delegate GetUsePartial_IHandler ()
- {
- if (cb_usePartial_I == null)
- cb_usePartial_I = JNINativeWrapper.CreateDelegate ((_JniMarshal_PPI_L) n_UsePartial_I);
- return cb_usePartial_I;
- }
-
- static IntPtr n_UsePartial_I (IntPtr jnienv, IntPtr native__this, int partial)
- {
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- return JNIEnv.NewString (__this.UsePartial (partial));
- }
-#pragma warning restore 0169
-
- static IntPtr id_usePartial_I;
- // Metadata.xml XPath method reference: path="/api/package[@name='xamarin.test']/class[@name='CSharpKeywords']/method[@name='usePartial' and count(parameter)=1 and parameter[1][@type='int']]"
- [Register ("usePartial", "(I)Ljava/lang/String;", "GetUsePartial_IHandler")]
- public virtual unsafe string UsePartial (int partial)
- {
- if (id_usePartial_I == IntPtr.Zero)
- id_usePartial_I = JNIEnv.GetMethodID (class_ref, "usePartial", "(I)Ljava/lang/String;");
- try {
- JValue* __args = stackalloc JValue [1];
- __args [0] = new JValue (partial);
-
- if (((object) this).GetType () == ThresholdType)
- return JNIEnv.GetString (JNIEnv.CallObjectMethod (((global::Java.Lang.Object) this).Handle, id_usePartial_I, __args), JniHandleOwnership.TransferLocalRef);
- else
- return JNIEnv.GetString (JNIEnv.CallNonvirtualObjectMethod (((global::Java.Lang.Object) this).Handle, ThresholdClass, JNIEnv.GetMethodID (ThresholdClass, "usePartial", "(I)Ljava/lang/String;"), __args), JniHandleOwnership.TransferLocalRef);
- } finally {
- }
- }
-
- static IntPtr id_useThis_Ljava_lang_String_;
- // Metadata.xml XPath method reference: path="/api/package[@name='xamarin.test']/class[@name='CSharpKeywords']/method[@name='useThis' and count(parameter)=1 and parameter[1][@type='java.lang.String']]"
- [Register ("useThis", "(Ljava/lang/String;)Ljava/lang/String;", "")]
- public static unsafe string UseThis (string this_)
- {
- if (id_useThis_Ljava_lang_String_ == IntPtr.Zero)
- id_useThis_Ljava_lang_String_ = JNIEnv.GetStaticMethodID (class_ref, "useThis", "(Ljava/lang/String;)Ljava/lang/String;");
- IntPtr native_this = JNIEnv.NewString ((string)this_);
- try {
- JValue* __args = stackalloc JValue [1];
- __args [0] = new JValue (native_this);
- string __ret = JNIEnv.GetString (JNIEnv.CallStaticObjectMethod (class_ref, id_useThis_Ljava_lang_String_, __args), JniHandleOwnership.TransferLocalRef);
- return __ret;
- } finally {
- JNIEnv.DeleteLocalRef (native_this);
- }
- }
-
- }
-}
diff --git a/tests/generator-Tests/expected/Constructors/Mono.Android.projitems b/tests/generator-Tests/expected/Constructors/Mono.Android.projitems
deleted file mode 100644
index 82192a590..000000000
--- a/tests/generator-Tests/expected/Constructors/Mono.Android.projitems
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
- $(DefineConstants);ANDROID_1;ANDROID_2;ANDROID_3;ANDROID_4
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/tests/generator-Tests/expected/Constructors/Xamarin.Test.SomeObject.cs b/tests/generator-Tests/expected/Constructors/Xamarin.Test.SomeObject.cs
deleted file mode 100644
index 662bb2a3e..000000000
--- a/tests/generator-Tests/expected/Constructors/Xamarin.Test.SomeObject.cs
+++ /dev/null
@@ -1,98 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#nullable restore
-using System;
-using System.Collections.Generic;
-using Android.Runtime;
-
-namespace Xamarin.Test {
-
- // Metadata.xml XPath class reference: path="/api/package[@name='xamarin.test']/class[@name='SomeObject']"
- [global::Android.Runtime.Register ("xamarin/test/SomeObject", DoNotGenerateAcw=true)]
- public partial class SomeObject : global::Java.Lang.Object {
-
- internal static new IntPtr java_class_handle;
- internal static new IntPtr class_ref {
- get {
- return JNIEnv.FindClass ("xamarin/test/SomeObject", ref java_class_handle);
- }
- }
-
- protected override IntPtr ThresholdClass {
- get { return class_ref; }
- }
-
- protected override global::System.Type ThresholdType {
- get { return typeof (SomeObject); }
- }
-
- protected SomeObject (IntPtr javaReference, JniHandleOwnership transfer) : base (javaReference, transfer) {}
-
- static IntPtr id_ctor;
- // Metadata.xml XPath constructor reference: path="/api/package[@name='xamarin.test']/class[@name='SomeObject']/constructor[@name='SomeObject' and count(parameter)=0]"
- [Register (".ctor", "()V", "")]
- [Obsolete (@"deprecated")]
- public unsafe SomeObject ()
- : base (IntPtr.Zero, JniHandleOwnership.DoNotTransfer)
- {
- if (((global::Java.Lang.Object) this).Handle != IntPtr.Zero)
- return;
-
- try {
- if (((object) this).GetType () != typeof (SomeObject)) {
- SetHandle (
- global::Android.Runtime.JNIEnv.StartCreateInstance (((object) this).GetType (), "()V"),
- JniHandleOwnership.TransferLocalRef);
- global::Android.Runtime.JNIEnv.FinishCreateInstance (((global::Java.Lang.Object) this).Handle, "()V");
- return;
- }
-
- if (id_ctor == IntPtr.Zero)
- id_ctor = JNIEnv.GetMethodID (class_ref, "", "()V");
- SetHandle (
- global::Android.Runtime.JNIEnv.StartCreateInstance (class_ref, id_ctor),
- JniHandleOwnership.TransferLocalRef);
- JNIEnv.FinishCreateInstance (((global::Java.Lang.Object) this).Handle, class_ref, id_ctor);
- } finally {
- }
- }
-
- static IntPtr id_ctor_I;
- // Metadata.xml XPath constructor reference: path="/api/package[@name='xamarin.test']/class[@name='SomeObject']/constructor[@name='SomeObject' and count(parameter)=1 and parameter[1][@type='int']]"
- [Register (".ctor", "(I)V", "")]
- public unsafe SomeObject (int aint)
- : base (IntPtr.Zero, JniHandleOwnership.DoNotTransfer)
- {
- if (((global::Java.Lang.Object) this).Handle != IntPtr.Zero)
- return;
-
- try {
- JValue* __args = stackalloc JValue [1];
- __args [0] = new JValue (aint);
- if (((object) this).GetType () != typeof (SomeObject)) {
- SetHandle (
- global::Android.Runtime.JNIEnv.StartCreateInstance (((object) this).GetType (), "(I)V", __args),
- JniHandleOwnership.TransferLocalRef);
- global::Android.Runtime.JNIEnv.FinishCreateInstance (((global::Java.Lang.Object) this).Handle, "(I)V", __args);
- return;
- }
-
- if (id_ctor_I == IntPtr.Zero)
- id_ctor_I = JNIEnv.GetMethodID (class_ref, "", "(I)V");
- SetHandle (
- global::Android.Runtime.JNIEnv.StartCreateInstance (class_ref, id_ctor_I, __args),
- JniHandleOwnership.TransferLocalRef);
- JNIEnv.FinishCreateInstance (((global::Java.Lang.Object) this).Handle, class_ref, id_ctor_I, __args);
- } finally {
- }
- }
-
- }
-}
diff --git a/tests/generator-Tests/expected/Constructors/Xamarin.Test.SomeObject2.cs b/tests/generator-Tests/expected/Constructors/Xamarin.Test.SomeObject2.cs
deleted file mode 100644
index 8ab008553..000000000
--- a/tests/generator-Tests/expected/Constructors/Xamarin.Test.SomeObject2.cs
+++ /dev/null
@@ -1,69 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#nullable restore
-using System;
-using System.Collections.Generic;
-using Android.Runtime;
-
-namespace Xamarin.Test {
-
- // Metadata.xml XPath class reference: path="/api/package[@name='xamarin.test']/class[@name='SomeObject2']"
- [global::Android.Runtime.Register ("xamarin/test/SomeObject2", DoNotGenerateAcw=true)]
- public sealed partial class SomeObject2 : global::Java.Lang.Object {
-
- internal static new IntPtr java_class_handle;
- internal static new IntPtr class_ref {
- get {
- return JNIEnv.FindClass ("xamarin/test/SomeObject2", ref java_class_handle);
- }
- }
-
- protected override IntPtr ThresholdClass {
- get { return class_ref; }
- }
-
- protected override global::System.Type ThresholdType {
- get { return typeof (SomeObject2); }
- }
-
- internal SomeObject2 (IntPtr javaReference, JniHandleOwnership transfer) : base (javaReference, transfer) {}
-
- static IntPtr id_ctor_I;
- // Metadata.xml XPath constructor reference: path="/api/package[@name='xamarin.test']/class[@name='SomeObject2']/constructor[@name='SomeObject2' and count(parameter)=1 and parameter[1][@type='int']]"
- [Register (".ctor", "(I)V", "")]
- public unsafe SomeObject2 (int aint)
- : base (IntPtr.Zero, JniHandleOwnership.DoNotTransfer)
- {
- if (((global::Java.Lang.Object) this).Handle != IntPtr.Zero)
- return;
-
- try {
- JValue* __args = stackalloc JValue [1];
- __args [0] = new JValue (aint);
- if (((object) this).GetType () != typeof (SomeObject2)) {
- SetHandle (
- global::Android.Runtime.JNIEnv.StartCreateInstance (((object) this).GetType (), "(I)V", __args),
- JniHandleOwnership.TransferLocalRef);
- global::Android.Runtime.JNIEnv.FinishCreateInstance (((global::Java.Lang.Object) this).Handle, "(I)V", __args);
- return;
- }
-
- if (id_ctor_I == IntPtr.Zero)
- id_ctor_I = JNIEnv.GetMethodID (class_ref, "", "(I)V");
- SetHandle (
- global::Android.Runtime.JNIEnv.StartCreateInstance (class_ref, id_ctor_I, __args),
- JniHandleOwnership.TransferLocalRef);
- JNIEnv.FinishCreateInstance (((global::Java.Lang.Object) this).Handle, class_ref, id_ctor_I, __args);
- } finally {
- }
- }
-
- }
-}
diff --git a/tests/generator-Tests/expected/Core_ClassParse/Java.Lang.Object.cs b/tests/generator-Tests/expected/Core_ClassParse/Java.Lang.Object.cs
deleted file mode 100644
index dd027b081..000000000
--- a/tests/generator-Tests/expected/Core_ClassParse/Java.Lang.Object.cs
+++ /dev/null
@@ -1,29 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#nullable restore
-using System;
-using System.Collections.Generic;
-using Android.Runtime;
-
-namespace Java.Lang {
-
- // Metadata.xml XPath class reference: path="/api/package[@name='java.lang']/class[@name='Object']"
- [global::Android.Runtime.Register ("java/lang/Object", DoNotGenerateAcw=true)]
- public partial class Object {
-
- internal static IntPtr java_class_handle;
- internal static IntPtr class_ref {
- get {
- return JNIEnv.FindClass ("java/lang/Object", ref java_class_handle);
- }
- }
-
- }
-}
diff --git a/tests/generator-Tests/expected/Core_ClassParse/Java.Lang.String.cs b/tests/generator-Tests/expected/Core_ClassParse/Java.Lang.String.cs
deleted file mode 100644
index 87e3da3d0..000000000
--- a/tests/generator-Tests/expected/Core_ClassParse/Java.Lang.String.cs
+++ /dev/null
@@ -1,39 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#nullable restore
-using System;
-using System.Collections.Generic;
-using Android.Runtime;
-
-namespace Java.Lang {
-
- // Metadata.xml XPath class reference: path="/api/package[@name='java.lang']/class[@name='String']"
- [global::Android.Runtime.Register ("java/lang/String", DoNotGenerateAcw=true)]
- public partial class String : global::Java.Lang.Object {
-
- internal static new IntPtr java_class_handle;
- internal static new IntPtr class_ref {
- get {
- return JNIEnv.FindClass ("java/lang/String", ref java_class_handle);
- }
- }
-
- protected override IntPtr ThresholdClass {
- get { return class_ref; }
- }
-
- protected override global::System.Type ThresholdType {
- get { return typeof (String); }
- }
-
- protected String (IntPtr javaReference, JniHandleOwnership transfer) : base (javaReference, transfer) {}
-
- }
-}
diff --git a/tests/generator-Tests/expected/Core_ClassParse/Mono.Android.projitems b/tests/generator-Tests/expected/Core_ClassParse/Mono.Android.projitems
deleted file mode 100644
index 5a1d5a97e..000000000
--- a/tests/generator-Tests/expected/Core_ClassParse/Mono.Android.projitems
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
- $(DefineConstants);ANDROID_1;ANDROID_2;ANDROID_3;ANDROID_4
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/tests/generator-Tests/expected/Core_ClassParse/Xamarin.Google.Composable.MyClass.cs b/tests/generator-Tests/expected/Core_ClassParse/Xamarin.Google.Composable.MyClass.cs
deleted file mode 100644
index 3b842c55f..000000000
--- a/tests/generator-Tests/expected/Core_ClassParse/Xamarin.Google.Composable.MyClass.cs
+++ /dev/null
@@ -1,39 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#nullable restore
-using System;
-using System.Collections.Generic;
-using Android.Runtime;
-
-namespace Xamarin.Google.Composable {
-
- // Metadata.xml XPath class reference: path="/api/package[@name='com.com.google.compose']/class[@name='MyClass']"
- [global::Android.Runtime.Register ("com/com/google/compose/MyClass", DoNotGenerateAcw=true)]
- public partial class MyClass : global::Java.Lang.Object {
-
- internal static new IntPtr java_class_handle;
- internal static new IntPtr class_ref {
- get {
- return JNIEnv.FindClass ("com/com/google/compose/MyClass", ref java_class_handle);
- }
- }
-
- protected override IntPtr ThresholdClass {
- get { return class_ref; }
- }
-
- protected override global::System.Type ThresholdType {
- get { return typeof (MyClass); }
- }
-
- protected MyClass (IntPtr javaReference, JniHandleOwnership transfer) : base (javaReference, transfer) {}
-
- }
-}
diff --git a/tests/generator-Tests/expected/Core_ClassParse/Xamarin.Test.Invalidnames.In.cs b/tests/generator-Tests/expected/Core_ClassParse/Xamarin.Test.Invalidnames.In.cs
deleted file mode 100644
index 660d64872..000000000
--- a/tests/generator-Tests/expected/Core_ClassParse/Xamarin.Test.Invalidnames.In.cs
+++ /dev/null
@@ -1,39 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#nullable restore
-using System;
-using System.Collections.Generic;
-using Android.Runtime;
-
-namespace Xamarin.Test.Invalidnames {
-
- // Metadata.xml XPath class reference: path="/api/package[@name='xamarin.test.invalidnames']/class[@name='in']"
- [global::Android.Runtime.Register ("xamarin/test/invalidnames/in", DoNotGenerateAcw=true)]
- public partial class In : global::Java.Lang.Object {
-
- internal static new IntPtr java_class_handle;
- internal static new IntPtr class_ref {
- get {
- return JNIEnv.FindClass ("xamarin/test/invalidnames/in", ref java_class_handle);
- }
- }
-
- protected override IntPtr ThresholdClass {
- get { return class_ref; }
- }
-
- protected override global::System.Type ThresholdType {
- get { return typeof (In); }
- }
-
- protected In (IntPtr javaReference, JniHandleOwnership transfer) : base (javaReference, transfer) {}
-
- }
-}
diff --git a/tests/generator-Tests/expected/Core_ClassParse/Xamarin.Test.Invalidnames.InvalidNameMembers.cs b/tests/generator-Tests/expected/Core_ClassParse/Xamarin.Test.Invalidnames.InvalidNameMembers.cs
deleted file mode 100644
index 7717c3d05..000000000
--- a/tests/generator-Tests/expected/Core_ClassParse/Xamarin.Test.Invalidnames.InvalidNameMembers.cs
+++ /dev/null
@@ -1,39 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#nullable restore
-using System;
-using System.Collections.Generic;
-using Android.Runtime;
-
-namespace Xamarin.Test.Invalidnames {
-
- // Metadata.xml XPath class reference: path="/api/package[@name='xamarin.test.invalidnames']/class[@name='InvalidNameMembers']"
- [global::Android.Runtime.Register ("xamarin/test/invalidnames/InvalidNameMembers", DoNotGenerateAcw=true)]
- public partial class InvalidNameMembers : global::Java.Lang.Object {
-
- internal static new IntPtr java_class_handle;
- internal static new IntPtr class_ref {
- get {
- return JNIEnv.FindClass ("xamarin/test/invalidnames/InvalidNameMembers", ref java_class_handle);
- }
- }
-
- protected override IntPtr ThresholdClass {
- get { return class_ref; }
- }
-
- protected override global::System.Type ThresholdType {
- get { return typeof (InvalidNameMembers); }
- }
-
- protected InvalidNameMembers (IntPtr javaReference, JniHandleOwnership transfer) : base (javaReference, transfer) {}
-
- }
-}
diff --git a/tests/generator-Tests/expected/Core_Jar2Xml/Android.Text.ISpannable.cs b/tests/generator-Tests/expected/Core_Jar2Xml/Android.Text.ISpannable.cs
deleted file mode 100644
index 2dfa1dd7d..000000000
--- a/tests/generator-Tests/expected/Core_Jar2Xml/Android.Text.ISpannable.cs
+++ /dev/null
@@ -1,87 +0,0 @@
-using System;
-using System.Collections.Generic;
-using Android.Runtime;
-
-namespace Android.Text {
-
- // Metadata.xml XPath interface reference: path="/api/package[@name='android.text']/interface[@name='Spannable']"
- [Register ("android/text/Spannable", "", "Android.Text.ISpannableInvoker")]
- public partial interface ISpannable : global::Android.Text.ISpanned {
-
- }
-
- [global::Android.Runtime.Register ("android/text/Spannable", DoNotGenerateAcw=true)]
- internal partial class ISpannableInvoker : global::Java.Lang.Object, ISpannable {
-
- static IntPtr java_class_ref = JNIEnv.FindClass ("android/text/Spannable");
-
- protected override IntPtr ThresholdClass {
- get { return class_ref; }
- }
-
- protected override global::System.Type ThresholdType {
- get { return typeof (ISpannableInvoker); }
- }
-
- new IntPtr class_ref;
-
- public static ISpannable GetObject (IntPtr handle, JniHandleOwnership transfer)
- {
- return global::Java.Lang.Object.GetObject (handle, transfer);
- }
-
- static IntPtr Validate (IntPtr handle)
- {
- if (!JNIEnv.IsInstanceOf (handle, java_class_ref))
- throw new InvalidCastException (string.Format ("Unable to convert instance of type '{0}' to type '{1}'.",
- JNIEnv.GetClassNameFromInstance (handle), "android.text.Spannable"));
- return handle;
- }
-
- protected override void Dispose (bool disposing)
- {
- if (this.class_ref != IntPtr.Zero)
- JNIEnv.DeleteGlobalRef (this.class_ref);
- this.class_ref = IntPtr.Zero;
- base.Dispose (disposing);
- }
-
- public ISpannableInvoker (IntPtr handle, JniHandleOwnership transfer) : base (Validate (handle), transfer)
- {
- IntPtr local_ref = JNIEnv.GetObjectClass (((global::Java.Lang.Object) this).Handle);
- this.class_ref = JNIEnv.NewGlobalRef (local_ref);
- JNIEnv.DeleteLocalRef (local_ref);
- }
-
- static Delegate cb_getSpanFlags_Ljava_lang_Object_;
-#pragma warning disable 0169
- static Delegate GetGetSpanFlags_Ljava_lang_Object_Handler ()
- {
- if (cb_getSpanFlags_Ljava_lang_Object_ == null)
- cb_getSpanFlags_Ljava_lang_Object_ = JNINativeWrapper.CreateDelegate ((_JniMarshal_PPL_I) n_GetSpanFlags_Ljava_lang_Object_);
- return cb_getSpanFlags_Ljava_lang_Object_;
- }
-
- static int n_GetSpanFlags_Ljava_lang_Object_ (IntPtr jnienv, IntPtr native__this, IntPtr native_tag)
- {
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- var tag = global::Java.Lang.Object.GetObject (native_tag, JniHandleOwnership.DoNotTransfer);
- int __ret = (int) __this.GetSpanFlags (tag);
- return __ret;
- }
-#pragma warning restore 0169
-
- IntPtr id_getSpanFlags_Ljava_lang_Object_;
- public unsafe global::Android.Text.SpanTypes GetSpanFlags (global::Java.Lang.Object tag)
- {
- if (id_getSpanFlags_Ljava_lang_Object_ == IntPtr.Zero)
- id_getSpanFlags_Ljava_lang_Object_ = JNIEnv.GetMethodID (class_ref, "getSpanFlags", "(Ljava/lang/Object;)I");
- JValue* __args = stackalloc JValue [1];
- __args [0] = new JValue (tag);
- var __ret = (global::Android.Text.SpanTypes) JNIEnv.CallIntMethod (((global::Java.Lang.Object) this).Handle, id_getSpanFlags_Ljava_lang_Object_, __args);
- return __ret;
- }
-
- }
-
-}
diff --git a/tests/generator-Tests/expected/Core_Jar2Xml/Android.Text.ISpanned.cs b/tests/generator-Tests/expected/Core_Jar2Xml/Android.Text.ISpanned.cs
deleted file mode 100644
index 99a2ea8e2..000000000
--- a/tests/generator-Tests/expected/Core_Jar2Xml/Android.Text.ISpanned.cs
+++ /dev/null
@@ -1,92 +0,0 @@
-using System;
-using System.Collections.Generic;
-using Android.Runtime;
-
-namespace Android.Text {
-
- // Metadata.xml XPath interface reference: path="/api/package[@name='android.text']/interface[@name='Spanned']"
- [Register ("android/text/Spanned", "", "Android.Text.ISpannedInvoker")]
- public partial interface ISpanned : IJavaObject {
-
- // Metadata.xml XPath method reference: path="/api/package[@name='android.text']/interface[@name='Spanned']/method[@name='getSpanFlags' and count(parameter)=1 and parameter[1][@type='java.lang.Object']]"
- [return:global::Android.Runtime.GeneratedEnum]
- [Register ("getSpanFlags", "(Ljava/lang/Object;)I", "GetGetSpanFlags_Ljava_lang_Object_Handler:Android.Text.ISpannedInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
- global::Android.Text.SpanTypes GetSpanFlags (global::Java.Lang.Object tag);
-
- }
-
- [global::Android.Runtime.Register ("android/text/Spanned", DoNotGenerateAcw=true)]
- internal partial class ISpannedInvoker : global::Java.Lang.Object, ISpanned {
-
- static IntPtr java_class_ref = JNIEnv.FindClass ("android/text/Spanned");
-
- protected override IntPtr ThresholdClass {
- get { return class_ref; }
- }
-
- protected override global::System.Type ThresholdType {
- get { return typeof (ISpannedInvoker); }
- }
-
- new IntPtr class_ref;
-
- public static ISpanned GetObject (IntPtr handle, JniHandleOwnership transfer)
- {
- return global::Java.Lang.Object.GetObject (handle, transfer);
- }
-
- static IntPtr Validate (IntPtr handle)
- {
- if (!JNIEnv.IsInstanceOf (handle, java_class_ref))
- throw new InvalidCastException (string.Format ("Unable to convert instance of type '{0}' to type '{1}'.",
- JNIEnv.GetClassNameFromInstance (handle), "android.text.Spanned"));
- return handle;
- }
-
- protected override void Dispose (bool disposing)
- {
- if (this.class_ref != IntPtr.Zero)
- JNIEnv.DeleteGlobalRef (this.class_ref);
- this.class_ref = IntPtr.Zero;
- base.Dispose (disposing);
- }
-
- public ISpannedInvoker (IntPtr handle, JniHandleOwnership transfer) : base (Validate (handle), transfer)
- {
- IntPtr local_ref = JNIEnv.GetObjectClass (((global::Java.Lang.Object) this).Handle);
- this.class_ref = JNIEnv.NewGlobalRef (local_ref);
- JNIEnv.DeleteLocalRef (local_ref);
- }
-
- static Delegate cb_getSpanFlags_Ljava_lang_Object_;
-#pragma warning disable 0169
- static Delegate GetGetSpanFlags_Ljava_lang_Object_Handler ()
- {
- if (cb_getSpanFlags_Ljava_lang_Object_ == null)
- cb_getSpanFlags_Ljava_lang_Object_ = JNINativeWrapper.CreateDelegate ((_JniMarshal_PPL_I) n_GetSpanFlags_Ljava_lang_Object_);
- return cb_getSpanFlags_Ljava_lang_Object_;
- }
-
- static int n_GetSpanFlags_Ljava_lang_Object_ (IntPtr jnienv, IntPtr native__this, IntPtr native_tag)
- {
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- var tag = global::Java.Lang.Object.GetObject (native_tag, JniHandleOwnership.DoNotTransfer);
- int __ret = (int) __this.GetSpanFlags (tag);
- return __ret;
- }
-#pragma warning restore 0169
-
- IntPtr id_getSpanFlags_Ljava_lang_Object_;
- public unsafe global::Android.Text.SpanTypes GetSpanFlags (global::Java.Lang.Object tag)
- {
- if (id_getSpanFlags_Ljava_lang_Object_ == IntPtr.Zero)
- id_getSpanFlags_Ljava_lang_Object_ = JNIEnv.GetMethodID (class_ref, "getSpanFlags", "(Ljava/lang/Object;)I");
- JValue* __args = stackalloc JValue [1];
- __args [0] = new JValue (tag);
- var __ret = (global::Android.Text.SpanTypes) JNIEnv.CallIntMethod (((global::Java.Lang.Object) this).Handle, id_getSpanFlags_Ljava_lang_Object_, __args);
- return __ret;
- }
-
- }
-
-}
diff --git a/tests/generator-Tests/expected/Core_Jar2Xml/Android.Text.SpannableString.cs b/tests/generator-Tests/expected/Core_Jar2Xml/Android.Text.SpannableString.cs
deleted file mode 100644
index ffc5743de..000000000
--- a/tests/generator-Tests/expected/Core_Jar2Xml/Android.Text.SpannableString.cs
+++ /dev/null
@@ -1,140 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#nullable restore
-using System;
-using System.Collections.Generic;
-using Android.Runtime;
-
-namespace Android.Text {
-
- // Metadata.xml XPath class reference: path="/api/package[@name='android.text']/class[@name='SpannableString']"
- [global::Android.Runtime.Register ("android/text/SpannableString", DoNotGenerateAcw=true)]
- public partial class SpannableString : global::Android.Text.SpannableStringInternal, global::Android.Text.ISpannable {
-
- internal static new IntPtr java_class_handle;
- internal static new IntPtr class_ref {
- get {
- return JNIEnv.FindClass ("android/text/SpannableString", ref java_class_handle);
- }
- }
-
- protected override IntPtr ThresholdClass {
- get { return class_ref; }
- }
-
- protected override global::System.Type ThresholdType {
- get { return typeof (SpannableString); }
- }
-
- protected SpannableString (IntPtr javaReference, JniHandleOwnership transfer) : base (javaReference, transfer) {}
-
- static IntPtr id_ctor_Ljava_lang_CharSequence_;
- // Metadata.xml XPath constructor reference: path="/api/package[@name='android.text']/class[@name='SpannableString']/constructor[@name='SpannableString' and count(parameter)=1 and parameter[1][@type='java.lang.CharSequence']]"
- [Register (".ctor", "(Ljava/lang/CharSequence;)V", "")]
- public unsafe SpannableString (global::Java.Lang.ICharSequence source)
- : base (IntPtr.Zero, JniHandleOwnership.DoNotTransfer)
- {
- if (((global::Java.Lang.Object) this).Handle != IntPtr.Zero)
- return;
-
- IntPtr native_source = CharSequence.ToLocalJniHandle (source);
- try {
- JValue* __args = stackalloc JValue [1];
- __args [0] = new JValue (native_source);
- if (((object) this).GetType () != typeof (SpannableString)) {
- SetHandle (
- global::Android.Runtime.JNIEnv.StartCreateInstance (((object) this).GetType (), "(Ljava/lang/CharSequence;)V", __args),
- JniHandleOwnership.TransferLocalRef);
- global::Android.Runtime.JNIEnv.FinishCreateInstance (((global::Java.Lang.Object) this).Handle, "(Ljava/lang/CharSequence;)V", __args);
- return;
- }
-
- if (id_ctor_Ljava_lang_CharSequence_ == IntPtr.Zero)
- id_ctor_Ljava_lang_CharSequence_ = JNIEnv.GetMethodID (class_ref, "", "(Ljava/lang/CharSequence;)V");
- SetHandle (
- global::Android.Runtime.JNIEnv.StartCreateInstance (class_ref, id_ctor_Ljava_lang_CharSequence_, __args),
- JniHandleOwnership.TransferLocalRef);
- JNIEnv.FinishCreateInstance (((global::Java.Lang.Object) this).Handle, class_ref, id_ctor_Ljava_lang_CharSequence_, __args);
- } finally {
- JNIEnv.DeleteLocalRef (native_source);
- }
- }
-
- [Register (".ctor", "(Ljava/lang/CharSequence;)V", "")]
- public unsafe SpannableString (string source)
- : base (IntPtr.Zero, JniHandleOwnership.DoNotTransfer)
- {
- if (((global::Java.Lang.Object) this).Handle != IntPtr.Zero)
- return;
-
- IntPtr native_source = CharSequence.ToLocalJniHandle (source);
- try {
- JValue* __args = stackalloc JValue [1];
- __args [0] = new JValue (native_source);
- if (((object) this).GetType () != typeof (SpannableString)) {
- SetHandle (
- global::Android.Runtime.JNIEnv.StartCreateInstance (((object) this).GetType (), "(Ljava/lang/CharSequence;)V", __args),
- JniHandleOwnership.TransferLocalRef);
- global::Android.Runtime.JNIEnv.FinishCreateInstance (((global::Java.Lang.Object) this).Handle, "(Ljava/lang/CharSequence;)V", __args);
- return;
- }
-
- if (id_ctor_Ljava_lang_CharSequence_ == IntPtr.Zero)
- id_ctor_Ljava_lang_CharSequence_ = JNIEnv.GetMethodID (class_ref, "", "(Ljava/lang/CharSequence;)V");
- SetHandle (
- global::Android.Runtime.JNIEnv.StartCreateInstance (class_ref, id_ctor_Ljava_lang_CharSequence_, __args),
- JniHandleOwnership.TransferLocalRef);
- JNIEnv.FinishCreateInstance (((global::Java.Lang.Object) this).Handle, class_ref, id_ctor_Ljava_lang_CharSequence_, __args);
- } finally {
- JNIEnv.DeleteLocalRef (native_source);
- }
- }
-
- static Delegate cb_getSpanFlags_Ljava_lang_Object_;
-#pragma warning disable 0169
- static Delegate GetGetSpanFlags_Ljava_lang_Object_Handler ()
- {
- if (cb_getSpanFlags_Ljava_lang_Object_ == null)
- cb_getSpanFlags_Ljava_lang_Object_ = JNINativeWrapper.CreateDelegate ((_JniMarshal_PPL_I) n_GetSpanFlags_Ljava_lang_Object_);
- return cb_getSpanFlags_Ljava_lang_Object_;
- }
-
- static int n_GetSpanFlags_Ljava_lang_Object_ (IntPtr jnienv, IntPtr native__this, IntPtr native_what)
- {
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- var what = global::Java.Lang.Object.GetObject (native_what, JniHandleOwnership.DoNotTransfer);
- int __ret = (int) __this.GetSpanFlags (what);
- return __ret;
- }
-#pragma warning restore 0169
-
- static IntPtr id_getSpanFlags_Ljava_lang_Object_;
- // Metadata.xml XPath method reference: path="/api/package[@name='android.text']/class[@name='SpannableString']/method[@name='getSpanFlags' and count(parameter)=1 and parameter[1][@type='java.lang.Object']]"
- [Register ("getSpanFlags", "(Ljava/lang/Object;)I", "GetGetSpanFlags_Ljava_lang_Object_Handler")]
- public override unsafe global::Android.Text.SpanTypes GetSpanFlags (global::Java.Lang.Object what)
- {
- if (id_getSpanFlags_Ljava_lang_Object_ == IntPtr.Zero)
- id_getSpanFlags_Ljava_lang_Object_ = JNIEnv.GetMethodID (class_ref, "getSpanFlags", "(Ljava/lang/Object;)I");
- try {
- JValue* __args = stackalloc JValue [1];
- __args [0] = new JValue (what);
-
- global::Android.Text.SpanTypes __ret;
- if (((object) this).GetType () == ThresholdType)
- __ret = (global::Android.Text.SpanTypes) JNIEnv.CallIntMethod (((global::Java.Lang.Object) this).Handle, id_getSpanFlags_Ljava_lang_Object_, __args);
- else
- __ret = (global::Android.Text.SpanTypes) JNIEnv.CallNonvirtualIntMethod (((global::Java.Lang.Object) this).Handle, ThresholdClass, JNIEnv.GetMethodID (ThresholdClass, "getSpanFlags", "(Ljava/lang/Object;)I"), __args);
- return __ret;
- } finally {
- }
- }
-
- }
-}
diff --git a/tests/generator-Tests/expected/Core_Jar2Xml/Android.Text.SpannableStringInternal.cs b/tests/generator-Tests/expected/Core_Jar2Xml/Android.Text.SpannableStringInternal.cs
deleted file mode 100644
index e9cc92aac..000000000
--- a/tests/generator-Tests/expected/Core_Jar2Xml/Android.Text.SpannableStringInternal.cs
+++ /dev/null
@@ -1,91 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#nullable restore
-using System;
-using System.Collections.Generic;
-using Android.Runtime;
-
-namespace Android.Text {
-
- // Metadata.xml XPath class reference: path="/api/package[@name='android.text']/class[@name='SpannableStringInternal']"
- [global::Android.Runtime.Register ("android/text/SpannableStringInternal", DoNotGenerateAcw=true)]
- public abstract partial class SpannableStringInternal : global::Java.Lang.Object {
-
- internal static new IntPtr java_class_handle;
- internal static new IntPtr class_ref {
- get {
- return JNIEnv.FindClass ("android/text/SpannableStringInternal", ref java_class_handle);
- }
- }
-
- protected override IntPtr ThresholdClass {
- get { return class_ref; }
- }
-
- protected override global::System.Type ThresholdType {
- get { return typeof (SpannableStringInternal); }
- }
-
- protected SpannableStringInternal (IntPtr javaReference, JniHandleOwnership transfer) : base (javaReference, transfer) {}
-
- static Delegate cb_getSpanFlags_Ljava_lang_Object_;
-#pragma warning disable 0169
- static Delegate GetGetSpanFlags_Ljava_lang_Object_Handler ()
- {
- if (cb_getSpanFlags_Ljava_lang_Object_ == null)
- cb_getSpanFlags_Ljava_lang_Object_ = JNINativeWrapper.CreateDelegate ((_JniMarshal_PPL_I) n_GetSpanFlags_Ljava_lang_Object_);
- return cb_getSpanFlags_Ljava_lang_Object_;
- }
-
- static int n_GetSpanFlags_Ljava_lang_Object_ (IntPtr jnienv, IntPtr native__this, IntPtr native_p0)
- {
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- var p0 = global::Java.Lang.Object.GetObject (native_p0, JniHandleOwnership.DoNotTransfer);
- int __ret = (int) __this.GetSpanFlags (p0);
- return __ret;
- }
-#pragma warning restore 0169
-
- static IntPtr id_getSpanFlags_Ljava_lang_Object_;
- // Metadata.xml XPath method reference: path="/api/package[@name='android.text']/class[@name='SpannableStringInternal']/method[@name='getSpanFlags' and count(parameter)=1 and parameter[1][@type='java.lang.Object']]"
- [return:global::Android.Runtime.GeneratedEnum]
- [Register ("getSpanFlags", "(Ljava/lang/Object;)I", "GetGetSpanFlags_Ljava_lang_Object_Handler")]
- public virtual unsafe global::Android.Text.SpanTypes GetSpanFlags (global::Java.Lang.Object p0)
- {
- if (id_getSpanFlags_Ljava_lang_Object_ == IntPtr.Zero)
- id_getSpanFlags_Ljava_lang_Object_ = JNIEnv.GetMethodID (class_ref, "getSpanFlags", "(Ljava/lang/Object;)I");
- try {
- JValue* __args = stackalloc JValue [1];
- __args [0] = new JValue (p0);
-
- global::Android.Text.SpanTypes __ret;
- if (((object) this).GetType () == ThresholdType)
- __ret = (global::Android.Text.SpanTypes) JNIEnv.CallIntMethod (((global::Java.Lang.Object) this).Handle, id_getSpanFlags_Ljava_lang_Object_, __args);
- else
- __ret = (global::Android.Text.SpanTypes) JNIEnv.CallNonvirtualIntMethod (((global::Java.Lang.Object) this).Handle, ThresholdClass, JNIEnv.GetMethodID (ThresholdClass, "getSpanFlags", "(Ljava/lang/Object;)I"), __args);
- return __ret;
- } finally {
- }
- }
-
- }
-
- [global::Android.Runtime.Register ("android/text/SpannableStringInternal", DoNotGenerateAcw=true)]
- internal partial class SpannableStringInternalInvoker : SpannableStringInternal {
-
- public SpannableStringInternalInvoker (IntPtr handle, JniHandleOwnership transfer) : base (handle, transfer) {}
-
- protected override global::System.Type ThresholdType {
- get { return typeof (SpannableStringInternalInvoker); }
- }
-
- }
-
-}
diff --git a/tests/generator-Tests/expected/Core_Jar2Xml/Android.Views.View.cs b/tests/generator-Tests/expected/Core_Jar2Xml/Android.Views.View.cs
deleted file mode 100644
index 2396b7a88..000000000
--- a/tests/generator-Tests/expected/Core_Jar2Xml/Android.Views.View.cs
+++ /dev/null
@@ -1,285 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#nullable restore
-using System;
-using System.Collections.Generic;
-using Android.Runtime;
-
-namespace Android.Views {
-
- // Metadata.xml XPath class reference: path="/api/package[@name='android.view']/class[@name='View']"
- [global::Android.Runtime.Register ("android/view/View", DoNotGenerateAcw=true)]
- public partial class View : global::Java.Lang.Object {
-
- // Metadata.xml XPath interface reference: path="/api/package[@name='android.view']/interface[@name='View.OnClickListener']"
- [Register ("android/view/View$OnClickListener", "", "Android.Views.View/IOnClickListenerInvoker")]
- public partial interface IOnClickListener : IJavaObject {
-
- // Metadata.xml XPath method reference: path="/api/package[@name='android.view']/interface[@name='View.OnClickListener']/method[@name='onClick' and count(parameter)=1 and parameter[1][@type='android.view.View']]"
- [Register ("onClick", "(Landroid/view/View;)V", "GetOnClick_Landroid_view_View_Handler:Android.Views.View/IOnClickListenerInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
- void OnClick (global::Android.Views.View v);
-
- }
-
- [global::Android.Runtime.Register ("android/view/View$OnClickListener", DoNotGenerateAcw=true)]
- internal partial class IOnClickListenerInvoker : global::Java.Lang.Object, IOnClickListener {
-
- static IntPtr java_class_ref = JNIEnv.FindClass ("android/view/View$OnClickListener");
-
- protected override IntPtr ThresholdClass {
- get { return class_ref; }
- }
-
- protected override global::System.Type ThresholdType {
- get { return typeof (IOnClickListenerInvoker); }
- }
-
- new IntPtr class_ref;
-
- public static IOnClickListener GetObject (IntPtr handle, JniHandleOwnership transfer)
- {
- return global::Java.Lang.Object.GetObject (handle, transfer);
- }
-
- static IntPtr Validate (IntPtr handle)
- {
- if (!JNIEnv.IsInstanceOf (handle, java_class_ref))
- throw new InvalidCastException (string.Format ("Unable to convert instance of type '{0}' to type '{1}'.",
- JNIEnv.GetClassNameFromInstance (handle), "android.view.View.OnClickListener"));
- return handle;
- }
-
- protected override void Dispose (bool disposing)
- {
- if (this.class_ref != IntPtr.Zero)
- JNIEnv.DeleteGlobalRef (this.class_ref);
- this.class_ref = IntPtr.Zero;
- base.Dispose (disposing);
- }
-
- public IOnClickListenerInvoker (IntPtr handle, JniHandleOwnership transfer) : base (Validate (handle), transfer)
- {
- IntPtr local_ref = JNIEnv.GetObjectClass (((global::Java.Lang.Object) this).Handle);
- this.class_ref = JNIEnv.NewGlobalRef (local_ref);
- JNIEnv.DeleteLocalRef (local_ref);
- }
-
- static Delegate cb_onClick_Landroid_view_View_;
-#pragma warning disable 0169
- static Delegate GetOnClick_Landroid_view_View_Handler ()
- {
- if (cb_onClick_Landroid_view_View_ == null)
- cb_onClick_Landroid_view_View_ = JNINativeWrapper.CreateDelegate ((_JniMarshal_PPL_V) n_OnClick_Landroid_view_View_);
- return cb_onClick_Landroid_view_View_;
- }
-
- static void n_OnClick_Landroid_view_View_ (IntPtr jnienv, IntPtr native__this, IntPtr native_v)
- {
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- var v = global::Java.Lang.Object.GetObject (native_v, JniHandleOwnership.DoNotTransfer);
- __this.OnClick (v);
- }
-#pragma warning restore 0169
-
- IntPtr id_onClick_Landroid_view_View_;
- public unsafe void OnClick (global::Android.Views.View v)
- {
- if (id_onClick_Landroid_view_View_ == IntPtr.Zero)
- id_onClick_Landroid_view_View_ = JNIEnv.GetMethodID (class_ref, "onClick", "(Landroid/view/View;)V");
- JValue* __args = stackalloc JValue [1];
- __args [0] = new JValue (v);
- JNIEnv.CallVoidMethod (((global::Java.Lang.Object) this).Handle, id_onClick_Landroid_view_View_, __args);
- }
-
- }
-
- [global::Android.Runtime.Register ("mono/android/view/View_OnClickListenerImplementor")]
- internal sealed partial class IOnClickListenerImplementor : global::Java.Lang.Object, IOnClickListener {
-
- public IOnClickListenerImplementor ()
- : base (
- global::Android.Runtime.JNIEnv.StartCreateInstance ("mono/android/view/View_OnClickListenerImplementor", "()V"),
- JniHandleOwnership.TransferLocalRef)
- {
- global::Android.Runtime.JNIEnv.FinishCreateInstance (((global::Java.Lang.Object) this).Handle, "()V");
- }
-
-#pragma warning disable 0649
- public EventHandler Handler;
-#pragma warning restore 0649
-
- public void OnClick (global::Android.Views.View v)
- {
- var __h = Handler;
- if (__h != null)
- __h (v, new EventArgs ());
- }
-
- internal static bool __IsEmpty (IOnClickListenerImplementor value)
- {
- return value.Handler == null;
- }
- }
-
-
- internal static new IntPtr java_class_handle;
- internal static new IntPtr class_ref {
- get {
- return JNIEnv.FindClass ("android/view/View", ref java_class_handle);
- }
- }
-
- protected override IntPtr ThresholdClass {
- get { return class_ref; }
- }
-
- protected override global::System.Type ThresholdType {
- get { return typeof (View); }
- }
-
- protected View (IntPtr javaReference, JniHandleOwnership transfer) : base (javaReference, transfer) {}
-
- static Delegate cb_setOnClickListener_Landroid_view_View_OnClickListener_;
-#pragma warning disable 0169
- static Delegate GetSetOnClickListener_Landroid_view_View_OnClickListener_Handler ()
- {
- if (cb_setOnClickListener_Landroid_view_View_OnClickListener_ == null)
- cb_setOnClickListener_Landroid_view_View_OnClickListener_ = JNINativeWrapper.CreateDelegate ((_JniMarshal_PPL_V) n_SetOnClickListener_Landroid_view_View_OnClickListener_);
- return cb_setOnClickListener_Landroid_view_View_OnClickListener_;
- }
-
- static void n_SetOnClickListener_Landroid_view_View_OnClickListener_ (IntPtr jnienv, IntPtr native__this, IntPtr native_l)
- {
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- var l = (global::Android.Views.View.IOnClickListener)global::Java.Lang.Object.GetObject (native_l, JniHandleOwnership.DoNotTransfer);
- __this.SetOnClickListener (l);
- }
-#pragma warning restore 0169
-
- static IntPtr id_setOnClickListener_Landroid_view_View_OnClickListener_;
- // Metadata.xml XPath method reference: path="/api/package[@name='android.view']/class[@name='View']/method[@name='setOnClickListener' and count(parameter)=1 and parameter[1][@type='android.view.View.OnClickListener']]"
- [Register ("setOnClickListener", "(Landroid/view/View$OnClickListener;)V", "GetSetOnClickListener_Landroid_view_View_OnClickListener_Handler")]
- public virtual unsafe void SetOnClickListener (global::Android.Views.View.IOnClickListener l)
- {
- if (id_setOnClickListener_Landroid_view_View_OnClickListener_ == IntPtr.Zero)
- id_setOnClickListener_Landroid_view_View_OnClickListener_ = JNIEnv.GetMethodID (class_ref, "setOnClickListener", "(Landroid/view/View$OnClickListener;)V");
- try {
- JValue* __args = stackalloc JValue [1];
- __args [0] = new JValue (l);
-
- if (((object) this).GetType () == ThresholdType)
- JNIEnv.CallVoidMethod (((global::Java.Lang.Object) this).Handle, id_setOnClickListener_Landroid_view_View_OnClickListener_, __args);
- else
- JNIEnv.CallNonvirtualVoidMethod (((global::Java.Lang.Object) this).Handle, ThresholdClass, JNIEnv.GetMethodID (ThresholdClass, "setOnClickListener", "(Landroid/view/View$OnClickListener;)V"), __args);
- } finally {
- }
- }
-
- static Delegate cb_setOn123Listener_Landroid_view_View_OnClickListener_;
-#pragma warning disable 0169
- static Delegate GetSetOn123Listener_Landroid_view_View_OnClickListener_Handler ()
- {
- if (cb_setOn123Listener_Landroid_view_View_OnClickListener_ == null)
- cb_setOn123Listener_Landroid_view_View_OnClickListener_ = JNINativeWrapper.CreateDelegate ((_JniMarshal_PPL_V) n_SetOn123Listener_Landroid_view_View_OnClickListener_);
- return cb_setOn123Listener_Landroid_view_View_OnClickListener_;
- }
-
- static void n_SetOn123Listener_Landroid_view_View_OnClickListener_ (IntPtr jnienv, IntPtr native__this, IntPtr native_l)
- {
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- var l = (global::Android.Views.View.IOnClickListener)global::Java.Lang.Object.GetObject (native_l, JniHandleOwnership.DoNotTransfer);
- __this.SetOn123Listener (l);
- }
-#pragma warning restore 0169
-
- static IntPtr id_setOn123Listener_Landroid_view_View_OnClickListener_;
- // Metadata.xml XPath method reference: path="/api/package[@name='android.view']/class[@name='View']/method[@name='setOn123Listener' and count(parameter)=1 and parameter[1][@type='android.view.View.OnClickListener']]"
- [Register ("setOn123Listener", "(Landroid/view/View$OnClickListener;)V", "GetSetOn123Listener_Landroid_view_View_OnClickListener_Handler")]
- public virtual unsafe void SetOn123Listener (global::Android.Views.View.IOnClickListener l)
- {
- if (id_setOn123Listener_Landroid_view_View_OnClickListener_ == IntPtr.Zero)
- id_setOn123Listener_Landroid_view_View_OnClickListener_ = JNIEnv.GetMethodID (class_ref, "setOn123Listener", "(Landroid/view/View$OnClickListener;)V");
- try {
- JValue* __args = stackalloc JValue [1];
- __args [0] = new JValue (l);
-
- if (((object) this).GetType () == ThresholdType)
- JNIEnv.CallVoidMethod (((global::Java.Lang.Object) this).Handle, id_setOn123Listener_Landroid_view_View_OnClickListener_, __args);
- else
- JNIEnv.CallNonvirtualVoidMethod (((global::Java.Lang.Object) this).Handle, ThresholdClass, JNIEnv.GetMethodID (ThresholdClass, "setOn123Listener", "(Landroid/view/View$OnClickListener;)V"), __args);
- } finally {
- }
- }
-
- static Delegate cb_addTouchables_Ljava_util_ArrayList_;
-#pragma warning disable 0169
- static Delegate GetAddTouchables_Ljava_util_ArrayList_Handler ()
- {
- if (cb_addTouchables_Ljava_util_ArrayList_ == null)
- cb_addTouchables_Ljava_util_ArrayList_ = JNINativeWrapper.CreateDelegate ((_JniMarshal_PPL_V) n_AddTouchables_Ljava_util_ArrayList_);
- return cb_addTouchables_Ljava_util_ArrayList_;
- }
-
- static void n_AddTouchables_Ljava_util_ArrayList_ (IntPtr jnienv, IntPtr native__this, IntPtr native_views)
- {
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- var views = global::Android.Runtime.JavaList.FromJniHandle (native_views, JniHandleOwnership.DoNotTransfer);
- __this.AddTouchables (views);
- }
-#pragma warning restore 0169
-
- static IntPtr id_addTouchables_Ljava_util_ArrayList_;
- // Metadata.xml XPath method reference: path="/api/package[@name='android.view']/class[@name='View']/method[@name='addTouchables' and count(parameter)=1 and parameter[1][@type='java.util.ArrayList<android.view.View>']]"
- [Register ("addTouchables", "(Ljava/util/ArrayList;)V", "GetAddTouchables_Ljava_util_ArrayList_Handler")]
- public virtual unsafe void AddTouchables (global::System.Collections.Generic.IList views)
- {
- if (id_addTouchables_Ljava_util_ArrayList_ == IntPtr.Zero)
- id_addTouchables_Ljava_util_ArrayList_ = JNIEnv.GetMethodID (class_ref, "addTouchables", "(Ljava/util/ArrayList;)V");
- IntPtr native_views = global::Android.Runtime.JavaList.ToLocalJniHandle (views);
- try {
- JValue* __args = stackalloc JValue [1];
- __args [0] = new JValue (native_views);
-
- if (((object) this).GetType () == ThresholdType)
- JNIEnv.CallVoidMethod (((global::Java.Lang.Object) this).Handle, id_addTouchables_Ljava_util_ArrayList_, __args);
- else
- JNIEnv.CallNonvirtualVoidMethod (((global::Java.Lang.Object) this).Handle, ThresholdClass, JNIEnv.GetMethodID (ThresholdClass, "addTouchables", "(Ljava/util/ArrayList;)V"), __args);
- } finally {
- JNIEnv.DeleteLocalRef (native_views);
- }
- }
-
-#region "Event implementation for Android.Views.View.IOnClickListener"
- public event EventHandler Click {
- add {
- global::Java.Interop.EventHelper.AddEventHandler(
- ref weak_implementor_SetOnClickListener,
- __CreateIOnClickListenerImplementor,
- SetOnClickListener,
- __h => __h.Handler += value);
- }
- remove {
- global::Java.Interop.EventHelper.RemoveEventHandler(
- ref weak_implementor_SetOnClickListener,
- global::Android.Views.View.IOnClickListenerImplementor.__IsEmpty,
- __v => SetOnClickListener (null),
- __h => __h.Handler -= value);
- }
- }
-
- WeakReference weak_implementor_SetOnClickListener;
-
- global::Android.Views.View.IOnClickListenerImplementor __CreateIOnClickListenerImplementor ()
- {
- return new global::Android.Views.View.IOnClickListenerImplementor ();
- }
-#endregion
- }
-}
diff --git a/tests/generator-Tests/expected/Core_Jar2Xml/Java.Lang.Object.cs b/tests/generator-Tests/expected/Core_Jar2Xml/Java.Lang.Object.cs
deleted file mode 100644
index dd027b081..000000000
--- a/tests/generator-Tests/expected/Core_Jar2Xml/Java.Lang.Object.cs
+++ /dev/null
@@ -1,29 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#nullable restore
-using System;
-using System.Collections.Generic;
-using Android.Runtime;
-
-namespace Java.Lang {
-
- // Metadata.xml XPath class reference: path="/api/package[@name='java.lang']/class[@name='Object']"
- [global::Android.Runtime.Register ("java/lang/Object", DoNotGenerateAcw=true)]
- public partial class Object {
-
- internal static IntPtr java_class_handle;
- internal static IntPtr class_ref {
- get {
- return JNIEnv.FindClass ("java/lang/Object", ref java_class_handle);
- }
- }
-
- }
-}
diff --git a/tests/generator-Tests/expected/Core_Jar2Xml/Mono.Android.projitems b/tests/generator-Tests/expected/Core_Jar2Xml/Mono.Android.projitems
deleted file mode 100644
index 0b239b193..000000000
--- a/tests/generator-Tests/expected/Core_Jar2Xml/Mono.Android.projitems
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
- $(DefineConstants);ANDROID_1;ANDROID_2;ANDROID_3;ANDROID_4
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/tests/generator-Tests/expected/EnumerationFixup/EnumerationFixup.xml b/tests/generator-Tests/expected/EnumerationFixup/EnumerationFixup.xml
deleted file mode 100644
index 758f2bec3..000000000
--- a/tests/generator-Tests/expected/EnumerationFixup/EnumerationFixup.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/tests/generator-Tests/expected/EnumerationFixup/EnumerationFixupMap.xml b/tests/generator-Tests/expected/EnumerationFixup/EnumerationFixupMap.xml
deleted file mode 100644
index 10a23fd05..000000000
--- a/tests/generator-Tests/expected/EnumerationFixup/EnumerationFixupMap.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
diff --git a/tests/generator-Tests/expected/EnumerationFixup/Java.Interop.__TypeRegistrations.cs b/tests/generator-Tests/expected/EnumerationFixup/Java.Interop.__TypeRegistrations.cs
deleted file mode 100644
index 0131993a1..000000000
--- a/tests/generator-Tests/expected/EnumerationFixup/Java.Interop.__TypeRegistrations.cs
+++ /dev/null
@@ -1,47 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#nullable restore
-using System;
-using System.Collections.Generic;
-using Android.Runtime;
-
-namespace Java.Interop {
-
- partial class __TypeRegistrations {
-
- public static void RegisterPackages ()
- {
-#if MONODROID_TIMING
- var start = DateTime.Now;
- Android.Util.Log.Info ("MonoDroid-Timing", "RegisterPackages start: " + (start - new DateTime (1970, 1, 1)).TotalMilliseconds);
-#endif // def MONODROID_TIMING
- Java.Interop.TypeManager.RegisterPackages (
- new string[]{
- },
- new Converter[]{
- });
-#if MONODROID_TIMING
- var end = DateTime.Now;
- Android.Util.Log.Info ("MonoDroid-Timing", "RegisterPackages time: " + (end - new DateTime (1970, 1, 1)).TotalMilliseconds + " [elapsed: " + (end - start).TotalMilliseconds + " ms]");
-#endif // def MONODROID_TIMING
- }
-
-#if NET5_0_OR_GREATER
- [System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessage ("Trimming", "IL2057")]
-#endif
- static Type Lookup (string[] mappings, string javaType)
- {
- var managedType = Java.Interop.TypeManager.LookupTypeMapping (mappings, javaType);
- if (managedType == null)
- return null;
- return Type.GetType (managedType);
- }
- }
-}
diff --git a/tests/generator-Tests/expected/EnumerationFixup/Java.Lang.Object.cs b/tests/generator-Tests/expected/EnumerationFixup/Java.Lang.Object.cs
deleted file mode 100644
index dd027b081..000000000
--- a/tests/generator-Tests/expected/EnumerationFixup/Java.Lang.Object.cs
+++ /dev/null
@@ -1,29 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#nullable restore
-using System;
-using System.Collections.Generic;
-using Android.Runtime;
-
-namespace Java.Lang {
-
- // Metadata.xml XPath class reference: path="/api/package[@name='java.lang']/class[@name='Object']"
- [global::Android.Runtime.Register ("java/lang/Object", DoNotGenerateAcw=true)]
- public partial class Object {
-
- internal static IntPtr java_class_handle;
- internal static IntPtr class_ref {
- get {
- return JNIEnv.FindClass ("java/lang/Object", ref java_class_handle);
- }
- }
-
- }
-}
diff --git a/tests/generator-Tests/expected/EnumerationFixup/Mono.Android.projitems b/tests/generator-Tests/expected/EnumerationFixup/Mono.Android.projitems
deleted file mode 100644
index 439ba2d49..000000000
--- a/tests/generator-Tests/expected/EnumerationFixup/Mono.Android.projitems
+++ /dev/null
@@ -1,19 +0,0 @@
-
-
-
- $(DefineConstants);ANDROID_1;ANDROID_2;ANDROID_3;ANDROID_4
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/tests/generator-Tests/expected/EnumerationFixup/Xamarin.Test.DeprecatedItems.cs b/tests/generator-Tests/expected/EnumerationFixup/Xamarin.Test.DeprecatedItems.cs
deleted file mode 100644
index f14c6a109..000000000
--- a/tests/generator-Tests/expected/EnumerationFixup/Xamarin.Test.DeprecatedItems.cs
+++ /dev/null
@@ -1,44 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#nullable restore
-using System;
-using System.Collections.Generic;
-using Android.Runtime;
-
-namespace Xamarin.Test {
-
- // Metadata.xml XPath class reference: path="/api/package[@name='xamarin.test']/class[@name='DeprecatedItems']"
- [global::Android.Runtime.Register ("xamarin/test/DeprecatedItems", DoNotGenerateAcw=true)]
- public partial class DeprecatedItems : global::Java.Lang.Object {
-
-
- // Metadata.xml XPath field reference: path="/api/package[@name='xamarin.test']/class[@name='DeprecatedItems']/field[@name='My_Test_Field']"
- [Register ("My_Test_Field")]
- [Obsolete ("Field is deprecated", error: true)]
- public const int MyTestField = (int) 1;
- internal static new IntPtr java_class_handle;
- internal static new IntPtr class_ref {
- get {
- return JNIEnv.FindClass ("xamarin/test/DeprecatedItems", ref java_class_handle);
- }
- }
-
- protected override IntPtr ThresholdClass {
- get { return class_ref; }
- }
-
- protected override global::System.Type ThresholdType {
- get { return typeof (DeprecatedItems); }
- }
-
- protected DeprecatedItems (IntPtr javaReference, JniHandleOwnership transfer) : base (javaReference, transfer) {}
-
- }
-}
diff --git a/tests/generator-Tests/expected/EnumerationFixup/Xamarin.Test.SomeObject.cs b/tests/generator-Tests/expected/EnumerationFixup/Xamarin.Test.SomeObject.cs
deleted file mode 100644
index 1b3b3fd43..000000000
--- a/tests/generator-Tests/expected/EnumerationFixup/Xamarin.Test.SomeObject.cs
+++ /dev/null
@@ -1,107 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#nullable restore
-using System;
-using System.Collections.Generic;
-using Android.Runtime;
-
-namespace Xamarin.Test {
-
- // Metadata.xml XPath class reference: path="/api/package[@name='xamarin.test']/class[@name='SomeObject']"
- [global::Android.Runtime.Register ("xamarin/test/SomeObject", DoNotGenerateAcw=true)]
- public partial class SomeObject : global::Java.Lang.Object {
-
- internal static new IntPtr java_class_handle;
- internal static new IntPtr class_ref {
- get {
- return JNIEnv.FindClass ("xamarin/test/SomeObject", ref java_class_handle);
- }
- }
-
- protected override IntPtr ThresholdClass {
- get { return class_ref; }
- }
-
- protected override global::System.Type ThresholdType {
- get { return typeof (SomeObject); }
- }
-
- protected SomeObject (IntPtr javaReference, JniHandleOwnership transfer) : base (javaReference, transfer) {}
-
- static Delegate cb_getSomeObjectProperty;
-#pragma warning disable 0169
- static Delegate GetGetSomeObjectPropertyHandler ()
- {
- if (cb_getSomeObjectProperty == null)
- cb_getSomeObjectProperty = JNINativeWrapper.CreateDelegate ((_JniMarshal_PP_I) n_GetSomeObjectProperty);
- return cb_getSomeObjectProperty;
- }
-
- static int n_GetSomeObjectProperty (IntPtr jnienv, IntPtr native__this)
- {
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- return (int) __this.SomeObjectProperty;
- }
-#pragma warning restore 0169
-
- static Delegate cb_setSomeObjectProperty_I;
-#pragma warning disable 0169
- static Delegate GetSetSomeObjectProperty_IHandler ()
- {
- if (cb_setSomeObjectProperty_I == null)
- cb_setSomeObjectProperty_I = JNINativeWrapper.CreateDelegate ((_JniMarshal_PPI_V) n_SetSomeObjectProperty_I);
- return cb_setSomeObjectProperty_I;
- }
-
- static void n_SetSomeObjectProperty_I (IntPtr jnienv, IntPtr native__this, int native_newvalue)
- {
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- var newvalue = (global::Xamarin.Test.SomeValues) native_newvalue;
- __this.SomeObjectProperty = newvalue;
- }
-#pragma warning restore 0169
-
- static IntPtr id_getSomeObjectProperty;
- static IntPtr id_setSomeObjectProperty_I;
- public virtual unsafe global::Xamarin.Test.SomeValues SomeObjectProperty {
- // Metadata.xml XPath method reference: path="/api/package[@name='xamarin.test']/class[@name='SomeObject']/method[@name='getSomeObjectProperty' and count(parameter)=0]"
- [Register ("getSomeObjectProperty", "()I", "GetGetSomeObjectPropertyHandler")]
- get {
- if (id_getSomeObjectProperty == IntPtr.Zero)
- id_getSomeObjectProperty = JNIEnv.GetMethodID (class_ref, "getSomeObjectProperty", "()I");
- try {
-
- if (((object) this).GetType () == ThresholdType)
- return (global::Xamarin.Test.SomeValues) JNIEnv.CallIntMethod (((global::Java.Lang.Object) this).Handle, id_getSomeObjectProperty);
- else
- return (global::Xamarin.Test.SomeValues) JNIEnv.CallNonvirtualIntMethod (((global::Java.Lang.Object) this).Handle, ThresholdClass, JNIEnv.GetMethodID (ThresholdClass, "getSomeObjectProperty", "()I"));
- } finally {
- }
- }
- // Metadata.xml XPath method reference: path="/api/package[@name='xamarin.test']/class[@name='SomeObject']/method[@name='setSomeObjectProperty' and count(parameter)=1 and parameter[1][@type='int']]"
- [Register ("setSomeObjectProperty", "(I)V", "GetSetSomeObjectProperty_IHandler")]
- set {
- if (id_setSomeObjectProperty_I == IntPtr.Zero)
- id_setSomeObjectProperty_I = JNIEnv.GetMethodID (class_ref, "setSomeObjectProperty", "(I)V");
- try {
- JValue* __args = stackalloc JValue [1];
- __args [0] = new JValue ((int) value);
-
- if (((object) this).GetType () == ThresholdType)
- JNIEnv.CallVoidMethod (((global::Java.Lang.Object) this).Handle, id_setSomeObjectProperty_I, __args);
- else
- JNIEnv.CallNonvirtualVoidMethod (((global::Java.Lang.Object) this).Handle, ThresholdClass, JNIEnv.GetMethodID (ThresholdClass, "setSomeObjectProperty", "(I)V"), __args);
- } finally {
- }
- }
- }
-
- }
-}
diff --git a/tests/generator-Tests/expected/EnumerationFixup/Xamarin.Test.SomeObject2.cs b/tests/generator-Tests/expected/EnumerationFixup/Xamarin.Test.SomeObject2.cs
deleted file mode 100644
index dd82f5665..000000000
--- a/tests/generator-Tests/expected/EnumerationFixup/Xamarin.Test.SomeObject2.cs
+++ /dev/null
@@ -1,184 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#nullable restore
-using System;
-using System.Collections.Generic;
-using Android.Runtime;
-
-namespace Xamarin.Test {
-
- // Metadata.xml XPath class reference: path="/api/package[@name='xamarin.test']/class[@name='SomeObject2']"
- [global::Android.Runtime.Register ("xamarin/test/SomeObject2", DoNotGenerateAcw=true)]
- public partial class SomeObject2 : global::Xamarin.Test.SomeObject {
-
- internal static new IntPtr java_class_handle;
- internal static new IntPtr class_ref {
- get {
- return JNIEnv.FindClass ("xamarin/test/SomeObject2", ref java_class_handle);
- }
- }
-
- protected override IntPtr ThresholdClass {
- get { return class_ref; }
- }
-
- protected override global::System.Type ThresholdType {
- get { return typeof (SomeObject2); }
- }
-
- protected SomeObject2 (IntPtr javaReference, JniHandleOwnership transfer) : base (javaReference, transfer) {}
-
- static Delegate cb_getSomeObjectProperty;
-#pragma warning disable 0169
- static Delegate GetGetSomeObjectPropertyHandler ()
- {
- if (cb_getSomeObjectProperty == null)
- cb_getSomeObjectProperty = JNINativeWrapper.CreateDelegate ((_JniMarshal_PP_I) n_GetSomeObjectProperty);
- return cb_getSomeObjectProperty;
- }
-
- static int n_GetSomeObjectProperty (IntPtr jnienv, IntPtr native__this)
- {
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- return (int) __this.SomeObjectProperty;
- }
-#pragma warning restore 0169
-
- static Delegate cb_setSomeObjectProperty_I;
-#pragma warning disable 0169
- static Delegate GetSetSomeObjectProperty_IHandler ()
- {
- if (cb_setSomeObjectProperty_I == null)
- cb_setSomeObjectProperty_I = JNINativeWrapper.CreateDelegate ((_JniMarshal_PPI_V) n_SetSomeObjectProperty_I);
- return cb_setSomeObjectProperty_I;
- }
-
- static void n_SetSomeObjectProperty_I (IntPtr jnienv, IntPtr native__this, int native_newvalue)
- {
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- var newvalue = (global::Xamarin.Test.SomeValues) native_newvalue;
- __this.SomeObjectProperty = newvalue;
- }
-#pragma warning restore 0169
-
- static IntPtr id_getSomeObjectProperty;
- static IntPtr id_setSomeObjectProperty_I;
- public override unsafe global::Xamarin.Test.SomeValues SomeObjectProperty {
- // Metadata.xml XPath method reference: path="/api/package[@name='xamarin.test']/class[@name='SomeObject2']/method[@name='getSomeObjectProperty' and count(parameter)=0]"
- [Register ("getSomeObjectProperty", "()I", "GetGetSomeObjectPropertyHandler")]
- get {
- if (id_getSomeObjectProperty == IntPtr.Zero)
- id_getSomeObjectProperty = JNIEnv.GetMethodID (class_ref, "getSomeObjectProperty", "()I");
- try {
-
- if (((object) this).GetType () == ThresholdType)
- return (global::Xamarin.Test.SomeValues) JNIEnv.CallIntMethod (((global::Java.Lang.Object) this).Handle, id_getSomeObjectProperty);
- else
- return (global::Xamarin.Test.SomeValues) JNIEnv.CallNonvirtualIntMethod (((global::Java.Lang.Object) this).Handle, ThresholdClass, JNIEnv.GetMethodID (ThresholdClass, "getSomeObjectProperty", "()I"));
- } finally {
- }
- }
- // Metadata.xml XPath method reference: path="/api/package[@name='xamarin.test']/class[@name='SomeObject2']/method[@name='setSomeObjectProperty' and count(parameter)=1 and parameter[1][@type='int']]"
- [Register ("setSomeObjectProperty", "(I)V", "GetSetSomeObjectProperty_IHandler")]
- set {
- if (id_setSomeObjectProperty_I == IntPtr.Zero)
- id_setSomeObjectProperty_I = JNIEnv.GetMethodID (class_ref, "setSomeObjectProperty", "(I)V");
- try {
- JValue* __args = stackalloc JValue [1];
- __args [0] = new JValue ((int) value);
-
- if (((object) this).GetType () == ThresholdType)
- JNIEnv.CallVoidMethod (((global::Java.Lang.Object) this).Handle, id_setSomeObjectProperty_I, __args);
- else
- JNIEnv.CallNonvirtualVoidMethod (((global::Java.Lang.Object) this).Handle, ThresholdClass, JNIEnv.GetMethodID (ThresholdClass, "setSomeObjectProperty", "(I)V"), __args);
- } finally {
- }
- }
- }
-
- static Delegate cb_getSomeObjectPropertyArray;
-#pragma warning disable 0169
- static Delegate GetGetSomeObjectPropertyArrayHandler ()
- {
- if (cb_getSomeObjectPropertyArray == null)
- cb_getSomeObjectPropertyArray = JNINativeWrapper.CreateDelegate ((_JniMarshal_PP_L) n_GetSomeObjectPropertyArray);
- return cb_getSomeObjectPropertyArray;
- }
-
- static IntPtr n_GetSomeObjectPropertyArray (IntPtr jnienv, IntPtr native__this)
- {
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- return JNIEnv.NewArray (__this.GetSomeObjectPropertyArray ());
- }
-#pragma warning restore 0169
-
- static IntPtr id_getSomeObjectPropertyArray;
- // Metadata.xml XPath method reference: path="/api/package[@name='xamarin.test']/class[@name='SomeObject2']/method[@name='getSomeObjectPropertyArray' and count(parameter)=0]"
- [return:global::Android.Runtime.GeneratedEnum]
- [Register ("getSomeObjectPropertyArray", "()[I", "GetGetSomeObjectPropertyArrayHandler")]
- public virtual unsafe global::Xamarin.Test.SomeValues[] GetSomeObjectPropertyArray ()
- {
- if (id_getSomeObjectPropertyArray == IntPtr.Zero)
- id_getSomeObjectPropertyArray = JNIEnv.GetMethodID (class_ref, "getSomeObjectPropertyArray", "()[I");
- try {
-
- if (((object) this).GetType () == ThresholdType)
- return (global::Xamarin.Test.SomeValues[]) JNIEnv.GetArray (JNIEnv.CallObjectMethod (((global::Java.Lang.Object) this).Handle, id_getSomeObjectPropertyArray), JniHandleOwnership.TransferLocalRef, typeof (global::Xamarin.Test.SomeValues));
- else
- return (global::Xamarin.Test.SomeValues[]) JNIEnv.GetArray (JNIEnv.CallNonvirtualObjectMethod (((global::Java.Lang.Object) this).Handle, ThresholdClass, JNIEnv.GetMethodID (ThresholdClass, "getSomeObjectPropertyArray", "()[I")), JniHandleOwnership.TransferLocalRef, typeof (global::Xamarin.Test.SomeValues));
- } finally {
- }
- }
-
- static Delegate cb_setSomeObjectPropertyArray_arrayI;
-#pragma warning disable 0169
- static Delegate GetSetSomeObjectPropertyArray_arrayIHandler ()
- {
- if (cb_setSomeObjectPropertyArray_arrayI == null)
- cb_setSomeObjectPropertyArray_arrayI = JNINativeWrapper.CreateDelegate ((_JniMarshal_PPL_V) n_SetSomeObjectPropertyArray_arrayI);
- return cb_setSomeObjectPropertyArray_arrayI;
- }
-
- static void n_SetSomeObjectPropertyArray_arrayI (IntPtr jnienv, IntPtr native__this, IntPtr native_newvalue)
- {
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- var newvalue = (global::Xamarin.Test.SomeValues[]) JNIEnv.GetArray (native_newvalue, JniHandleOwnership.DoNotTransfer, typeof (global::Xamarin.Test.SomeValues));
- __this.SetSomeObjectPropertyArray (newvalue);
- if (newvalue != null)
- JNIEnv.CopyArray (newvalue, native_newvalue);
- }
-#pragma warning restore 0169
-
- static IntPtr id_setSomeObjectPropertyArray_arrayI;
- // Metadata.xml XPath method reference: path="/api/package[@name='xamarin.test']/class[@name='SomeObject2']/method[@name='setSomeObjectPropertyArray' and count(parameter)=1 and parameter[1][@type='int[]']]"
- [Register ("setSomeObjectPropertyArray", "([I)V", "GetSetSomeObjectPropertyArray_arrayIHandler")]
- public virtual unsafe void SetSomeObjectPropertyArray ([global::Android.Runtime.GeneratedEnum] global::Xamarin.Test.SomeValues[] newvalue)
- {
- if (id_setSomeObjectPropertyArray_arrayI == IntPtr.Zero)
- id_setSomeObjectPropertyArray_arrayI = JNIEnv.GetMethodID (class_ref, "setSomeObjectPropertyArray", "([I)V");
- IntPtr native_newvalue = JNIEnv.NewArray (newvalue);
- try {
- JValue* __args = stackalloc JValue [1];
- __args [0] = new JValue (native_newvalue);
-
- if (((object) this).GetType () == ThresholdType)
- JNIEnv.CallVoidMethod (((global::Java.Lang.Object) this).Handle, id_setSomeObjectPropertyArray_arrayI, __args);
- else
- JNIEnv.CallNonvirtualVoidMethod (((global::Java.Lang.Object) this).Handle, ThresholdClass, JNIEnv.GetMethodID (ThresholdClass, "setSomeObjectPropertyArray", "([I)V"), __args);
- } finally {
- if (newvalue != null) {
- JNIEnv.CopyArray (native_newvalue, newvalue);
- JNIEnv.DeleteLocalRef (native_newvalue);
- }
- }
- }
-
- }
-}
diff --git a/tests/generator-Tests/expected/EnumerationFixup/Xamarin.Test.SomeValues.cs b/tests/generator-Tests/expected/EnumerationFixup/Xamarin.Test.SomeValues.cs
deleted file mode 100644
index 83a61799d..000000000
--- a/tests/generator-Tests/expected/EnumerationFixup/Xamarin.Test.SomeValues.cs
+++ /dev/null
@@ -1,8 +0,0 @@
-namespace Xamarin.Test {
- public enum SomeValues {
- [global::Android.Runtime.IntDefinition (null, JniField = "xamarin/test/SomeObject.SOME_VALUE")]
- SomeValue = 0,
- [global::Android.Runtime.IntDefinition (null, JniField = "xamarin/test/SomeObject.SOME_VALUE2")]
- SomeValue2 = 1,
- }
-}
diff --git a/tests/generator-Tests/expected/EnumerationFixup/__NamespaceMapping__.cs b/tests/generator-Tests/expected/EnumerationFixup/__NamespaceMapping__.cs
deleted file mode 100644
index 223b17256..000000000
--- a/tests/generator-Tests/expected/EnumerationFixup/__NamespaceMapping__.cs
+++ /dev/null
@@ -1,9 +0,0 @@
-using System;
-
-[assembly:global::Android.Runtime.NamespaceMapping (Java = "java.lang", Managed="Java.Lang")]
-[assembly:global::Android.Runtime.NamespaceMapping (Java = "xamarin.test", Managed="Xamarin.Test")]
-
-delegate int _JniMarshal_PP_I (IntPtr jnienv, IntPtr klass);
-delegate IntPtr _JniMarshal_PP_L (IntPtr jnienv, IntPtr klass);
-delegate void _JniMarshal_PPI_V (IntPtr jnienv, IntPtr klass, int p0);
-delegate void _JniMarshal_PPL_V (IntPtr jnienv, IntPtr klass, IntPtr p0);
diff --git a/tests/generator-Tests/expected/EnumerationFixup/enumlist b/tests/generator-Tests/expected/EnumerationFixup/enumlist
deleted file mode 100644
index e69de29bb..000000000
diff --git a/tests/generator-Tests/expected/GenericArguments/Com.Google.Android.Exoplayer.Drm.FrameworkMediaDrm.cs b/tests/generator-Tests/expected/GenericArguments/Com.Google.Android.Exoplayer.Drm.FrameworkMediaDrm.cs
deleted file mode 100644
index 6dea321d0..000000000
--- a/tests/generator-Tests/expected/GenericArguments/Com.Google.Android.Exoplayer.Drm.FrameworkMediaDrm.cs
+++ /dev/null
@@ -1,88 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#nullable restore
-using System;
-using System.Collections.Generic;
-using Android.Runtime;
-
-namespace Com.Google.Android.Exoplayer.Drm {
-
- // Metadata.xml XPath class reference: path="/api/package[@name='com.google.android.exoplayer.drm']/class[@name='FrameworkMediaDrm']"
- [global::Android.Runtime.Register ("com/google/android/exoplayer/drm/FrameworkMediaDrm", DoNotGenerateAcw=true)]
- public sealed partial class FrameworkMediaDrm : global::Java.Lang.Object, global::Com.Google.Android.Exoplayer.Drm.IExoMediaDrm {
-
- internal static new IntPtr java_class_handle;
- internal static new IntPtr class_ref {
- get {
- return JNIEnv.FindClass ("com/google/android/exoplayer/drm/FrameworkMediaDrm", ref java_class_handle);
- }
- }
-
- protected override IntPtr ThresholdClass {
- get { return class_ref; }
- }
-
- protected override global::System.Type ThresholdType {
- get { return typeof (FrameworkMediaDrm); }
- }
-
- internal FrameworkMediaDrm (IntPtr javaReference, JniHandleOwnership transfer) : base (javaReference, transfer) {}
-
- static IntPtr id_ctor;
- // Metadata.xml XPath constructor reference: path="/api/package[@name='com.google.android.exoplayer.drm']/class[@name='FrameworkMediaDrm']/constructor[@name='FrameworkMediaDrm' and count(parameter)=0]"
- [Register (".ctor", "()V", "")]
- public unsafe FrameworkMediaDrm ()
- : base (IntPtr.Zero, JniHandleOwnership.DoNotTransfer)
- {
- if (((global::Java.Lang.Object) this).Handle != IntPtr.Zero)
- return;
-
- try {
- if (((object) this).GetType () != typeof (FrameworkMediaDrm)) {
- SetHandle (
- global::Android.Runtime.JNIEnv.StartCreateInstance (((object) this).GetType (), "()V"),
- JniHandleOwnership.TransferLocalRef);
- global::Android.Runtime.JNIEnv.FinishCreateInstance (((global::Java.Lang.Object) this).Handle, "()V");
- return;
- }
-
- if (id_ctor == IntPtr.Zero)
- id_ctor = JNIEnv.GetMethodID (class_ref, "", "()V");
- SetHandle (
- global::Android.Runtime.JNIEnv.StartCreateInstance (class_ref, id_ctor),
- JniHandleOwnership.TransferLocalRef);
- JNIEnv.FinishCreateInstance (((global::Java.Lang.Object) this).Handle, class_ref, id_ctor);
- } finally {
- }
- }
-
- static IntPtr id_setOnEventListener_Lcom_google_android_exoplayer_drm_ExoMediaDrm_OnEventListener_;
- // Metadata.xml XPath method reference: path="/api/package[@name='com.google.android.exoplayer.drm']/class[@name='FrameworkMediaDrm']/method[@name='setOnEventListener' and count(parameter)=1 and parameter[1][@type='com.google.android.exoplayer.drm.ExoMediaDrm.OnEventListener<com.google.android.exoplayer.drm.FrameworkMediaCrypto>']]"
- [Register ("setOnEventListener", "(Lcom/google/android/exoplayer/drm/ExoMediaDrm$OnEventListener;)V", "")]
- public unsafe void SetOnEventListener (global::Com.Google.Android.Exoplayer.Drm.IExoMediaDrmOnEventListener p0)
- {
- if (id_setOnEventListener_Lcom_google_android_exoplayer_drm_ExoMediaDrm_OnEventListener_ == IntPtr.Zero)
- id_setOnEventListener_Lcom_google_android_exoplayer_drm_ExoMediaDrm_OnEventListener_ = JNIEnv.GetMethodID (class_ref, "setOnEventListener", "(Lcom/google/android/exoplayer/drm/ExoMediaDrm$OnEventListener;)V");
- try {
- JValue* __args = stackalloc JValue [1];
- __args [0] = new JValue (p0);
- JNIEnv.CallVoidMethod (((global::Java.Lang.Object) this).Handle, id_setOnEventListener_Lcom_google_android_exoplayer_drm_ExoMediaDrm_OnEventListener_, __args);
- } finally {
- }
- }
-
- // This method is explicitly implemented as a member of an instantiated Com.Google.Android.Exoplayer.Drm.IExoMediaDrm
- void global::Com.Google.Android.Exoplayer.Drm.IExoMediaDrm.SetOnEventListener (global::Com.Google.Android.Exoplayer.Drm.IExoMediaDrmOnEventListener p0)
- {
- SetOnEventListener (global::Java.Interop.JavaObjectExtensions.JavaCast(p0));
- }
-
- }
-}
diff --git a/tests/generator-Tests/expected/GenericArguments/Com.Google.Android.Exoplayer.Drm.IExoMediaDrm.cs b/tests/generator-Tests/expected/GenericArguments/Com.Google.Android.Exoplayer.Drm.IExoMediaDrm.cs
deleted file mode 100644
index aea9f861e..000000000
--- a/tests/generator-Tests/expected/GenericArguments/Com.Google.Android.Exoplayer.Drm.IExoMediaDrm.cs
+++ /dev/null
@@ -1,263 +0,0 @@
-using System;
-using System.Collections.Generic;
-using Android.Runtime;
-
-namespace Com.Google.Android.Exoplayer.Drm {
-
- // Metadata.xml XPath interface reference: path="/api/package[@name='com.google.android.exoplayer.drm']/interface[@name='ExoMediaDrm.OnEventListener']"
- [Register ("com/google/android/exoplayer/drm/ExoMediaDrm$OnEventListener", "", "Com.Google.Android.Exoplayer.Drm.IExoMediaDrmOnEventListenerInvoker")]
- [global::Java.Interop.JavaTypeParameters (new string [] {"T extends com.google.android.exoplayer.drm.ExoMediaCrypto"})]
- public partial interface IExoMediaDrmOnEventListener : IJavaObject {
-
- // Metadata.xml XPath method reference: path="/api/package[@name='com.google.android.exoplayer.drm']/interface[@name='ExoMediaDrm.OnEventListener']/method[@name='onEvent' and count(parameter)=5 and parameter[1][@type='com.google.android.exoplayer.drm.ExoMediaDrm<T>'] and parameter[2][@type='byte[]'] and parameter[3][@type='int'] and parameter[4][@type='int'] and parameter[5][@type='byte[]']]"
- [Register ("onEvent", "(Lcom/google/android/exoplayer/drm/ExoMediaDrm;[BII[B)V", "GetOnEvent_Lcom_google_android_exoplayer_drm_ExoMediaDrm_arrayBIIarrayBHandler:Com.Google.Android.Exoplayer.Drm.IExoMediaDrmOnEventListenerInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
- void OnEvent (global::Com.Google.Android.Exoplayer.Drm.IExoMediaDrm p0, byte[] p1, int p2, int p3, byte[] p4);
-
- }
-
- [global::Android.Runtime.Register ("com/google/android/exoplayer/drm/ExoMediaDrm$OnEventListener", DoNotGenerateAcw=true)]
- internal partial class IExoMediaDrmOnEventListenerInvoker : global::Java.Lang.Object, IExoMediaDrmOnEventListener {
-
- static IntPtr java_class_ref = JNIEnv.FindClass ("com/google/android/exoplayer/drm/ExoMediaDrm$OnEventListener");
-
- protected override IntPtr ThresholdClass {
- get { return class_ref; }
- }
-
- protected override global::System.Type ThresholdType {
- get { return typeof (IExoMediaDrmOnEventListenerInvoker); }
- }
-
- new IntPtr class_ref;
-
- public static IExoMediaDrmOnEventListener GetObject (IntPtr handle, JniHandleOwnership transfer)
- {
- return global::Java.Lang.Object.GetObject (handle, transfer);
- }
-
- static IntPtr Validate (IntPtr handle)
- {
- if (!JNIEnv.IsInstanceOf (handle, java_class_ref))
- throw new InvalidCastException (string.Format ("Unable to convert instance of type '{0}' to type '{1}'.",
- JNIEnv.GetClassNameFromInstance (handle), "com.google.android.exoplayer.drm.ExoMediaDrm.OnEventListener"));
- return handle;
- }
-
- protected override void Dispose (bool disposing)
- {
- if (this.class_ref != IntPtr.Zero)
- JNIEnv.DeleteGlobalRef (this.class_ref);
- this.class_ref = IntPtr.Zero;
- base.Dispose (disposing);
- }
-
- public IExoMediaDrmOnEventListenerInvoker (IntPtr handle, JniHandleOwnership transfer) : base (Validate (handle), transfer)
- {
- IntPtr local_ref = JNIEnv.GetObjectClass (((global::Java.Lang.Object) this).Handle);
- this.class_ref = JNIEnv.NewGlobalRef (local_ref);
- JNIEnv.DeleteLocalRef (local_ref);
- }
-
- static Delegate cb_onEvent_Lcom_google_android_exoplayer_drm_ExoMediaDrm_arrayBIIarrayB;
-#pragma warning disable 0169
- static Delegate GetOnEvent_Lcom_google_android_exoplayer_drm_ExoMediaDrm_arrayBIIarrayBHandler ()
- {
- if (cb_onEvent_Lcom_google_android_exoplayer_drm_ExoMediaDrm_arrayBIIarrayB == null)
- cb_onEvent_Lcom_google_android_exoplayer_drm_ExoMediaDrm_arrayBIIarrayB = JNINativeWrapper.CreateDelegate ((_JniMarshal_PPLLIIL_V) n_OnEvent_Lcom_google_android_exoplayer_drm_ExoMediaDrm_arrayBIIarrayB);
- return cb_onEvent_Lcom_google_android_exoplayer_drm_ExoMediaDrm_arrayBIIarrayB;
- }
-
- static void n_OnEvent_Lcom_google_android_exoplayer_drm_ExoMediaDrm_arrayBIIarrayB (IntPtr jnienv, IntPtr native__this, IntPtr native_p0, IntPtr native_p1, int p2, int p3, IntPtr native_p4)
- {
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- var p0 = (global::Com.Google.Android.Exoplayer.Drm.IExoMediaDrm)global::Java.Lang.Object.GetObject (native_p0, JniHandleOwnership.DoNotTransfer);
- var p1 = (byte[]) JNIEnv.GetArray (native_p1, JniHandleOwnership.DoNotTransfer, typeof (byte));
- var p4 = (byte[]) JNIEnv.GetArray (native_p4, JniHandleOwnership.DoNotTransfer, typeof (byte));
- __this.OnEvent (p0, p1, p2, p3, p4);
- if (p1 != null)
- JNIEnv.CopyArray (p1, native_p1);
- if (p4 != null)
- JNIEnv.CopyArray (p4, native_p4);
- }
-#pragma warning restore 0169
-
- IntPtr id_onEvent_Lcom_google_android_exoplayer_drm_ExoMediaDrm_arrayBIIarrayB;
- public unsafe void OnEvent (global::Com.Google.Android.Exoplayer.Drm.IExoMediaDrm p0, byte[] p1, int p2, int p3, byte[] p4)
- {
- if (id_onEvent_Lcom_google_android_exoplayer_drm_ExoMediaDrm_arrayBIIarrayB == IntPtr.Zero)
- id_onEvent_Lcom_google_android_exoplayer_drm_ExoMediaDrm_arrayBIIarrayB = JNIEnv.GetMethodID (class_ref, "onEvent", "(Lcom/google/android/exoplayer/drm/ExoMediaDrm;[BII[B)V");
- IntPtr native_p1 = JNIEnv.NewArray (p1);
- IntPtr native_p4 = JNIEnv.NewArray (p4);
- JValue* __args = stackalloc JValue [5];
- __args [0] = new JValue (p0);
- __args [1] = new JValue (native_p1);
- __args [2] = new JValue (p2);
- __args [3] = new JValue (p3);
- __args [4] = new JValue (native_p4);
- JNIEnv.CallVoidMethod (((global::Java.Lang.Object) this).Handle, id_onEvent_Lcom_google_android_exoplayer_drm_ExoMediaDrm_arrayBIIarrayB, __args);
- if (p1 != null) {
- JNIEnv.CopyArray (native_p1, p1);
- JNIEnv.DeleteLocalRef (native_p1);
- }
- if (p4 != null) {
- JNIEnv.CopyArray (native_p4, p4);
- JNIEnv.DeleteLocalRef (native_p4);
- }
- }
-
- }
-
- // event args for com.google.android.exoplayer.drm.ExoMediaDrm.OnEventListener.onEvent
- public partial class ExoMediaDrmOnEventEventArgs : global::System.EventArgs {
-
- public ExoMediaDrmOnEventEventArgs (global::Com.Google.Android.Exoplayer.Drm.IExoMediaDrm p0, byte[] p1, int p2, int p3, byte[] p4)
- {
- this.p0 = p0;
- this.p1 = p1;
- this.p2 = p2;
- this.p3 = p3;
- this.p4 = p4;
- }
-
- global::Com.Google.Android.Exoplayer.Drm.IExoMediaDrm p0;
- public global::Com.Google.Android.Exoplayer.Drm.IExoMediaDrm P0 {
- get { return p0; }
- }
-
- byte[] p1;
- public byte[] P1 {
- get { return p1; }
- }
-
- int p2;
- public int P2 {
- get { return p2; }
- }
-
- int p3;
- public int P3 {
- get { return p3; }
- }
-
- byte[] p4;
- public byte[] P4 {
- get { return p4; }
- }
- }
-
- [global::Android.Runtime.Register ("mono/com/google/android/exoplayer/drm/ExoMediaDrm_OnEventListenerImplementor")]
- internal sealed partial class IExoMediaDrmOnEventListenerImplementor : global::Java.Lang.Object, IExoMediaDrmOnEventListener {
-
- object sender;
-
- public IExoMediaDrmOnEventListenerImplementor (object sender)
- : base (
- global::Android.Runtime.JNIEnv.StartCreateInstance ("mono/com/google/android/exoplayer/drm/ExoMediaDrm_OnEventListenerImplementor", "()V"),
- JniHandleOwnership.TransferLocalRef)
- {
- global::Android.Runtime.JNIEnv.FinishCreateInstance (((global::Java.Lang.Object) this).Handle, "()V");
- this.sender = sender;
- }
-
-#pragma warning disable 0649
- public EventHandler Handler;
-#pragma warning restore 0649
-
- public void OnEvent (global::Com.Google.Android.Exoplayer.Drm.IExoMediaDrm p0, byte[] p1, int p2, int p3, byte[] p4)
- {
- var __h = Handler;
- if (__h != null)
- __h (sender, new ExoMediaDrmOnEventEventArgs (p0, p1, p2, p3, p4));
- }
-
- internal static bool __IsEmpty (IExoMediaDrmOnEventListenerImplementor value)
- {
- return value.Handler == null;
- }
- }
-
-
- // Metadata.xml XPath interface reference: path="/api/package[@name='com.google.android.exoplayer.drm']/interface[@name='ExoMediaDrm']"
- [Register ("com/google/android/exoplayer/drm/ExoMediaDrm", "", "Com.Google.Android.Exoplayer.Drm.IExoMediaDrmInvoker")]
- [global::Java.Interop.JavaTypeParameters (new string [] {"T extends com.google.android.exoplayer.drm.ExoMediaCrypto"})]
- public partial interface IExoMediaDrm : IJavaObject {
-
- // Metadata.xml XPath method reference: path="/api/package[@name='com.google.android.exoplayer.drm']/interface[@name='ExoMediaDrm']/method[@name='setOnEventListener' and count(parameter)=1 and parameter[1][@type='com.google.android.exoplayer.drm.ExoMediaDrm.OnEventListener<T>']]"
- [Register ("setOnEventListener", "(Lcom/google/android/exoplayer/drm/ExoMediaDrm$OnEventListener;)V", "GetSetOnEventListener_Lcom_google_android_exoplayer_drm_ExoMediaDrm_OnEventListener_Handler:Com.Google.Android.Exoplayer.Drm.IExoMediaDrmInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
- void SetOnEventListener (global::Com.Google.Android.Exoplayer.Drm.IExoMediaDrmOnEventListener p0);
-
- }
-
- [global::Android.Runtime.Register ("com/google/android/exoplayer/drm/ExoMediaDrm", DoNotGenerateAcw=true)]
- internal partial class IExoMediaDrmInvoker : global::Java.Lang.Object, IExoMediaDrm {
-
- static IntPtr java_class_ref = JNIEnv.FindClass ("com/google/android/exoplayer/drm/ExoMediaDrm");
-
- protected override IntPtr ThresholdClass {
- get { return class_ref; }
- }
-
- protected override global::System.Type ThresholdType {
- get { return typeof (IExoMediaDrmInvoker); }
- }
-
- new IntPtr class_ref;
-
- public static IExoMediaDrm GetObject (IntPtr handle, JniHandleOwnership transfer)
- {
- return global::Java.Lang.Object.GetObject (handle, transfer);
- }
-
- static IntPtr Validate (IntPtr handle)
- {
- if (!JNIEnv.IsInstanceOf (handle, java_class_ref))
- throw new InvalidCastException (string.Format ("Unable to convert instance of type '{0}' to type '{1}'.",
- JNIEnv.GetClassNameFromInstance (handle), "com.google.android.exoplayer.drm.ExoMediaDrm"));
- return handle;
- }
-
- protected override void Dispose (bool disposing)
- {
- if (this.class_ref != IntPtr.Zero)
- JNIEnv.DeleteGlobalRef (this.class_ref);
- this.class_ref = IntPtr.Zero;
- base.Dispose (disposing);
- }
-
- public IExoMediaDrmInvoker (IntPtr handle, JniHandleOwnership transfer) : base (Validate (handle), transfer)
- {
- IntPtr local_ref = JNIEnv.GetObjectClass (((global::Java.Lang.Object) this).Handle);
- this.class_ref = JNIEnv.NewGlobalRef (local_ref);
- JNIEnv.DeleteLocalRef (local_ref);
- }
-
- static Delegate cb_setOnEventListener_Lcom_google_android_exoplayer_drm_ExoMediaDrm_OnEventListener_;
-#pragma warning disable 0169
- static Delegate GetSetOnEventListener_Lcom_google_android_exoplayer_drm_ExoMediaDrm_OnEventListener_Handler ()
- {
- if (cb_setOnEventListener_Lcom_google_android_exoplayer_drm_ExoMediaDrm_OnEventListener_ == null)
- cb_setOnEventListener_Lcom_google_android_exoplayer_drm_ExoMediaDrm_OnEventListener_ = JNINativeWrapper.CreateDelegate ((_JniMarshal_PPL_V) n_SetOnEventListener_Lcom_google_android_exoplayer_drm_ExoMediaDrm_OnEventListener_);
- return cb_setOnEventListener_Lcom_google_android_exoplayer_drm_ExoMediaDrm_OnEventListener_;
- }
-
- static void n_SetOnEventListener_Lcom_google_android_exoplayer_drm_ExoMediaDrm_OnEventListener_ (IntPtr jnienv, IntPtr native__this, IntPtr native_p0)
- {
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- var p0 = (global::Com.Google.Android.Exoplayer.Drm.IExoMediaDrmOnEventListener)global::Java.Lang.Object.GetObject (native_p0, JniHandleOwnership.DoNotTransfer);
- __this.SetOnEventListener (p0);
- }
-#pragma warning restore 0169
-
- IntPtr id_setOnEventListener_Lcom_google_android_exoplayer_drm_ExoMediaDrm_OnEventListener_;
- public unsafe void SetOnEventListener (global::Com.Google.Android.Exoplayer.Drm.IExoMediaDrmOnEventListener p0)
- {
- if (id_setOnEventListener_Lcom_google_android_exoplayer_drm_ExoMediaDrm_OnEventListener_ == IntPtr.Zero)
- id_setOnEventListener_Lcom_google_android_exoplayer_drm_ExoMediaDrm_OnEventListener_ = JNIEnv.GetMethodID (class_ref, "setOnEventListener", "(Lcom/google/android/exoplayer/drm/ExoMediaDrm$OnEventListener;)V");
- JValue* __args = stackalloc JValue [1];
- __args [0] = new JValue (p0);
- JNIEnv.CallVoidMethod (((global::Java.Lang.Object) this).Handle, id_setOnEventListener_Lcom_google_android_exoplayer_drm_ExoMediaDrm_OnEventListener_, __args);
- }
-
- }
-
-}
diff --git a/tests/generator-Tests/expected/GenericArguments/GenericArguments.xml b/tests/generator-Tests/expected/GenericArguments/GenericArguments.xml
deleted file mode 100644
index f9387a080..000000000
--- a/tests/generator-Tests/expected/GenericArguments/GenericArguments.xml
+++ /dev/null
@@ -1,69 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/tests/generator-Tests/expected/GenericArguments/Java.Lang.Object.cs b/tests/generator-Tests/expected/GenericArguments/Java.Lang.Object.cs
deleted file mode 100644
index dd027b081..000000000
--- a/tests/generator-Tests/expected/GenericArguments/Java.Lang.Object.cs
+++ /dev/null
@@ -1,29 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#nullable restore
-using System;
-using System.Collections.Generic;
-using Android.Runtime;
-
-namespace Java.Lang {
-
- // Metadata.xml XPath class reference: path="/api/package[@name='java.lang']/class[@name='Object']"
- [global::Android.Runtime.Register ("java/lang/Object", DoNotGenerateAcw=true)]
- public partial class Object {
-
- internal static IntPtr java_class_handle;
- internal static IntPtr class_ref {
- get {
- return JNIEnv.FindClass ("java/lang/Object", ref java_class_handle);
- }
- }
-
- }
-}
diff --git a/tests/generator-Tests/expected/GenericArguments/Mono.Android.projitems b/tests/generator-Tests/expected/GenericArguments/Mono.Android.projitems
deleted file mode 100644
index ce2c2b1c9..000000000
--- a/tests/generator-Tests/expected/GenericArguments/Mono.Android.projitems
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
- $(DefineConstants);ANDROID_1;ANDROID_2;ANDROID_3;ANDROID_4
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/tests/generator-Tests/expected/InterfaceMethodsConflict/InterfaceMethodsConflict.xml b/tests/generator-Tests/expected/InterfaceMethodsConflict/InterfaceMethodsConflict.xml
deleted file mode 100644
index e83a6e37a..000000000
--- a/tests/generator-Tests/expected/InterfaceMethodsConflict/InterfaceMethodsConflict.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/tests/generator-Tests/expected/InterfaceMethodsConflict/Java.Interop.__TypeRegistrations.cs b/tests/generator-Tests/expected/InterfaceMethodsConflict/Java.Interop.__TypeRegistrations.cs
deleted file mode 100644
index 0131993a1..000000000
--- a/tests/generator-Tests/expected/InterfaceMethodsConflict/Java.Interop.__TypeRegistrations.cs
+++ /dev/null
@@ -1,47 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#nullable restore
-using System;
-using System.Collections.Generic;
-using Android.Runtime;
-
-namespace Java.Interop {
-
- partial class __TypeRegistrations {
-
- public static void RegisterPackages ()
- {
-#if MONODROID_TIMING
- var start = DateTime.Now;
- Android.Util.Log.Info ("MonoDroid-Timing", "RegisterPackages start: " + (start - new DateTime (1970, 1, 1)).TotalMilliseconds);
-#endif // def MONODROID_TIMING
- Java.Interop.TypeManager.RegisterPackages (
- new string[]{
- },
- new Converter[]{
- });
-#if MONODROID_TIMING
- var end = DateTime.Now;
- Android.Util.Log.Info ("MonoDroid-Timing", "RegisterPackages time: " + (end - new DateTime (1970, 1, 1)).TotalMilliseconds + " [elapsed: " + (end - start).TotalMilliseconds + " ms]");
-#endif // def MONODROID_TIMING
- }
-
-#if NET5_0_OR_GREATER
- [System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessage ("Trimming", "IL2057")]
-#endif
- static Type Lookup (string[] mappings, string javaType)
- {
- var managedType = Java.Interop.TypeManager.LookupTypeMapping (mappings, javaType);
- if (managedType == null)
- return null;
- return Type.GetType (managedType);
- }
- }
-}
diff --git a/tests/generator-Tests/expected/InterfaceMethodsConflict/Mono.Android.projitems b/tests/generator-Tests/expected/InterfaceMethodsConflict/Mono.Android.projitems
deleted file mode 100644
index 03c426cd6..000000000
--- a/tests/generator-Tests/expected/InterfaceMethodsConflict/Mono.Android.projitems
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
- $(DefineConstants);ANDROID_1;ANDROID_2;ANDROID_3;ANDROID_4
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/tests/generator-Tests/expected/InterfaceMethodsConflict/Xamarin.Test.II1.cs b/tests/generator-Tests/expected/InterfaceMethodsConflict/Xamarin.Test.II1.cs
deleted file mode 100644
index 1949af7f2..000000000
--- a/tests/generator-Tests/expected/InterfaceMethodsConflict/Xamarin.Test.II1.cs
+++ /dev/null
@@ -1,86 +0,0 @@
-using System;
-using System.Collections.Generic;
-using Android.Runtime;
-
-namespace Xamarin.Test {
-
- // Metadata.xml XPath interface reference: path="/api/package[@name='xamarin.test']/interface[@name='I1']"
- [Register ("xamarin/test/I1", "", "Xamarin.Test.II1Invoker")]
- public partial interface II1 : IJavaObject {
-
- // Metadata.xml XPath method reference: path="/api/package[@name='xamarin.test']/interface[@name='I1']/method[@name='close' and count(parameter)=0]"
- [Register ("close", "()V", "GetCloseHandler:Xamarin.Test.II1Invoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
- void Close ();
-
- }
-
- [global::Android.Runtime.Register ("xamarin/test/I1", DoNotGenerateAcw=true)]
- internal partial class II1Invoker : global::Java.Lang.Object, II1 {
-
- static IntPtr java_class_ref = JNIEnv.FindClass ("xamarin/test/I1");
-
- protected override IntPtr ThresholdClass {
- get { return class_ref; }
- }
-
- protected override global::System.Type ThresholdType {
- get { return typeof (II1Invoker); }
- }
-
- new IntPtr class_ref;
-
- public static II1 GetObject (IntPtr handle, JniHandleOwnership transfer)
- {
- return global::Java.Lang.Object.GetObject (handle, transfer);
- }
-
- static IntPtr Validate (IntPtr handle)
- {
- if (!JNIEnv.IsInstanceOf (handle, java_class_ref))
- throw new InvalidCastException (string.Format ("Unable to convert instance of type '{0}' to type '{1}'.",
- JNIEnv.GetClassNameFromInstance (handle), "xamarin.test.I1"));
- return handle;
- }
-
- protected override void Dispose (bool disposing)
- {
- if (this.class_ref != IntPtr.Zero)
- JNIEnv.DeleteGlobalRef (this.class_ref);
- this.class_ref = IntPtr.Zero;
- base.Dispose (disposing);
- }
-
- public II1Invoker (IntPtr handle, JniHandleOwnership transfer) : base (Validate (handle), transfer)
- {
- IntPtr local_ref = JNIEnv.GetObjectClass (((global::Java.Lang.Object) this).Handle);
- this.class_ref = JNIEnv.NewGlobalRef (local_ref);
- JNIEnv.DeleteLocalRef (local_ref);
- }
-
- static Delegate cb_close;
-#pragma warning disable 0169
- static Delegate GetCloseHandler ()
- {
- if (cb_close == null)
- cb_close = JNINativeWrapper.CreateDelegate ((_JniMarshal_PP_V) n_Close);
- return cb_close;
- }
-
- static void n_Close (IntPtr jnienv, IntPtr native__this)
- {
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- __this.Close ();
- }
-#pragma warning restore 0169
-
- IntPtr id_close;
- public unsafe void Close ()
- {
- if (id_close == IntPtr.Zero)
- id_close = JNIEnv.GetMethodID (class_ref, "close", "()V");
- JNIEnv.CallVoidMethod (((global::Java.Lang.Object) this).Handle, id_close);
- }
-
- }
-
-}
diff --git a/tests/generator-Tests/expected/InterfaceMethodsConflict/Xamarin.Test.II2.cs b/tests/generator-Tests/expected/InterfaceMethodsConflict/Xamarin.Test.II2.cs
deleted file mode 100644
index 1e544b89a..000000000
--- a/tests/generator-Tests/expected/InterfaceMethodsConflict/Xamarin.Test.II2.cs
+++ /dev/null
@@ -1,86 +0,0 @@
-using System;
-using System.Collections.Generic;
-using Android.Runtime;
-
-namespace Xamarin.Test {
-
- // Metadata.xml XPath interface reference: path="/api/package[@name='xamarin.test']/interface[@name='I2']"
- [Register ("xamarin/test/I2", "", "Xamarin.Test.II2Invoker")]
- public partial interface II2 : IJavaObject {
-
- // Metadata.xml XPath method reference: path="/api/package[@name='xamarin.test']/interface[@name='I2']/method[@name='close' and count(parameter)=0]"
- [Register ("close", "()V", "GetCloseHandler:Xamarin.Test.II2Invoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
- void Close ();
-
- }
-
- [global::Android.Runtime.Register ("xamarin/test/I2", DoNotGenerateAcw=true)]
- internal partial class II2Invoker : global::Java.Lang.Object, II2 {
-
- static IntPtr java_class_ref = JNIEnv.FindClass ("xamarin/test/I2");
-
- protected override IntPtr ThresholdClass {
- get { return class_ref; }
- }
-
- protected override global::System.Type ThresholdType {
- get { return typeof (II2Invoker); }
- }
-
- new IntPtr class_ref;
-
- public static II2 GetObject (IntPtr handle, JniHandleOwnership transfer)
- {
- return global::Java.Lang.Object.GetObject (handle, transfer);
- }
-
- static IntPtr Validate (IntPtr handle)
- {
- if (!JNIEnv.IsInstanceOf (handle, java_class_ref))
- throw new InvalidCastException (string.Format ("Unable to convert instance of type '{0}' to type '{1}'.",
- JNIEnv.GetClassNameFromInstance (handle), "xamarin.test.I2"));
- return handle;
- }
-
- protected override void Dispose (bool disposing)
- {
- if (this.class_ref != IntPtr.Zero)
- JNIEnv.DeleteGlobalRef (this.class_ref);
- this.class_ref = IntPtr.Zero;
- base.Dispose (disposing);
- }
-
- public II2Invoker (IntPtr handle, JniHandleOwnership transfer) : base (Validate (handle), transfer)
- {
- IntPtr local_ref = JNIEnv.GetObjectClass (((global::Java.Lang.Object) this).Handle);
- this.class_ref = JNIEnv.NewGlobalRef (local_ref);
- JNIEnv.DeleteLocalRef (local_ref);
- }
-
- static Delegate cb_close;
-#pragma warning disable 0169
- static Delegate GetCloseHandler ()
- {
- if (cb_close == null)
- cb_close = JNINativeWrapper.CreateDelegate ((_JniMarshal_PP_V) n_Close);
- return cb_close;
- }
-
- static void n_Close (IntPtr jnienv, IntPtr native__this)
- {
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- __this.Close ();
- }
-#pragma warning restore 0169
-
- IntPtr id_close;
- public unsafe void Close ()
- {
- if (id_close == IntPtr.Zero)
- id_close = JNIEnv.GetMethodID (class_ref, "close", "()V");
- JNIEnv.CallVoidMethod (((global::Java.Lang.Object) this).Handle, id_close);
- }
-
- }
-
-}
diff --git a/tests/generator-Tests/expected/InterfaceMethodsConflict/Xamarin.Test.SomeObject.cs b/tests/generator-Tests/expected/InterfaceMethodsConflict/Xamarin.Test.SomeObject.cs
deleted file mode 100644
index 4c87567e2..000000000
--- a/tests/generator-Tests/expected/InterfaceMethodsConflict/Xamarin.Test.SomeObject.cs
+++ /dev/null
@@ -1,72 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#nullable restore
-using System;
-using System.Collections.Generic;
-using Android.Runtime;
-
-namespace Xamarin.Test {
-
- // Metadata.xml XPath class reference: path="/api/package[@name='xamarin.test']/class[@name='SomeObject']"
- [global::Android.Runtime.Register ("xamarin/test/SomeObject", DoNotGenerateAcw=true)]
- public partial class SomeObject : global::Java.Lang.Object, global::Xamarin.Test.II1, global::Xamarin.Test.II2 {
-
- internal static new IntPtr java_class_handle;
- internal static new IntPtr class_ref {
- get {
- return JNIEnv.FindClass ("xamarin/test/SomeObject", ref java_class_handle);
- }
- }
-
- protected override IntPtr ThresholdClass {
- get { return class_ref; }
- }
-
- protected override global::System.Type ThresholdType {
- get { return typeof (SomeObject); }
- }
-
- protected SomeObject (IntPtr javaReference, JniHandleOwnership transfer) : base (javaReference, transfer) {}
-
- static Delegate cb_close;
-#pragma warning disable 0169
- static Delegate GetCloseHandler ()
- {
- if (cb_close == null)
- cb_close = JNINativeWrapper.CreateDelegate ((_JniMarshal_PP_V) n_Close);
- return cb_close;
- }
-
- static void n_Close (IntPtr jnienv, IntPtr native__this)
- {
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- __this.Close ();
- }
-#pragma warning restore 0169
-
- static IntPtr id_close;
- // Metadata.xml XPath method reference: path="/api/package[@name='xamarin.test']/class[@name='SomeObject']/method[@name='close' and count(parameter)=0]"
- [Register ("close", "()V", "GetCloseHandler")]
- public virtual unsafe void Close ()
- {
- if (id_close == IntPtr.Zero)
- id_close = JNIEnv.GetMethodID (class_ref, "close", "()V");
- try {
-
- if (((object) this).GetType () == ThresholdType)
- JNIEnv.CallVoidMethod (((global::Java.Lang.Object) this).Handle, id_close);
- else
- JNIEnv.CallNonvirtualVoidMethod (((global::Java.Lang.Object) this).Handle, ThresholdClass, JNIEnv.GetMethodID (ThresholdClass, "close", "()V"));
- } finally {
- }
- }
-
- }
-}
diff --git a/tests/generator-Tests/expected/InterfaceMethodsConflict/Xamarin.Test.SomeObject2.cs b/tests/generator-Tests/expected/InterfaceMethodsConflict/Xamarin.Test.SomeObject2.cs
deleted file mode 100644
index 7db201146..000000000
--- a/tests/generator-Tests/expected/InterfaceMethodsConflict/Xamarin.Test.SomeObject2.cs
+++ /dev/null
@@ -1,117 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#nullable restore
-using System;
-using System.Collections.Generic;
-using Android.Runtime;
-
-namespace Xamarin.Test {
-
- // Metadata.xml XPath class reference: path="/api/package[@name='xamarin.test']/class[@name='SomeObject2']"
- [global::Android.Runtime.Register ("xamarin/test/SomeObject2", DoNotGenerateAcw=true)]
- public abstract partial class SomeObject2 : global::Java.Lang.Object, global::Xamarin.Test.II1, global::Xamarin.Test.II2 {
-
- internal static new IntPtr java_class_handle;
- internal static new IntPtr class_ref {
- get {
- return JNIEnv.FindClass ("xamarin/test/SomeObject2", ref java_class_handle);
- }
- }
-
- protected override IntPtr ThresholdClass {
- get { return class_ref; }
- }
-
- protected override global::System.Type ThresholdType {
- get { return typeof (SomeObject2); }
- }
-
- protected SomeObject2 (IntPtr javaReference, JniHandleOwnership transfer) : base (javaReference, transfer) {}
-
- static Delegate cb_irrelevant;
-#pragma warning disable 0169
- static Delegate GetIrrelevantHandler ()
- {
- if (cb_irrelevant == null)
- cb_irrelevant = JNINativeWrapper.CreateDelegate ((_JniMarshal_PP_V) n_Irrelevant);
- return cb_irrelevant;
- }
-
- static void n_Irrelevant (IntPtr jnienv, IntPtr native__this)
- {
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- __this.Irrelevant ();
- }
-#pragma warning restore 0169
-
- static IntPtr id_irrelevant;
- // Metadata.xml XPath method reference: path="/api/package[@name='xamarin.test']/class[@name='SomeObject2']/method[@name='irrelevant' and count(parameter)=0]"
- [Register ("irrelevant", "()V", "GetIrrelevantHandler")]
- public virtual unsafe void Irrelevant ()
- {
- if (id_irrelevant == IntPtr.Zero)
- id_irrelevant = JNIEnv.GetMethodID (class_ref, "irrelevant", "()V");
- try {
-
- if (((object) this).GetType () == ThresholdType)
- JNIEnv.CallVoidMethod (((global::Java.Lang.Object) this).Handle, id_irrelevant);
- else
- JNIEnv.CallNonvirtualVoidMethod (((global::Java.Lang.Object) this).Handle, ThresholdClass, JNIEnv.GetMethodID (ThresholdClass, "irrelevant", "()V"));
- } finally {
- }
- }
-
- static Delegate cb_close;
-#pragma warning disable 0169
- static Delegate GetCloseHandler ()
- {
- if (cb_close == null)
- cb_close = JNINativeWrapper.CreateDelegate ((_JniMarshal_PP_V) n_Close);
- return cb_close;
- }
-
- static void n_Close (IntPtr jnienv, IntPtr native__this)
- {
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- __this.Close ();
- }
-#pragma warning restore 0169
-
- // Metadata.xml XPath method reference: path="/api/package[@name='xamarin.test']/interface[@name='I1']/method[@name='close' and count(parameter)=0]"
- [Register ("close", "()V", "GetCloseHandler")]
- public abstract void Close ();
-
- }
-
- [global::Android.Runtime.Register ("xamarin/test/SomeObject2", DoNotGenerateAcw=true)]
- internal partial class SomeObject2Invoker : SomeObject2 {
-
- public SomeObject2Invoker (IntPtr handle, JniHandleOwnership transfer) : base (handle, transfer) {}
-
- protected override global::System.Type ThresholdType {
- get { return typeof (SomeObject2Invoker); }
- }
-
- static IntPtr id_close;
- // Metadata.xml XPath method reference: path="/api/package[@name='xamarin.test']/interface[@name='I1']/method[@name='close' and count(parameter)=0]"
- [Register ("close", "()V", "GetCloseHandler")]
- public override unsafe void Close ()
- {
- if (id_close == IntPtr.Zero)
- id_close = JNIEnv.GetMethodID (class_ref, "close", "()V");
- try {
- JNIEnv.CallVoidMethod (((global::Java.Lang.Object) this).Handle, id_close);
- } finally {
- }
- }
-
- }
-
-}
diff --git a/tests/generator-Tests/expected/InterfaceMethodsConflict/__NamespaceMapping__.cs b/tests/generator-Tests/expected/InterfaceMethodsConflict/__NamespaceMapping__.cs
deleted file mode 100644
index 85c43009a..000000000
--- a/tests/generator-Tests/expected/InterfaceMethodsConflict/__NamespaceMapping__.cs
+++ /dev/null
@@ -1,6 +0,0 @@
-using System;
-
-[assembly:global::Android.Runtime.NamespaceMapping (Java = "java.lang", Managed="Java.Lang")]
-[assembly:global::Android.Runtime.NamespaceMapping (Java = "xamarin.test", Managed="Xamarin.Test")]
-
-delegate void _JniMarshal_PP_V (IntPtr jnienv, IntPtr klass);
diff --git a/tests/generator-Tests/expected/NestedTypes/Mono.Android.projitems b/tests/generator-Tests/expected/NestedTypes/Mono.Android.projitems
deleted file mode 100644
index 5e66c0f7f..000000000
--- a/tests/generator-Tests/expected/NestedTypes/Mono.Android.projitems
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-
- $(DefineConstants);ANDROID_1;ANDROID_2;ANDROID_3;ANDROID_4
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/tests/generator-Tests/expected/NestedTypes/Xamarin.Test.NotificationCompatBase.cs b/tests/generator-Tests/expected/NestedTypes/Xamarin.Test.NotificationCompatBase.cs
deleted file mode 100644
index 313a15dfd..000000000
--- a/tests/generator-Tests/expected/NestedTypes/Xamarin.Test.NotificationCompatBase.cs
+++ /dev/null
@@ -1,221 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#nullable restore
-using System;
-using System.Collections.Generic;
-using Android.Runtime;
-
-namespace Xamarin.Test {
-
- // Metadata.xml XPath class reference: path="/api/package[@name='xamarin.test']/class[@name='NotificationCompatBase']"
- [global::Android.Runtime.Register ("xamarin/test/NotificationCompatBase", DoNotGenerateAcw=true)]
- public partial class NotificationCompatBase : global::Java.Lang.Object {
-
- // Metadata.xml XPath class reference: path="/api/package[@name='xamarin.test']/class[@name='NotificationCompatBase.Action']"
- [global::Android.Runtime.Register ("xamarin/test/NotificationCompatBase$Action", DoNotGenerateAcw=true)]
- public abstract partial class Action : global::Java.Lang.Object {
-
- // Metadata.xml XPath interface reference: path="/api/package[@name='xamarin.test']/interface[@name='NotificationCompatBase.Action.Factory']"
- [Register ("xamarin/test/NotificationCompatBase$Action$Factory", "", "Xamarin.Test.NotificationCompatBase/Action/IFactoryInvoker")]
- public partial interface IFactory : IJavaObject {
-
- // Metadata.xml XPath method reference: path="/api/package[@name='xamarin.test']/interface[@name='NotificationCompatBase.Action.Factory']/method[@name='build' and count(parameter)=1 and parameter[1][@type='int']]"
- [Register ("build", "(I)Lxamarin/test/NotificationCompatBase$Action;", "GetBuild_IHandler:Xamarin.Test.NotificationCompatBase/Action/IFactoryInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
- global::Xamarin.Test.NotificationCompatBase.Action Build (int p0);
-
- }
-
- [global::Android.Runtime.Register ("xamarin/test/NotificationCompatBase$Action$Factory", DoNotGenerateAcw=true)]
- internal partial class IFactoryInvoker : global::Java.Lang.Object, IFactory {
-
- static IntPtr java_class_ref = JNIEnv.FindClass ("xamarin/test/NotificationCompatBase$Action$Factory");
-
- protected override IntPtr ThresholdClass {
- get { return class_ref; }
- }
-
- protected override global::System.Type ThresholdType {
- get { return typeof (IFactoryInvoker); }
- }
-
- new IntPtr class_ref;
-
- public static IFactory GetObject (IntPtr handle, JniHandleOwnership transfer)
- {
- return global::Java.Lang.Object.GetObject (handle, transfer);
- }
-
- static IntPtr Validate (IntPtr handle)
- {
- if (!JNIEnv.IsInstanceOf (handle, java_class_ref))
- throw new InvalidCastException (string.Format ("Unable to convert instance of type '{0}' to type '{1}'.",
- JNIEnv.GetClassNameFromInstance (handle), "xamarin.test.NotificationCompatBase.Action.Factory"));
- return handle;
- }
-
- protected override void Dispose (bool disposing)
- {
- if (this.class_ref != IntPtr.Zero)
- JNIEnv.DeleteGlobalRef (this.class_ref);
- this.class_ref = IntPtr.Zero;
- base.Dispose (disposing);
- }
-
- public IFactoryInvoker (IntPtr handle, JniHandleOwnership transfer) : base (Validate (handle), transfer)
- {
- IntPtr local_ref = JNIEnv.GetObjectClass (((global::Java.Lang.Object) this).Handle);
- this.class_ref = JNIEnv.NewGlobalRef (local_ref);
- JNIEnv.DeleteLocalRef (local_ref);
- }
-
- static Delegate cb_build_I;
-#pragma warning disable 0169
- static Delegate GetBuild_IHandler ()
- {
- if (cb_build_I == null)
- cb_build_I = JNINativeWrapper.CreateDelegate ((_JniMarshal_PPI_L) n_Build_I);
- return cb_build_I;
- }
-
- static IntPtr n_Build_I (IntPtr jnienv, IntPtr native__this, int p0)
- {
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- return JNIEnv.ToLocalJniHandle (__this.Build (p0));
- }
-#pragma warning restore 0169
-
- IntPtr id_build_I;
- public unsafe global::Xamarin.Test.NotificationCompatBase.Action Build (int p0)
- {
- if (id_build_I == IntPtr.Zero)
- id_build_I = JNIEnv.GetMethodID (class_ref, "build", "(I)Lxamarin/test/NotificationCompatBase$Action;");
- JValue* __args = stackalloc JValue [1];
- __args [0] = new JValue (p0);
- return global::Java.Lang.Object.GetObject (JNIEnv.CallObjectMethod (((global::Java.Lang.Object) this).Handle, id_build_I, __args), JniHandleOwnership.TransferLocalRef);
- }
-
- }
-
-
- internal static new IntPtr java_class_handle;
- internal static new IntPtr class_ref {
- get {
- return JNIEnv.FindClass ("xamarin/test/NotificationCompatBase$Action", ref java_class_handle);
- }
- }
-
- protected override IntPtr ThresholdClass {
- get { return class_ref; }
- }
-
- protected override global::System.Type ThresholdType {
- get { return typeof (Action); }
- }
-
- protected Action (IntPtr javaReference, JniHandleOwnership transfer) : base (javaReference, transfer) {}
-
- }
-
- [global::Android.Runtime.Register ("xamarin/test/NotificationCompatBase$Action", DoNotGenerateAcw=true)]
- internal partial class ActionInvoker : Action {
-
- public ActionInvoker (IntPtr handle, JniHandleOwnership transfer) : base (handle, transfer) {}
-
- protected override global::System.Type ThresholdType {
- get { return typeof (ActionInvoker); }
- }
-
- }
-
-
- // Metadata.xml XPath class reference: path="/api/package[@name='xamarin.test']/class[@name='NotificationCompatBase.InstanceInner']"
- [global::Android.Runtime.Register ("xamarin/test/NotificationCompatBase$InstanceInner", DoNotGenerateAcw=true)]
- public abstract partial class InstanceInner : global::Java.Lang.Object {
-
- internal static new IntPtr java_class_handle;
- internal static new IntPtr class_ref {
- get {
- return JNIEnv.FindClass ("xamarin/test/NotificationCompatBase$InstanceInner", ref java_class_handle);
- }
- }
-
- protected override IntPtr ThresholdClass {
- get { return class_ref; }
- }
-
- protected override global::System.Type ThresholdType {
- get { return typeof (InstanceInner); }
- }
-
- protected InstanceInner (IntPtr javaReference, JniHandleOwnership transfer) : base (javaReference, transfer) {}
-
- static IntPtr id_ctor_Lxamarin_test_NotificationCompatBase_;
- // Metadata.xml XPath constructor reference: path="/api/package[@name='xamarin.test']/class[@name='NotificationCompatBase.InstanceInner']/constructor[@name='NotificationCompatBase.InstanceInner' and count(parameter)=1 and parameter[1][@type='xamarin.test.NotificationCompatBase']]"
- [Register (".ctor", "(Lxamarin/test/NotificationCompatBase;)V", "")]
- public unsafe InstanceInner (global::Xamarin.Test.NotificationCompatBase __self)
- : base (IntPtr.Zero, JniHandleOwnership.DoNotTransfer)
- {
- if (((global::Java.Lang.Object) this).Handle != IntPtr.Zero)
- return;
-
- try {
- JValue* __args = stackalloc JValue [1];
- __args [0] = new JValue (__self);
- if (((object) this).GetType () != typeof (InstanceInner)) {
- SetHandle (
- global::Android.Runtime.JNIEnv.StartCreateInstance (((object) this).GetType (), "(L" + global::Android.Runtime.JNIEnv.GetJniName (GetType ().DeclaringType) + ";)V", __args),
- JniHandleOwnership.TransferLocalRef);
- global::Android.Runtime.JNIEnv.FinishCreateInstance (((global::Java.Lang.Object) this).Handle, "(L" + global::Android.Runtime.JNIEnv.GetJniName (GetType ().DeclaringType) + ";)V", __args);
- return;
- }
-
- if (id_ctor_Lxamarin_test_NotificationCompatBase_ == IntPtr.Zero)
- id_ctor_Lxamarin_test_NotificationCompatBase_ = JNIEnv.GetMethodID (class_ref, "", "(Lxamarin/test/NotificationCompatBase;)V");
- SetHandle (
- global::Android.Runtime.JNIEnv.StartCreateInstance (class_ref, id_ctor_Lxamarin_test_NotificationCompatBase_, __args),
- JniHandleOwnership.TransferLocalRef);
- JNIEnv.FinishCreateInstance (((global::Java.Lang.Object) this).Handle, class_ref, id_ctor_Lxamarin_test_NotificationCompatBase_, __args);
- } finally {
- }
- }
-
- }
-
- [global::Android.Runtime.Register ("xamarin/test/NotificationCompatBase$InstanceInner", DoNotGenerateAcw=true)]
- internal partial class InstanceInnerInvoker : InstanceInner {
-
- public InstanceInnerInvoker (IntPtr handle, JniHandleOwnership transfer) : base (handle, transfer) {}
-
- protected override global::System.Type ThresholdType {
- get { return typeof (InstanceInnerInvoker); }
- }
-
- }
-
-
- internal static new IntPtr java_class_handle;
- internal static new IntPtr class_ref {
- get {
- return JNIEnv.FindClass ("xamarin/test/NotificationCompatBase", ref java_class_handle);
- }
- }
-
- protected override IntPtr ThresholdClass {
- get { return class_ref; }
- }
-
- protected override global::System.Type ThresholdType {
- get { return typeof (NotificationCompatBase); }
- }
-
- protected NotificationCompatBase (IntPtr javaReference, JniHandleOwnership transfer) : base (javaReference, transfer) {}
-
- }
-}
diff --git a/tests/generator-Tests/expected/NonStaticFields/Mono.Android.projitems b/tests/generator-Tests/expected/NonStaticFields/Mono.Android.projitems
deleted file mode 100644
index 066be1dd1..000000000
--- a/tests/generator-Tests/expected/NonStaticFields/Mono.Android.projitems
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-
- $(DefineConstants);ANDROID_1;ANDROID_2;ANDROID_3;ANDROID_4
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/tests/generator-Tests/expected/NonStaticFields/Xamarin.Test.SomeObject.cs b/tests/generator-Tests/expected/NonStaticFields/Xamarin.Test.SomeObject.cs
deleted file mode 100644
index db0051860..000000000
--- a/tests/generator-Tests/expected/NonStaticFields/Xamarin.Test.SomeObject.cs
+++ /dev/null
@@ -1,59 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#nullable restore
-using System;
-using System.Collections.Generic;
-using Android.Runtime;
-
-namespace Xamarin.Test {
-
- // Metadata.xml XPath class reference: path="/api/package[@name='xamarin.test']/class[@name='SomeObject']"
- [global::Android.Runtime.Register ("xamarin/test/SomeObject", DoNotGenerateAcw=true)]
- public partial class SomeObject : global::Java.Lang.Object {
-
-
- static IntPtr Value_jfieldId;
-
- // Metadata.xml XPath field reference: path="/api/package[@name='xamarin.test']/class[@name='SomeObject']/field[@name='Value']"
- [Register ("Value")]
- public int Value {
- get {
- if (Value_jfieldId == IntPtr.Zero)
- Value_jfieldId = JNIEnv.GetFieldID (class_ref, "Value", "I");
- return JNIEnv.GetIntField (((global::Java.Lang.Object) this).Handle, Value_jfieldId);
- }
- set {
- if (Value_jfieldId == IntPtr.Zero)
- Value_jfieldId = JNIEnv.GetFieldID (class_ref, "Value", "I");
- try {
- JNIEnv.SetField (((global::Java.Lang.Object) this).Handle, Value_jfieldId, value);
- } finally {
- }
- }
- }
- internal static new IntPtr java_class_handle;
- internal static new IntPtr class_ref {
- get {
- return JNIEnv.FindClass ("xamarin/test/SomeObject", ref java_class_handle);
- }
- }
-
- protected override IntPtr ThresholdClass {
- get { return class_ref; }
- }
-
- protected override global::System.Type ThresholdType {
- get { return typeof (SomeObject); }
- }
-
- protected SomeObject (IntPtr javaReference, JniHandleOwnership transfer) : base (javaReference, transfer) {}
-
- }
-}
diff --git a/tests/generator-Tests/expected/NormalMethods/Java.Lang.Throwable.cs b/tests/generator-Tests/expected/NormalMethods/Java.Lang.Throwable.cs
deleted file mode 100644
index b2305df63..000000000
--- a/tests/generator-Tests/expected/NormalMethods/Java.Lang.Throwable.cs
+++ /dev/null
@@ -1,29 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#nullable restore
-using System;
-using System.Collections.Generic;
-using Android.Runtime;
-
-namespace Java.Lang {
-
- // Metadata.xml XPath class reference: path="/api/package[@name='java.lang']/class[@name='Throwable']"
- [global::Android.Runtime.Register ("java/lang/Throwable", DoNotGenerateAcw=true)]
- public partial class Throwable {
-
- internal static IntPtr java_class_handle;
- internal static IntPtr class_ref {
- get {
- return JNIEnv.FindClass ("java/lang/Throwable", ref java_class_handle);
- }
- }
-
- }
-}
diff --git a/tests/generator-Tests/expected/NormalMethods/Mono.Android.projitems b/tests/generator-Tests/expected/NormalMethods/Mono.Android.projitems
deleted file mode 100644
index 98ca90f0d..000000000
--- a/tests/generator-Tests/expected/NormalMethods/Mono.Android.projitems
+++ /dev/null
@@ -1,20 +0,0 @@
-
-
-
- $(DefineConstants);ANDROID_1;ANDROID_2;ANDROID_3;ANDROID_4
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/tests/generator-Tests/expected/NormalMethods/Xamarin.Test.A.cs b/tests/generator-Tests/expected/NormalMethods/Xamarin.Test.A.cs
deleted file mode 100644
index a3b5fe125..000000000
--- a/tests/generator-Tests/expected/NormalMethods/Xamarin.Test.A.cs
+++ /dev/null
@@ -1,131 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#nullable restore
-using System;
-using System.Collections.Generic;
-using Android.Runtime;
-
-namespace Xamarin.Test {
-
- // Metadata.xml XPath class reference: path="/api/package[@name='xamarin.test']/class[@name='A']"
- [global::Android.Runtime.Register ("xamarin/test/A", DoNotGenerateAcw=true)]
- public partial class A : global::Java.Lang.Object {
-
- // Metadata.xml XPath class reference: path="/api/package[@name='xamarin.test']/class[@name='A.B']"
- [global::Android.Runtime.Register ("xamarin/test/A$B", DoNotGenerateAcw=true)]
- [global::Java.Interop.JavaTypeParameters (new string [] {"T extends xamarin.test.A.B"})]
- public partial class B : global::Java.Lang.Object {
-
- internal static new IntPtr java_class_handle;
- internal static new IntPtr class_ref {
- get {
- return JNIEnv.FindClass ("xamarin/test/A$B", ref java_class_handle);
- }
- }
-
- protected override IntPtr ThresholdClass {
- get { return class_ref; }
- }
-
- protected override global::System.Type ThresholdType {
- get { return typeof (B); }
- }
-
- protected B (IntPtr javaReference, JniHandleOwnership transfer) : base (javaReference, transfer) {}
-
- static Delegate cb_setCustomDimension_I;
-#pragma warning disable 0169
- static Delegate GetSetCustomDimension_IHandler ()
- {
- if (cb_setCustomDimension_I == null)
- cb_setCustomDimension_I = JNINativeWrapper.CreateDelegate ((_JniMarshal_PPI_L) n_SetCustomDimension_I);
- return cb_setCustomDimension_I;
- }
-
- static IntPtr n_SetCustomDimension_I (IntPtr jnienv, IntPtr native__this, int index)
- {
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- return JNIEnv.ToLocalJniHandle (__this.SetCustomDimension (index));
- }
-#pragma warning restore 0169
-
- static IntPtr id_setCustomDimension_I;
- // Metadata.xml XPath method reference: path="/api/package[@name='xamarin.test']/class[@name='A.B']/method[@name='setCustomDimension' and count(parameter)=1 and parameter[1][@type='int']]"
- [Register ("setCustomDimension", "(I)Lxamarin/test/A$B;", "GetSetCustomDimension_IHandler")]
- public virtual unsafe global::Java.Lang.Object SetCustomDimension (int index)
- {
- if (id_setCustomDimension_I == IntPtr.Zero)
- id_setCustomDimension_I = JNIEnv.GetMethodID (class_ref, "setCustomDimension", "(I)Lxamarin/test/A$B;");
- try {
- JValue* __args = stackalloc JValue [1];
- __args [0] = new JValue (index);
-
- if (((object) this).GetType () == ThresholdType)
- return (global::Java.Lang.Object) global::Java.Lang.Object.GetObject (JNIEnv.CallObjectMethod (((global::Java.Lang.Object) this).Handle, id_setCustomDimension_I, __args), JniHandleOwnership.TransferLocalRef);
- else
- return (global::Java.Lang.Object) global::Java.Lang.Object.GetObject (JNIEnv.CallNonvirtualObjectMethod (((global::Java.Lang.Object) this).Handle, ThresholdClass, JNIEnv.GetMethodID (ThresholdClass, "setCustomDimension", "(I)Lxamarin/test/A$B;"), __args), JniHandleOwnership.TransferLocalRef);
- } finally {
- }
- }
-
- }
-
- internal static new IntPtr java_class_handle;
- internal static new IntPtr class_ref {
- get {
- return JNIEnv.FindClass ("xamarin/test/A", ref java_class_handle);
- }
- }
-
- protected override IntPtr ThresholdClass {
- get { return class_ref; }
- }
-
- protected override global::System.Type ThresholdType {
- get { return typeof (A); }
- }
-
- protected A (IntPtr javaReference, JniHandleOwnership transfer) : base (javaReference, transfer) {}
-
- static Delegate cb_getHandle;
-#pragma warning disable 0169
- static Delegate GetGetHandleHandler ()
- {
- if (cb_getHandle == null)
- cb_getHandle = JNINativeWrapper.CreateDelegate ((_JniMarshal_PP_I) n_GetHandle);
- return cb_getHandle;
- }
-
- static int n_GetHandle (IntPtr jnienv, IntPtr native__this)
- {
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- return __this.GetHandle ();
- }
-#pragma warning restore 0169
-
- static IntPtr id_getHandle;
- // Metadata.xml XPath method reference: path="/api/package[@name='xamarin.test']/class[@name='A']/method[@name='getHandle' and count(parameter)=0]"
- [Register ("getHandle", "()I", "GetGetHandleHandler")]
- public virtual unsafe int GetHandle ()
- {
- if (id_getHandle == IntPtr.Zero)
- id_getHandle = JNIEnv.GetMethodID (class_ref, "getHandle", "()I");
- try {
-
- if (((object) this).GetType () == ThresholdType)
- return JNIEnv.CallIntMethod (((global::Java.Lang.Object) this).Handle, id_getHandle);
- else
- return JNIEnv.CallNonvirtualIntMethod (((global::Java.Lang.Object) this).Handle, ThresholdClass, JNIEnv.GetMethodID (ThresholdClass, "getHandle", "()I"));
- } finally {
- }
- }
-
- }
-}
diff --git a/tests/generator-Tests/expected/NormalMethods/Xamarin.Test.C.cs b/tests/generator-Tests/expected/NormalMethods/Xamarin.Test.C.cs
deleted file mode 100644
index 43d12c4ca..000000000
--- a/tests/generator-Tests/expected/NormalMethods/Xamarin.Test.C.cs
+++ /dev/null
@@ -1,75 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#nullable restore
-using System;
-using System.Collections.Generic;
-using Android.Runtime;
-
-namespace Xamarin.Test {
-
- // Metadata.xml XPath class reference: path="/api/package[@name='xamarin.test']/class[@name='C']"
- [global::Android.Runtime.Register ("xamarin/test/C", DoNotGenerateAcw=true)]
- [global::Java.Interop.JavaTypeParameters (new string [] {"T extends xamarin.test.C"})]
- public partial class C : global::Java.Lang.Object {
-
- internal static new IntPtr java_class_handle;
- internal static new IntPtr class_ref {
- get {
- return JNIEnv.FindClass ("xamarin/test/C", ref java_class_handle);
- }
- }
-
- protected override IntPtr ThresholdClass {
- get { return class_ref; }
- }
-
- protected override global::System.Type ThresholdType {
- get { return typeof (C); }
- }
-
- protected C (IntPtr javaReference, JniHandleOwnership transfer) : base (javaReference, transfer) {}
-
- static Delegate cb_setCustomDimension_I;
-#pragma warning disable 0169
- static Delegate GetSetCustomDimension_IHandler ()
- {
- if (cb_setCustomDimension_I == null)
- cb_setCustomDimension_I = JNINativeWrapper.CreateDelegate ((_JniMarshal_PPI_L) n_SetCustomDimension_I);
- return cb_setCustomDimension_I;
- }
-
- static IntPtr n_SetCustomDimension_I (IntPtr jnienv, IntPtr native__this, int index)
- {
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- return JNIEnv.ToLocalJniHandle (__this.SetCustomDimension (index));
- }
-#pragma warning restore 0169
-
- static IntPtr id_setCustomDimension_I;
- // Metadata.xml XPath method reference: path="/api/package[@name='xamarin.test']/class[@name='C']/method[@name='setCustomDimension' and count(parameter)=1 and parameter[1][@type='int']]"
- [Register ("setCustomDimension", "(I)Lxamarin/test/C;", "GetSetCustomDimension_IHandler")]
- public virtual unsafe global::Java.Lang.Object SetCustomDimension (int index)
- {
- if (id_setCustomDimension_I == IntPtr.Zero)
- id_setCustomDimension_I = JNIEnv.GetMethodID (class_ref, "setCustomDimension", "(I)Lxamarin/test/C;");
- try {
- JValue* __args = stackalloc JValue [1];
- __args [0] = new JValue (index);
-
- if (((object) this).GetType () == ThresholdType)
- return (global::Java.Lang.Object) global::Java.Lang.Object.GetObject (JNIEnv.CallObjectMethod (((global::Java.Lang.Object) this).Handle, id_setCustomDimension_I, __args), JniHandleOwnership.TransferLocalRef);
- else
- return (global::Java.Lang.Object) global::Java.Lang.Object.GetObject (JNIEnv.CallNonvirtualObjectMethod (((global::Java.Lang.Object) this).Handle, ThresholdClass, JNIEnv.GetMethodID (ThresholdClass, "setCustomDimension", "(I)Lxamarin/test/C;"), __args), JniHandleOwnership.TransferLocalRef);
- } finally {
- }
- }
-
- }
-}
diff --git a/tests/generator-Tests/expected/NormalMethods/Xamarin.Test.SomeObject.cs b/tests/generator-Tests/expected/NormalMethods/Xamarin.Test.SomeObject.cs
deleted file mode 100644
index e56bf97c8..000000000
--- a/tests/generator-Tests/expected/NormalMethods/Xamarin.Test.SomeObject.cs
+++ /dev/null
@@ -1,390 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#nullable restore
-using System;
-using System.Collections.Generic;
-using Android.Runtime;
-
-namespace Xamarin.Test {
-
- // Metadata.xml XPath class reference: path="/api/package[@name='xamarin.test']/class[@name='SomeObject']"
- [global::Android.Runtime.Register ("xamarin/test/SomeObject", DoNotGenerateAcw=true)]
- public partial class SomeObject : global::Java.Lang.Object {
-
- internal static new IntPtr java_class_handle;
- internal static new IntPtr class_ref {
- get {
- return JNIEnv.FindClass ("xamarin/test/SomeObject", ref java_class_handle);
- }
- }
-
- protected override IntPtr ThresholdClass {
- get { return class_ref; }
- }
-
- protected override global::System.Type ThresholdType {
- get { return typeof (SomeObject); }
- }
-
- protected SomeObject (IntPtr javaReference, JniHandleOwnership transfer) : base (javaReference, transfer) {}
-
- static IntPtr id_ctor_Ljava_lang_Class_;
- // Metadata.xml XPath constructor reference: path="/api/package[@name='xamarin.test']/class[@name='SomeObject']/constructor[@name='SomeObject' and count(parameter)=1 and parameter[1][@type='java.lang.Class<? extends xamarin.test.SomeObject>']]"
- [Register (".ctor", "(Ljava/lang/Class;)V", "")]
- public unsafe SomeObject (global::Java.Lang.Class c)
- : base (IntPtr.Zero, JniHandleOwnership.DoNotTransfer)
- {
- if (((global::Java.Lang.Object) this).Handle != IntPtr.Zero)
- return;
-
- try {
- JValue* __args = stackalloc JValue [1];
- __args [0] = new JValue (c);
- if (((object) this).GetType () != typeof (SomeObject)) {
- SetHandle (
- global::Android.Runtime.JNIEnv.StartCreateInstance (((object) this).GetType (), "(Ljava/lang/Class;)V", __args),
- JniHandleOwnership.TransferLocalRef);
- global::Android.Runtime.JNIEnv.FinishCreateInstance (((global::Java.Lang.Object) this).Handle, "(Ljava/lang/Class;)V", __args);
- return;
- }
-
- if (id_ctor_Ljava_lang_Class_ == IntPtr.Zero)
- id_ctor_Ljava_lang_Class_ = JNIEnv.GetMethodID (class_ref, "", "(Ljava/lang/Class;)V");
- SetHandle (
- global::Android.Runtime.JNIEnv.StartCreateInstance (class_ref, id_ctor_Ljava_lang_Class_, __args),
- JniHandleOwnership.TransferLocalRef);
- JNIEnv.FinishCreateInstance (((global::Java.Lang.Object) this).Handle, class_ref, id_ctor_Ljava_lang_Class_, __args);
- } finally {
- }
- }
-
- static Delegate cb_getType;
-#pragma warning disable 0169
- static Delegate GetGetTypeHandler ()
- {
- if (cb_getType == null)
- cb_getType = JNINativeWrapper.CreateDelegate ((_JniMarshal_PP_L) n_GetType);
- return cb_getType;
- }
-
- static IntPtr n_GetType (IntPtr jnienv, IntPtr native__this)
- {
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- return JNIEnv.NewArray (__this.GetType ());
- }
-#pragma warning restore 0169
-
- static IntPtr id_getType;
- // Metadata.xml XPath method reference: path="/api/package[@name='xamarin.test']/class[@name='SomeObject']/method[@name='getType' and count(parameter)=0]"
- [Register ("getType", "()[I", "GetGetTypeHandler")]
- public new virtual unsafe int[] GetType ()
- {
- if (id_getType == IntPtr.Zero)
- id_getType = JNIEnv.GetMethodID (class_ref, "getType", "()[I");
- try {
-
- if (((object) this).GetType () == ThresholdType)
- return (int[]) JNIEnv.GetArray (JNIEnv.CallObjectMethod (((global::Java.Lang.Object) this).Handle, id_getType), JniHandleOwnership.TransferLocalRef, typeof (int));
- else
- return (int[]) JNIEnv.GetArray (JNIEnv.CallNonvirtualObjectMethod (((global::Java.Lang.Object) this).Handle, ThresholdClass, JNIEnv.GetMethodID (ThresholdClass, "getType", "()[I")), JniHandleOwnership.TransferLocalRef, typeof (int));
- } finally {
- }
- }
-
- static Delegate cb_handle_Ljava_lang_Object_Ljava_lang_Throwable_;
-#pragma warning disable 0169
- static Delegate GetHandle_Ljava_lang_Object_Ljava_lang_Throwable_Handler ()
- {
- if (cb_handle_Ljava_lang_Object_Ljava_lang_Throwable_ == null)
- cb_handle_Ljava_lang_Object_Ljava_lang_Throwable_ = JNINativeWrapper.CreateDelegate ((_JniMarshal_PPLL_I) n_Handle_Ljava_lang_Object_Ljava_lang_Throwable_);
- return cb_handle_Ljava_lang_Object_Ljava_lang_Throwable_;
- }
-
- static int n_Handle_Ljava_lang_Object_Ljava_lang_Throwable_ (IntPtr jnienv, IntPtr native__this, IntPtr native_o, IntPtr native_t)
- {
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- var o = global::Java.Lang.Object.GetObject (native_o, JniHandleOwnership.DoNotTransfer);
- var t = global::Java.Lang.Object.GetObject (native_t, JniHandleOwnership.DoNotTransfer);
- int __ret = __this.Handle (o, t);
- return __ret;
- }
-#pragma warning restore 0169
-
- static IntPtr id_handle_Ljava_lang_Object_Ljava_lang_Throwable_;
- // Metadata.xml XPath method reference: path="/api/package[@name='xamarin.test']/class[@name='SomeObject']/method[@name='handle' and count(parameter)=2 and parameter[1][@type='java.lang.Object'] and parameter[2][@type='java.lang.Throwable']]"
- [Register ("handle", "(Ljava/lang/Object;Ljava/lang/Throwable;)I", "GetHandle_Ljava_lang_Object_Ljava_lang_Throwable_Handler")]
- public new virtual unsafe int Handle (global::Java.Lang.Object o, global::Java.Lang.Throwable t)
- {
- if (id_handle_Ljava_lang_Object_Ljava_lang_Throwable_ == IntPtr.Zero)
- id_handle_Ljava_lang_Object_Ljava_lang_Throwable_ = JNIEnv.GetMethodID (class_ref, "handle", "(Ljava/lang/Object;Ljava/lang/Throwable;)I");
- try {
- JValue* __args = stackalloc JValue [2];
- __args [0] = new JValue (o);
- __args [1] = new JValue (t);
-
- int __ret;
- if (((object) this).GetType () == ThresholdType)
- __ret = JNIEnv.CallIntMethod (((global::Java.Lang.Object) this).Handle, id_handle_Ljava_lang_Object_Ljava_lang_Throwable_, __args);
- else
- __ret = JNIEnv.CallNonvirtualIntMethod (((global::Java.Lang.Object) this).Handle, ThresholdClass, JNIEnv.GetMethodID (ThresholdClass, "handle", "(Ljava/lang/Object;Ljava/lang/Throwable;)I"), __args);
- return __ret;
- } finally {
- }
- }
-
- static Delegate cb_IntegerMethod;
-#pragma warning disable 0169
- static Delegate GetIntegerMethodHandler ()
- {
- if (cb_IntegerMethod == null)
- cb_IntegerMethod = JNINativeWrapper.CreateDelegate ((_JniMarshal_PP_I) n_IntegerMethod);
- return cb_IntegerMethod;
- }
-
- static int n_IntegerMethod (IntPtr jnienv, IntPtr native__this)
- {
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- return __this.IntegerMethod ();
- }
-#pragma warning restore 0169
-
- static IntPtr id_IntegerMethod;
- // Metadata.xml XPath method reference: path="/api/package[@name='xamarin.test']/class[@name='SomeObject']/method[@name='IntegerMethod' and count(parameter)=0]"
- [Register ("IntegerMethod", "()I", "GetIntegerMethodHandler")]
- public virtual unsafe int IntegerMethod ()
- {
- if (id_IntegerMethod == IntPtr.Zero)
- id_IntegerMethod = JNIEnv.GetMethodID (class_ref, "IntegerMethod", "()I");
- try {
-
- if (((object) this).GetType () == ThresholdType)
- return JNIEnv.CallIntMethod (((global::Java.Lang.Object) this).Handle, id_IntegerMethod);
- else
- return JNIEnv.CallNonvirtualIntMethod (((global::Java.Lang.Object) this).Handle, ThresholdClass, JNIEnv.GetMethodID (ThresholdClass, "IntegerMethod", "()I"));
- } finally {
- }
- }
-
- static Delegate cb_VoidMethod;
-#pragma warning disable 0169
- static Delegate GetVoidMethodHandler ()
- {
- if (cb_VoidMethod == null)
- cb_VoidMethod = JNINativeWrapper.CreateDelegate ((_JniMarshal_PP_V) n_VoidMethod);
- return cb_VoidMethod;
- }
-
- static void n_VoidMethod (IntPtr jnienv, IntPtr native__this)
- {
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- __this.VoidMethod ();
- }
-#pragma warning restore 0169
-
- static IntPtr id_VoidMethod;
- // Metadata.xml XPath method reference: path="/api/package[@name='xamarin.test']/class[@name='SomeObject']/method[@name='VoidMethod' and count(parameter)=0]"
- [Register ("VoidMethod", "()V", "GetVoidMethodHandler")]
- public virtual unsafe void VoidMethod ()
- {
- if (id_VoidMethod == IntPtr.Zero)
- id_VoidMethod = JNIEnv.GetMethodID (class_ref, "VoidMethod", "()V");
- try {
-
- if (((object) this).GetType () == ThresholdType)
- JNIEnv.CallVoidMethod (((global::Java.Lang.Object) this).Handle, id_VoidMethod);
- else
- JNIEnv.CallNonvirtualVoidMethod (((global::Java.Lang.Object) this).Handle, ThresholdClass, JNIEnv.GetMethodID (ThresholdClass, "VoidMethod", "()V"));
- } finally {
- }
- }
-
- static Delegate cb_StringMethod;
-#pragma warning disable 0169
- static Delegate GetStringMethodHandler ()
- {
- if (cb_StringMethod == null)
- cb_StringMethod = JNINativeWrapper.CreateDelegate ((_JniMarshal_PP_L) n_StringMethod);
- return cb_StringMethod;
- }
-
- static IntPtr n_StringMethod (IntPtr jnienv, IntPtr native__this)
- {
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- return JNIEnv.NewString (__this.StringMethod ());
- }
-#pragma warning restore 0169
-
- static IntPtr id_StringMethod;
- // Metadata.xml XPath method reference: path="/api/package[@name='xamarin.test']/class[@name='SomeObject']/method[@name='StringMethod' and count(parameter)=0]"
- [Register ("StringMethod", "()Ljava/lang/String;", "GetStringMethodHandler")]
- public virtual unsafe string StringMethod ()
- {
- if (id_StringMethod == IntPtr.Zero)
- id_StringMethod = JNIEnv.GetMethodID (class_ref, "StringMethod", "()Ljava/lang/String;");
- try {
-
- if (((object) this).GetType () == ThresholdType)
- return JNIEnv.GetString (JNIEnv.CallObjectMethod (((global::Java.Lang.Object) this).Handle, id_StringMethod), JniHandleOwnership.TransferLocalRef);
- else
- return JNIEnv.GetString (JNIEnv.CallNonvirtualObjectMethod (((global::Java.Lang.Object) this).Handle, ThresholdClass, JNIEnv.GetMethodID (ThresholdClass, "StringMethod", "()Ljava/lang/String;")), JniHandleOwnership.TransferLocalRef);
- } finally {
- }
- }
-
- static Delegate cb_ObjectMethod;
-#pragma warning disable 0169
- static Delegate GetObjectMethodHandler ()
- {
- if (cb_ObjectMethod == null)
- cb_ObjectMethod = JNINativeWrapper.CreateDelegate ((_JniMarshal_PP_L) n_ObjectMethod);
- return cb_ObjectMethod;
- }
-
- static IntPtr n_ObjectMethod (IntPtr jnienv, IntPtr native__this)
- {
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- return JNIEnv.ToLocalJniHandle (__this.ObjectMethod ());
- }
-#pragma warning restore 0169
-
- static IntPtr id_ObjectMethod;
- // Metadata.xml XPath method reference: path="/api/package[@name='xamarin.test']/class[@name='SomeObject']/method[@name='ObjectMethod' and count(parameter)=0]"
- [Register ("ObjectMethod", "()Ljava/lang/Object;", "GetObjectMethodHandler")]
- public virtual unsafe global::Java.Lang.Object ObjectMethod ()
- {
- if (id_ObjectMethod == IntPtr.Zero)
- id_ObjectMethod = JNIEnv.GetMethodID (class_ref, "ObjectMethod", "()Ljava/lang/Object;");
- try {
-
- if (((object) this).GetType () == ThresholdType)
- return global::Java.Lang.Object.GetObject (JNIEnv.CallObjectMethod (((global::Java.Lang.Object) this).Handle, id_ObjectMethod), JniHandleOwnership.TransferLocalRef);
- else
- return global::Java.Lang.Object.GetObject (JNIEnv.CallNonvirtualObjectMethod (((global::Java.Lang.Object) this).Handle, ThresholdClass, JNIEnv.GetMethodID (ThresholdClass, "ObjectMethod", "()Ljava/lang/Object;")), JniHandleOwnership.TransferLocalRef);
- } finally {
- }
- }
-
- static Delegate cb_VoidMethodWithParams_Ljava_lang_String_ILjava_lang_Object_;
-#pragma warning disable 0169
- static Delegate GetVoidMethodWithParams_Ljava_lang_String_ILjava_lang_Object_Handler ()
- {
- if (cb_VoidMethodWithParams_Ljava_lang_String_ILjava_lang_Object_ == null)
- cb_VoidMethodWithParams_Ljava_lang_String_ILjava_lang_Object_ = JNINativeWrapper.CreateDelegate ((_JniMarshal_PPLIL_V) n_VoidMethodWithParams_Ljava_lang_String_ILjava_lang_Object_);
- return cb_VoidMethodWithParams_Ljava_lang_String_ILjava_lang_Object_;
- }
-
- static void n_VoidMethodWithParams_Ljava_lang_String_ILjava_lang_Object_ (IntPtr jnienv, IntPtr native__this, IntPtr native_astring, int anint, IntPtr native_anObject)
- {
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- var astring = JNIEnv.GetString (native_astring, JniHandleOwnership.DoNotTransfer);
- var anObject = global::Java.Lang.Object.GetObject (native_anObject, JniHandleOwnership.DoNotTransfer);
- __this.VoidMethodWithParams (astring, anint, anObject);
- }
-#pragma warning restore 0169
-
- static IntPtr id_VoidMethodWithParams_Ljava_lang_String_ILjava_lang_Object_;
- // Metadata.xml XPath method reference: path="/api/package[@name='xamarin.test']/class[@name='SomeObject']/method[@name='VoidMethodWithParams' and count(parameter)=3 and parameter[1][@type='java.lang.String'] and parameter[2][@type='int'] and parameter[3][@type='java.lang.Object']]"
- [Register ("VoidMethodWithParams", "(Ljava/lang/String;ILjava/lang/Object;)V", "GetVoidMethodWithParams_Ljava_lang_String_ILjava_lang_Object_Handler")]
- public virtual unsafe void VoidMethodWithParams (string astring, int anint, global::Java.Lang.Object anObject)
- {
- if (id_VoidMethodWithParams_Ljava_lang_String_ILjava_lang_Object_ == IntPtr.Zero)
- id_VoidMethodWithParams_Ljava_lang_String_ILjava_lang_Object_ = JNIEnv.GetMethodID (class_ref, "VoidMethodWithParams", "(Ljava/lang/String;ILjava/lang/Object;)V");
- IntPtr native_astring = JNIEnv.NewString ((string)astring);
- try {
- JValue* __args = stackalloc JValue [3];
- __args [0] = new JValue (native_astring);
- __args [1] = new JValue (anint);
- __args [2] = new JValue (anObject);
-
- if (((object) this).GetType () == ThresholdType)
- JNIEnv.CallVoidMethod (((global::Java.Lang.Object) this).Handle, id_VoidMethodWithParams_Ljava_lang_String_ILjava_lang_Object_, __args);
- else
- JNIEnv.CallNonvirtualVoidMethod (((global::Java.Lang.Object) this).Handle, ThresholdClass, JNIEnv.GetMethodID (ThresholdClass, "VoidMethodWithParams", "(Ljava/lang/String;ILjava/lang/Object;)V"), __args);
- } finally {
- JNIEnv.DeleteLocalRef (native_astring);
- }
- }
-
- static Delegate cb_ObsoleteMethod;
-#pragma warning disable 0169
- [Obsolete]
- static Delegate GetObsoleteMethodHandler ()
- {
- if (cb_ObsoleteMethod == null)
- cb_ObsoleteMethod = JNINativeWrapper.CreateDelegate ((_JniMarshal_PP_I) n_ObsoleteMethod);
- return cb_ObsoleteMethod;
- }
-
- [Obsolete]
- static int n_ObsoleteMethod (IntPtr jnienv, IntPtr native__this)
- {
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- return __this.ObsoleteMethod ();
- }
-#pragma warning restore 0169
-
- static IntPtr id_ObsoleteMethod;
- // Metadata.xml XPath method reference: path="/api/package[@name='xamarin.test']/class[@name='SomeObject']/method[@name='ObsoleteMethod' and count(parameter)=0]"
- [Obsolete (@"Deprecated please use IntegerMethod instead")]
- [Register ("ObsoleteMethod", "()I", "GetObsoleteMethodHandler")]
- public virtual unsafe int ObsoleteMethod ()
- {
- if (id_ObsoleteMethod == IntPtr.Zero)
- id_ObsoleteMethod = JNIEnv.GetMethodID (class_ref, "ObsoleteMethod", "()I");
- try {
-
- if (((object) this).GetType () == ThresholdType)
- return JNIEnv.CallIntMethod (((global::Java.Lang.Object) this).Handle, id_ObsoleteMethod);
- else
- return JNIEnv.CallNonvirtualIntMethod (((global::Java.Lang.Object) this).Handle, ThresholdClass, JNIEnv.GetMethodID (ThresholdClass, "ObsoleteMethod", "()I"));
- } finally {
- }
- }
-
- static Delegate cb_ArrayListTest_Ljava_util_ArrayList_;
-#pragma warning disable 0169
- static Delegate GetArrayListTest_Ljava_util_ArrayList_Handler ()
- {
- if (cb_ArrayListTest_Ljava_util_ArrayList_ == null)
- cb_ArrayListTest_Ljava_util_ArrayList_ = JNINativeWrapper.CreateDelegate ((_JniMarshal_PPL_V) n_ArrayListTest_Ljava_util_ArrayList_);
- return cb_ArrayListTest_Ljava_util_ArrayList_;
- }
-
- static void n_ArrayListTest_Ljava_util_ArrayList_ (IntPtr jnienv, IntPtr native__this, IntPtr native_p0)
- {
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- var p0 = global::Android.Runtime.JavaList.FromJniHandle (native_p0, JniHandleOwnership.DoNotTransfer);
- __this.ArrayListTest (p0);
- }
-#pragma warning restore 0169
-
- static IntPtr id_ArrayListTest_Ljava_util_ArrayList_;
- // Metadata.xml XPath method reference: path="/api/package[@name='xamarin.test']/class[@name='SomeObject']/method[@name='ArrayListTest' and count(parameter)=1 and parameter[1][@type='java.util.ArrayList<java.lang.Integer>']]"
- [Register ("ArrayListTest", "(Ljava/util/ArrayList;)V", "GetArrayListTest_Ljava_util_ArrayList_Handler")]
- public virtual unsafe void ArrayListTest (global::System.Collections.Generic.IList p0)
- {
- if (id_ArrayListTest_Ljava_util_ArrayList_ == IntPtr.Zero)
- id_ArrayListTest_Ljava_util_ArrayList_ = JNIEnv.GetMethodID (class_ref, "ArrayListTest", "(Ljava/util/ArrayList;)V");
- IntPtr native_p0 = global::Android.Runtime.JavaList.ToLocalJniHandle (p0);
- try {
- JValue* __args = stackalloc JValue [1];
- __args [0] = new JValue (native_p0);
-
- if (((object) this).GetType () == ThresholdType)
- JNIEnv.CallVoidMethod (((global::Java.Lang.Object) this).Handle, id_ArrayListTest_Ljava_util_ArrayList_, __args);
- else
- JNIEnv.CallNonvirtualVoidMethod (((global::Java.Lang.Object) this).Handle, ThresholdClass, JNIEnv.GetMethodID (ThresholdClass, "ArrayListTest", "(Ljava/util/ArrayList;)V"), __args);
- } finally {
- JNIEnv.DeleteLocalRef (native_p0);
- }
- }
-
- }
-}
diff --git a/tests/generator-Tests/expected/NormalProperties/Mono.Android.projitems b/tests/generator-Tests/expected/NormalProperties/Mono.Android.projitems
deleted file mode 100644
index 066be1dd1..000000000
--- a/tests/generator-Tests/expected/NormalProperties/Mono.Android.projitems
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-
- $(DefineConstants);ANDROID_1;ANDROID_2;ANDROID_3;ANDROID_4
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/tests/generator-Tests/expected/NormalProperties/Xamarin.Test.SomeObject.cs b/tests/generator-Tests/expected/NormalProperties/Xamarin.Test.SomeObject.cs
deleted file mode 100644
index bcedc36c1..000000000
--- a/tests/generator-Tests/expected/NormalProperties/Xamarin.Test.SomeObject.cs
+++ /dev/null
@@ -1,253 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#nullable restore
-using System;
-using System.Collections.Generic;
-using Android.Runtime;
-
-namespace Xamarin.Test {
-
- // Metadata.xml XPath class reference: path="/api/package[@name='xamarin.test']/class[@name='SomeObject']"
- [global::Android.Runtime.Register ("xamarin/test/SomeObject", DoNotGenerateAcw=true)]
- public abstract partial class SomeObject : global::Java.Lang.Object {
-
- internal static new IntPtr java_class_handle;
- internal static new IntPtr class_ref {
- get {
- return JNIEnv.FindClass ("xamarin/test/SomeObject", ref java_class_handle);
- }
- }
-
- protected override IntPtr ThresholdClass {
- get { return class_ref; }
- }
-
- protected override global::System.Type ThresholdType {
- get { return typeof (SomeObject); }
- }
-
- protected SomeObject (IntPtr javaReference, JniHandleOwnership transfer) : base (javaReference, transfer) {}
-
- static Delegate cb_getSomeInteger;
-#pragma warning disable 0169
- static Delegate GetGetSomeIntegerHandler ()
- {
- if (cb_getSomeInteger == null)
- cb_getSomeInteger = JNINativeWrapper.CreateDelegate ((_JniMarshal_PP_I) n_GetSomeInteger);
- return cb_getSomeInteger;
- }
-
- static int n_GetSomeInteger (IntPtr jnienv, IntPtr native__this)
- {
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- return __this.SomeInteger;
- }
-#pragma warning restore 0169
-
- static Delegate cb_setSomeInteger_I;
-#pragma warning disable 0169
- static Delegate GetSetSomeInteger_IHandler ()
- {
- if (cb_setSomeInteger_I == null)
- cb_setSomeInteger_I = JNINativeWrapper.CreateDelegate ((_JniMarshal_PPI_V) n_SetSomeInteger_I);
- return cb_setSomeInteger_I;
- }
-
- static void n_SetSomeInteger_I (IntPtr jnienv, IntPtr native__this, int newvalue)
- {
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- __this.SomeInteger = newvalue;
- }
-#pragma warning restore 0169
-
- public abstract int SomeInteger {
- // Metadata.xml XPath method reference: path="/api/package[@name='xamarin.test']/class[@name='SomeObject']/method[@name='getSomeInteger' and count(parameter)=0]"
- [Register ("getSomeInteger", "()I", "GetGetSomeIntegerHandler")] get;
- // Metadata.xml XPath method reference: path="/api/package[@name='xamarin.test']/class[@name='SomeObject']/method[@name='setSomeInteger' and count(parameter)=1 and parameter[1][@type='int']]"
- [Register ("setSomeInteger", "(I)V", "GetSetSomeInteger_IHandler")] set;
- }
-
- static Delegate cb_getSomeObjectProperty;
-#pragma warning disable 0169
- static Delegate GetGetSomeObjectPropertyHandler ()
- {
- if (cb_getSomeObjectProperty == null)
- cb_getSomeObjectProperty = JNINativeWrapper.CreateDelegate ((_JniMarshal_PP_L) n_GetSomeObjectProperty);
- return cb_getSomeObjectProperty;
- }
-
- static IntPtr n_GetSomeObjectProperty (IntPtr jnienv, IntPtr native__this)
- {
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- return JNIEnv.ToLocalJniHandle (__this.SomeObjectProperty);
- }
-#pragma warning restore 0169
-
- static Delegate cb_setSomeObjectProperty_Ljava_lang_Object_;
-#pragma warning disable 0169
- static Delegate GetSetSomeObjectProperty_Ljava_lang_Object_Handler ()
- {
- if (cb_setSomeObjectProperty_Ljava_lang_Object_ == null)
- cb_setSomeObjectProperty_Ljava_lang_Object_ = JNINativeWrapper.CreateDelegate ((_JniMarshal_PPL_V) n_SetSomeObjectProperty_Ljava_lang_Object_);
- return cb_setSomeObjectProperty_Ljava_lang_Object_;
- }
-
- static void n_SetSomeObjectProperty_Ljava_lang_Object_ (IntPtr jnienv, IntPtr native__this, IntPtr native_newvalue)
- {
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- var newvalue = global::Java.Lang.Object.GetObject (native_newvalue, JniHandleOwnership.DoNotTransfer);
- __this.SomeObjectProperty = newvalue;
- }
-#pragma warning restore 0169
-
- public abstract global::Java.Lang.Object SomeObjectProperty {
- // Metadata.xml XPath method reference: path="/api/package[@name='xamarin.test']/class[@name='SomeObject']/method[@name='getSomeObjectProperty' and count(parameter)=0]"
- [Register ("getSomeObjectProperty", "()Ljava/lang/Object;", "GetGetSomeObjectPropertyHandler")] get;
- // Metadata.xml XPath method reference: path="/api/package[@name='xamarin.test']/class[@name='SomeObject']/method[@name='setSomeObjectProperty' and count(parameter)=1 and parameter[1][@type='java.lang.Object']]"
- [Register ("setSomeObjectProperty", "(Ljava/lang/Object;)V", "GetSetSomeObjectProperty_Ljava_lang_Object_Handler")] set;
- }
-
- static Delegate cb_getSomeString;
-#pragma warning disable 0169
- static Delegate GetGetSomeStringHandler ()
- {
- if (cb_getSomeString == null)
- cb_getSomeString = JNINativeWrapper.CreateDelegate ((_JniMarshal_PP_L) n_GetSomeString);
- return cb_getSomeString;
- }
-
- static IntPtr n_GetSomeString (IntPtr jnienv, IntPtr native__this)
- {
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- return JNIEnv.NewString (__this.SomeString);
- }
-#pragma warning restore 0169
-
- static Delegate cb_setSomeString_Ljava_lang_String_;
-#pragma warning disable 0169
- static Delegate GetSetSomeString_Ljava_lang_String_Handler ()
- {
- if (cb_setSomeString_Ljava_lang_String_ == null)
- cb_setSomeString_Ljava_lang_String_ = JNINativeWrapper.CreateDelegate ((_JniMarshal_PPL_V) n_SetSomeString_Ljava_lang_String_);
- return cb_setSomeString_Ljava_lang_String_;
- }
-
- static void n_SetSomeString_Ljava_lang_String_ (IntPtr jnienv, IntPtr native__this, IntPtr native_newvalue)
- {
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- var newvalue = JNIEnv.GetString (native_newvalue, JniHandleOwnership.DoNotTransfer);
- __this.SomeString = newvalue;
- }
-#pragma warning restore 0169
-
- public abstract string SomeString {
- // Metadata.xml XPath method reference: path="/api/package[@name='xamarin.test']/class[@name='SomeObject']/method[@name='getSomeString' and count(parameter)=0]"
- [Register ("getSomeString", "()Ljava/lang/String;", "GetGetSomeStringHandler")] get;
- // Metadata.xml XPath method reference: path="/api/package[@name='xamarin.test']/class[@name='SomeObject']/method[@name='setSomeString' and count(parameter)=1 and parameter[1][@type='java.lang.String']]"
- [Register ("setSomeString", "(Ljava/lang/String;)V", "GetSetSomeString_Ljava_lang_String_Handler")] set;
- }
-
- }
-
- [global::Android.Runtime.Register ("xamarin/test/SomeObject", DoNotGenerateAcw=true)]
- internal partial class SomeObjectInvoker : SomeObject {
-
- public SomeObjectInvoker (IntPtr handle, JniHandleOwnership transfer) : base (handle, transfer) {}
-
- protected override global::System.Type ThresholdType {
- get { return typeof (SomeObjectInvoker); }
- }
-
- static IntPtr id_getSomeInteger;
- static IntPtr id_setSomeInteger_I;
- public override unsafe int SomeInteger {
- // Metadata.xml XPath method reference: path="/api/package[@name='xamarin.test']/class[@name='SomeObject']/method[@name='getSomeInteger' and count(parameter)=0]"
- [Register ("getSomeInteger", "()I", "GetGetSomeIntegerHandler")]
- get {
- if (id_getSomeInteger == IntPtr.Zero)
- id_getSomeInteger = JNIEnv.GetMethodID (class_ref, "getSomeInteger", "()I");
- try {
- return JNIEnv.CallIntMethod (((global::Java.Lang.Object) this).Handle, id_getSomeInteger);
- } finally {
- }
- }
- // Metadata.xml XPath method reference: path="/api/package[@name='xamarin.test']/class[@name='SomeObject']/method[@name='setSomeInteger' and count(parameter)=1 and parameter[1][@type='int']]"
- [Register ("setSomeInteger", "(I)V", "GetSetSomeInteger_IHandler")]
- set {
- if (id_setSomeInteger_I == IntPtr.Zero)
- id_setSomeInteger_I = JNIEnv.GetMethodID (class_ref, "setSomeInteger", "(I)V");
- try {
- JValue* __args = stackalloc JValue [1];
- __args [0] = new JValue (value);
- JNIEnv.CallVoidMethod (((global::Java.Lang.Object) this).Handle, id_setSomeInteger_I, __args);
- } finally {
- }
- }
- }
-
- static IntPtr id_getSomeObjectProperty;
- static IntPtr id_setSomeObjectProperty_Ljava_lang_Object_;
- public override unsafe global::Java.Lang.Object SomeObjectProperty {
- // Metadata.xml XPath method reference: path="/api/package[@name='xamarin.test']/class[@name='SomeObject']/method[@name='getSomeObjectProperty' and count(parameter)=0]"
- [Register ("getSomeObjectProperty", "()Ljava/lang/Object;", "GetGetSomeObjectPropertyHandler")]
- get {
- if (id_getSomeObjectProperty == IntPtr.Zero)
- id_getSomeObjectProperty = JNIEnv.GetMethodID (class_ref, "getSomeObjectProperty", "()Ljava/lang/Object;");
- try {
- return global::Java.Lang.Object.GetObject (JNIEnv.CallObjectMethod (((global::Java.Lang.Object) this).Handle, id_getSomeObjectProperty), JniHandleOwnership.TransferLocalRef);
- } finally {
- }
- }
- // Metadata.xml XPath method reference: path="/api/package[@name='xamarin.test']/class[@name='SomeObject']/method[@name='setSomeObjectProperty' and count(parameter)=1 and parameter[1][@type='java.lang.Object']]"
- [Register ("setSomeObjectProperty", "(Ljava/lang/Object;)V", "GetSetSomeObjectProperty_Ljava_lang_Object_Handler")]
- set {
- if (id_setSomeObjectProperty_Ljava_lang_Object_ == IntPtr.Zero)
- id_setSomeObjectProperty_Ljava_lang_Object_ = JNIEnv.GetMethodID (class_ref, "setSomeObjectProperty", "(Ljava/lang/Object;)V");
- try {
- JValue* __args = stackalloc JValue [1];
- __args [0] = new JValue (value);
- JNIEnv.CallVoidMethod (((global::Java.Lang.Object) this).Handle, id_setSomeObjectProperty_Ljava_lang_Object_, __args);
- } finally {
- }
- }
- }
-
- static IntPtr id_getSomeString;
- static IntPtr id_setSomeString_Ljava_lang_String_;
- public override unsafe string SomeString {
- // Metadata.xml XPath method reference: path="/api/package[@name='xamarin.test']/class[@name='SomeObject']/method[@name='getSomeString' and count(parameter)=0]"
- [Register ("getSomeString", "()Ljava/lang/String;", "GetGetSomeStringHandler")]
- get {
- if (id_getSomeString == IntPtr.Zero)
- id_getSomeString = JNIEnv.GetMethodID (class_ref, "getSomeString", "()Ljava/lang/String;");
- try {
- return JNIEnv.GetString (JNIEnv.CallObjectMethod (((global::Java.Lang.Object) this).Handle, id_getSomeString), JniHandleOwnership.TransferLocalRef);
- } finally {
- }
- }
- // Metadata.xml XPath method reference: path="/api/package[@name='xamarin.test']/class[@name='SomeObject']/method[@name='setSomeString' and count(parameter)=1 and parameter[1][@type='java.lang.String']]"
- [Register ("setSomeString", "(Ljava/lang/String;)V", "GetSetSomeString_Ljava_lang_String_Handler")]
- set {
- if (id_setSomeString_Ljava_lang_String_ == IntPtr.Zero)
- id_setSomeString_Ljava_lang_String_ = JNIEnv.GetMethodID (class_ref, "setSomeString", "(Ljava/lang/String;)V");
- IntPtr native_value = JNIEnv.NewString ((string)value);
- try {
- JValue* __args = stackalloc JValue [1];
- __args [0] = new JValue (native_value);
- JNIEnv.CallVoidMethod (((global::Java.Lang.Object) this).Handle, id_setSomeString_Ljava_lang_String_, __args);
- } finally {
- JNIEnv.DeleteLocalRef (native_value);
- }
- }
- }
-
- }
-
-}
diff --git a/tests/generator-Tests/expected/ParameterXPath/Mono.Android.projitems b/tests/generator-Tests/expected/ParameterXPath/Mono.Android.projitems
deleted file mode 100644
index e6f21d31f..000000000
--- a/tests/generator-Tests/expected/ParameterXPath/Mono.Android.projitems
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
- $(DefineConstants);ANDROID_1;ANDROID_2;ANDROID_3;ANDROID_4
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/tests/generator-Tests/expected/ParameterXPath/Xamarin.Test.A.cs b/tests/generator-Tests/expected/ParameterXPath/Xamarin.Test.A.cs
deleted file mode 100644
index 5e4136993..000000000
--- a/tests/generator-Tests/expected/ParameterXPath/Xamarin.Test.A.cs
+++ /dev/null
@@ -1,116 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#nullable restore
-using System;
-using System.Collections.Generic;
-using Android.Runtime;
-
-namespace Xamarin.Test {
-
- // Metadata.xml XPath class reference: path="/api/package[@name='xamarin.test']/class[@name='A']"
- [global::Android.Runtime.Register ("xamarin/test/A", DoNotGenerateAcw=true)]
- [global::Java.Interop.JavaTypeParameters (new string [] {"T extends java.lang.Object"})]
- public partial class A : global::Java.Lang.Object {
-
- internal static new IntPtr java_class_handle;
- internal static new IntPtr class_ref {
- get {
- return JNIEnv.FindClass ("xamarin/test/A", ref java_class_handle);
- }
- }
-
- protected override IntPtr ThresholdClass {
- get { return class_ref; }
- }
-
- protected override global::System.Type ThresholdType {
- get { return typeof (A); }
- }
-
- protected A (IntPtr javaReference, JniHandleOwnership transfer) : base (javaReference, transfer) {}
-
- static Delegate cb_setA_Ljava_lang_Object_;
-#pragma warning disable 0169
- static Delegate GetSetA_Ljava_lang_Object_Handler ()
- {
- if (cb_setA_Ljava_lang_Object_ == null)
- cb_setA_Ljava_lang_Object_ = JNINativeWrapper.CreateDelegate ((_JniMarshal_PPL_V) n_SetA_Ljava_lang_Object_);
- return cb_setA_Ljava_lang_Object_;
- }
-
- static void n_SetA_Ljava_lang_Object_ (IntPtr jnienv, IntPtr native__this, IntPtr native_adapter)
- {
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- var adapter = global::Java.Lang.Object.GetObject (native_adapter, JniHandleOwnership.DoNotTransfer);
- __this.SetA (adapter);
- }
-#pragma warning restore 0169
-
- static IntPtr id_setA_Ljava_lang_Object_;
- // Metadata.xml XPath method reference: path="/api/package[@name='xamarin.test']/class[@name='A']/method[@name='setA' and count(parameter)=1 and parameter[1][@type='T']]"
- [Register ("setA", "(Ljava/lang/Object;)V", "GetSetA_Ljava_lang_Object_Handler")]
- public virtual unsafe void SetA (global::Java.Lang.Object adapter)
- {
- if (id_setA_Ljava_lang_Object_ == IntPtr.Zero)
- id_setA_Ljava_lang_Object_ = JNIEnv.GetMethodID (class_ref, "setA", "(Ljava/lang/Object;)V");
- IntPtr native_adapter = JNIEnv.ToLocalJniHandle (adapter);
- try {
- JValue* __args = stackalloc JValue [1];
- __args [0] = new JValue (native_adapter);
-
- if (((object) this).GetType () == ThresholdType)
- JNIEnv.CallVoidMethod (((global::Java.Lang.Object) this).Handle, id_setA_Ljava_lang_Object_, __args);
- else
- JNIEnv.CallNonvirtualVoidMethod (((global::Java.Lang.Object) this).Handle, ThresholdClass, JNIEnv.GetMethodID (ThresholdClass, "setA", "(Ljava/lang/Object;)V"), __args);
- } finally {
- JNIEnv.DeleteLocalRef (native_adapter);
- }
- }
-
- static Delegate cb_listTest_Ljava_util_List_;
-#pragma warning disable 0169
- static Delegate GetListTest_Ljava_util_List_Handler ()
- {
- if (cb_listTest_Ljava_util_List_ == null)
- cb_listTest_Ljava_util_List_ = JNINativeWrapper.CreateDelegate ((_JniMarshal_PPL_V) n_ListTest_Ljava_util_List_);
- return cb_listTest_Ljava_util_List_;
- }
-
- static void n_ListTest_Ljava_util_List_ (IntPtr jnienv, IntPtr native__this, IntPtr native_p0)
- {
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- var p0 = global::Android.Runtime.JavaList.FromJniHandle (native_p0, JniHandleOwnership.DoNotTransfer);
- __this.ListTest (p0);
- }
-#pragma warning restore 0169
-
- static IntPtr id_listTest_Ljava_util_List_;
- // Metadata.xml XPath method reference: path="/api/package[@name='xamarin.test']/class[@name='A']/method[@name='listTest' and count(parameter)=1 and parameter[1][@type='java.util.List<java.lang.Integer>']]"
- [Register ("listTest", "(Ljava/util/List;)V", "GetListTest_Ljava_util_List_Handler")]
- public virtual unsafe void ListTest (global::System.Collections.Generic.IList p0)
- {
- if (id_listTest_Ljava_util_List_ == IntPtr.Zero)
- id_listTest_Ljava_util_List_ = JNIEnv.GetMethodID (class_ref, "listTest", "(Ljava/util/List;)V");
- IntPtr native_p0 = global::Android.Runtime.JavaList.ToLocalJniHandle (p0);
- try {
- JValue* __args = stackalloc JValue [1];
- __args [0] = new JValue (native_p0);
-
- if (((object) this).GetType () == ThresholdType)
- JNIEnv.CallVoidMethod (((global::Java.Lang.Object) this).Handle, id_listTest_Ljava_util_List_, __args);
- else
- JNIEnv.CallNonvirtualVoidMethod (((global::Java.Lang.Object) this).Handle, ThresholdClass, JNIEnv.GetMethodID (ThresholdClass, "listTest", "(Ljava/util/List;)V"), __args);
- } finally {
- JNIEnv.DeleteLocalRef (native_p0);
- }
- }
-
- }
-}
diff --git a/tests/generator-Tests/expected/StaticFields/Mono.Android.projitems b/tests/generator-Tests/expected/StaticFields/Mono.Android.projitems
deleted file mode 100644
index 066be1dd1..000000000
--- a/tests/generator-Tests/expected/StaticFields/Mono.Android.projitems
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-
- $(DefineConstants);ANDROID_1;ANDROID_2;ANDROID_3;ANDROID_4
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/tests/generator-Tests/expected/StaticFields/Xamarin.Test.SomeObject.cs b/tests/generator-Tests/expected/StaticFields/Xamarin.Test.SomeObject.cs
deleted file mode 100644
index a4e0ca6b2..000000000
--- a/tests/generator-Tests/expected/StaticFields/Xamarin.Test.SomeObject.cs
+++ /dev/null
@@ -1,71 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#nullable restore
-using System;
-using System.Collections.Generic;
-using Android.Runtime;
-
-namespace Xamarin.Test {
-
- // Metadata.xml XPath class reference: path="/api/package[@name='xamarin.test']/class[@name='SomeObject']"
- [global::Android.Runtime.Register ("xamarin/test/SomeObject", DoNotGenerateAcw=true)]
- public partial class SomeObject : global::Java.Lang.Object {
-
-
- static IntPtr Value_jfieldId;
-
- // Metadata.xml XPath field reference: path="/api/package[@name='xamarin.test']/class[@name='SomeObject']/field[@name='Value']"
- [Register ("Value")]
- public static int Value {
- get {
- if (Value_jfieldId == IntPtr.Zero)
- Value_jfieldId = JNIEnv.GetStaticFieldID (class_ref, "Value", "I");
- return JNIEnv.GetStaticIntField (class_ref, Value_jfieldId);
- }
- }
-
- static IntPtr Value2_jfieldId;
-
- // Metadata.xml XPath field reference: path="/api/package[@name='xamarin.test']/class[@name='SomeObject']/field[@name='Value2']"
- [Register ("Value2")]
- public static int Value2 {
- get {
- if (Value2_jfieldId == IntPtr.Zero)
- Value2_jfieldId = JNIEnv.GetStaticFieldID (class_ref, "Value2", "I");
- return JNIEnv.GetStaticIntField (class_ref, Value2_jfieldId);
- }
- set {
- if (Value2_jfieldId == IntPtr.Zero)
- Value2_jfieldId = JNIEnv.GetStaticFieldID (class_ref, "Value2", "I");
- try {
- JNIEnv.SetStaticField (class_ref, Value2_jfieldId, value);
- } finally {
- }
- }
- }
- internal static new IntPtr java_class_handle;
- internal static new IntPtr class_ref {
- get {
- return JNIEnv.FindClass ("xamarin/test/SomeObject", ref java_class_handle);
- }
- }
-
- protected override IntPtr ThresholdClass {
- get { return class_ref; }
- }
-
- protected override global::System.Type ThresholdType {
- get { return typeof (SomeObject); }
- }
-
- protected SomeObject (IntPtr javaReference, JniHandleOwnership transfer) : base (javaReference, transfer) {}
-
- }
-}
diff --git a/tests/generator-Tests/expected/StaticMethods/Mono.Android.projitems b/tests/generator-Tests/expected/StaticMethods/Mono.Android.projitems
deleted file mode 100644
index 066be1dd1..000000000
--- a/tests/generator-Tests/expected/StaticMethods/Mono.Android.projitems
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-
- $(DefineConstants);ANDROID_1;ANDROID_2;ANDROID_3;ANDROID_4
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/tests/generator-Tests/expected/StaticMethods/Xamarin.Test.SomeObject.cs b/tests/generator-Tests/expected/StaticMethods/Xamarin.Test.SomeObject.cs
deleted file mode 100644
index 4340390e9..000000000
--- a/tests/generator-Tests/expected/StaticMethods/Xamarin.Test.SomeObject.cs
+++ /dev/null
@@ -1,79 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#nullable restore
-using System;
-using System.Collections.Generic;
-using Android.Runtime;
-
-namespace Xamarin.Test {
-
- // Metadata.xml XPath class reference: path="/api/package[@name='xamarin.test']/class[@name='SomeObject']"
- [global::Android.Runtime.Register ("xamarin/test/SomeObject", DoNotGenerateAcw=true)]
- public partial class SomeObject : global::Java.Lang.Object {
-
- internal static new IntPtr java_class_handle;
- internal static new IntPtr class_ref {
- get {
- return JNIEnv.FindClass ("xamarin/test/SomeObject", ref java_class_handle);
- }
- }
-
- protected override IntPtr ThresholdClass {
- get { return class_ref; }
- }
-
- protected override global::System.Type ThresholdType {
- get { return typeof (SomeObject); }
- }
-
- protected SomeObject (IntPtr javaReference, JniHandleOwnership transfer) : base (javaReference, transfer) {}
-
- static IntPtr id_methodAsInt;
- // Metadata.xml XPath method reference: path="/api/package[@name='xamarin.test']/class[@name='SomeObject']/method[@name='methodAsInt' and count(parameter)=0]"
- [Register ("methodAsInt", "()I", "")]
- public static unsafe int MethodAsInt ()
- {
- if (id_methodAsInt == IntPtr.Zero)
- id_methodAsInt = JNIEnv.GetStaticMethodID (class_ref, "methodAsInt", "()I");
- try {
- return JNIEnv.CallStaticIntMethod (class_ref, id_methodAsInt);
- } finally {
- }
- }
-
- static IntPtr id_methodAsString;
- // Metadata.xml XPath method reference: path="/api/package[@name='xamarin.test']/class[@name='SomeObject']/method[@name='methodAsString' and count(parameter)=0]"
- [Register ("methodAsString", "()Ljava/lang/String;", "")]
- public static unsafe string MethodAsString ()
- {
- if (id_methodAsString == IntPtr.Zero)
- id_methodAsString = JNIEnv.GetStaticMethodID (class_ref, "methodAsString", "()Ljava/lang/String;");
- try {
- return JNIEnv.GetString (JNIEnv.CallStaticObjectMethod (class_ref, id_methodAsString), JniHandleOwnership.TransferLocalRef);
- } finally {
- }
- }
-
- static IntPtr id_Obsoletemethod;
- // Metadata.xml XPath method reference: path="/api/package[@name='xamarin.test']/class[@name='SomeObject']/method[@name='Obsoletemethod' and count(parameter)=0]"
- [Obsolete (@"Deprecated please use methodAsString")]
- [Register ("Obsoletemethod", "()Ljava/lang/String;", "")]
- public static unsafe string Obsoletemethod ()
- {
- if (id_Obsoletemethod == IntPtr.Zero)
- id_Obsoletemethod = JNIEnv.GetStaticMethodID (class_ref, "Obsoletemethod", "()Ljava/lang/String;");
- try {
- return JNIEnv.GetString (JNIEnv.CallStaticObjectMethod (class_ref, id_Obsoletemethod), JniHandleOwnership.TransferLocalRef);
- } finally {
- }
- }
-
- }
-}
diff --git a/tests/generator-Tests/expected/StaticProperties/Mono.Android.projitems b/tests/generator-Tests/expected/StaticProperties/Mono.Android.projitems
deleted file mode 100644
index 066be1dd1..000000000
--- a/tests/generator-Tests/expected/StaticProperties/Mono.Android.projitems
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-
- $(DefineConstants);ANDROID_1;ANDROID_2;ANDROID_3;ANDROID_4
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/tests/generator-Tests/expected/StaticProperties/Xamarin.Test.SomeObject.cs b/tests/generator-Tests/expected/StaticProperties/Xamarin.Test.SomeObject.cs
deleted file mode 100644
index 45b08ec40..000000000
--- a/tests/generator-Tests/expected/StaticProperties/Xamarin.Test.SomeObject.cs
+++ /dev/null
@@ -1,123 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#nullable restore
-using System;
-using System.Collections.Generic;
-using Android.Runtime;
-
-namespace Xamarin.Test {
-
- // Metadata.xml XPath class reference: path="/api/package[@name='xamarin.test']/class[@name='SomeObject']"
- [global::Android.Runtime.Register ("xamarin/test/SomeObject", DoNotGenerateAcw=true)]
- public partial class SomeObject : global::Java.Lang.Object {
-
- internal static new IntPtr java_class_handle;
- internal static new IntPtr class_ref {
- get {
- return JNIEnv.FindClass ("xamarin/test/SomeObject", ref java_class_handle);
- }
- }
-
- protected override IntPtr ThresholdClass {
- get { return class_ref; }
- }
-
- protected override global::System.Type ThresholdType {
- get { return typeof (SomeObject); }
- }
-
- protected SomeObject (IntPtr javaReference, JniHandleOwnership transfer) : base (javaReference, transfer) {}
-
- static IntPtr id_getSomeInteger;
- static IntPtr id_setSomeInteger_I;
- public static unsafe int SomeInteger {
- // Metadata.xml XPath method reference: path="/api/package[@name='xamarin.test']/class[@name='SomeObject']/method[@name='getSomeInteger' and count(parameter)=0]"
- [Register ("getSomeInteger", "()I", "")]
- get {
- if (id_getSomeInteger == IntPtr.Zero)
- id_getSomeInteger = JNIEnv.GetStaticMethodID (class_ref, "getSomeInteger", "()I");
- try {
- return JNIEnv.CallStaticIntMethod (class_ref, id_getSomeInteger);
- } finally {
- }
- }
- // Metadata.xml XPath method reference: path="/api/package[@name='xamarin.test']/class[@name='SomeObject']/method[@name='setSomeInteger' and count(parameter)=1 and parameter[1][@type='int']]"
- [Register ("setSomeInteger", "(I)V", "")]
- set {
- if (id_setSomeInteger_I == IntPtr.Zero)
- id_setSomeInteger_I = JNIEnv.GetStaticMethodID (class_ref, "setSomeInteger", "(I)V");
- try {
- JValue* __args = stackalloc JValue [1];
- __args [0] = new JValue (value);
- JNIEnv.CallStaticVoidMethod (class_ref, id_setSomeInteger_I, __args);
- } finally {
- }
- }
- }
-
- static IntPtr id_getSomeString;
- static IntPtr id_setSomeString_Ljava_lang_String_;
- public static unsafe string SomeString {
- // Metadata.xml XPath method reference: path="/api/package[@name='xamarin.test']/class[@name='SomeObject']/method[@name='getSomeString' and count(parameter)=0]"
- [Register ("getSomeString", "()Ljava/lang/String;", "")]
- get {
- if (id_getSomeString == IntPtr.Zero)
- id_getSomeString = JNIEnv.GetStaticMethodID (class_ref, "getSomeString", "()Ljava/lang/String;");
- try {
- return JNIEnv.GetString (JNIEnv.CallStaticObjectMethod (class_ref, id_getSomeString), JniHandleOwnership.TransferLocalRef);
- } finally {
- }
- }
- // Metadata.xml XPath method reference: path="/api/package[@name='xamarin.test']/class[@name='SomeObject']/method[@name='setSomeString' and count(parameter)=1 and parameter[1][@type='java.lang.String']]"
- [Register ("setSomeString", "(Ljava/lang/String;)V", "")]
- set {
- if (id_setSomeString_Ljava_lang_String_ == IntPtr.Zero)
- id_setSomeString_Ljava_lang_String_ = JNIEnv.GetStaticMethodID (class_ref, "setSomeString", "(Ljava/lang/String;)V");
- IntPtr native_value = JNIEnv.NewString ((string)value);
- try {
- JValue* __args = stackalloc JValue [1];
- __args [0] = new JValue (native_value);
- JNIEnv.CallStaticVoidMethod (class_ref, id_setSomeString_Ljava_lang_String_, __args);
- } finally {
- JNIEnv.DeleteLocalRef (native_value);
- }
- }
- }
-
- static IntPtr id_getSomeObject;
- // Metadata.xml XPath method reference: path="/api/package[@name='xamarin.test']/class[@name='SomeObject']/method[@name='getSomeObject' and count(parameter)=0]"
- [Register ("getSomeObject", "()Ljava/lang/Object;", "")]
- public static unsafe global::Java.Lang.Object GetSomeObject ()
- {
- if (id_getSomeObject == IntPtr.Zero)
- id_getSomeObject = JNIEnv.GetStaticMethodID (class_ref, "getSomeObject", "()Ljava/lang/Object;");
- try {
- return global::Java.Lang.Object.GetObject (JNIEnv.CallStaticObjectMethod (class_ref, id_getSomeObject), JniHandleOwnership.TransferLocalRef);
- } finally {
- }
- }
-
- static IntPtr id_setSomeObject_Ljava_lang_Object_;
- // Metadata.xml XPath method reference: path="/api/package[@name='xamarin.test']/class[@name='SomeObject']/method[@name='setSomeObject' and count(parameter)=1 and parameter[1][@type='java.lang.Object']]"
- [Register ("setSomeObject", "(Ljava/lang/Object;)V", "")]
- public static unsafe void SetSomeObject (global::Java.Lang.Object newvalue)
- {
- if (id_setSomeObject_Ljava_lang_Object_ == IntPtr.Zero)
- id_setSomeObject_Ljava_lang_Object_ = JNIEnv.GetStaticMethodID (class_ref, "setSomeObject", "(Ljava/lang/Object;)V");
- try {
- JValue* __args = stackalloc JValue [1];
- __args [0] = new JValue (newvalue);
- JNIEnv.CallStaticVoidMethod (class_ref, id_setSomeObject_Ljava_lang_Object_, __args);
- } finally {
- }
- }
-
- }
-}
diff --git a/tests/generator-Tests/expected/Streams/Java.IO.FilterOutputStream.cs b/tests/generator-Tests/expected/Streams/Java.IO.FilterOutputStream.cs
deleted file mode 100644
index 33dda8be4..000000000
--- a/tests/generator-Tests/expected/Streams/Java.IO.FilterOutputStream.cs
+++ /dev/null
@@ -1,106 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#nullable restore
-using System;
-using System.Collections.Generic;
-using Android.Runtime;
-
-namespace Java.IO {
-
- // Metadata.xml XPath class reference: path="/api/package[@name='java.io']/class[@name='FilterOutputStream']"
- [global::Android.Runtime.Register ("java/io/FilterOutputStream", DoNotGenerateAcw=true)]
- public partial class FilterOutputStream : global::Java.IO.OutputStream {
-
- internal static new IntPtr java_class_handle;
- internal static new IntPtr class_ref {
- get {
- return JNIEnv.FindClass ("java/io/FilterOutputStream", ref java_class_handle);
- }
- }
-
- protected override IntPtr ThresholdClass {
- get { return class_ref; }
- }
-
- protected override global::System.Type ThresholdType {
- get { return typeof (FilterOutputStream); }
- }
-
- protected FilterOutputStream (IntPtr javaReference, JniHandleOwnership transfer) : base (javaReference, transfer) {}
-
- static IntPtr id_ctor_Ljava_io_OutputStream_;
- // Metadata.xml XPath constructor reference: path="/api/package[@name='java.io']/class[@name='FilterOutputStream']/constructor[@name='FilterOutputStream' and count(parameter)=1 and parameter[1][@type='java.io.OutputStream']]"
- [Register (".ctor", "(Ljava/io/OutputStream;)V", "")]
- public unsafe FilterOutputStream (global::System.IO.Stream @out)
- : base (IntPtr.Zero, JniHandleOwnership.DoNotTransfer)
- {
- if (((global::Java.Lang.Object) this).Handle != IntPtr.Zero)
- return;
-
- IntPtr native__out = global::Android.Runtime.OutputStreamAdapter.ToLocalJniHandle (@out);
- try {
- JValue* __args = stackalloc JValue [1];
- __args [0] = new JValue (native__out);
- if (((object) this).GetType () != typeof (FilterOutputStream)) {
- SetHandle (
- global::Android.Runtime.JNIEnv.StartCreateInstance (((object) this).GetType (), "(Ljava/io/OutputStream;)V", __args),
- JniHandleOwnership.TransferLocalRef);
- global::Android.Runtime.JNIEnv.FinishCreateInstance (((global::Java.Lang.Object) this).Handle, "(Ljava/io/OutputStream;)V", __args);
- return;
- }
-
- if (id_ctor_Ljava_io_OutputStream_ == IntPtr.Zero)
- id_ctor_Ljava_io_OutputStream_ = JNIEnv.GetMethodID (class_ref, "", "(Ljava/io/OutputStream;)V");
- SetHandle (
- global::Android.Runtime.JNIEnv.StartCreateInstance (class_ref, id_ctor_Ljava_io_OutputStream_, __args),
- JniHandleOwnership.TransferLocalRef);
- JNIEnv.FinishCreateInstance (((global::Java.Lang.Object) this).Handle, class_ref, id_ctor_Ljava_io_OutputStream_, __args);
- } finally {
- JNIEnv.DeleteLocalRef (native__out);
- }
- }
-
- static Delegate cb_write_I;
-#pragma warning disable 0169
- static Delegate GetWrite_IHandler ()
- {
- if (cb_write_I == null)
- cb_write_I = JNINativeWrapper.CreateDelegate ((_JniMarshal_PPI_V) n_Write_I);
- return cb_write_I;
- }
-
- static void n_Write_I (IntPtr jnienv, IntPtr native__this, int oneByte)
- {
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- __this.Write (oneByte);
- }
-#pragma warning restore 0169
-
- static IntPtr id_write_I;
- // Metadata.xml XPath method reference: path="/api/package[@name='java.io']/class[@name='FilterOutputStream']/method[@name='write' and count(parameter)=1 and parameter[1][@type='int']]"
- [Register ("write", "(I)V", "GetWrite_IHandler")]
- public override unsafe void Write (int oneByte)
- {
- if (id_write_I == IntPtr.Zero)
- id_write_I = JNIEnv.GetMethodID (class_ref, "write", "(I)V");
- try {
- JValue* __args = stackalloc JValue [1];
- __args [0] = new JValue (oneByte);
-
- if (((object) this).GetType () == ThresholdType)
- JNIEnv.CallVoidMethod (((global::Java.Lang.Object) this).Handle, id_write_I, __args);
- else
- JNIEnv.CallNonvirtualVoidMethod (((global::Java.Lang.Object) this).Handle, ThresholdClass, JNIEnv.GetMethodID (ThresholdClass, "write", "(I)V"), __args);
- } finally {
- }
- }
-
- }
-}
diff --git a/tests/generator-Tests/expected/Streams/Java.IO.IOException.cs b/tests/generator-Tests/expected/Streams/Java.IO.IOException.cs
deleted file mode 100644
index 9584b3969..000000000
--- a/tests/generator-Tests/expected/Streams/Java.IO.IOException.cs
+++ /dev/null
@@ -1,84 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#nullable restore
-using System;
-using System.Collections.Generic;
-using Android.Runtime;
-
-namespace Java.IO {
-
- // Metadata.xml XPath class reference: path="/api/package[@name='java.io']/class[@name='IOException']"
- [global::Android.Runtime.Register ("java/io/IOException", DoNotGenerateAcw=true)]
- public abstract partial class IOException : global::Java.Lang.Throwable {
-
- internal static new IntPtr java_class_handle;
- internal static new IntPtr class_ref {
- get {
- return JNIEnv.FindClass ("java/io/IOException", ref java_class_handle);
- }
- }
-
- protected override IntPtr ThresholdClass {
- get { return class_ref; }
- }
-
- protected override global::System.Type ThresholdType {
- get { return typeof (IOException); }
- }
-
- protected IOException (IntPtr javaReference, JniHandleOwnership transfer) : base (javaReference, transfer) {}
-
- static Delegate cb_printStackTrace;
-#pragma warning disable 0169
- static Delegate GetPrintStackTraceHandler ()
- {
- if (cb_printStackTrace == null)
- cb_printStackTrace = JNINativeWrapper.CreateDelegate ((_JniMarshal_PP_V) n_PrintStackTrace);
- return cb_printStackTrace;
- }
-
- static void n_PrintStackTrace (IntPtr jnienv, IntPtr native__this)
- {
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- __this.PrintStackTrace ();
- }
-#pragma warning restore 0169
-
- static IntPtr id_printStackTrace;
- // Metadata.xml XPath method reference: path="/api/package[@name='java.io']/class[@name='IOException']/method[@name='printStackTrace' and count(parameter)=0]"
- [Register ("printStackTrace", "()V", "GetPrintStackTraceHandler")]
- public virtual unsafe void PrintStackTrace ()
- {
- if (id_printStackTrace == IntPtr.Zero)
- id_printStackTrace = JNIEnv.GetMethodID (class_ref, "printStackTrace", "()V");
- try {
-
- if (((object) this).GetType () == ThresholdType)
- JNIEnv.CallVoidMethod (((global::Java.Lang.Throwable) this).Handle, id_printStackTrace);
- else
- JNIEnv.CallNonvirtualVoidMethod (((global::Java.Lang.Throwable) this).Handle, ThresholdClass, JNIEnv.GetMethodID (ThresholdClass, "printStackTrace", "()V"));
- } finally {
- }
- }
-
- }
-
- [global::Android.Runtime.Register ("java/io/IOException", DoNotGenerateAcw=true)]
- internal partial class IOExceptionInvoker : IOException {
-
- public IOExceptionInvoker (IntPtr handle, JniHandleOwnership transfer) : base (handle, transfer) {}
-
- protected override global::System.Type ThresholdType {
- get { return typeof (IOExceptionInvoker); }
- }
-
- }
-
-}
diff --git a/tests/generator-Tests/expected/Streams/Java.IO.InputStream.cs b/tests/generator-Tests/expected/Streams/Java.IO.InputStream.cs
deleted file mode 100644
index 1bb1cd744..000000000
--- a/tests/generator-Tests/expected/Streams/Java.IO.InputStream.cs
+++ /dev/null
@@ -1,408 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#nullable restore
-using System;
-using System.Collections.Generic;
-using Android.Runtime;
-
-namespace Java.IO {
-
- // Metadata.xml XPath class reference: path="/api/package[@name='java.io']/class[@name='InputStream']"
- [global::Android.Runtime.Register ("java/io/InputStream", DoNotGenerateAcw=true)]
- public abstract partial class InputStream : global::Java.Lang.Object {
-
- internal static new IntPtr java_class_handle;
- internal static new IntPtr class_ref {
- get {
- return JNIEnv.FindClass ("java/io/InputStream", ref java_class_handle);
- }
- }
-
- protected override IntPtr ThresholdClass {
- get { return class_ref; }
- }
-
- protected override global::System.Type ThresholdType {
- get { return typeof (InputStream); }
- }
-
- protected InputStream (IntPtr javaReference, JniHandleOwnership transfer) : base (javaReference, transfer) {}
-
- static IntPtr id_ctor;
- // Metadata.xml XPath constructor reference: path="/api/package[@name='java.io']/class[@name='InputStream']/constructor[@name='InputStream' and count(parameter)=0]"
- [Register (".ctor", "()V", "")]
- public unsafe InputStream ()
- : base (IntPtr.Zero, JniHandleOwnership.DoNotTransfer)
- {
- if (((global::Java.Lang.Object) this).Handle != IntPtr.Zero)
- return;
-
- try {
- if (((object) this).GetType () != typeof (InputStream)) {
- SetHandle (
- global::Android.Runtime.JNIEnv.StartCreateInstance (((object) this).GetType (), "()V"),
- JniHandleOwnership.TransferLocalRef);
- global::Android.Runtime.JNIEnv.FinishCreateInstance (((global::Java.Lang.Object) this).Handle, "()V");
- return;
- }
-
- if (id_ctor == IntPtr.Zero)
- id_ctor = JNIEnv.GetMethodID (class_ref, "", "()V");
- SetHandle (
- global::Android.Runtime.JNIEnv.StartCreateInstance (class_ref, id_ctor),
- JniHandleOwnership.TransferLocalRef);
- JNIEnv.FinishCreateInstance (((global::Java.Lang.Object) this).Handle, class_ref, id_ctor);
- } finally {
- }
- }
-
- static Delegate cb_available;
-#pragma warning disable 0169
- static Delegate GetAvailableHandler ()
- {
- if (cb_available == null)
- cb_available = JNINativeWrapper.CreateDelegate ((_JniMarshal_PP_I) n_Available);
- return cb_available;
- }
-
- static int n_Available (IntPtr jnienv, IntPtr native__this)
- {
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- return __this.Available ();
- }
-#pragma warning restore 0169
-
- static IntPtr id_available;
- // Metadata.xml XPath method reference: path="/api/package[@name='java.io']/class[@name='InputStream']/method[@name='available' and count(parameter)=0]"
- [Register ("available", "()I", "GetAvailableHandler")]
- public virtual unsafe int Available ()
- {
- if (id_available == IntPtr.Zero)
- id_available = JNIEnv.GetMethodID (class_ref, "available", "()I");
- try {
-
- if (((object) this).GetType () == ThresholdType)
- return JNIEnv.CallIntMethod (((global::Java.Lang.Object) this).Handle, id_available);
- else
- return JNIEnv.CallNonvirtualIntMethod (((global::Java.Lang.Object) this).Handle, ThresholdClass, JNIEnv.GetMethodID (ThresholdClass, "available", "()I"));
- } finally {
- }
- }
-
- static Delegate cb_close;
-#pragma warning disable 0169
- static Delegate GetCloseHandler ()
- {
- if (cb_close == null)
- cb_close = JNINativeWrapper.CreateDelegate ((_JniMarshal_PP_V) n_Close);
- return cb_close;
- }
-
- static void n_Close (IntPtr jnienv, IntPtr native__this)
- {
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- __this.Close ();
- }
-#pragma warning restore 0169
-
- static IntPtr id_close;
- // Metadata.xml XPath method reference: path="/api/package[@name='java.io']/class[@name='InputStream']/method[@name='close' and count(parameter)=0]"
- [Register ("close", "()V", "GetCloseHandler")]
- public virtual unsafe void Close ()
- {
- if (id_close == IntPtr.Zero)
- id_close = JNIEnv.GetMethodID (class_ref, "close", "()V");
- try {
-
- if (((object) this).GetType () == ThresholdType)
- JNIEnv.CallVoidMethod (((global::Java.Lang.Object) this).Handle, id_close);
- else
- JNIEnv.CallNonvirtualVoidMethod (((global::Java.Lang.Object) this).Handle, ThresholdClass, JNIEnv.GetMethodID (ThresholdClass, "close", "()V"));
- } finally {
- }
- }
-
- static Delegate cb_mark_I;
-#pragma warning disable 0169
- static Delegate GetMark_IHandler ()
- {
- if (cb_mark_I == null)
- cb_mark_I = JNINativeWrapper.CreateDelegate ((_JniMarshal_PPI_V) n_Mark_I);
- return cb_mark_I;
- }
-
- static void n_Mark_I (IntPtr jnienv, IntPtr native__this, int readlimit)
- {
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- __this.Mark (readlimit);
- }
-#pragma warning restore 0169
-
- static IntPtr id_mark_I;
- // Metadata.xml XPath method reference: path="/api/package[@name='java.io']/class[@name='InputStream']/method[@name='mark' and count(parameter)=1 and parameter[1][@type='int']]"
- [Register ("mark", "(I)V", "GetMark_IHandler")]
- public virtual unsafe void Mark (int readlimit)
- {
- if (id_mark_I == IntPtr.Zero)
- id_mark_I = JNIEnv.GetMethodID (class_ref, "mark", "(I)V");
- try {
- JValue* __args = stackalloc JValue [1];
- __args [0] = new JValue (readlimit);
-
- if (((object) this).GetType () == ThresholdType)
- JNIEnv.CallVoidMethod (((global::Java.Lang.Object) this).Handle, id_mark_I, __args);
- else
- JNIEnv.CallNonvirtualVoidMethod (((global::Java.Lang.Object) this).Handle, ThresholdClass, JNIEnv.GetMethodID (ThresholdClass, "mark", "(I)V"), __args);
- } finally {
- }
- }
-
- static Delegate cb_markSupported;
-#pragma warning disable 0169
- static Delegate GetMarkSupportedHandler ()
- {
- if (cb_markSupported == null)
- cb_markSupported = JNINativeWrapper.CreateDelegate ((_JniMarshal_PP_Z) n_MarkSupported);
- return cb_markSupported;
- }
-
- static bool n_MarkSupported (IntPtr jnienv, IntPtr native__this)
- {
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- return __this.MarkSupported ();
- }
-#pragma warning restore 0169
-
- static IntPtr id_markSupported;
- // Metadata.xml XPath method reference: path="/api/package[@name='java.io']/class[@name='InputStream']/method[@name='markSupported' and count(parameter)=0]"
- [Register ("markSupported", "()Z", "GetMarkSupportedHandler")]
- public virtual unsafe bool MarkSupported ()
- {
- if (id_markSupported == IntPtr.Zero)
- id_markSupported = JNIEnv.GetMethodID (class_ref, "markSupported", "()Z");
- try {
-
- if (((object) this).GetType () == ThresholdType)
- return JNIEnv.CallBooleanMethod (((global::Java.Lang.Object) this).Handle, id_markSupported);
- else
- return JNIEnv.CallNonvirtualBooleanMethod (((global::Java.Lang.Object) this).Handle, ThresholdClass, JNIEnv.GetMethodID (ThresholdClass, "markSupported", "()Z"));
- } finally {
- }
- }
-
- static Delegate cb_read;
-#pragma warning disable 0169
- static Delegate GetReadHandler ()
- {
- if (cb_read == null)
- cb_read = JNINativeWrapper.CreateDelegate ((_JniMarshal_PP_I) n_Read);
- return cb_read;
- }
-
- static int n_Read (IntPtr jnienv, IntPtr native__this)
- {
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- return __this.Read ();
- }
-#pragma warning restore 0169
-
- // Metadata.xml XPath method reference: path="/api/package[@name='java.io']/class[@name='InputStream']/method[@name='read' and count(parameter)=0]"
- [Register ("read", "()I", "GetReadHandler")]
- public abstract int Read ();
-
- static Delegate cb_read_arrayB;
-#pragma warning disable 0169
- static Delegate GetRead_arrayBHandler ()
- {
- if (cb_read_arrayB == null)
- cb_read_arrayB = JNINativeWrapper.CreateDelegate ((_JniMarshal_PPL_I) n_Read_arrayB);
- return cb_read_arrayB;
- }
-
- static int n_Read_arrayB (IntPtr jnienv, IntPtr native__this, IntPtr native_buffer)
- {
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- var buffer = (byte[]) JNIEnv.GetArray (native_buffer, JniHandleOwnership.DoNotTransfer, typeof (byte));
- int __ret = __this.Read (buffer);
- if (buffer != null)
- JNIEnv.CopyArray (buffer, native_buffer);
- return __ret;
- }
-#pragma warning restore 0169
-
- static IntPtr id_read_arrayB;
- // Metadata.xml XPath method reference: path="/api/package[@name='java.io']/class[@name='InputStream']/method[@name='read' and count(parameter)=1 and parameter[1][@type='byte[]']]"
- [Register ("read", "([B)I", "GetRead_arrayBHandler")]
- public virtual unsafe int Read (byte[] buffer)
- {
- if (id_read_arrayB == IntPtr.Zero)
- id_read_arrayB = JNIEnv.GetMethodID (class_ref, "read", "([B)I");
- IntPtr native_buffer = JNIEnv.NewArray (buffer);
- try {
- JValue* __args = stackalloc JValue [1];
- __args [0] = new JValue (native_buffer);
-
- int __ret;
- if (((object) this).GetType () == ThresholdType)
- __ret = JNIEnv.CallIntMethod (((global::Java.Lang.Object) this).Handle, id_read_arrayB, __args);
- else
- __ret = JNIEnv.CallNonvirtualIntMethod (((global::Java.Lang.Object) this).Handle, ThresholdClass, JNIEnv.GetMethodID (ThresholdClass, "read", "([B)I"), __args);
- return __ret;
- } finally {
- if (buffer != null) {
- JNIEnv.CopyArray (native_buffer, buffer);
- JNIEnv.DeleteLocalRef (native_buffer);
- }
- }
- }
-
- static Delegate cb_read_arrayBII;
-#pragma warning disable 0169
- static Delegate GetRead_arrayBIIHandler ()
- {
- if (cb_read_arrayBII == null)
- cb_read_arrayBII = JNINativeWrapper.CreateDelegate ((_JniMarshal_PPLII_I) n_Read_arrayBII);
- return cb_read_arrayBII;
- }
-
- static int n_Read_arrayBII (IntPtr jnienv, IntPtr native__this, IntPtr native_buffer, int byteOffset, int byteCount)
- {
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- var buffer = (byte[]) JNIEnv.GetArray (native_buffer, JniHandleOwnership.DoNotTransfer, typeof (byte));
- int __ret = __this.Read (buffer, byteOffset, byteCount);
- if (buffer != null)
- JNIEnv.CopyArray (buffer, native_buffer);
- return __ret;
- }
-#pragma warning restore 0169
-
- static IntPtr id_read_arrayBII;
- // Metadata.xml XPath method reference: path="/api/package[@name='java.io']/class[@name='InputStream']/method[@name='read' and count(parameter)=3 and parameter[1][@type='byte[]'] and parameter[2][@type='int'] and parameter[3][@type='int']]"
- [Register ("read", "([BII)I", "GetRead_arrayBIIHandler")]
- public virtual unsafe int Read (byte[] buffer, int byteOffset, int byteCount)
- {
- if (id_read_arrayBII == IntPtr.Zero)
- id_read_arrayBII = JNIEnv.GetMethodID (class_ref, "read", "([BII)I");
- IntPtr native_buffer = JNIEnv.NewArray (buffer);
- try {
- JValue* __args = stackalloc JValue [3];
- __args [0] = new JValue (native_buffer);
- __args [1] = new JValue (byteOffset);
- __args [2] = new JValue (byteCount);
-
- int __ret;
- if (((object) this).GetType () == ThresholdType)
- __ret = JNIEnv.CallIntMethod (((global::Java.Lang.Object) this).Handle, id_read_arrayBII, __args);
- else
- __ret = JNIEnv.CallNonvirtualIntMethod (((global::Java.Lang.Object) this).Handle, ThresholdClass, JNIEnv.GetMethodID (ThresholdClass, "read", "([BII)I"), __args);
- return __ret;
- } finally {
- if (buffer != null) {
- JNIEnv.CopyArray (native_buffer, buffer);
- JNIEnv.DeleteLocalRef (native_buffer);
- }
- }
- }
-
- static Delegate cb_reset;
-#pragma warning disable 0169
- static Delegate GetResetHandler ()
- {
- if (cb_reset == null)
- cb_reset = JNINativeWrapper.CreateDelegate ((_JniMarshal_PP_V) n_Reset);
- return cb_reset;
- }
-
- static void n_Reset (IntPtr jnienv, IntPtr native__this)
- {
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- __this.Reset ();
- }
-#pragma warning restore 0169
-
- static IntPtr id_reset;
- // Metadata.xml XPath method reference: path="/api/package[@name='java.io']/class[@name='InputStream']/method[@name='reset' and count(parameter)=0]"
- [Register ("reset", "()V", "GetResetHandler")]
- public virtual unsafe void Reset ()
- {
- if (id_reset == IntPtr.Zero)
- id_reset = JNIEnv.GetMethodID (class_ref, "reset", "()V");
- try {
-
- if (((object) this).GetType () == ThresholdType)
- JNIEnv.CallVoidMethod (((global::Java.Lang.Object) this).Handle, id_reset);
- else
- JNIEnv.CallNonvirtualVoidMethod (((global::Java.Lang.Object) this).Handle, ThresholdClass, JNIEnv.GetMethodID (ThresholdClass, "reset", "()V"));
- } finally {
- }
- }
-
- static Delegate cb_skip_J;
-#pragma warning disable 0169
- static Delegate GetSkip_JHandler ()
- {
- if (cb_skip_J == null)
- cb_skip_J = JNINativeWrapper.CreateDelegate ((_JniMarshal_PPJ_J) n_Skip_J);
- return cb_skip_J;
- }
-
- static long n_Skip_J (IntPtr jnienv, IntPtr native__this, long byteCount)
- {
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- return __this.Skip (byteCount);
- }
-#pragma warning restore 0169
-
- static IntPtr id_skip_J;
- // Metadata.xml XPath method reference: path="/api/package[@name='java.io']/class[@name='InputStream']/method[@name='skip' and count(parameter)=1 and parameter[1][@type='long']]"
- [Register ("skip", "(J)J", "GetSkip_JHandler")]
- public virtual unsafe long Skip (long byteCount)
- {
- if (id_skip_J == IntPtr.Zero)
- id_skip_J = JNIEnv.GetMethodID (class_ref, "skip", "(J)J");
- try {
- JValue* __args = stackalloc JValue [1];
- __args [0] = new JValue (byteCount);
-
- if (((object) this).GetType () == ThresholdType)
- return JNIEnv.CallLongMethod (((global::Java.Lang.Object) this).Handle, id_skip_J, __args);
- else
- return JNIEnv.CallNonvirtualLongMethod (((global::Java.Lang.Object) this).Handle, ThresholdClass, JNIEnv.GetMethodID (ThresholdClass, "skip", "(J)J"), __args);
- } finally {
- }
- }
-
- }
-
- [global::Android.Runtime.Register ("java/io/InputStream", DoNotGenerateAcw=true)]
- internal partial class InputStreamInvoker : InputStream {
-
- public InputStreamInvoker (IntPtr handle, JniHandleOwnership transfer) : base (handle, transfer) {}
-
- protected override global::System.Type ThresholdType {
- get { return typeof (InputStreamInvoker); }
- }
-
- static IntPtr id_read;
- // Metadata.xml XPath method reference: path="/api/package[@name='java.io']/class[@name='InputStream']/method[@name='read' and count(parameter)=0]"
- [Register ("read", "()I", "GetReadHandler")]
- public override unsafe int Read ()
- {
- if (id_read == IntPtr.Zero)
- id_read = JNIEnv.GetMethodID (class_ref, "read", "()I");
- try {
- return JNIEnv.CallIntMethod (((global::Java.Lang.Object) this).Handle, id_read);
- } finally {
- }
- }
-
- }
-
-}
diff --git a/tests/generator-Tests/expected/Streams/Java.IO.OutputStream.cs b/tests/generator-Tests/expected/Streams/Java.IO.OutputStream.cs
deleted file mode 100644
index 84e376838..000000000
--- a/tests/generator-Tests/expected/Streams/Java.IO.OutputStream.cs
+++ /dev/null
@@ -1,268 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#nullable restore
-using System;
-using System.Collections.Generic;
-using Android.Runtime;
-
-namespace Java.IO {
-
- // Metadata.xml XPath class reference: path="/api/package[@name='java.io']/class[@name='OutputStream']"
- [global::Android.Runtime.Register ("java/io/OutputStream", DoNotGenerateAcw=true)]
- public abstract partial class OutputStream : global::Java.Lang.Object {
-
- internal static new IntPtr java_class_handle;
- internal static new IntPtr class_ref {
- get {
- return JNIEnv.FindClass ("java/io/OutputStream", ref java_class_handle);
- }
- }
-
- protected override IntPtr ThresholdClass {
- get { return class_ref; }
- }
-
- protected override global::System.Type ThresholdType {
- get { return typeof (OutputStream); }
- }
-
- protected OutputStream (IntPtr javaReference, JniHandleOwnership transfer) : base (javaReference, transfer) {}
-
- static IntPtr id_ctor;
- // Metadata.xml XPath constructor reference: path="/api/package[@name='java.io']/class[@name='OutputStream']/constructor[@name='OutputStream' and count(parameter)=0]"
- [Register (".ctor", "()V", "")]
- public unsafe OutputStream ()
- : base (IntPtr.Zero, JniHandleOwnership.DoNotTransfer)
- {
- if (((global::Java.Lang.Object) this).Handle != IntPtr.Zero)
- return;
-
- try {
- if (((object) this).GetType () != typeof (OutputStream)) {
- SetHandle (
- global::Android.Runtime.JNIEnv.StartCreateInstance (((object) this).GetType (), "()V"),
- JniHandleOwnership.TransferLocalRef);
- global::Android.Runtime.JNIEnv.FinishCreateInstance (((global::Java.Lang.Object) this).Handle, "()V");
- return;
- }
-
- if (id_ctor == IntPtr.Zero)
- id_ctor = JNIEnv.GetMethodID (class_ref, "", "()V");
- SetHandle (
- global::Android.Runtime.JNIEnv.StartCreateInstance (class_ref, id_ctor),
- JniHandleOwnership.TransferLocalRef);
- JNIEnv.FinishCreateInstance (((global::Java.Lang.Object) this).Handle, class_ref, id_ctor);
- } finally {
- }
- }
-
- static Delegate cb_close;
-#pragma warning disable 0169
- static Delegate GetCloseHandler ()
- {
- if (cb_close == null)
- cb_close = JNINativeWrapper.CreateDelegate ((_JniMarshal_PP_V) n_Close);
- return cb_close;
- }
-
- static void n_Close (IntPtr jnienv, IntPtr native__this)
- {
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- __this.Close ();
- }
-#pragma warning restore 0169
-
- static IntPtr id_close;
- // Metadata.xml XPath method reference: path="/api/package[@name='java.io']/class[@name='OutputStream']/method[@name='close' and count(parameter)=0]"
- [Register ("close", "()V", "GetCloseHandler")]
- public virtual unsafe void Close ()
- {
- if (id_close == IntPtr.Zero)
- id_close = JNIEnv.GetMethodID (class_ref, "close", "()V");
- try {
-
- if (((object) this).GetType () == ThresholdType)
- JNIEnv.CallVoidMethod (((global::Java.Lang.Object) this).Handle, id_close);
- else
- JNIEnv.CallNonvirtualVoidMethod (((global::Java.Lang.Object) this).Handle, ThresholdClass, JNIEnv.GetMethodID (ThresholdClass, "close", "()V"));
- } finally {
- }
- }
-
- static Delegate cb_flush;
-#pragma warning disable 0169
- static Delegate GetFlushHandler ()
- {
- if (cb_flush == null)
- cb_flush = JNINativeWrapper.CreateDelegate ((_JniMarshal_PP_V) n_Flush);
- return cb_flush;
- }
-
- static void n_Flush (IntPtr jnienv, IntPtr native__this)
- {
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- __this.Flush ();
- }
-#pragma warning restore 0169
-
- static IntPtr id_flush;
- // Metadata.xml XPath method reference: path="/api/package[@name='java.io']/class[@name='OutputStream']/method[@name='flush' and count(parameter)=0]"
- [Register ("flush", "()V", "GetFlushHandler")]
- public virtual unsafe void Flush ()
- {
- if (id_flush == IntPtr.Zero)
- id_flush = JNIEnv.GetMethodID (class_ref, "flush", "()V");
- try {
-
- if (((object) this).GetType () == ThresholdType)
- JNIEnv.CallVoidMethod (((global::Java.Lang.Object) this).Handle, id_flush);
- else
- JNIEnv.CallNonvirtualVoidMethod (((global::Java.Lang.Object) this).Handle, ThresholdClass, JNIEnv.GetMethodID (ThresholdClass, "flush", "()V"));
- } finally {
- }
- }
-
- static Delegate cb_write_arrayB;
-#pragma warning disable 0169
- static Delegate GetWrite_arrayBHandler ()
- {
- if (cb_write_arrayB == null)
- cb_write_arrayB = JNINativeWrapper.CreateDelegate ((_JniMarshal_PPL_V) n_Write_arrayB);
- return cb_write_arrayB;
- }
-
- static void n_Write_arrayB (IntPtr jnienv, IntPtr native__this, IntPtr native_buffer)
- {
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- var buffer = (byte[]) JNIEnv.GetArray (native_buffer, JniHandleOwnership.DoNotTransfer, typeof (byte));
- __this.Write (buffer);
- if (buffer != null)
- JNIEnv.CopyArray (buffer, native_buffer);
- }
-#pragma warning restore 0169
-
- static IntPtr id_write_arrayB;
- // Metadata.xml XPath method reference: path="/api/package[@name='java.io']/class[@name='OutputStream']/method[@name='write' and count(parameter)=1 and parameter[1][@type='byte[]']]"
- [Register ("write", "([B)V", "GetWrite_arrayBHandler")]
- public virtual unsafe void Write (byte[] buffer)
- {
- if (id_write_arrayB == IntPtr.Zero)
- id_write_arrayB = JNIEnv.GetMethodID (class_ref, "write", "([B)V");
- IntPtr native_buffer = JNIEnv.NewArray (buffer);
- try {
- JValue* __args = stackalloc JValue [1];
- __args [0] = new JValue (native_buffer);
-
- if (((object) this).GetType () == ThresholdType)
- JNIEnv.CallVoidMethod (((global::Java.Lang.Object) this).Handle, id_write_arrayB, __args);
- else
- JNIEnv.CallNonvirtualVoidMethod (((global::Java.Lang.Object) this).Handle, ThresholdClass, JNIEnv.GetMethodID (ThresholdClass, "write", "([B)V"), __args);
- } finally {
- if (buffer != null) {
- JNIEnv.CopyArray (native_buffer, buffer);
- JNIEnv.DeleteLocalRef (native_buffer);
- }
- }
- }
-
- static Delegate cb_write_arrayBII;
-#pragma warning disable 0169
- static Delegate GetWrite_arrayBIIHandler ()
- {
- if (cb_write_arrayBII == null)
- cb_write_arrayBII = JNINativeWrapper.CreateDelegate ((_JniMarshal_PPLII_V) n_Write_arrayBII);
- return cb_write_arrayBII;
- }
-
- static void n_Write_arrayBII (IntPtr jnienv, IntPtr native__this, IntPtr native_buffer, int offset, int count)
- {
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- var buffer = (byte[]) JNIEnv.GetArray (native_buffer, JniHandleOwnership.DoNotTransfer, typeof (byte));
- __this.Write (buffer, offset, count);
- if (buffer != null)
- JNIEnv.CopyArray (buffer, native_buffer);
- }
-#pragma warning restore 0169
-
- static IntPtr id_write_arrayBII;
- // Metadata.xml XPath method reference: path="/api/package[@name='java.io']/class[@name='OutputStream']/method[@name='write' and count(parameter)=3 and parameter[1][@type='byte[]'] and parameter[2][@type='int'] and parameter[3][@type='int']]"
- [Register ("write", "([BII)V", "GetWrite_arrayBIIHandler")]
- public virtual unsafe void Write (byte[] buffer, int offset, int count)
- {
- if (id_write_arrayBII == IntPtr.Zero)
- id_write_arrayBII = JNIEnv.GetMethodID (class_ref, "write", "([BII)V");
- IntPtr native_buffer = JNIEnv.NewArray (buffer);
- try {
- JValue* __args = stackalloc JValue [3];
- __args [0] = new JValue (native_buffer);
- __args [1] = new JValue (offset);
- __args [2] = new JValue (count);
-
- if (((object) this).GetType () == ThresholdType)
- JNIEnv.CallVoidMethod (((global::Java.Lang.Object) this).Handle, id_write_arrayBII, __args);
- else
- JNIEnv.CallNonvirtualVoidMethod (((global::Java.Lang.Object) this).Handle, ThresholdClass, JNIEnv.GetMethodID (ThresholdClass, "write", "([BII)V"), __args);
- } finally {
- if (buffer != null) {
- JNIEnv.CopyArray (native_buffer, buffer);
- JNIEnv.DeleteLocalRef (native_buffer);
- }
- }
- }
-
- static Delegate cb_write_I;
-#pragma warning disable 0169
- static Delegate GetWrite_IHandler ()
- {
- if (cb_write_I == null)
- cb_write_I = JNINativeWrapper.CreateDelegate ((_JniMarshal_PPI_V) n_Write_I);
- return cb_write_I;
- }
-
- static void n_Write_I (IntPtr jnienv, IntPtr native__this, int oneByte)
- {
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- __this.Write (oneByte);
- }
-#pragma warning restore 0169
-
- // Metadata.xml XPath method reference: path="/api/package[@name='java.io']/class[@name='OutputStream']/method[@name='write' and count(parameter)=1 and parameter[1][@type='int']]"
- [Register ("write", "(I)V", "GetWrite_IHandler")]
- public abstract void Write (int oneByte);
-
- }
-
- [global::Android.Runtime.Register ("java/io/OutputStream", DoNotGenerateAcw=true)]
- internal partial class OutputStreamInvoker : OutputStream {
-
- public OutputStreamInvoker (IntPtr handle, JniHandleOwnership transfer) : base (handle, transfer) {}
-
- protected override global::System.Type ThresholdType {
- get { return typeof (OutputStreamInvoker); }
- }
-
- static IntPtr id_write_I;
- // Metadata.xml XPath method reference: path="/api/package[@name='java.io']/class[@name='OutputStream']/method[@name='write' and count(parameter)=1 and parameter[1][@type='int']]"
- [Register ("write", "(I)V", "GetWrite_IHandler")]
- public override unsafe void Write (int oneByte)
- {
- if (id_write_I == IntPtr.Zero)
- id_write_I = JNIEnv.GetMethodID (class_ref, "write", "(I)V");
- try {
- JValue* __args = stackalloc JValue [1];
- __args [0] = new JValue (oneByte);
- JNIEnv.CallVoidMethod (((global::Java.Lang.Object) this).Handle, id_write_I, __args);
- } finally {
- }
- }
-
- }
-
-}
diff --git a/tests/generator-Tests/expected/Streams/Java.Lang.Throwable.cs b/tests/generator-Tests/expected/Streams/Java.Lang.Throwable.cs
deleted file mode 100644
index f057baf0a..000000000
--- a/tests/generator-Tests/expected/Streams/Java.Lang.Throwable.cs
+++ /dev/null
@@ -1,63 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#nullable restore
-using System;
-using System.Collections.Generic;
-using Android.Runtime;
-
-namespace Java.Lang {
-
- // Metadata.xml XPath class reference: path="/api/package[@name='java.lang']/class[@name='Throwable']"
- [global::Android.Runtime.Register ("java/lang/Throwable", DoNotGenerateAcw=true)]
- public partial class Throwable {
-
- internal static IntPtr java_class_handle;
- internal static IntPtr class_ref {
- get {
- return JNIEnv.FindClass ("java/lang/Throwable", ref java_class_handle);
- }
- }
-
- static Delegate cb_getMessage;
-#pragma warning disable 0169
- static Delegate GetGetMessageHandler ()
- {
- if (cb_getMessage == null)
- cb_getMessage = JNINativeWrapper.CreateDelegate ((_JniMarshal_PP_L) n_GetMessage);
- return cb_getMessage;
- }
-
- static IntPtr n_GetMessage (IntPtr jnienv, IntPtr native__this)
- {
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- return JNIEnv.NewString (__this.Message);
- }
-#pragma warning restore 0169
-
- static IntPtr id_getMessage;
- public new virtual unsafe string Message {
- // Metadata.xml XPath method reference: path="/api/package[@name='java.lang']/class[@name='Throwable']/method[@name='getMessage' and count(parameter)=0]"
- [Register ("getMessage", "()Ljava/lang/String;", "GetGetMessageHandler")]
- get {
- if (id_getMessage == IntPtr.Zero)
- id_getMessage = JNIEnv.GetMethodID (class_ref, "getMessage", "()Ljava/lang/String;");
- try {
-
- if (((object) this).GetType () == ThresholdType)
- return JNIEnv.GetString (JNIEnv.CallObjectMethod (((global::Java.Lang.Throwable) this).Handle, id_getMessage), JniHandleOwnership.TransferLocalRef);
- else
- return JNIEnv.GetString (JNIEnv.CallNonvirtualObjectMethod (((global::Java.Lang.Throwable) this).Handle, ThresholdClass, JNIEnv.GetMethodID (ThresholdClass, "getMessage", "()Ljava/lang/String;")), JniHandleOwnership.TransferLocalRef);
- } finally {
- }
- }
- }
-
- }
-}
diff --git a/tests/generator-Tests/expected/Streams/Mono.Android.projitems b/tests/generator-Tests/expected/Streams/Mono.Android.projitems
deleted file mode 100644
index 3d19ddac3..000000000
--- a/tests/generator-Tests/expected/Streams/Mono.Android.projitems
+++ /dev/null
@@ -1,19 +0,0 @@
-
-
-
- $(DefineConstants);ANDROID_1;ANDROID_2;ANDROID_3;ANDROID_4
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/tests/generator-Tests/expected/TestInterface/ClassWithoutNamespace.cs b/tests/generator-Tests/expected/TestInterface/ClassWithoutNamespace.cs
deleted file mode 100644
index 3c095cabf..000000000
--- a/tests/generator-Tests/expected/TestInterface/ClassWithoutNamespace.cs
+++ /dev/null
@@ -1,109 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#nullable restore
-using System;
-using System.Collections.Generic;
-using Android.Runtime;
-
-// Metadata.xml XPath class reference: path="/api/package[@name='']/class[@name='ClassWithoutNamespace']"
-[global::Android.Runtime.Register ("ClassWithoutNamespace", DoNotGenerateAcw=true)]
-public abstract partial class ClassWithoutNamespace : global::Java.Lang.Object, IInterfaceWithoutNamespace {
-
- internal static new IntPtr java_class_handle;
- internal static new IntPtr class_ref {
- get {
- return JNIEnv.FindClass ("ClassWithoutNamespace", ref java_class_handle);
- }
- }
-
- protected override IntPtr ThresholdClass {
- get { return class_ref; }
- }
-
- protected override global::System.Type ThresholdType {
- get { return typeof (ClassWithoutNamespace); }
- }
-
- protected ClassWithoutNamespace (IntPtr javaReference, JniHandleOwnership transfer) : base (javaReference, transfer) {}
-
- static IntPtr id_ctor;
- // Metadata.xml XPath constructor reference: path="/api/package[@name='']/class[@name='ClassWithoutNamespace']/constructor[@name='ClassWithoutNamespace' and count(parameter)=0]"
- [Register (".ctor", "()V", "")]
- public unsafe ClassWithoutNamespace ()
- : base (IntPtr.Zero, JniHandleOwnership.DoNotTransfer)
- {
- if (((global::Java.Lang.Object) this).Handle != IntPtr.Zero)
- return;
-
- try {
- if (((object) this).GetType () != typeof (ClassWithoutNamespace)) {
- SetHandle (
- global::Android.Runtime.JNIEnv.StartCreateInstance (((object) this).GetType (), "()V"),
- JniHandleOwnership.TransferLocalRef);
- global::Android.Runtime.JNIEnv.FinishCreateInstance (((global::Java.Lang.Object) this).Handle, "()V");
- return;
- }
-
- if (id_ctor == IntPtr.Zero)
- id_ctor = JNIEnv.GetMethodID (class_ref, "", "()V");
- SetHandle (
- global::Android.Runtime.JNIEnv.StartCreateInstance (class_ref, id_ctor),
- JniHandleOwnership.TransferLocalRef);
- JNIEnv.FinishCreateInstance (((global::Java.Lang.Object) this).Handle, class_ref, id_ctor);
- } finally {
- }
- }
-
- static Delegate cb_Foo;
-#pragma warning disable 0169
- static Delegate GetFooHandler ()
- {
- if (cb_Foo == null)
- cb_Foo = JNINativeWrapper.CreateDelegate ((_JniMarshal_PP_V) n_Foo);
- return cb_Foo;
- }
-
- static void n_Foo (IntPtr jnienv, IntPtr native__this)
- {
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- __this.Foo ();
- }
-#pragma warning restore 0169
-
- // Metadata.xml XPath method reference: path="/api/package[@name='']/interface[@name='InterfaceWithoutNamespace']/method[@name='Foo' and count(parameter)=0]"
- [Register ("Foo", "()V", "GetFooHandler")]
- public abstract void Foo ();
-
-}
-
-[global::Android.Runtime.Register ("ClassWithoutNamespace", DoNotGenerateAcw=true)]
-internal partial class ClassWithoutNamespaceInvoker : ClassWithoutNamespace {
-
- public ClassWithoutNamespaceInvoker (IntPtr handle, JniHandleOwnership transfer) : base (handle, transfer) {}
-
- protected override global::System.Type ThresholdType {
- get { return typeof (ClassWithoutNamespaceInvoker); }
- }
-
- static IntPtr id_Foo;
- // Metadata.xml XPath method reference: path="/api/package[@name='']/interface[@name='InterfaceWithoutNamespace']/method[@name='Foo' and count(parameter)=0]"
- [Register ("Foo", "()V", "GetFooHandler")]
- public override unsafe void Foo ()
- {
- if (id_Foo == IntPtr.Zero)
- id_Foo = JNIEnv.GetMethodID (class_ref, "Foo", "()V");
- try {
- JNIEnv.CallVoidMethod (((global::Java.Lang.Object) this).Handle, id_Foo);
- } finally {
- }
- }
-
-}
-
diff --git a/tests/generator-Tests/expected/TestInterface/IInterfaceWithoutNamespace.cs b/tests/generator-Tests/expected/TestInterface/IInterfaceWithoutNamespace.cs
deleted file mode 100644
index 612fe57d7..000000000
--- a/tests/generator-Tests/expected/TestInterface/IInterfaceWithoutNamespace.cs
+++ /dev/null
@@ -1,83 +0,0 @@
-using System;
-using System.Collections.Generic;
-using Android.Runtime;
-
-// Metadata.xml XPath interface reference: path="/api/package[@name='']/interface[@name='InterfaceWithoutNamespace']"
-[Register ("InterfaceWithoutNamespace", "", "IInterfaceWithoutNamespaceInvoker")]
-public partial interface IInterfaceWithoutNamespace : IJavaObject {
-
- // Metadata.xml XPath method reference: path="/api/package[@name='']/interface[@name='InterfaceWithoutNamespace']/method[@name='Foo' and count(parameter)=0]"
- [Register ("Foo", "()V", "GetFooHandler:IInterfaceWithoutNamespaceInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
- void Foo ();
-
-}
-
-[global::Android.Runtime.Register ("InterfaceWithoutNamespace", DoNotGenerateAcw=true)]
-internal partial class IInterfaceWithoutNamespaceInvoker : global::Java.Lang.Object, IInterfaceWithoutNamespace {
-
- static IntPtr java_class_ref = JNIEnv.FindClass ("InterfaceWithoutNamespace");
-
- protected override IntPtr ThresholdClass {
- get { return class_ref; }
- }
-
- protected override global::System.Type ThresholdType {
- get { return typeof (IInterfaceWithoutNamespaceInvoker); }
- }
-
- new IntPtr class_ref;
-
- public static IInterfaceWithoutNamespace GetObject (IntPtr handle, JniHandleOwnership transfer)
- {
- return global::Java.Lang.Object.GetObject (handle, transfer);
- }
-
- static IntPtr Validate (IntPtr handle)
- {
- if (!JNIEnv.IsInstanceOf (handle, java_class_ref))
- throw new InvalidCastException (string.Format ("Unable to convert instance of type '{0}' to type '{1}'.",
- JNIEnv.GetClassNameFromInstance (handle), "InterfaceWithoutNamespace"));
- return handle;
- }
-
- protected override void Dispose (bool disposing)
- {
- if (this.class_ref != IntPtr.Zero)
- JNIEnv.DeleteGlobalRef (this.class_ref);
- this.class_ref = IntPtr.Zero;
- base.Dispose (disposing);
- }
-
- public IInterfaceWithoutNamespaceInvoker (IntPtr handle, JniHandleOwnership transfer) : base (Validate (handle), transfer)
- {
- IntPtr local_ref = JNIEnv.GetObjectClass (((global::Java.Lang.Object) this).Handle);
- this.class_ref = JNIEnv.NewGlobalRef (local_ref);
- JNIEnv.DeleteLocalRef (local_ref);
- }
-
- static Delegate cb_Foo;
-#pragma warning disable 0169
- static Delegate GetFooHandler ()
- {
- if (cb_Foo == null)
- cb_Foo = JNINativeWrapper.CreateDelegate ((_JniMarshal_PP_V) n_Foo);
- return cb_Foo;
- }
-
- static void n_Foo (IntPtr jnienv, IntPtr native__this)
- {
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- __this.Foo ();
- }
-#pragma warning restore 0169
-
- IntPtr id_Foo;
- public unsafe void Foo ()
- {
- if (id_Foo == IntPtr.Zero)
- id_Foo = JNIEnv.GetMethodID (class_ref, "Foo", "()V");
- JNIEnv.CallVoidMethod (((global::Java.Lang.Object) this).Handle, id_Foo);
- }
-
-}
-
diff --git a/tests/generator-Tests/expected/TestInterface/Mono.Android.projitems b/tests/generator-Tests/expected/TestInterface/Mono.Android.projitems
deleted file mode 100644
index 5a3e90231..000000000
--- a/tests/generator-Tests/expected/TestInterface/Mono.Android.projitems
+++ /dev/null
@@ -1,25 +0,0 @@
-
-
-
- $(DefineConstants);ANDROID_1;ANDROID_2;ANDROID_3;ANDROID_4
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/tests/generator-Tests/expected/TestInterface/Test.ME.GenericImplementation.cs b/tests/generator-Tests/expected/TestInterface/Test.ME.GenericImplementation.cs
deleted file mode 100644
index dcd3d996e..000000000
--- a/tests/generator-Tests/expected/TestInterface/Test.ME.GenericImplementation.cs
+++ /dev/null
@@ -1,116 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#nullable restore
-using System;
-using System.Collections.Generic;
-using Android.Runtime;
-
-namespace Test.ME {
-
- // Metadata.xml XPath class reference: path="/api/package[@name='test.me']/class[@name='GenericImplementation']"
- [global::Android.Runtime.Register ("test/me/GenericImplementation", DoNotGenerateAcw=true)]
- public partial class GenericImplementation : global::Java.Lang.Object, global::Test.ME.IGenericInterface {
-
- internal static new IntPtr java_class_handle;
- internal static new IntPtr class_ref {
- get {
- return JNIEnv.FindClass ("test/me/GenericImplementation", ref java_class_handle);
- }
- }
-
- protected override IntPtr ThresholdClass {
- get { return class_ref; }
- }
-
- protected override global::System.Type ThresholdType {
- get { return typeof (GenericImplementation); }
- }
-
- protected GenericImplementation (IntPtr javaReference, JniHandleOwnership transfer) : base (javaReference, transfer) {}
-
- static IntPtr id_ctor;
- // Metadata.xml XPath constructor reference: path="/api/package[@name='test.me']/class[@name='GenericImplementation']/constructor[@name='GenericImplementation' and count(parameter)=0]"
- [Register (".ctor", "()V", "")]
- public unsafe GenericImplementation ()
- : base (IntPtr.Zero, JniHandleOwnership.DoNotTransfer)
- {
- if (((global::Java.Lang.Object) this).Handle != IntPtr.Zero)
- return;
-
- try {
- if (((object) this).GetType () != typeof (GenericImplementation)) {
- SetHandle (
- global::Android.Runtime.JNIEnv.StartCreateInstance (((object) this).GetType (), "()V"),
- JniHandleOwnership.TransferLocalRef);
- global::Android.Runtime.JNIEnv.FinishCreateInstance (((global::Java.Lang.Object) this).Handle, "()V");
- return;
- }
-
- if (id_ctor == IntPtr.Zero)
- id_ctor = JNIEnv.GetMethodID (class_ref, "", "()V");
- SetHandle (
- global::Android.Runtime.JNIEnv.StartCreateInstance (class_ref, id_ctor),
- JniHandleOwnership.TransferLocalRef);
- JNIEnv.FinishCreateInstance (((global::Java.Lang.Object) this).Handle, class_ref, id_ctor);
- } finally {
- }
- }
-
- static Delegate cb_SetObject_arrayB;
-#pragma warning disable 0169
- static Delegate GetSetObject_arrayBHandler ()
- {
- if (cb_SetObject_arrayB == null)
- cb_SetObject_arrayB = JNINativeWrapper.CreateDelegate ((_JniMarshal_PPL_V) n_SetObject_arrayB);
- return cb_SetObject_arrayB;
- }
-
- static void n_SetObject_arrayB (IntPtr jnienv, IntPtr native__this, IntPtr native_value)
- {
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- var value = (byte[]) JNIEnv.GetArray (native_value, JniHandleOwnership.DoNotTransfer, typeof (byte));
- __this.SetObject (value);
- if (value != null)
- JNIEnv.CopyArray (value, native_value);
- }
-#pragma warning restore 0169
-
- static IntPtr id_SetObject_arrayB;
- // Metadata.xml XPath method reference: path="/api/package[@name='test.me']/class[@name='GenericImplementation']/method[@name='SetObject' and count(parameter)=1 and parameter[1][@type='byte[]']]"
- [Register ("SetObject", "([B)V", "GetSetObject_arrayBHandler")]
- public virtual unsafe void SetObject (byte[] value)
- {
- if (id_SetObject_arrayB == IntPtr.Zero)
- id_SetObject_arrayB = JNIEnv.GetMethodID (class_ref, "SetObject", "([B)V");
- IntPtr native_value = JNIEnv.NewArray (value);
- try {
- JValue* __args = stackalloc JValue [1];
- __args [0] = new JValue (native_value);
-
- if (((object) this).GetType () == ThresholdType)
- JNIEnv.CallVoidMethod (((global::Java.Lang.Object) this).Handle, id_SetObject_arrayB, __args);
- else
- JNIEnv.CallNonvirtualVoidMethod (((global::Java.Lang.Object) this).Handle, ThresholdClass, JNIEnv.GetMethodID (ThresholdClass, "SetObject", "([B)V"), __args);
- } finally {
- if (value != null) {
- JNIEnv.CopyArray (native_value, value);
- JNIEnv.DeleteLocalRef (native_value);
- }
- }
- }
-
- // This method is explicitly implemented as a member of an instantiated Test.ME.IGenericInterface
- void global::Test.ME.IGenericInterface.SetObject (global::Java.Lang.Object value)
- {
- SetObject (value.ToArray ());
- }
-
- }
-}
diff --git a/tests/generator-Tests/expected/TestInterface/Test.ME.GenericObjectPropertyImplementation.cs b/tests/generator-Tests/expected/TestInterface/Test.ME.GenericObjectPropertyImplementation.cs
deleted file mode 100644
index 7573c8b90..000000000
--- a/tests/generator-Tests/expected/TestInterface/Test.ME.GenericObjectPropertyImplementation.cs
+++ /dev/null
@@ -1,135 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#nullable restore
-using System;
-using System.Collections.Generic;
-using Android.Runtime;
-
-namespace Test.ME {
-
- // Metadata.xml XPath class reference: path="/api/package[@name='test.me']/class[@name='GenericObjectPropertyImplementation']"
- [global::Android.Runtime.Register ("test/me/GenericObjectPropertyImplementation", DoNotGenerateAcw=true)]
- public partial class GenericObjectPropertyImplementation : global::Java.Lang.Object, global::Test.ME.IGenericPropertyInterface {
-
- internal static new IntPtr java_class_handle;
- internal static new IntPtr class_ref {
- get {
- return JNIEnv.FindClass ("test/me/GenericObjectPropertyImplementation", ref java_class_handle);
- }
- }
-
- protected override IntPtr ThresholdClass {
- get { return class_ref; }
- }
-
- protected override global::System.Type ThresholdType {
- get { return typeof (GenericObjectPropertyImplementation); }
- }
-
- protected GenericObjectPropertyImplementation (IntPtr javaReference, JniHandleOwnership transfer) : base (javaReference, transfer) {}
-
- static IntPtr id_ctor;
- // Metadata.xml XPath constructor reference: path="/api/package[@name='test.me']/class[@name='GenericObjectPropertyImplementation']/constructor[@name='GenericObjectPropertyImplementation' and count(parameter)=0]"
- [Register (".ctor", "()V", "")]
- public unsafe GenericObjectPropertyImplementation ()
- : base (IntPtr.Zero, JniHandleOwnership.DoNotTransfer)
- {
- if (((global::Java.Lang.Object) this).Handle != IntPtr.Zero)
- return;
-
- try {
- if (((object) this).GetType () != typeof (GenericObjectPropertyImplementation)) {
- SetHandle (
- global::Android.Runtime.JNIEnv.StartCreateInstance (((object) this).GetType (), "()V"),
- JniHandleOwnership.TransferLocalRef);
- global::Android.Runtime.JNIEnv.FinishCreateInstance (((global::Java.Lang.Object) this).Handle, "()V");
- return;
- }
-
- if (id_ctor == IntPtr.Zero)
- id_ctor = JNIEnv.GetMethodID (class_ref, "", "()V");
- SetHandle (
- global::Android.Runtime.JNIEnv.StartCreateInstance (class_ref, id_ctor),
- JniHandleOwnership.TransferLocalRef);
- JNIEnv.FinishCreateInstance (((global::Java.Lang.Object) this).Handle, class_ref, id_ctor);
- } finally {
- }
- }
-
- static Delegate cb_getObject;
-#pragma warning disable 0169
- static Delegate GetGetObjectHandler ()
- {
- if (cb_getObject == null)
- cb_getObject = JNINativeWrapper.CreateDelegate ((_JniMarshal_PP_L) n_GetObject);
- return cb_getObject;
- }
-
- static IntPtr n_GetObject (IntPtr jnienv, IntPtr native__this)
- {
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- return JNIEnv.ToLocalJniHandle (__this.Object);
- }
-#pragma warning restore 0169
-
- static Delegate cb_setObject_Ljava_lang_Object_;
-#pragma warning disable 0169
- static Delegate GetSetObject_Ljava_lang_Object_Handler ()
- {
- if (cb_setObject_Ljava_lang_Object_ == null)
- cb_setObject_Ljava_lang_Object_ = JNINativeWrapper.CreateDelegate ((_JniMarshal_PPL_V) n_SetObject_Ljava_lang_Object_);
- return cb_setObject_Ljava_lang_Object_;
- }
-
- static void n_SetObject_Ljava_lang_Object_ (IntPtr jnienv, IntPtr native__this, IntPtr native_value)
- {
- var __this = global::Java.Lang.Object.GetObject (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
- var value = global::Java.Lang.Object.GetObject