diff --git a/tests/generator-Tests/expected.ji/AccessModifiers/Java.Lang.Object.cs b/tests/generator-Tests/expected.ji/AccessModifiers/Java.Lang.Object.cs
index 86d0bd17b..47f7f2661 100644
--- a/tests/generator-Tests/expected.ji/AccessModifiers/Java.Lang.Object.cs
+++ b/tests/generator-Tests/expected.ji/AccessModifiers/Java.Lang.Object.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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 Java.Interop;
diff --git a/tests/generator-Tests/expected.ji/AccessModifiers/Xamarin.Test.BasePublicClass.cs b/tests/generator-Tests/expected.ji/AccessModifiers/Xamarin.Test.BasePublicClass.cs
index e3df45939..e7622dd0d 100644
--- a/tests/generator-Tests/expected.ji/AccessModifiers/Xamarin.Test.BasePublicClass.cs
+++ b/tests/generator-Tests/expected.ji/AccessModifiers/Xamarin.Test.BasePublicClass.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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 Java.Interop;
diff --git a/tests/generator-Tests/expected.ji/AccessModifiers/Xamarin.Test.ExtendPublicClass.cs b/tests/generator-Tests/expected.ji/AccessModifiers/Xamarin.Test.ExtendPublicClass.cs
index 22c13a9e7..a97794658 100644
--- a/tests/generator-Tests/expected.ji/AccessModifiers/Xamarin.Test.ExtendPublicClass.cs
+++ b/tests/generator-Tests/expected.ji/AccessModifiers/Xamarin.Test.ExtendPublicClass.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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 Java.Interop;
diff --git a/tests/generator-Tests/expected.ji/AccessModifiers/Xamarin.Test.PublicClass.cs b/tests/generator-Tests/expected.ji/AccessModifiers/Xamarin.Test.PublicClass.cs
index cdeabf00a..59729bf4f 100644
--- a/tests/generator-Tests/expected.ji/AccessModifiers/Xamarin.Test.PublicClass.cs
+++ b/tests/generator-Tests/expected.ji/AccessModifiers/Xamarin.Test.PublicClass.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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 Java.Interop;
diff --git a/tests/generator-Tests/expected.ji/AccessModifiers/Xamarin.Test.PublicFinalClass.cs b/tests/generator-Tests/expected.ji/AccessModifiers/Xamarin.Test.PublicFinalClass.cs
index 6e6e15b7e..a19d6b224 100644
--- a/tests/generator-Tests/expected.ji/AccessModifiers/Xamarin.Test.PublicFinalClass.cs
+++ b/tests/generator-Tests/expected.ji/AccessModifiers/Xamarin.Test.PublicFinalClass.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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 Java.Interop;
diff --git a/tests/generator-Tests/expected.ji/AccessModifiers/Xamarin.Test.TestClass.cs b/tests/generator-Tests/expected.ji/AccessModifiers/Xamarin.Test.TestClass.cs
index d7dee56d3..01cef9a97 100644
--- a/tests/generator-Tests/expected.ji/AccessModifiers/Xamarin.Test.TestClass.cs
+++ b/tests/generator-Tests/expected.ji/AccessModifiers/Xamarin.Test.TestClass.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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 Java.Interop;
diff --git a/tests/generator-Tests/expected.ji/Android.Graphics.Color/Java.Lang.Object.cs b/tests/generator-Tests/expected.ji/Android.Graphics.Color/Java.Lang.Object.cs
index 86d0bd17b..47f7f2661 100644
--- a/tests/generator-Tests/expected.ji/Android.Graphics.Color/Java.Lang.Object.cs
+++ b/tests/generator-Tests/expected.ji/Android.Graphics.Color/Java.Lang.Object.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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 Java.Interop;
diff --git a/tests/generator-Tests/expected.ji/Android.Graphics.Color/Xamarin.Test.SomeObject.cs b/tests/generator-Tests/expected.ji/Android.Graphics.Color/Xamarin.Test.SomeObject.cs
index 014aae545..f51c9cf0b 100644
--- a/tests/generator-Tests/expected.ji/Android.Graphics.Color/Xamarin.Test.SomeObject.cs
+++ b/tests/generator-Tests/expected.ji/Android.Graphics.Color/Xamarin.Test.SomeObject.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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 Java.Interop;
diff --git a/tests/generator-Tests/expected.ji/Arrays/Java.Lang.Object.cs b/tests/generator-Tests/expected.ji/Arrays/Java.Lang.Object.cs
index 86d0bd17b..47f7f2661 100644
--- a/tests/generator-Tests/expected.ji/Arrays/Java.Lang.Object.cs
+++ b/tests/generator-Tests/expected.ji/Arrays/Java.Lang.Object.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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 Java.Interop;
diff --git a/tests/generator-Tests/expected.ji/Arrays/Xamarin.Test.SomeObject.cs b/tests/generator-Tests/expected.ji/Arrays/Xamarin.Test.SomeObject.cs
index 3bbffcffd..8ee4768af 100644
--- a/tests/generator-Tests/expected.ji/Arrays/Xamarin.Test.SomeObject.cs
+++ b/tests/generator-Tests/expected.ji/Arrays/Xamarin.Test.SomeObject.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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 Java.Interop;
diff --git a/tests/generator-Tests/expected.ji/CSharpKeywords/Java.Lang.Object.cs b/tests/generator-Tests/expected.ji/CSharpKeywords/Java.Lang.Object.cs
index 86d0bd17b..47f7f2661 100644
--- a/tests/generator-Tests/expected.ji/CSharpKeywords/Java.Lang.Object.cs
+++ b/tests/generator-Tests/expected.ji/CSharpKeywords/Java.Lang.Object.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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 Java.Interop;
diff --git a/tests/generator-Tests/expected.ji/CSharpKeywords/Java.Lang.Throwable.cs b/tests/generator-Tests/expected.ji/CSharpKeywords/Java.Lang.Throwable.cs
index 819a48c13..f627b04b9 100644
--- a/tests/generator-Tests/expected.ji/CSharpKeywords/Java.Lang.Throwable.cs
+++ b/tests/generator-Tests/expected.ji/CSharpKeywords/Java.Lang.Throwable.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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 Java.Interop;
diff --git a/tests/generator-Tests/expected.ji/CSharpKeywords/Xamarin.Test.CSharpKeywords.cs b/tests/generator-Tests/expected.ji/CSharpKeywords/Xamarin.Test.CSharpKeywords.cs
index 8a582c4fa..a0ec376a3 100644
--- a/tests/generator-Tests/expected.ji/CSharpKeywords/Xamarin.Test.CSharpKeywords.cs
+++ b/tests/generator-Tests/expected.ji/CSharpKeywords/Xamarin.Test.CSharpKeywords.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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 Java.Interop;
diff --git a/tests/generator-Tests/expected.ji/Constructors/Java.Lang.Object.cs b/tests/generator-Tests/expected.ji/Constructors/Java.Lang.Object.cs
index 86d0bd17b..47f7f2661 100644
--- a/tests/generator-Tests/expected.ji/Constructors/Java.Lang.Object.cs
+++ b/tests/generator-Tests/expected.ji/Constructors/Java.Lang.Object.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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 Java.Interop;
diff --git a/tests/generator-Tests/expected.ji/Constructors/Xamarin.Test.SomeObject.cs b/tests/generator-Tests/expected.ji/Constructors/Xamarin.Test.SomeObject.cs
index 114b04309..ca6ea1511 100644
--- a/tests/generator-Tests/expected.ji/Constructors/Xamarin.Test.SomeObject.cs
+++ b/tests/generator-Tests/expected.ji/Constructors/Xamarin.Test.SomeObject.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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 Java.Interop;
diff --git a/tests/generator-Tests/expected.ji/Constructors/Xamarin.Test.SomeObject2.cs b/tests/generator-Tests/expected.ji/Constructors/Xamarin.Test.SomeObject2.cs
index 61fde3751..48cea1b28 100644
--- a/tests/generator-Tests/expected.ji/Constructors/Xamarin.Test.SomeObject2.cs
+++ b/tests/generator-Tests/expected.ji/Constructors/Xamarin.Test.SomeObject2.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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 Java.Interop;
diff --git a/tests/generator-Tests/expected.ji/Core_ClassParse/Java.Lang.Object.cs b/tests/generator-Tests/expected.ji/Core_ClassParse/Java.Lang.Object.cs
index 86d0bd17b..47f7f2661 100644
--- a/tests/generator-Tests/expected.ji/Core_ClassParse/Java.Lang.Object.cs
+++ b/tests/generator-Tests/expected.ji/Core_ClassParse/Java.Lang.Object.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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 Java.Interop;
diff --git a/tests/generator-Tests/expected.ji/Core_ClassParse/Java.Lang.String.cs b/tests/generator-Tests/expected.ji/Core_ClassParse/Java.Lang.String.cs
index f0b531609..02a9a305e 100644
--- a/tests/generator-Tests/expected.ji/Core_ClassParse/Java.Lang.String.cs
+++ b/tests/generator-Tests/expected.ji/Core_ClassParse/Java.Lang.String.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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 Java.Interop;
diff --git a/tests/generator-Tests/expected.ji/Core_ClassParse/Xamarin.Google.Composable.MyClass.cs b/tests/generator-Tests/expected.ji/Core_ClassParse/Xamarin.Google.Composable.MyClass.cs
index 06d93f40b..d32fef53f 100644
--- a/tests/generator-Tests/expected.ji/Core_ClassParse/Xamarin.Google.Composable.MyClass.cs
+++ b/tests/generator-Tests/expected.ji/Core_ClassParse/Xamarin.Google.Composable.MyClass.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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 Java.Interop;
diff --git a/tests/generator-Tests/expected.ji/Core_ClassParse/Xamarin.Test.Invalidnames.In.cs b/tests/generator-Tests/expected.ji/Core_ClassParse/Xamarin.Test.Invalidnames.In.cs
index 32708d624..6a75bf7b5 100644
--- a/tests/generator-Tests/expected.ji/Core_ClassParse/Xamarin.Test.Invalidnames.In.cs
+++ b/tests/generator-Tests/expected.ji/Core_ClassParse/Xamarin.Test.Invalidnames.In.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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 Java.Interop;
diff --git a/tests/generator-Tests/expected.ji/Core_ClassParse/Xamarin.Test.Invalidnames.InvalidNameMembers.cs b/tests/generator-Tests/expected.ji/Core_ClassParse/Xamarin.Test.Invalidnames.InvalidNameMembers.cs
index 4d7823993..ec5ff2cdb 100644
--- a/tests/generator-Tests/expected.ji/Core_ClassParse/Xamarin.Test.Invalidnames.InvalidNameMembers.cs
+++ b/tests/generator-Tests/expected.ji/Core_ClassParse/Xamarin.Test.Invalidnames.InvalidNameMembers.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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 Java.Interop;
diff --git a/tests/generator-Tests/expected.ji/InterfaceMethodsConflict/Java.Lang.Object.cs b/tests/generator-Tests/expected.ji/InterfaceMethodsConflict/Java.Lang.Object.cs
index 86d0bd17b..47f7f2661 100644
--- a/tests/generator-Tests/expected.ji/InterfaceMethodsConflict/Java.Lang.Object.cs
+++ b/tests/generator-Tests/expected.ji/InterfaceMethodsConflict/Java.Lang.Object.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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 Java.Interop;
diff --git a/tests/generator-Tests/expected.ji/InterfaceMethodsConflict/Xamarin.Test.SomeObject.cs b/tests/generator-Tests/expected.ji/InterfaceMethodsConflict/Xamarin.Test.SomeObject.cs
index 433f0a4b4..d28401fff 100644
--- a/tests/generator-Tests/expected.ji/InterfaceMethodsConflict/Xamarin.Test.SomeObject.cs
+++ b/tests/generator-Tests/expected.ji/InterfaceMethodsConflict/Xamarin.Test.SomeObject.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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 Java.Interop;
diff --git a/tests/generator-Tests/expected.ji/InterfaceMethodsConflict/Xamarin.Test.SomeObject2.cs b/tests/generator-Tests/expected.ji/InterfaceMethodsConflict/Xamarin.Test.SomeObject2.cs
index 1e22265d6..af3a4fd23 100644
--- a/tests/generator-Tests/expected.ji/InterfaceMethodsConflict/Xamarin.Test.SomeObject2.cs
+++ b/tests/generator-Tests/expected.ji/InterfaceMethodsConflict/Xamarin.Test.SomeObject2.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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 Java.Interop;
diff --git a/tests/generator-Tests/expected.ji/NonStaticFields/Java.Lang.Object.cs b/tests/generator-Tests/expected.ji/NonStaticFields/Java.Lang.Object.cs
index 86d0bd17b..47f7f2661 100644
--- a/tests/generator-Tests/expected.ji/NonStaticFields/Java.Lang.Object.cs
+++ b/tests/generator-Tests/expected.ji/NonStaticFields/Java.Lang.Object.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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 Java.Interop;
diff --git a/tests/generator-Tests/expected.ji/NonStaticFields/Xamarin.Test.SomeObject.cs b/tests/generator-Tests/expected.ji/NonStaticFields/Xamarin.Test.SomeObject.cs
index 27d1a3c84..e82874ff1 100644
--- a/tests/generator-Tests/expected.ji/NonStaticFields/Xamarin.Test.SomeObject.cs
+++ b/tests/generator-Tests/expected.ji/NonStaticFields/Xamarin.Test.SomeObject.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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 Java.Interop;
diff --git a/tests/generator-Tests/expected.ji/NormalProperties/Java.Lang.Object.cs b/tests/generator-Tests/expected.ji/NormalProperties/Java.Lang.Object.cs
index 86d0bd17b..47f7f2661 100644
--- a/tests/generator-Tests/expected.ji/NormalProperties/Java.Lang.Object.cs
+++ b/tests/generator-Tests/expected.ji/NormalProperties/Java.Lang.Object.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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 Java.Interop;
diff --git a/tests/generator-Tests/expected.ji/NormalProperties/Xamarin.Test.SomeObject.cs b/tests/generator-Tests/expected.ji/NormalProperties/Xamarin.Test.SomeObject.cs
index 1805d0e74..56d76fd45 100644
--- a/tests/generator-Tests/expected.ji/NormalProperties/Xamarin.Test.SomeObject.cs
+++ b/tests/generator-Tests/expected.ji/NormalProperties/Xamarin.Test.SomeObject.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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 Java.Interop;
diff --git a/tests/generator-Tests/expected.ji/StaticFields/Java.Lang.Object.cs b/tests/generator-Tests/expected.ji/StaticFields/Java.Lang.Object.cs
index 86d0bd17b..47f7f2661 100644
--- a/tests/generator-Tests/expected.ji/StaticFields/Java.Lang.Object.cs
+++ b/tests/generator-Tests/expected.ji/StaticFields/Java.Lang.Object.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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 Java.Interop;
diff --git a/tests/generator-Tests/expected.ji/StaticFields/Xamarin.Test.SomeObject.cs b/tests/generator-Tests/expected.ji/StaticFields/Xamarin.Test.SomeObject.cs
index cb4bfd195..5b726dd25 100644
--- a/tests/generator-Tests/expected.ji/StaticFields/Xamarin.Test.SomeObject.cs
+++ b/tests/generator-Tests/expected.ji/StaticFields/Xamarin.Test.SomeObject.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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 Java.Interop;
diff --git a/tests/generator-Tests/expected.ji/StaticMethods/Java.Lang.Object.cs b/tests/generator-Tests/expected.ji/StaticMethods/Java.Lang.Object.cs
index 86d0bd17b..47f7f2661 100644
--- a/tests/generator-Tests/expected.ji/StaticMethods/Java.Lang.Object.cs
+++ b/tests/generator-Tests/expected.ji/StaticMethods/Java.Lang.Object.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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 Java.Interop;
diff --git a/tests/generator-Tests/expected.ji/StaticMethods/Xamarin.Test.SomeObject.cs b/tests/generator-Tests/expected.ji/StaticMethods/Xamarin.Test.SomeObject.cs
index 6f84647ae..31f272080 100644
--- a/tests/generator-Tests/expected.ji/StaticMethods/Xamarin.Test.SomeObject.cs
+++ b/tests/generator-Tests/expected.ji/StaticMethods/Xamarin.Test.SomeObject.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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 Java.Interop;
diff --git a/tests/generator-Tests/expected.ji/StaticProperties/Java.Lang.Object.cs b/tests/generator-Tests/expected.ji/StaticProperties/Java.Lang.Object.cs
index 86d0bd17b..47f7f2661 100644
--- a/tests/generator-Tests/expected.ji/StaticProperties/Java.Lang.Object.cs
+++ b/tests/generator-Tests/expected.ji/StaticProperties/Java.Lang.Object.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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 Java.Interop;
diff --git a/tests/generator-Tests/expected.ji/StaticProperties/Xamarin.Test.SomeObject.cs b/tests/generator-Tests/expected.ji/StaticProperties/Xamarin.Test.SomeObject.cs
index 1ec40e23b..847372322 100644
--- a/tests/generator-Tests/expected.ji/StaticProperties/Xamarin.Test.SomeObject.cs
+++ b/tests/generator-Tests/expected.ji/StaticProperties/Xamarin.Test.SomeObject.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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 Java.Interop;
diff --git a/tests/generator-Tests/expected.ji/Streams/Java.IO.FilterOutputStream.cs b/tests/generator-Tests/expected.ji/Streams/Java.IO.FilterOutputStream.cs
index 4e1f4018e..296c4100a 100644
--- a/tests/generator-Tests/expected.ji/Streams/Java.IO.FilterOutputStream.cs
+++ b/tests/generator-Tests/expected.ji/Streams/Java.IO.FilterOutputStream.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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 Java.Interop;
diff --git a/tests/generator-Tests/expected.ji/Streams/Java.IO.IOException.cs b/tests/generator-Tests/expected.ji/Streams/Java.IO.IOException.cs
index 9cf0dfacf..8d90b17a5 100644
--- a/tests/generator-Tests/expected.ji/Streams/Java.IO.IOException.cs
+++ b/tests/generator-Tests/expected.ji/Streams/Java.IO.IOException.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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 Java.Interop;
diff --git a/tests/generator-Tests/expected.ji/Streams/Java.IO.InputStream.cs b/tests/generator-Tests/expected.ji/Streams/Java.IO.InputStream.cs
index 99fe8d937..07bc2d69c 100644
--- a/tests/generator-Tests/expected.ji/Streams/Java.IO.InputStream.cs
+++ b/tests/generator-Tests/expected.ji/Streams/Java.IO.InputStream.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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 Java.Interop;
diff --git a/tests/generator-Tests/expected.ji/Streams/Java.IO.OutputStream.cs b/tests/generator-Tests/expected.ji/Streams/Java.IO.OutputStream.cs
index d046ebe6c..6798d7124 100644
--- a/tests/generator-Tests/expected.ji/Streams/Java.IO.OutputStream.cs
+++ b/tests/generator-Tests/expected.ji/Streams/Java.IO.OutputStream.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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 Java.Interop;
diff --git a/tests/generator-Tests/expected.ji/Streams/Java.Lang.Object.cs b/tests/generator-Tests/expected.ji/Streams/Java.Lang.Object.cs
index 86d0bd17b..47f7f2661 100644
--- a/tests/generator-Tests/expected.ji/Streams/Java.Lang.Object.cs
+++ b/tests/generator-Tests/expected.ji/Streams/Java.Lang.Object.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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 Java.Interop;
diff --git a/tests/generator-Tests/expected.ji/Streams/Java.Lang.Throwable.cs b/tests/generator-Tests/expected.ji/Streams/Java.Lang.Throwable.cs
index 819a48c13..f627b04b9 100644
--- a/tests/generator-Tests/expected.ji/Streams/Java.Lang.Throwable.cs
+++ b/tests/generator-Tests/expected.ji/Streams/Java.Lang.Throwable.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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 Java.Interop;
diff --git a/tests/generator-Tests/expected.ji/java.lang.Object/Java.Lang.Object.cs b/tests/generator-Tests/expected.ji/java.lang.Object/Java.Lang.Object.cs
index 86d0bd17b..47f7f2661 100644
--- a/tests/generator-Tests/expected.ji/java.lang.Object/Java.Lang.Object.cs
+++ b/tests/generator-Tests/expected.ji/java.lang.Object/Java.Lang.Object.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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 Java.Interop;
diff --git a/tests/generator-Tests/expected.xaji/AccessModifiers/Java.Interop.__TypeRegistrations.cs b/tests/generator-Tests/expected.xaji/AccessModifiers/Java.Interop.__TypeRegistrations.cs
index d71a25b64..0131993a1 100644
--- a/tests/generator-Tests/expected.xaji/AccessModifiers/Java.Interop.__TypeRegistrations.cs
+++ b/tests/generator-Tests/expected.xaji/AccessModifiers/Java.Interop.__TypeRegistrations.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected.xaji/AccessModifiers/Java.Lang.Object.cs b/tests/generator-Tests/expected.xaji/AccessModifiers/Java.Lang.Object.cs
index 634d01cdf..e7029b8f7 100644
--- a/tests/generator-Tests/expected.xaji/AccessModifiers/Java.Lang.Object.cs
+++ b/tests/generator-Tests/expected.xaji/AccessModifiers/Java.Lang.Object.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected.xaji/AccessModifiers/Xamarin.Test.BasePublicClass.cs b/tests/generator-Tests/expected.xaji/AccessModifiers/Xamarin.Test.BasePublicClass.cs
index 02797a529..98fc38b2d 100644
--- a/tests/generator-Tests/expected.xaji/AccessModifiers/Xamarin.Test.BasePublicClass.cs
+++ b/tests/generator-Tests/expected.xaji/AccessModifiers/Xamarin.Test.BasePublicClass.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected.xaji/AccessModifiers/Xamarin.Test.ExtendPublicClass.cs b/tests/generator-Tests/expected.xaji/AccessModifiers/Xamarin.Test.ExtendPublicClass.cs
index 78676aa31..b296b414a 100644
--- a/tests/generator-Tests/expected.xaji/AccessModifiers/Xamarin.Test.ExtendPublicClass.cs
+++ b/tests/generator-Tests/expected.xaji/AccessModifiers/Xamarin.Test.ExtendPublicClass.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected.xaji/AccessModifiers/Xamarin.Test.PublicClass.cs b/tests/generator-Tests/expected.xaji/AccessModifiers/Xamarin.Test.PublicClass.cs
index 0cb475b53..6673f267d 100644
--- a/tests/generator-Tests/expected.xaji/AccessModifiers/Xamarin.Test.PublicClass.cs
+++ b/tests/generator-Tests/expected.xaji/AccessModifiers/Xamarin.Test.PublicClass.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected.xaji/AccessModifiers/Xamarin.Test.PublicFinalClass.cs b/tests/generator-Tests/expected.xaji/AccessModifiers/Xamarin.Test.PublicFinalClass.cs
index 06ede7658..8a4ebcfff 100644
--- a/tests/generator-Tests/expected.xaji/AccessModifiers/Xamarin.Test.PublicFinalClass.cs
+++ b/tests/generator-Tests/expected.xaji/AccessModifiers/Xamarin.Test.PublicFinalClass.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected.xaji/AccessModifiers/Xamarin.Test.TestClass.cs b/tests/generator-Tests/expected.xaji/AccessModifiers/Xamarin.Test.TestClass.cs
index 785548cac..c15ed710e 100644
--- a/tests/generator-Tests/expected.xaji/AccessModifiers/Xamarin.Test.TestClass.cs
+++ b/tests/generator-Tests/expected.xaji/AccessModifiers/Xamarin.Test.TestClass.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected.xaji/Adapters/Java.Interop.__TypeRegistrations.cs b/tests/generator-Tests/expected.xaji/Adapters/Java.Interop.__TypeRegistrations.cs
index d71a25b64..0131993a1 100644
--- a/tests/generator-Tests/expected.xaji/Adapters/Java.Interop.__TypeRegistrations.cs
+++ b/tests/generator-Tests/expected.xaji/Adapters/Java.Interop.__TypeRegistrations.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected.xaji/Adapters/Java.Lang.Object.cs b/tests/generator-Tests/expected.xaji/Adapters/Java.Lang.Object.cs
index 634d01cdf..e7029b8f7 100644
--- a/tests/generator-Tests/expected.xaji/Adapters/Java.Lang.Object.cs
+++ b/tests/generator-Tests/expected.xaji/Adapters/Java.Lang.Object.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected.xaji/Adapters/Xamarin.Test.AbsSpinner.cs b/tests/generator-Tests/expected.xaji/Adapters/Xamarin.Test.AbsSpinner.cs
index 74b8e2a21..bb31521ec 100644
--- a/tests/generator-Tests/expected.xaji/Adapters/Xamarin.Test.AbsSpinner.cs
+++ b/tests/generator-Tests/expected.xaji/Adapters/Xamarin.Test.AbsSpinner.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected.xaji/Adapters/Xamarin.Test.AdapterView.cs b/tests/generator-Tests/expected.xaji/Adapters/Xamarin.Test.AdapterView.cs
index ab52bf131..db349fec2 100644
--- a/tests/generator-Tests/expected.xaji/Adapters/Xamarin.Test.AdapterView.cs
+++ b/tests/generator-Tests/expected.xaji/Adapters/Xamarin.Test.AdapterView.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected.xaji/Adapters/Xamarin.Test.GenericReturnObject.cs b/tests/generator-Tests/expected.xaji/Adapters/Xamarin.Test.GenericReturnObject.cs
index 626acaca3..0d0033545 100644
--- a/tests/generator-Tests/expected.xaji/Adapters/Xamarin.Test.GenericReturnObject.cs
+++ b/tests/generator-Tests/expected.xaji/Adapters/Xamarin.Test.GenericReturnObject.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected.xaji/Android.Graphics.Color/Java.Interop.__TypeRegistrations.cs b/tests/generator-Tests/expected.xaji/Android.Graphics.Color/Java.Interop.__TypeRegistrations.cs
index d71a25b64..0131993a1 100644
--- a/tests/generator-Tests/expected.xaji/Android.Graphics.Color/Java.Interop.__TypeRegistrations.cs
+++ b/tests/generator-Tests/expected.xaji/Android.Graphics.Color/Java.Interop.__TypeRegistrations.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected.xaji/Android.Graphics.Color/Java.Lang.Object.cs b/tests/generator-Tests/expected.xaji/Android.Graphics.Color/Java.Lang.Object.cs
index 634d01cdf..e7029b8f7 100644
--- a/tests/generator-Tests/expected.xaji/Android.Graphics.Color/Java.Lang.Object.cs
+++ b/tests/generator-Tests/expected.xaji/Android.Graphics.Color/Java.Lang.Object.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected.xaji/Android.Graphics.Color/Xamarin.Test.SomeObject.cs b/tests/generator-Tests/expected.xaji/Android.Graphics.Color/Xamarin.Test.SomeObject.cs
index 9d7e469ce..8df1709a9 100644
--- a/tests/generator-Tests/expected.xaji/Android.Graphics.Color/Xamarin.Test.SomeObject.cs
+++ b/tests/generator-Tests/expected.xaji/Android.Graphics.Color/Xamarin.Test.SomeObject.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected.xaji/Arrays/Java.Interop.__TypeRegistrations.cs b/tests/generator-Tests/expected.xaji/Arrays/Java.Interop.__TypeRegistrations.cs
index d71a25b64..0131993a1 100644
--- a/tests/generator-Tests/expected.xaji/Arrays/Java.Interop.__TypeRegistrations.cs
+++ b/tests/generator-Tests/expected.xaji/Arrays/Java.Interop.__TypeRegistrations.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected.xaji/Arrays/Java.Lang.Object.cs b/tests/generator-Tests/expected.xaji/Arrays/Java.Lang.Object.cs
index 634d01cdf..e7029b8f7 100644
--- a/tests/generator-Tests/expected.xaji/Arrays/Java.Lang.Object.cs
+++ b/tests/generator-Tests/expected.xaji/Arrays/Java.Lang.Object.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected.xaji/Arrays/Xamarin.Test.SomeObject.cs b/tests/generator-Tests/expected.xaji/Arrays/Xamarin.Test.SomeObject.cs
index 9c21297f5..92a40e3a2 100644
--- a/tests/generator-Tests/expected.xaji/Arrays/Xamarin.Test.SomeObject.cs
+++ b/tests/generator-Tests/expected.xaji/Arrays/Xamarin.Test.SomeObject.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected.xaji/CSharpKeywords/Java.Interop.__TypeRegistrations.cs b/tests/generator-Tests/expected.xaji/CSharpKeywords/Java.Interop.__TypeRegistrations.cs
index d71a25b64..0131993a1 100644
--- a/tests/generator-Tests/expected.xaji/CSharpKeywords/Java.Interop.__TypeRegistrations.cs
+++ b/tests/generator-Tests/expected.xaji/CSharpKeywords/Java.Interop.__TypeRegistrations.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected.xaji/CSharpKeywords/Java.Lang.Object.cs b/tests/generator-Tests/expected.xaji/CSharpKeywords/Java.Lang.Object.cs
index 634d01cdf..e7029b8f7 100644
--- a/tests/generator-Tests/expected.xaji/CSharpKeywords/Java.Lang.Object.cs
+++ b/tests/generator-Tests/expected.xaji/CSharpKeywords/Java.Lang.Object.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected.xaji/CSharpKeywords/Java.Lang.Throwable.cs b/tests/generator-Tests/expected.xaji/CSharpKeywords/Java.Lang.Throwable.cs
index 5687244ed..d77835162 100644
--- a/tests/generator-Tests/expected.xaji/CSharpKeywords/Java.Lang.Throwable.cs
+++ b/tests/generator-Tests/expected.xaji/CSharpKeywords/Java.Lang.Throwable.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected.xaji/CSharpKeywords/Xamarin.Test.CSharpKeywords.cs b/tests/generator-Tests/expected.xaji/CSharpKeywords/Xamarin.Test.CSharpKeywords.cs
index 9e0f41a1e..3ca30d858 100644
--- a/tests/generator-Tests/expected.xaji/CSharpKeywords/Xamarin.Test.CSharpKeywords.cs
+++ b/tests/generator-Tests/expected.xaji/CSharpKeywords/Xamarin.Test.CSharpKeywords.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected.xaji/Constructors/Java.Interop.__TypeRegistrations.cs b/tests/generator-Tests/expected.xaji/Constructors/Java.Interop.__TypeRegistrations.cs
index d71a25b64..0131993a1 100644
--- a/tests/generator-Tests/expected.xaji/Constructors/Java.Interop.__TypeRegistrations.cs
+++ b/tests/generator-Tests/expected.xaji/Constructors/Java.Interop.__TypeRegistrations.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected.xaji/Constructors/Java.Lang.Object.cs b/tests/generator-Tests/expected.xaji/Constructors/Java.Lang.Object.cs
index 634d01cdf..e7029b8f7 100644
--- a/tests/generator-Tests/expected.xaji/Constructors/Java.Lang.Object.cs
+++ b/tests/generator-Tests/expected.xaji/Constructors/Java.Lang.Object.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected.xaji/Constructors/Xamarin.Test.SomeObject.cs b/tests/generator-Tests/expected.xaji/Constructors/Xamarin.Test.SomeObject.cs
index a4b0b9031..a5d4dd041 100644
--- a/tests/generator-Tests/expected.xaji/Constructors/Xamarin.Test.SomeObject.cs
+++ b/tests/generator-Tests/expected.xaji/Constructors/Xamarin.Test.SomeObject.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected.xaji/Constructors/Xamarin.Test.SomeObject2.cs b/tests/generator-Tests/expected.xaji/Constructors/Xamarin.Test.SomeObject2.cs
index 9ea19a6a7..b8bbda396 100644
--- a/tests/generator-Tests/expected.xaji/Constructors/Xamarin.Test.SomeObject2.cs
+++ b/tests/generator-Tests/expected.xaji/Constructors/Xamarin.Test.SomeObject2.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected.xaji/Core_ClassParse/Java.Interop.__TypeRegistrations.cs b/tests/generator-Tests/expected.xaji/Core_ClassParse/Java.Interop.__TypeRegistrations.cs
index 2e45df39d..9212afa77 100644
--- a/tests/generator-Tests/expected.xaji/Core_ClassParse/Java.Interop.__TypeRegistrations.cs
+++ b/tests/generator-Tests/expected.xaji/Core_ClassParse/Java.Interop.__TypeRegistrations.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected.xaji/Core_ClassParse/Java.Lang.Object.cs b/tests/generator-Tests/expected.xaji/Core_ClassParse/Java.Lang.Object.cs
index 634d01cdf..e7029b8f7 100644
--- a/tests/generator-Tests/expected.xaji/Core_ClassParse/Java.Lang.Object.cs
+++ b/tests/generator-Tests/expected.xaji/Core_ClassParse/Java.Lang.Object.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected.xaji/Core_ClassParse/Java.Lang.String.cs b/tests/generator-Tests/expected.xaji/Core_ClassParse/Java.Lang.String.cs
index b5d48abc0..ddbc5d273 100644
--- a/tests/generator-Tests/expected.xaji/Core_ClassParse/Java.Lang.String.cs
+++ b/tests/generator-Tests/expected.xaji/Core_ClassParse/Java.Lang.String.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected.xaji/Core_ClassParse/Xamarin.Google.Composable.MyClass.cs b/tests/generator-Tests/expected.xaji/Core_ClassParse/Xamarin.Google.Composable.MyClass.cs
index a1288ce7e..67d3c554b 100644
--- a/tests/generator-Tests/expected.xaji/Core_ClassParse/Xamarin.Google.Composable.MyClass.cs
+++ b/tests/generator-Tests/expected.xaji/Core_ClassParse/Xamarin.Google.Composable.MyClass.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected.xaji/Core_ClassParse/Xamarin.Test.Invalidnames.In.cs b/tests/generator-Tests/expected.xaji/Core_ClassParse/Xamarin.Test.Invalidnames.In.cs
index 2a8a6da05..f1f70a0ba 100644
--- a/tests/generator-Tests/expected.xaji/Core_ClassParse/Xamarin.Test.Invalidnames.In.cs
+++ b/tests/generator-Tests/expected.xaji/Core_ClassParse/Xamarin.Test.Invalidnames.In.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected.xaji/Core_ClassParse/Xamarin.Test.Invalidnames.InvalidNameMembers.cs b/tests/generator-Tests/expected.xaji/Core_ClassParse/Xamarin.Test.Invalidnames.InvalidNameMembers.cs
index a46055f83..e62398fc2 100644
--- a/tests/generator-Tests/expected.xaji/Core_ClassParse/Xamarin.Test.Invalidnames.InvalidNameMembers.cs
+++ b/tests/generator-Tests/expected.xaji/Core_ClassParse/Xamarin.Test.Invalidnames.InvalidNameMembers.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected.xaji/Core_Jar2Xml/Android.Text.SpannableString.cs b/tests/generator-Tests/expected.xaji/Core_Jar2Xml/Android.Text.SpannableString.cs
index a32c65a19..5fbfbf7df 100644
--- a/tests/generator-Tests/expected.xaji/Core_Jar2Xml/Android.Text.SpannableString.cs
+++ b/tests/generator-Tests/expected.xaji/Core_Jar2Xml/Android.Text.SpannableString.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected.xaji/Core_Jar2Xml/Android.Text.SpannableStringInternal.cs b/tests/generator-Tests/expected.xaji/Core_Jar2Xml/Android.Text.SpannableStringInternal.cs
index 734d765f5..ee93439c0 100644
--- a/tests/generator-Tests/expected.xaji/Core_Jar2Xml/Android.Text.SpannableStringInternal.cs
+++ b/tests/generator-Tests/expected.xaji/Core_Jar2Xml/Android.Text.SpannableStringInternal.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected.xaji/Core_Jar2Xml/Android.Views.View.cs b/tests/generator-Tests/expected.xaji/Core_Jar2Xml/Android.Views.View.cs
index 85d34b24a..8820fff51 100644
--- a/tests/generator-Tests/expected.xaji/Core_Jar2Xml/Android.Views.View.cs
+++ b/tests/generator-Tests/expected.xaji/Core_Jar2Xml/Android.Views.View.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected.xaji/Core_Jar2Xml/Java.Interop.__TypeRegistrations.cs b/tests/generator-Tests/expected.xaji/Core_Jar2Xml/Java.Interop.__TypeRegistrations.cs
index 9c635c687..31d300f33 100644
--- a/tests/generator-Tests/expected.xaji/Core_Jar2Xml/Java.Interop.__TypeRegistrations.cs
+++ b/tests/generator-Tests/expected.xaji/Core_Jar2Xml/Java.Interop.__TypeRegistrations.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected.xaji/Core_Jar2Xml/Java.Lang.Object.cs b/tests/generator-Tests/expected.xaji/Core_Jar2Xml/Java.Lang.Object.cs
index 634d01cdf..e7029b8f7 100644
--- a/tests/generator-Tests/expected.xaji/Core_Jar2Xml/Java.Lang.Object.cs
+++ b/tests/generator-Tests/expected.xaji/Core_Jar2Xml/Java.Lang.Object.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected.xaji/GenericArguments/Com.Google.Android.Exoplayer.Drm.FrameworkMediaCrypto.cs b/tests/generator-Tests/expected.xaji/GenericArguments/Com.Google.Android.Exoplayer.Drm.FrameworkMediaCrypto.cs
index 4da94667c..e3268911c 100644
--- a/tests/generator-Tests/expected.xaji/GenericArguments/Com.Google.Android.Exoplayer.Drm.FrameworkMediaCrypto.cs
+++ b/tests/generator-Tests/expected.xaji/GenericArguments/Com.Google.Android.Exoplayer.Drm.FrameworkMediaCrypto.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected.xaji/GenericArguments/Com.Google.Android.Exoplayer.Drm.FrameworkMediaDrm.cs b/tests/generator-Tests/expected.xaji/GenericArguments/Com.Google.Android.Exoplayer.Drm.FrameworkMediaDrm.cs
index db4f1a2e1..4e00d0360 100644
--- a/tests/generator-Tests/expected.xaji/GenericArguments/Com.Google.Android.Exoplayer.Drm.FrameworkMediaDrm.cs
+++ b/tests/generator-Tests/expected.xaji/GenericArguments/Com.Google.Android.Exoplayer.Drm.FrameworkMediaDrm.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected.xaji/GenericArguments/Java.Interop.__TypeRegistrations.cs b/tests/generator-Tests/expected.xaji/GenericArguments/Java.Interop.__TypeRegistrations.cs
index d71a25b64..0131993a1 100644
--- a/tests/generator-Tests/expected.xaji/GenericArguments/Java.Interop.__TypeRegistrations.cs
+++ b/tests/generator-Tests/expected.xaji/GenericArguments/Java.Interop.__TypeRegistrations.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected.xaji/GenericArguments/Java.Lang.Object.cs b/tests/generator-Tests/expected.xaji/GenericArguments/Java.Lang.Object.cs
index 634d01cdf..e7029b8f7 100644
--- a/tests/generator-Tests/expected.xaji/GenericArguments/Java.Lang.Object.cs
+++ b/tests/generator-Tests/expected.xaji/GenericArguments/Java.Lang.Object.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected.xaji/InterfaceMethodsConflict/Java.Interop.__TypeRegistrations.cs b/tests/generator-Tests/expected.xaji/InterfaceMethodsConflict/Java.Interop.__TypeRegistrations.cs
index d71a25b64..0131993a1 100644
--- a/tests/generator-Tests/expected.xaji/InterfaceMethodsConflict/Java.Interop.__TypeRegistrations.cs
+++ b/tests/generator-Tests/expected.xaji/InterfaceMethodsConflict/Java.Interop.__TypeRegistrations.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected.xaji/InterfaceMethodsConflict/Java.Lang.Object.cs b/tests/generator-Tests/expected.xaji/InterfaceMethodsConflict/Java.Lang.Object.cs
index 634d01cdf..e7029b8f7 100644
--- a/tests/generator-Tests/expected.xaji/InterfaceMethodsConflict/Java.Lang.Object.cs
+++ b/tests/generator-Tests/expected.xaji/InterfaceMethodsConflict/Java.Lang.Object.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected.xaji/InterfaceMethodsConflict/Xamarin.Test.SomeObject.cs b/tests/generator-Tests/expected.xaji/InterfaceMethodsConflict/Xamarin.Test.SomeObject.cs
index c21c66181..2d737e3d1 100644
--- a/tests/generator-Tests/expected.xaji/InterfaceMethodsConflict/Xamarin.Test.SomeObject.cs
+++ b/tests/generator-Tests/expected.xaji/InterfaceMethodsConflict/Xamarin.Test.SomeObject.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected.xaji/InterfaceMethodsConflict/Xamarin.Test.SomeObject2.cs b/tests/generator-Tests/expected.xaji/InterfaceMethodsConflict/Xamarin.Test.SomeObject2.cs
index effc57aa8..af5336cf1 100644
--- a/tests/generator-Tests/expected.xaji/InterfaceMethodsConflict/Xamarin.Test.SomeObject2.cs
+++ b/tests/generator-Tests/expected.xaji/InterfaceMethodsConflict/Xamarin.Test.SomeObject2.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected.xaji/NestedTypes/Java.Interop.__TypeRegistrations.cs b/tests/generator-Tests/expected.xaji/NestedTypes/Java.Interop.__TypeRegistrations.cs
index d71a25b64..0131993a1 100644
--- a/tests/generator-Tests/expected.xaji/NestedTypes/Java.Interop.__TypeRegistrations.cs
+++ b/tests/generator-Tests/expected.xaji/NestedTypes/Java.Interop.__TypeRegistrations.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected.xaji/NestedTypes/Java.Lang.Object.cs b/tests/generator-Tests/expected.xaji/NestedTypes/Java.Lang.Object.cs
index 634d01cdf..e7029b8f7 100644
--- a/tests/generator-Tests/expected.xaji/NestedTypes/Java.Lang.Object.cs
+++ b/tests/generator-Tests/expected.xaji/NestedTypes/Java.Lang.Object.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected.xaji/NestedTypes/Xamarin.Test.NotificationCompatBase.cs b/tests/generator-Tests/expected.xaji/NestedTypes/Xamarin.Test.NotificationCompatBase.cs
index 85d621b46..025a2b799 100644
--- a/tests/generator-Tests/expected.xaji/NestedTypes/Xamarin.Test.NotificationCompatBase.cs
+++ b/tests/generator-Tests/expected.xaji/NestedTypes/Xamarin.Test.NotificationCompatBase.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected.xaji/NonStaticFields/Java.Interop.__TypeRegistrations.cs b/tests/generator-Tests/expected.xaji/NonStaticFields/Java.Interop.__TypeRegistrations.cs
index d71a25b64..0131993a1 100644
--- a/tests/generator-Tests/expected.xaji/NonStaticFields/Java.Interop.__TypeRegistrations.cs
+++ b/tests/generator-Tests/expected.xaji/NonStaticFields/Java.Interop.__TypeRegistrations.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected.xaji/NonStaticFields/Java.Lang.Object.cs b/tests/generator-Tests/expected.xaji/NonStaticFields/Java.Lang.Object.cs
index 634d01cdf..e7029b8f7 100644
--- a/tests/generator-Tests/expected.xaji/NonStaticFields/Java.Lang.Object.cs
+++ b/tests/generator-Tests/expected.xaji/NonStaticFields/Java.Lang.Object.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected.xaji/NonStaticFields/Xamarin.Test.SomeObject.cs b/tests/generator-Tests/expected.xaji/NonStaticFields/Xamarin.Test.SomeObject.cs
index 93cb9e94e..6375ec7c0 100644
--- a/tests/generator-Tests/expected.xaji/NonStaticFields/Xamarin.Test.SomeObject.cs
+++ b/tests/generator-Tests/expected.xaji/NonStaticFields/Xamarin.Test.SomeObject.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected.xaji/NormalMethods/Java.Interop.__TypeRegistrations.cs b/tests/generator-Tests/expected.xaji/NormalMethods/Java.Interop.__TypeRegistrations.cs
index d71a25b64..0131993a1 100644
--- a/tests/generator-Tests/expected.xaji/NormalMethods/Java.Interop.__TypeRegistrations.cs
+++ b/tests/generator-Tests/expected.xaji/NormalMethods/Java.Interop.__TypeRegistrations.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected.xaji/NormalMethods/Java.Lang.Class.cs b/tests/generator-Tests/expected.xaji/NormalMethods/Java.Lang.Class.cs
index d1ce76990..5647ba837 100644
--- a/tests/generator-Tests/expected.xaji/NormalMethods/Java.Lang.Class.cs
+++ b/tests/generator-Tests/expected.xaji/NormalMethods/Java.Lang.Class.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected.xaji/NormalMethods/Java.Lang.Integer.cs b/tests/generator-Tests/expected.xaji/NormalMethods/Java.Lang.Integer.cs
index 7499dd94d..1889e90d7 100644
--- a/tests/generator-Tests/expected.xaji/NormalMethods/Java.Lang.Integer.cs
+++ b/tests/generator-Tests/expected.xaji/NormalMethods/Java.Lang.Integer.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected.xaji/NormalMethods/Java.Lang.Object.cs b/tests/generator-Tests/expected.xaji/NormalMethods/Java.Lang.Object.cs
index 634d01cdf..e7029b8f7 100644
--- a/tests/generator-Tests/expected.xaji/NormalMethods/Java.Lang.Object.cs
+++ b/tests/generator-Tests/expected.xaji/NormalMethods/Java.Lang.Object.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected.xaji/NormalMethods/Java.Lang.Throwable.cs b/tests/generator-Tests/expected.xaji/NormalMethods/Java.Lang.Throwable.cs
index 03307c7e5..cc7579be9 100644
--- a/tests/generator-Tests/expected.xaji/NormalMethods/Java.Lang.Throwable.cs
+++ b/tests/generator-Tests/expected.xaji/NormalMethods/Java.Lang.Throwable.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected.xaji/NormalMethods/Xamarin.Test.A.cs b/tests/generator-Tests/expected.xaji/NormalMethods/Xamarin.Test.A.cs
index eebb6a326..7d0bb2c6f 100644
--- a/tests/generator-Tests/expected.xaji/NormalMethods/Xamarin.Test.A.cs
+++ b/tests/generator-Tests/expected.xaji/NormalMethods/Xamarin.Test.A.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected.xaji/NormalMethods/Xamarin.Test.C.cs b/tests/generator-Tests/expected.xaji/NormalMethods/Xamarin.Test.C.cs
index 8883d55e3..11ddac6e7 100644
--- a/tests/generator-Tests/expected.xaji/NormalMethods/Xamarin.Test.C.cs
+++ b/tests/generator-Tests/expected.xaji/NormalMethods/Xamarin.Test.C.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected.xaji/NormalMethods/Xamarin.Test.SomeObject.cs b/tests/generator-Tests/expected.xaji/NormalMethods/Xamarin.Test.SomeObject.cs
index a09cf93fd..bede6f084 100644
--- a/tests/generator-Tests/expected.xaji/NormalMethods/Xamarin.Test.SomeObject.cs
+++ b/tests/generator-Tests/expected.xaji/NormalMethods/Xamarin.Test.SomeObject.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected.xaji/NormalProperties/Java.Interop.__TypeRegistrations.cs b/tests/generator-Tests/expected.xaji/NormalProperties/Java.Interop.__TypeRegistrations.cs
index d71a25b64..0131993a1 100644
--- a/tests/generator-Tests/expected.xaji/NormalProperties/Java.Interop.__TypeRegistrations.cs
+++ b/tests/generator-Tests/expected.xaji/NormalProperties/Java.Interop.__TypeRegistrations.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected.xaji/NormalProperties/Java.Lang.Object.cs b/tests/generator-Tests/expected.xaji/NormalProperties/Java.Lang.Object.cs
index 634d01cdf..e7029b8f7 100644
--- a/tests/generator-Tests/expected.xaji/NormalProperties/Java.Lang.Object.cs
+++ b/tests/generator-Tests/expected.xaji/NormalProperties/Java.Lang.Object.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected.xaji/NormalProperties/Xamarin.Test.SomeObject.cs b/tests/generator-Tests/expected.xaji/NormalProperties/Xamarin.Test.SomeObject.cs
index e7850584b..c0336da69 100644
--- a/tests/generator-Tests/expected.xaji/NormalProperties/Xamarin.Test.SomeObject.cs
+++ b/tests/generator-Tests/expected.xaji/NormalProperties/Xamarin.Test.SomeObject.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected.xaji/ParameterXPath/Java.Interop.__TypeRegistrations.cs b/tests/generator-Tests/expected.xaji/ParameterXPath/Java.Interop.__TypeRegistrations.cs
index d71a25b64..0131993a1 100644
--- a/tests/generator-Tests/expected.xaji/ParameterXPath/Java.Interop.__TypeRegistrations.cs
+++ b/tests/generator-Tests/expected.xaji/ParameterXPath/Java.Interop.__TypeRegistrations.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected.xaji/ParameterXPath/Java.Lang.Integer.cs b/tests/generator-Tests/expected.xaji/ParameterXPath/Java.Lang.Integer.cs
index 7499dd94d..1889e90d7 100644
--- a/tests/generator-Tests/expected.xaji/ParameterXPath/Java.Lang.Integer.cs
+++ b/tests/generator-Tests/expected.xaji/ParameterXPath/Java.Lang.Integer.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected.xaji/ParameterXPath/Java.Lang.Object.cs b/tests/generator-Tests/expected.xaji/ParameterXPath/Java.Lang.Object.cs
index 634d01cdf..e7029b8f7 100644
--- a/tests/generator-Tests/expected.xaji/ParameterXPath/Java.Lang.Object.cs
+++ b/tests/generator-Tests/expected.xaji/ParameterXPath/Java.Lang.Object.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected.xaji/ParameterXPath/Xamarin.Test.A.cs b/tests/generator-Tests/expected.xaji/ParameterXPath/Xamarin.Test.A.cs
index 3250e8db5..f7ed7be26 100644
--- a/tests/generator-Tests/expected.xaji/ParameterXPath/Xamarin.Test.A.cs
+++ b/tests/generator-Tests/expected.xaji/ParameterXPath/Xamarin.Test.A.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected.xaji/StaticFields/Java.Interop.__TypeRegistrations.cs b/tests/generator-Tests/expected.xaji/StaticFields/Java.Interop.__TypeRegistrations.cs
index d71a25b64..0131993a1 100644
--- a/tests/generator-Tests/expected.xaji/StaticFields/Java.Interop.__TypeRegistrations.cs
+++ b/tests/generator-Tests/expected.xaji/StaticFields/Java.Interop.__TypeRegistrations.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected.xaji/StaticFields/Java.Lang.Object.cs b/tests/generator-Tests/expected.xaji/StaticFields/Java.Lang.Object.cs
index 634d01cdf..e7029b8f7 100644
--- a/tests/generator-Tests/expected.xaji/StaticFields/Java.Lang.Object.cs
+++ b/tests/generator-Tests/expected.xaji/StaticFields/Java.Lang.Object.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected.xaji/StaticFields/Xamarin.Test.SomeObject.cs b/tests/generator-Tests/expected.xaji/StaticFields/Xamarin.Test.SomeObject.cs
index a56021cda..57a795e04 100644
--- a/tests/generator-Tests/expected.xaji/StaticFields/Xamarin.Test.SomeObject.cs
+++ b/tests/generator-Tests/expected.xaji/StaticFields/Xamarin.Test.SomeObject.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected.xaji/StaticMethods/Java.Interop.__TypeRegistrations.cs b/tests/generator-Tests/expected.xaji/StaticMethods/Java.Interop.__TypeRegistrations.cs
index d71a25b64..0131993a1 100644
--- a/tests/generator-Tests/expected.xaji/StaticMethods/Java.Interop.__TypeRegistrations.cs
+++ b/tests/generator-Tests/expected.xaji/StaticMethods/Java.Interop.__TypeRegistrations.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected.xaji/StaticMethods/Java.Lang.Object.cs b/tests/generator-Tests/expected.xaji/StaticMethods/Java.Lang.Object.cs
index 634d01cdf..e7029b8f7 100644
--- a/tests/generator-Tests/expected.xaji/StaticMethods/Java.Lang.Object.cs
+++ b/tests/generator-Tests/expected.xaji/StaticMethods/Java.Lang.Object.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected.xaji/StaticMethods/Xamarin.Test.SomeObject.cs b/tests/generator-Tests/expected.xaji/StaticMethods/Xamarin.Test.SomeObject.cs
index c5aab3746..59976149b 100644
--- a/tests/generator-Tests/expected.xaji/StaticMethods/Xamarin.Test.SomeObject.cs
+++ b/tests/generator-Tests/expected.xaji/StaticMethods/Xamarin.Test.SomeObject.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected.xaji/StaticProperties/Java.Interop.__TypeRegistrations.cs b/tests/generator-Tests/expected.xaji/StaticProperties/Java.Interop.__TypeRegistrations.cs
index d71a25b64..0131993a1 100644
--- a/tests/generator-Tests/expected.xaji/StaticProperties/Java.Interop.__TypeRegistrations.cs
+++ b/tests/generator-Tests/expected.xaji/StaticProperties/Java.Interop.__TypeRegistrations.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected.xaji/StaticProperties/Java.Lang.Object.cs b/tests/generator-Tests/expected.xaji/StaticProperties/Java.Lang.Object.cs
index 634d01cdf..e7029b8f7 100644
--- a/tests/generator-Tests/expected.xaji/StaticProperties/Java.Lang.Object.cs
+++ b/tests/generator-Tests/expected.xaji/StaticProperties/Java.Lang.Object.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected.xaji/StaticProperties/Xamarin.Test.SomeObject.cs b/tests/generator-Tests/expected.xaji/StaticProperties/Xamarin.Test.SomeObject.cs
index 9ea14974e..80cffc22b 100644
--- a/tests/generator-Tests/expected.xaji/StaticProperties/Xamarin.Test.SomeObject.cs
+++ b/tests/generator-Tests/expected.xaji/StaticProperties/Xamarin.Test.SomeObject.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected.xaji/Streams/Java.IO.FilterOutputStream.cs b/tests/generator-Tests/expected.xaji/Streams/Java.IO.FilterOutputStream.cs
index db367cc52..9444b7ff6 100644
--- a/tests/generator-Tests/expected.xaji/Streams/Java.IO.FilterOutputStream.cs
+++ b/tests/generator-Tests/expected.xaji/Streams/Java.IO.FilterOutputStream.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected.xaji/Streams/Java.IO.IOException.cs b/tests/generator-Tests/expected.xaji/Streams/Java.IO.IOException.cs
index 06e9f376d..44517099e 100644
--- a/tests/generator-Tests/expected.xaji/Streams/Java.IO.IOException.cs
+++ b/tests/generator-Tests/expected.xaji/Streams/Java.IO.IOException.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected.xaji/Streams/Java.IO.InputStream.cs b/tests/generator-Tests/expected.xaji/Streams/Java.IO.InputStream.cs
index c58a4991a..b562872c0 100644
--- a/tests/generator-Tests/expected.xaji/Streams/Java.IO.InputStream.cs
+++ b/tests/generator-Tests/expected.xaji/Streams/Java.IO.InputStream.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected.xaji/Streams/Java.IO.OutputStream.cs b/tests/generator-Tests/expected.xaji/Streams/Java.IO.OutputStream.cs
index f3bd27f36..128209066 100644
--- a/tests/generator-Tests/expected.xaji/Streams/Java.IO.OutputStream.cs
+++ b/tests/generator-Tests/expected.xaji/Streams/Java.IO.OutputStream.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected.xaji/Streams/Java.Interop.__TypeRegistrations.cs b/tests/generator-Tests/expected.xaji/Streams/Java.Interop.__TypeRegistrations.cs
index d71a25b64..0131993a1 100644
--- a/tests/generator-Tests/expected.xaji/Streams/Java.Interop.__TypeRegistrations.cs
+++ b/tests/generator-Tests/expected.xaji/Streams/Java.Interop.__TypeRegistrations.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected.xaji/Streams/Java.Lang.Object.cs b/tests/generator-Tests/expected.xaji/Streams/Java.Lang.Object.cs
index 634d01cdf..e7029b8f7 100644
--- a/tests/generator-Tests/expected.xaji/Streams/Java.Lang.Object.cs
+++ b/tests/generator-Tests/expected.xaji/Streams/Java.Lang.Object.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected.xaji/Streams/Java.Lang.Throwable.cs b/tests/generator-Tests/expected.xaji/Streams/Java.Lang.Throwable.cs
index 5687244ed..d77835162 100644
--- a/tests/generator-Tests/expected.xaji/Streams/Java.Lang.Throwable.cs
+++ b/tests/generator-Tests/expected.xaji/Streams/Java.Lang.Throwable.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected.xaji/TestInterface/ClassWithoutNamespace.cs b/tests/generator-Tests/expected.xaji/TestInterface/ClassWithoutNamespace.cs
index d811133c3..1e6d7ec80 100644
--- a/tests/generator-Tests/expected.xaji/TestInterface/ClassWithoutNamespace.cs
+++ b/tests/generator-Tests/expected.xaji/TestInterface/ClassWithoutNamespace.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected.xaji/TestInterface/Java.Interop.__TypeRegistrations.cs b/tests/generator-Tests/expected.xaji/TestInterface/Java.Interop.__TypeRegistrations.cs
index d71a25b64..0131993a1 100644
--- a/tests/generator-Tests/expected.xaji/TestInterface/Java.Interop.__TypeRegistrations.cs
+++ b/tests/generator-Tests/expected.xaji/TestInterface/Java.Interop.__TypeRegistrations.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected.xaji/TestInterface/Java.Lang.Object.cs b/tests/generator-Tests/expected.xaji/TestInterface/Java.Lang.Object.cs
index 634d01cdf..e7029b8f7 100644
--- a/tests/generator-Tests/expected.xaji/TestInterface/Java.Lang.Object.cs
+++ b/tests/generator-Tests/expected.xaji/TestInterface/Java.Lang.Object.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected.xaji/TestInterface/Java.Lang.String.cs b/tests/generator-Tests/expected.xaji/TestInterface/Java.Lang.String.cs
index 660b75317..f9d26ceef 100644
--- a/tests/generator-Tests/expected.xaji/TestInterface/Java.Lang.String.cs
+++ b/tests/generator-Tests/expected.xaji/TestInterface/Java.Lang.String.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected.xaji/TestInterface/Test.ME.GenericImplementation.cs b/tests/generator-Tests/expected.xaji/TestInterface/Test.ME.GenericImplementation.cs
index f68437bb2..9e8cc5b11 100644
--- a/tests/generator-Tests/expected.xaji/TestInterface/Test.ME.GenericImplementation.cs
+++ b/tests/generator-Tests/expected.xaji/TestInterface/Test.ME.GenericImplementation.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected.xaji/TestInterface/Test.ME.GenericObjectPropertyImplementation.cs b/tests/generator-Tests/expected.xaji/TestInterface/Test.ME.GenericObjectPropertyImplementation.cs
index 3679f00c9..84ffb5866 100644
--- a/tests/generator-Tests/expected.xaji/TestInterface/Test.ME.GenericObjectPropertyImplementation.cs
+++ b/tests/generator-Tests/expected.xaji/TestInterface/Test.ME.GenericObjectPropertyImplementation.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected.xaji/TestInterface/Test.ME.GenericStringImplementation.cs b/tests/generator-Tests/expected.xaji/TestInterface/Test.ME.GenericStringImplementation.cs
index 12d584ea4..ee964434f 100644
--- a/tests/generator-Tests/expected.xaji/TestInterface/Test.ME.GenericStringImplementation.cs
+++ b/tests/generator-Tests/expected.xaji/TestInterface/Test.ME.GenericStringImplementation.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected.xaji/TestInterface/Test.ME.GenericStringPropertyImplementation.cs b/tests/generator-Tests/expected.xaji/TestInterface/Test.ME.GenericStringPropertyImplementation.cs
index 220474559..86ce6c5e5 100644
--- a/tests/generator-Tests/expected.xaji/TestInterface/Test.ME.GenericStringPropertyImplementation.cs
+++ b/tests/generator-Tests/expected.xaji/TestInterface/Test.ME.GenericStringPropertyImplementation.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected.xaji/TestInterface/Test.ME.TestInterfaceImplementation.cs b/tests/generator-Tests/expected.xaji/TestInterface/Test.ME.TestInterfaceImplementation.cs
index 7cef23b99..b5059c63d 100644
--- a/tests/generator-Tests/expected.xaji/TestInterface/Test.ME.TestInterfaceImplementation.cs
+++ b/tests/generator-Tests/expected.xaji/TestInterface/Test.ME.TestInterfaceImplementation.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected.xaji/java.lang.Enum/Java.Interop.__TypeRegistrations.cs b/tests/generator-Tests/expected.xaji/java.lang.Enum/Java.Interop.__TypeRegistrations.cs
index d71a25b64..0131993a1 100644
--- a/tests/generator-Tests/expected.xaji/java.lang.Enum/Java.Interop.__TypeRegistrations.cs
+++ b/tests/generator-Tests/expected.xaji/java.lang.Enum/Java.Interop.__TypeRegistrations.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected.xaji/java.lang.Enum/Java.Lang.Enum.cs b/tests/generator-Tests/expected.xaji/java.lang.Enum/Java.Lang.Enum.cs
index 97d0fc470..d5792caca 100644
--- a/tests/generator-Tests/expected.xaji/java.lang.Enum/Java.Lang.Enum.cs
+++ b/tests/generator-Tests/expected.xaji/java.lang.Enum/Java.Lang.Enum.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected.xaji/java.lang.Enum/Java.Lang.Object.cs b/tests/generator-Tests/expected.xaji/java.lang.Enum/Java.Lang.Object.cs
index 634d01cdf..e7029b8f7 100644
--- a/tests/generator-Tests/expected.xaji/java.lang.Enum/Java.Lang.Object.cs
+++ b/tests/generator-Tests/expected.xaji/java.lang.Enum/Java.Lang.Object.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected.xaji/java.lang.Enum/Java.Lang.State.cs b/tests/generator-Tests/expected.xaji/java.lang.Enum/Java.Lang.State.cs
index 9295c438c..994daa848 100644
--- a/tests/generator-Tests/expected.xaji/java.lang.Enum/Java.Lang.State.cs
+++ b/tests/generator-Tests/expected.xaji/java.lang.Enum/Java.Lang.State.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected.xaji/java.util.List/Java.Interop.__TypeRegistrations.cs b/tests/generator-Tests/expected.xaji/java.util.List/Java.Interop.__TypeRegistrations.cs
index d71a25b64..0131993a1 100644
--- a/tests/generator-Tests/expected.xaji/java.util.List/Java.Interop.__TypeRegistrations.cs
+++ b/tests/generator-Tests/expected.xaji/java.util.List/Java.Interop.__TypeRegistrations.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected.xaji/java.util.List/Java.Lang.Object.cs b/tests/generator-Tests/expected.xaji/java.util.List/Java.Lang.Object.cs
index 634d01cdf..e7029b8f7 100644
--- a/tests/generator-Tests/expected.xaji/java.util.List/Java.Lang.Object.cs
+++ b/tests/generator-Tests/expected.xaji/java.util.List/Java.Lang.Object.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected.xaji/java.util.List/Xamarin.Test.SomeObject.cs b/tests/generator-Tests/expected.xaji/java.util.List/Xamarin.Test.SomeObject.cs
index 10a2952f0..242dfcc2d 100644
--- a/tests/generator-Tests/expected.xaji/java.util.List/Xamarin.Test.SomeObject.cs
+++ b/tests/generator-Tests/expected.xaji/java.util.List/Xamarin.Test.SomeObject.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected/AccessModifiers/Xamarin.Test.BasePublicClass.cs b/tests/generator-Tests/expected/AccessModifiers/Xamarin.Test.BasePublicClass.cs
index 5eefa5d0e..59cd62440 100644
--- a/tests/generator-Tests/expected/AccessModifiers/Xamarin.Test.BasePublicClass.cs
+++ b/tests/generator-Tests/expected/AccessModifiers/Xamarin.Test.BasePublicClass.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected/AccessModifiers/Xamarin.Test.ExtendPublicClass.cs b/tests/generator-Tests/expected/AccessModifiers/Xamarin.Test.ExtendPublicClass.cs
index b477e5c6e..51133e38b 100644
--- a/tests/generator-Tests/expected/AccessModifiers/Xamarin.Test.ExtendPublicClass.cs
+++ b/tests/generator-Tests/expected/AccessModifiers/Xamarin.Test.ExtendPublicClass.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected/AccessModifiers/Xamarin.Test.PublicClass.cs b/tests/generator-Tests/expected/AccessModifiers/Xamarin.Test.PublicClass.cs
index 5bab2ec06..75ce4d378 100644
--- a/tests/generator-Tests/expected/AccessModifiers/Xamarin.Test.PublicClass.cs
+++ b/tests/generator-Tests/expected/AccessModifiers/Xamarin.Test.PublicClass.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected/AccessModifiers/Xamarin.Test.PublicFinalClass.cs b/tests/generator-Tests/expected/AccessModifiers/Xamarin.Test.PublicFinalClass.cs
index 76d083924..80687ecde 100644
--- a/tests/generator-Tests/expected/AccessModifiers/Xamarin.Test.PublicFinalClass.cs
+++ b/tests/generator-Tests/expected/AccessModifiers/Xamarin.Test.PublicFinalClass.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected/AccessModifiers/Xamarin.Test.TestClass.cs b/tests/generator-Tests/expected/AccessModifiers/Xamarin.Test.TestClass.cs
index 85049e4bf..f86a9a12d 100644
--- a/tests/generator-Tests/expected/AccessModifiers/Xamarin.Test.TestClass.cs
+++ b/tests/generator-Tests/expected/AccessModifiers/Xamarin.Test.TestClass.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected/Adapters/Xamarin.Test.AbsSpinner.cs b/tests/generator-Tests/expected/Adapters/Xamarin.Test.AbsSpinner.cs
index 2fd05863a..5f7fc9ad0 100644
--- a/tests/generator-Tests/expected/Adapters/Xamarin.Test.AbsSpinner.cs
+++ b/tests/generator-Tests/expected/Adapters/Xamarin.Test.AbsSpinner.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected/Adapters/Xamarin.Test.AdapterView.cs b/tests/generator-Tests/expected/Adapters/Xamarin.Test.AdapterView.cs
index a22a38963..bede35ee7 100644
--- a/tests/generator-Tests/expected/Adapters/Xamarin.Test.AdapterView.cs
+++ b/tests/generator-Tests/expected/Adapters/Xamarin.Test.AdapterView.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected/Adapters/Xamarin.Test.GenericReturnObject.cs b/tests/generator-Tests/expected/Adapters/Xamarin.Test.GenericReturnObject.cs
index ac3dcf7c1..60d2863f6 100644
--- a/tests/generator-Tests/expected/Adapters/Xamarin.Test.GenericReturnObject.cs
+++ b/tests/generator-Tests/expected/Adapters/Xamarin.Test.GenericReturnObject.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
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
index f93f97563..7b3131682 100644
--- a/tests/generator-Tests/expected/Android.Graphics.Color/Xamarin.Test.SomeObject.cs
+++ b/tests/generator-Tests/expected/Android.Graphics.Color/Xamarin.Test.SomeObject.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected/Arrays/Xamarin.Test.SomeObject.cs b/tests/generator-Tests/expected/Arrays/Xamarin.Test.SomeObject.cs
index b06f262b2..4dd713069 100644
--- a/tests/generator-Tests/expected/Arrays/Xamarin.Test.SomeObject.cs
+++ b/tests/generator-Tests/expected/Arrays/Xamarin.Test.SomeObject.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected/CSharpKeywords/Xamarin.Test.CSharpKeywords.cs b/tests/generator-Tests/expected/CSharpKeywords/Xamarin.Test.CSharpKeywords.cs
index 3159ca319..00a561164 100644
--- a/tests/generator-Tests/expected/CSharpKeywords/Xamarin.Test.CSharpKeywords.cs
+++ b/tests/generator-Tests/expected/CSharpKeywords/Xamarin.Test.CSharpKeywords.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected/Constructors/Xamarin.Test.SomeObject.cs b/tests/generator-Tests/expected/Constructors/Xamarin.Test.SomeObject.cs
index bda1ea005..662bb2a3e 100644
--- a/tests/generator-Tests/expected/Constructors/Xamarin.Test.SomeObject.cs
+++ b/tests/generator-Tests/expected/Constructors/Xamarin.Test.SomeObject.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected/Constructors/Xamarin.Test.SomeObject2.cs b/tests/generator-Tests/expected/Constructors/Xamarin.Test.SomeObject2.cs
index 1c3eaeba0..8ab008553 100644
--- a/tests/generator-Tests/expected/Constructors/Xamarin.Test.SomeObject2.cs
+++ b/tests/generator-Tests/expected/Constructors/Xamarin.Test.SomeObject2.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected/Core_ClassParse/Java.Lang.Object.cs b/tests/generator-Tests/expected/Core_ClassParse/Java.Lang.Object.cs
index f9126387e..dd027b081 100644
--- a/tests/generator-Tests/expected/Core_ClassParse/Java.Lang.Object.cs
+++ b/tests/generator-Tests/expected/Core_ClassParse/Java.Lang.Object.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected/Core_ClassParse/Java.Lang.String.cs b/tests/generator-Tests/expected/Core_ClassParse/Java.Lang.String.cs
index 20effd71e..87e3da3d0 100644
--- a/tests/generator-Tests/expected/Core_ClassParse/Java.Lang.String.cs
+++ b/tests/generator-Tests/expected/Core_ClassParse/Java.Lang.String.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
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
index 998184788..3b842c55f 100644
--- a/tests/generator-Tests/expected/Core_ClassParse/Xamarin.Google.Composable.MyClass.cs
+++ b/tests/generator-Tests/expected/Core_ClassParse/Xamarin.Google.Composable.MyClass.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
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
index 2bb9c4285..660d64872 100644
--- a/tests/generator-Tests/expected/Core_ClassParse/Xamarin.Test.Invalidnames.In.cs
+++ b/tests/generator-Tests/expected/Core_ClassParse/Xamarin.Test.Invalidnames.In.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
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
index 527b4a15d..7717c3d05 100644
--- a/tests/generator-Tests/expected/Core_ClassParse/Xamarin.Test.Invalidnames.InvalidNameMembers.cs
+++ b/tests/generator-Tests/expected/Core_ClassParse/Xamarin.Test.Invalidnames.InvalidNameMembers.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected/Core_Jar2Xml/Android.Text.SpannableString.cs b/tests/generator-Tests/expected/Core_Jar2Xml/Android.Text.SpannableString.cs
index 358c558c2..ffc5743de 100644
--- a/tests/generator-Tests/expected/Core_Jar2Xml/Android.Text.SpannableString.cs
+++ b/tests/generator-Tests/expected/Core_Jar2Xml/Android.Text.SpannableString.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected/Core_Jar2Xml/Android.Text.SpannableStringInternal.cs b/tests/generator-Tests/expected/Core_Jar2Xml/Android.Text.SpannableStringInternal.cs
index f6a4d9331..e9cc92aac 100644
--- a/tests/generator-Tests/expected/Core_Jar2Xml/Android.Text.SpannableStringInternal.cs
+++ b/tests/generator-Tests/expected/Core_Jar2Xml/Android.Text.SpannableStringInternal.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected/Core_Jar2Xml/Android.Views.View.cs b/tests/generator-Tests/expected/Core_Jar2Xml/Android.Views.View.cs
index 9567dd7ab..2396b7a88 100644
--- a/tests/generator-Tests/expected/Core_Jar2Xml/Android.Views.View.cs
+++ b/tests/generator-Tests/expected/Core_Jar2Xml/Android.Views.View.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected/Core_Jar2Xml/Java.Lang.Object.cs b/tests/generator-Tests/expected/Core_Jar2Xml/Java.Lang.Object.cs
index f9126387e..dd027b081 100644
--- a/tests/generator-Tests/expected/Core_Jar2Xml/Java.Lang.Object.cs
+++ b/tests/generator-Tests/expected/Core_Jar2Xml/Java.Lang.Object.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected/EnumerationFixup/Java.Interop.__TypeRegistrations.cs b/tests/generator-Tests/expected/EnumerationFixup/Java.Interop.__TypeRegistrations.cs
index d71a25b64..0131993a1 100644
--- a/tests/generator-Tests/expected/EnumerationFixup/Java.Interop.__TypeRegistrations.cs
+++ b/tests/generator-Tests/expected/EnumerationFixup/Java.Interop.__TypeRegistrations.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected/EnumerationFixup/Java.Lang.Object.cs b/tests/generator-Tests/expected/EnumerationFixup/Java.Lang.Object.cs
index f9126387e..dd027b081 100644
--- a/tests/generator-Tests/expected/EnumerationFixup/Java.Lang.Object.cs
+++ b/tests/generator-Tests/expected/EnumerationFixup/Java.Lang.Object.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected/EnumerationFixup/Xamarin.Test.DeprecatedItems.cs b/tests/generator-Tests/expected/EnumerationFixup/Xamarin.Test.DeprecatedItems.cs
index 5f60861aa..f14c6a109 100644
--- a/tests/generator-Tests/expected/EnumerationFixup/Xamarin.Test.DeprecatedItems.cs
+++ b/tests/generator-Tests/expected/EnumerationFixup/Xamarin.Test.DeprecatedItems.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected/EnumerationFixup/Xamarin.Test.SomeObject.cs b/tests/generator-Tests/expected/EnumerationFixup/Xamarin.Test.SomeObject.cs
index 65e7073a9..1b3b3fd43 100644
--- a/tests/generator-Tests/expected/EnumerationFixup/Xamarin.Test.SomeObject.cs
+++ b/tests/generator-Tests/expected/EnumerationFixup/Xamarin.Test.SomeObject.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected/EnumerationFixup/Xamarin.Test.SomeObject2.cs b/tests/generator-Tests/expected/EnumerationFixup/Xamarin.Test.SomeObject2.cs
index 7a22603ac..dd82f5665 100644
--- a/tests/generator-Tests/expected/EnumerationFixup/Xamarin.Test.SomeObject2.cs
+++ b/tests/generator-Tests/expected/EnumerationFixup/Xamarin.Test.SomeObject2.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
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
index 5bfb3529b..6dea321d0 100644
--- 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
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected/GenericArguments/Java.Lang.Object.cs b/tests/generator-Tests/expected/GenericArguments/Java.Lang.Object.cs
index f9126387e..dd027b081 100644
--- a/tests/generator-Tests/expected/GenericArguments/Java.Lang.Object.cs
+++ b/tests/generator-Tests/expected/GenericArguments/Java.Lang.Object.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected/InterfaceMethodsConflict/Java.Interop.__TypeRegistrations.cs b/tests/generator-Tests/expected/InterfaceMethodsConflict/Java.Interop.__TypeRegistrations.cs
index d71a25b64..0131993a1 100644
--- a/tests/generator-Tests/expected/InterfaceMethodsConflict/Java.Interop.__TypeRegistrations.cs
+++ b/tests/generator-Tests/expected/InterfaceMethodsConflict/Java.Interop.__TypeRegistrations.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected/InterfaceMethodsConflict/Xamarin.Test.SomeObject.cs b/tests/generator-Tests/expected/InterfaceMethodsConflict/Xamarin.Test.SomeObject.cs
index e314d7298..4c87567e2 100644
--- a/tests/generator-Tests/expected/InterfaceMethodsConflict/Xamarin.Test.SomeObject.cs
+++ b/tests/generator-Tests/expected/InterfaceMethodsConflict/Xamarin.Test.SomeObject.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected/InterfaceMethodsConflict/Xamarin.Test.SomeObject2.cs b/tests/generator-Tests/expected/InterfaceMethodsConflict/Xamarin.Test.SomeObject2.cs
index f56ee5e7a..7db201146 100644
--- a/tests/generator-Tests/expected/InterfaceMethodsConflict/Xamarin.Test.SomeObject2.cs
+++ b/tests/generator-Tests/expected/InterfaceMethodsConflict/Xamarin.Test.SomeObject2.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected/NestedTypes/Xamarin.Test.NotificationCompatBase.cs b/tests/generator-Tests/expected/NestedTypes/Xamarin.Test.NotificationCompatBase.cs
index 1c53a1698..313a15dfd 100644
--- a/tests/generator-Tests/expected/NestedTypes/Xamarin.Test.NotificationCompatBase.cs
+++ b/tests/generator-Tests/expected/NestedTypes/Xamarin.Test.NotificationCompatBase.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected/NonStaticFields/Xamarin.Test.SomeObject.cs b/tests/generator-Tests/expected/NonStaticFields/Xamarin.Test.SomeObject.cs
index 85b72a02f..db0051860 100644
--- a/tests/generator-Tests/expected/NonStaticFields/Xamarin.Test.SomeObject.cs
+++ b/tests/generator-Tests/expected/NonStaticFields/Xamarin.Test.SomeObject.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected/NormalMethods/Java.Lang.Throwable.cs b/tests/generator-Tests/expected/NormalMethods/Java.Lang.Throwable.cs
index a4120d2a3..b2305df63 100644
--- a/tests/generator-Tests/expected/NormalMethods/Java.Lang.Throwable.cs
+++ b/tests/generator-Tests/expected/NormalMethods/Java.Lang.Throwable.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected/NormalMethods/Xamarin.Test.A.cs b/tests/generator-Tests/expected/NormalMethods/Xamarin.Test.A.cs
index e3ecdce43..a3b5fe125 100644
--- a/tests/generator-Tests/expected/NormalMethods/Xamarin.Test.A.cs
+++ b/tests/generator-Tests/expected/NormalMethods/Xamarin.Test.A.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected/NormalMethods/Xamarin.Test.C.cs b/tests/generator-Tests/expected/NormalMethods/Xamarin.Test.C.cs
index 7d3502b40..43d12c4ca 100644
--- a/tests/generator-Tests/expected/NormalMethods/Xamarin.Test.C.cs
+++ b/tests/generator-Tests/expected/NormalMethods/Xamarin.Test.C.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected/NormalMethods/Xamarin.Test.SomeObject.cs b/tests/generator-Tests/expected/NormalMethods/Xamarin.Test.SomeObject.cs
index daed57891..e56bf97c8 100644
--- a/tests/generator-Tests/expected/NormalMethods/Xamarin.Test.SomeObject.cs
+++ b/tests/generator-Tests/expected/NormalMethods/Xamarin.Test.SomeObject.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected/NormalProperties/Xamarin.Test.SomeObject.cs b/tests/generator-Tests/expected/NormalProperties/Xamarin.Test.SomeObject.cs
index 1583369db..bcedc36c1 100644
--- a/tests/generator-Tests/expected/NormalProperties/Xamarin.Test.SomeObject.cs
+++ b/tests/generator-Tests/expected/NormalProperties/Xamarin.Test.SomeObject.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected/ParameterXPath/Xamarin.Test.A.cs b/tests/generator-Tests/expected/ParameterXPath/Xamarin.Test.A.cs
index 338ce1daf..5e4136993 100644
--- a/tests/generator-Tests/expected/ParameterXPath/Xamarin.Test.A.cs
+++ b/tests/generator-Tests/expected/ParameterXPath/Xamarin.Test.A.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected/StaticFields/Xamarin.Test.SomeObject.cs b/tests/generator-Tests/expected/StaticFields/Xamarin.Test.SomeObject.cs
index 364f322f6..a4e0ca6b2 100644
--- a/tests/generator-Tests/expected/StaticFields/Xamarin.Test.SomeObject.cs
+++ b/tests/generator-Tests/expected/StaticFields/Xamarin.Test.SomeObject.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected/StaticMethods/Xamarin.Test.SomeObject.cs b/tests/generator-Tests/expected/StaticMethods/Xamarin.Test.SomeObject.cs
index 65e1e5278..4340390e9 100644
--- a/tests/generator-Tests/expected/StaticMethods/Xamarin.Test.SomeObject.cs
+++ b/tests/generator-Tests/expected/StaticMethods/Xamarin.Test.SomeObject.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected/StaticProperties/Xamarin.Test.SomeObject.cs b/tests/generator-Tests/expected/StaticProperties/Xamarin.Test.SomeObject.cs
index bf811e9b2..45b08ec40 100644
--- a/tests/generator-Tests/expected/StaticProperties/Xamarin.Test.SomeObject.cs
+++ b/tests/generator-Tests/expected/StaticProperties/Xamarin.Test.SomeObject.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected/Streams/Java.IO.FilterOutputStream.cs b/tests/generator-Tests/expected/Streams/Java.IO.FilterOutputStream.cs
index 4f778944d..33dda8be4 100644
--- a/tests/generator-Tests/expected/Streams/Java.IO.FilterOutputStream.cs
+++ b/tests/generator-Tests/expected/Streams/Java.IO.FilterOutputStream.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected/Streams/Java.IO.IOException.cs b/tests/generator-Tests/expected/Streams/Java.IO.IOException.cs
index 6ce0bf4ef..9584b3969 100644
--- a/tests/generator-Tests/expected/Streams/Java.IO.IOException.cs
+++ b/tests/generator-Tests/expected/Streams/Java.IO.IOException.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected/Streams/Java.IO.InputStream.cs b/tests/generator-Tests/expected/Streams/Java.IO.InputStream.cs
index 82db6bcc4..1bb1cd744 100644
--- a/tests/generator-Tests/expected/Streams/Java.IO.InputStream.cs
+++ b/tests/generator-Tests/expected/Streams/Java.IO.InputStream.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected/Streams/Java.IO.OutputStream.cs b/tests/generator-Tests/expected/Streams/Java.IO.OutputStream.cs
index 735484d95..84e376838 100644
--- a/tests/generator-Tests/expected/Streams/Java.IO.OutputStream.cs
+++ b/tests/generator-Tests/expected/Streams/Java.IO.OutputStream.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected/Streams/Java.Lang.Throwable.cs b/tests/generator-Tests/expected/Streams/Java.Lang.Throwable.cs
index 600f87e40..f057baf0a 100644
--- a/tests/generator-Tests/expected/Streams/Java.Lang.Throwable.cs
+++ b/tests/generator-Tests/expected/Streams/Java.Lang.Throwable.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected/TestInterface/ClassWithoutNamespace.cs b/tests/generator-Tests/expected/TestInterface/ClassWithoutNamespace.cs
index d5b670cad..3c095cabf 100644
--- a/tests/generator-Tests/expected/TestInterface/ClassWithoutNamespace.cs
+++ b/tests/generator-Tests/expected/TestInterface/ClassWithoutNamespace.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected/TestInterface/Test.ME.GenericImplementation.cs b/tests/generator-Tests/expected/TestInterface/Test.ME.GenericImplementation.cs
index a2c700557..dcd3d996e 100644
--- a/tests/generator-Tests/expected/TestInterface/Test.ME.GenericImplementation.cs
+++ b/tests/generator-Tests/expected/TestInterface/Test.ME.GenericImplementation.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected/TestInterface/Test.ME.GenericObjectPropertyImplementation.cs b/tests/generator-Tests/expected/TestInterface/Test.ME.GenericObjectPropertyImplementation.cs
index 50f5121d1..7573c8b90 100644
--- a/tests/generator-Tests/expected/TestInterface/Test.ME.GenericObjectPropertyImplementation.cs
+++ b/tests/generator-Tests/expected/TestInterface/Test.ME.GenericObjectPropertyImplementation.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected/TestInterface/Test.ME.GenericStringImplementation.cs b/tests/generator-Tests/expected/TestInterface/Test.ME.GenericStringImplementation.cs
index 7795cdfa1..e4423efaf 100644
--- a/tests/generator-Tests/expected/TestInterface/Test.ME.GenericStringImplementation.cs
+++ b/tests/generator-Tests/expected/TestInterface/Test.ME.GenericStringImplementation.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected/TestInterface/Test.ME.GenericStringPropertyImplementation.cs b/tests/generator-Tests/expected/TestInterface/Test.ME.GenericStringPropertyImplementation.cs
index 348305d01..15263ec41 100644
--- a/tests/generator-Tests/expected/TestInterface/Test.ME.GenericStringPropertyImplementation.cs
+++ b/tests/generator-Tests/expected/TestInterface/Test.ME.GenericStringPropertyImplementation.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected/TestInterface/Test.ME.TestInterfaceImplementation.cs b/tests/generator-Tests/expected/TestInterface/Test.ME.TestInterfaceImplementation.cs
index 512c02f86..f04972ac9 100644
--- a/tests/generator-Tests/expected/TestInterface/Test.ME.TestInterfaceImplementation.cs
+++ b/tests/generator-Tests/expected/TestInterface/Test.ME.TestInterfaceImplementation.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected/java.lang.Enum/Java.Lang.Enum.cs b/tests/generator-Tests/expected/java.lang.Enum/Java.Lang.Enum.cs
index 32152a9a0..8e1a0147c 100644
--- a/tests/generator-Tests/expected/java.lang.Enum/Java.Lang.Enum.cs
+++ b/tests/generator-Tests/expected/java.lang.Enum/Java.Lang.Enum.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected/java.lang.Enum/Java.Lang.Object.cs b/tests/generator-Tests/expected/java.lang.Enum/Java.Lang.Object.cs
index f9126387e..dd027b081 100644
--- a/tests/generator-Tests/expected/java.lang.Enum/Java.Lang.Object.cs
+++ b/tests/generator-Tests/expected/java.lang.Enum/Java.Lang.Object.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected/java.lang.Enum/Java.Lang.State.cs b/tests/generator-Tests/expected/java.lang.Enum/Java.Lang.State.cs
index d961a4845..cd59b54c6 100644
--- a/tests/generator-Tests/expected/java.lang.Enum/Java.Lang.State.cs
+++ b/tests/generator-Tests/expected/java.lang.Enum/Java.Lang.State.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected/java.lang.Object/Java.Interop.__TypeRegistrations.cs b/tests/generator-Tests/expected/java.lang.Object/Java.Interop.__TypeRegistrations.cs
index d71a25b64..0131993a1 100644
--- a/tests/generator-Tests/expected/java.lang.Object/Java.Interop.__TypeRegistrations.cs
+++ b/tests/generator-Tests/expected/java.lang.Object/Java.Interop.__TypeRegistrations.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected/java.lang.Object/Java.Lang.Object.cs b/tests/generator-Tests/expected/java.lang.Object/Java.Lang.Object.cs
index f9126387e..dd027b081 100644
--- a/tests/generator-Tests/expected/java.lang.Object/Java.Lang.Object.cs
+++ b/tests/generator-Tests/expected/java.lang.Object/Java.Lang.Object.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tests/generator-Tests/expected/java.util.List/Xamarin.Test.SomeObject.cs b/tests/generator-Tests/expected/java.util.List/Xamarin.Test.SomeObject.cs
index 1f761e762..b0f420982 100644
--- a/tests/generator-Tests/expected/java.util.List/Xamarin.Test.SomeObject.cs
+++ b/tests/generator-Tests/expected/java.util.List/Xamarin.Test.SomeObject.cs
@@ -1,3 +1,13 @@
+//------------------------------------------------------------------------------
+//
+// 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;
diff --git a/tools/generator/Java.Interop.Tools.Generator.ObjectModel/ClassGen.cs b/tools/generator/Java.Interop.Tools.Generator.ObjectModel/ClassGen.cs
index 30ce30b9e..d274cb311 100644
--- a/tools/generator/Java.Interop.Tools.Generator.ObjectModel/ClassGen.cs
+++ b/tools/generator/Java.Interop.Tools.Generator.ObjectModel/ClassGen.cs
@@ -137,6 +137,7 @@ public override void FixupExplicitImplementation ()
public override void Generate (CodeGenerationOptions opt, GenerationInfo gen_info)
{
using (var sw = gen_info.OpenStream (opt.GetFileName (FullName))) {
+ WriteAutoGeneratedHeader (sw);
sw.WriteLine ("using System;");
sw.WriteLine ("using System.Collections.Generic;");
if (opt.CodeGenerationTarget != CodeGenerationTarget.JavaInterop1) {
@@ -188,6 +189,7 @@ public static void GenerateTypeRegistrations (CodeGenerationOptions opt, Generat
v.Add (new KeyValuePair (reg.Key, reg.Value));
}
+ WriteAutoGeneratedHeader (sw);
sw.WriteLine ("using System;");
sw.WriteLine ("using System.Collections.Generic;");
if (opt.CodeGenerationTarget != CodeGenerationTarget.JavaInterop1) {
@@ -254,6 +256,20 @@ public static void GenerateTypeRegistrations (CodeGenerationOptions opt, Generat
}
}
+ static void WriteAutoGeneratedHeader (StreamWriter sw)
+ {
+ sw.WriteLine ("//------------------------------------------------------------------------------");
+ sw.WriteLine ("// ");
+ sw.WriteLine ("// This code was generated by a tool.");
+ sw.WriteLine ("//");
+ sw.WriteLine ("// Changes to this file may cause incorrect behavior and will be lost if");
+ sw.WriteLine ("// the code is regenerated.");
+ sw.WriteLine ("// ");
+ sw.WriteLine ("//------------------------------------------------------------------------------");
+ sw.WriteLine ();
+ sw.WriteLine ("#nullable restore"); // Roslyn turns off NRT for generated files by default, re-enable it
+ }
+
protected override bool GetEnumMappedMemberInfo ()
{
foreach (var m in Ctors)