25using System.Collections.Generic;
26using System.Diagnostics;
42using System.Reflection;
43using System.Reflection.Emit;
52 abstract partial class RuntimeByteCodeJavaType : RuntimeJavaType
54#pragma warning disable 628
55 sealed partial class RuntimeByteCodeJavaType : RuntimeJavaType
59#if IMPORTER == false && NETCOREAPP
61 static readonly
PropertyInfo MetadataTokenInternalPropertyInfo = typeof(MethodBuilder).GetProperty(
"MetadataTokenInternal", BindingFlags.Instance | BindingFlags.NonPublic);
70 volatile DynamicImpl impl;
71 readonly RuntimeJavaType baseTypeWrapper;
72 readonly RuntimeJavaType[] interfaces;
73 readonly
string sourceFileName;
75 byte[][] lineNumberTables;
82 var tw = clazz.GetClassType();
88 CheckMissing(
this, tw);
93 private static void CheckMissing(RuntimeJavaType prev, RuntimeJavaType tw)
102 if (mt.Assembly.__IsMissing)
109 foreach (RuntimeJavaType iface
in tw.Interfaces)
111 CheckMissing(tw, iface);
114 tw = tw.BaseTypeWrapper;
127 Profiler.Count(
"RuntimeByteCodeJavaType");
129 this.sourceFileName = f.SourceFileAttribute;
133 foreach (ClassFile.Method method in f.Methods)
135 RuntimeJavaMethod mw;
137 && (mw = Context.
JavaBase.TypeOfJavaLangObject.GetMethod(method.Name, method.Signature,
false)) !=
null
141 throw new VerifyError(
"class " + f.Name +
" overrides final method " + method.Name +
"." + method.Signature);
147 this.baseTypeWrapper = LoadTypeWrapper(
classLoader, pd, f.SuperClass);
148 if (!BaseTypeWrapper.IsAccessibleFrom(
this))
150 throw new IllegalAccessError(
"Class " + f.Name +
" cannot access its superclass " + BaseTypeWrapper.Name);
152 if (BaseTypeWrapper.IsFinal)
154 throw new VerifyError(
"Class " + f.Name +
" extends final class " + BaseTypeWrapper.Name);
156 if (BaseTypeWrapper.IsInterface)
162 throw new VerifyError(BaseTypeWrapper.Name +
" cannot be used as a base class");
167 throw new VerifyError(
"Defining value types in Java is not implemented in IKVM v1");
175 ClassFile.ConstantPoolItemClass[] interfaces = f.Interfaces;
176 this.interfaces =
new RuntimeJavaType[interfaces.Length];
177 for (
int i = 0; i < interfaces.Length; i++)
179 RuntimeJavaType iface = LoadTypeWrapper(
classLoader, pd, interfaces[i]);
180 if (!iface.IsAccessibleFrom(
this))
182 throw new IllegalAccessError(
"Class " + f.Name +
" cannot access its superinterface " + iface.Name);
184 if (!iface.IsInterface)
188 this.interfaces[i] = iface;
191 impl =
new JavaTypeImpl(host, f,
this);
194 private void VerifyDelegate(ClassFile f)
200 ClassFile.Method invoke =
null;
201 ClassFile.Method beginInvoke =
null;
202 ClassFile.Method endInvoke =
null;
203 ClassFile.Method constructor =
null;
204 foreach (ClassFile.Method m in f.Methods)
206 if (m.Name ==
"Invoke")
210 throw new VerifyError(
"Delegate may only have a single Invoke method");
214 else if (m.Name ==
"BeginInvoke")
216 if (beginInvoke !=
null)
218 throw new VerifyError(
"Delegate may only have a single BeginInvoke method");
222 else if (m.Name ==
"EndInvoke")
224 if (endInvoke !=
null)
226 throw new VerifyError(
"Delegate may only have a single EndInvoke method");
230 else if (m.Name ==
"<init>")
232 if (constructor !=
null)
234 throw new VerifyError(
"Delegate may only have a single constructor");
240 throw new VerifyError(
"Delegate may not have any native methods besides Invoke, BeginInvoke and EndInvoke");
243 if (invoke ==
null || constructor ==
null)
245 throw new VerifyError(
"Delegate must have a constructor and an Invoke method");
247 if (!invoke.IsPublic || !invoke.IsNative || invoke.IsFinal || invoke.IsStatic)
249 throw new VerifyError(
"Delegate Invoke method must be a public native non-final instance method");
251 if ((beginInvoke !=
null && endInvoke ==
null) || (beginInvoke ==
null && endInvoke !=
null))
253 throw new VerifyError(
"Delegate must have both BeginInvoke and EndInvoke or neither");
255 if (!constructor.IsPublic)
257 throw new VerifyError(
"Delegate constructor must be public");
259 if (constructor.Instructions.Length < 3
261 || constructor.Instructions[0].NormalizedArg1 != 0
265 throw new VerifyError(
"Delegate constructor must be empty");
267 if (f.Fields.Length != 0)
269 throw new VerifyError(
"Delegate may not declare any fields");
271 var iface =
classLoader.TryLoadClassByName(f.Name + RuntimeManagedJavaType.DelegateInterfaceSuffix);
272 DelegateInnerClassCheck(iface !=
null);
273 DelegateInnerClassCheck(iface.IsInterface);
274 DelegateInnerClassCheck(iface.IsPublic);
275 DelegateInnerClassCheck(iface.ClassLoader ==
classLoader);
276 RuntimeJavaMethod[] methods = iface.GetMethods();
277 DelegateInnerClassCheck(methods.Length == 1 && methods[0].Name ==
"Invoke");
278 if (methods[0].
Signature != invoke.Signature)
280 throw new VerifyError(
"Delegate Invoke method signature must be identical to inner interface Invoke method signature");
282 if (iface.Interfaces.Length != 0)
284 throw new VerifyError(
"Delegate inner interface may not extend any interfaces");
286 if (constructor.Signature !=
"(" + iface.SigName +
")V")
288 throw new VerifyError(
"Delegate constructor must take a single argument of type inner Method interface");
290 if (beginInvoke !=
null && beginInvoke.Signature != invoke.Signature.Substring(0, invoke.Signature.IndexOf(
')')) +
"Lcli.System.AsyncCallback;Ljava.lang.Object;)Lcli.System.IAsyncResult;")
292 throw new VerifyError(
"Delegate BeginInvoke method has incorrect signature");
294 if (endInvoke !=
null && endInvoke.Signature !=
"(Lcli.System.IAsyncResult;)" + invoke.Signature.Substring(invoke.Signature.IndexOf(
')') + 1))
296 throw new VerifyError(
"Delegate EndInvoke method has incorrect signature");
300 private static void DelegateInnerClassCheck(
bool cond)
304 throw new VerifyError(
"Delegate must have a public inner interface named Method with a single method named Invoke");
308 private bool IsDelegate
312 RuntimeJavaType baseTypeWrapper = BaseTypeWrapper;
317 internal sealed override RuntimeJavaType BaseTypeWrapper
319 get {
return baseTypeWrapper; }
322 internal override RuntimeClassLoader ClassLoader =>
classLoader;
324 internal override Modifiers ReflectiveModifiers
328 return impl.ReflectiveModifiers;
332 internal override RuntimeJavaType[] Interfaces
340 internal override RuntimeJavaType[] InnerClasses
344 return impl.InnerClasses;
348 internal override RuntimeJavaType DeclaringTypeWrapper
352 return impl.DeclaringTypeWrapper;
356 internal override Type TypeAsTBD
364 internal override void Finish()
367 impl = impl.Finish();
370 internal void CreateStep1()
372 ((JavaTypeImpl)impl).CreateStep1();
375 internal void CreateStep2()
377 ((JavaTypeImpl)impl).CreateStep2();
380 private bool IsSerializable
384 return this.IsSubTypeOf(Context.
JavaBase.TypeOfJavaIoSerializable);
388 static bool CheckRequireOverrideStub(RuntimeJavaMethod mw1, RuntimeJavaMethod mw2)
391 if (!TypesMatchForOverride(mw1.ReturnType, mw2.ReturnType))
394 var args1 = mw1.GetParameters();
395 var args2 = mw2.GetParameters();
396 for (
int i = 0; i < args1.Length; i++)
397 if (!TypesMatchForOverride(args1[i], args2[i]))
403 static bool TypesMatchForOverride(RuntimeJavaType tw1, RuntimeJavaType tw2)
407 else if (tw1.IsUnloadable && tw2.IsUnloadable)
408 return ((RuntimeUnloadableJavaType)tw1).CustomModifier == ((RuntimeUnloadableJavaType)tw2).CustomModifier;
413 void GenerateOverrideStub(TypeBuilder typeBuilder, RuntimeJavaMethod baseMethod,
MethodInfo target, RuntimeJavaMethod targetMethod)
415 Debug.Assert(!baseMethod.HasCallerID);
417 var overrideStub = baseMethod.GetDefineMethodHelper().DefineMethod(
this, typeBuilder,
"__<overridestub>" + baseMethod.DeclaringType.Name +
"::" + baseMethod.Name, MethodAttributes.Private | MethodAttributes.Virtual | MethodAttributes.NewSlot | MethodAttributes.Final);
418 typeBuilder.DefineMethodOverride(overrideStub, (
MethodInfo)baseMethod.GetMethod());
420 var stubargs = baseMethod.GetParameters();
421 var targetArgs = targetMethod.GetParameters();
423 ilgen.Emit(OpCodes.Ldarg_0);
425 for (
int i = 0; i < targetArgs.Length; i++)
427 ilgen.EmitLdarg(i + 1);
428 ConvertStubArg(stubargs[i], targetArgs[i], ilgen);
432 ilgen.Emit(OpCodes.Callvirt, target);
434 targetMethod.EmitCallvirt(ilgen);
436 ConvertStubArg(targetMethod.ReturnType, baseMethod.ReturnType, ilgen);
437 ilgen.Emit(OpCodes.Ret);
441 static void ConvertStubArg(RuntimeJavaType src, RuntimeJavaType dst, CodeEmitter ilgen)
445 if (dst.IsUnloadable)
447 if (!src.IsUnloadable && (src.IsGhost || src.IsNonPrimitiveValueType))
449 src.EmitConvSignatureTypeToStackType(ilgen);
452 else if (dst.IsGhost || dst.IsNonPrimitiveValueType)
454 dst.EmitConvStackTypeToSignatureType(ilgen,
null);
458 dst.EmitCheckcast(ilgen);
463 static void GetParameterNamesFromMP(ClassFile.Method m,
string[] parameterNames)
465 var methodParameters = m.MethodParameters;
466 if (methodParameters !=
null)
468 for (
int i = 0, count = Math.Min(parameterNames.Length, methodParameters.Length); i < count; i++)
470 if (parameterNames[i] ==
null)
472 parameterNames[i] = methodParameters[i].name;
480 var localVars = m.LocalVariableTableAttribute;
481 if (localVars !=
null)
483 for (
int i = m.IsStatic ? 0 : 1, pos = 0; i < m.ArgMap.Length; i++)
486 if (m.ArgMap[i] != -1)
488 if (parameterNames[pos] ==
null)
490 for (
int j = 0; j < localVars.Length; j++)
492 if (localVars[j].index == i)
494 parameterNames[pos] = localVars[j].name;
508 var names =
new List<string>();
509 for (
int i = 1; sig[i] !=
')'; i++)
514 int end = sig.IndexOf(
';', i);
515 names.Add(GetParameterName(sig.Substring(i, end - i)));
518 else if (sig[i] ==
'[')
520 while (sig[++i] ==
'[') ;
524 int end = sig.IndexOf(
';', i);
525 names.Add(GetParameterName(sig.Substring(i, end - i)) +
"arr");
587 for (
int i = 0; i < parameterNames.Length; i++)
588 if (parameterNames[i] ==
null)
589 parameterNames[i] = names[i];
592 protected static ParameterBuilder[]
GetParameterBuilders(MethodBuilder mb,
int parameterCount,
string[] parameterNames)
594 var parameterBuilders =
new ParameterBuilder[parameterCount];
595 Dictionary<string, int> clashes =
null;
596 for (
int i = 0; i < parameterBuilders.Length; i++)
599 if (parameterNames !=
null && parameterNames[i] !=
null)
601 name = parameterNames[i];
602 if (Array.IndexOf(parameterNames, name, i + 1) >= 0 || (clashes !=
null && clashes.ContainsKey(name)))
604 clashes ??=
new Dictionary<string, int>();
607 if (clashes.ContainsKey(name))
608 clash = clashes[name] + 1;
610 clashes[name] = clash;
614 parameterBuilders[i] = mb.DefineParameter(i + 1, ParameterAttributes.None, name);
616 return parameterBuilders;
619 static string GetParameterName(
string type)
621 if (type ==
"java.lang.String")
625 else if (type ==
"java.lang.Object")
631 var sb =
new ValueStringBuilder(type.Length);
632 for (
int i = type.LastIndexOf(
'.') + 1; i < type.Length; i++)
633 if (
char.IsUpper(type, i))
634 sb.Append(
char.ToLower(type[i]));
636 return sb.ToString();
642 protected abstract void AddMapXmlFields(
ref RuntimeJavaField[] fields);
644 protected abstract bool EmitMapXmlMethodPrologueAndOrBody(CodeEmitter ilgen, ClassFile f, ClassFile.Method m);
646 protected abstract void EmitMapXmlMetadata(TypeBuilder typeBuilder, ClassFile classFile, RuntimeJavaField[] fields, RuntimeJavaMethod[] methods);
648 protected abstract MethodBuilder DefineGhostMethod(TypeBuilder typeBuilder,
string name, MethodAttributes attribs, RuntimeJavaMethod mw);
650 protected abstract void FinishGhost(TypeBuilder typeBuilder, RuntimeJavaMethod[] methods);
652 protected abstract void FinishGhostStep2();
654 protected abstract TypeBuilder DefineGhostType(
string mangledTypeName, TypeAttributes typeAttribs);
658 private bool IsPInvokeMethod(ClassFile.Method m)
664 IKVM.Tools.Importer.MapXml.Class clazz;
665 if (mapxml.TryGetValue(
this.Name, out clazz) && clazz.Methods !=
null)
669 if (method.Name == m.Name && method.Sig == m.Signature)
671 if (method.Attributes !=
null)
675 if (Context.StaticCompiler.GetType(
classLoader, attr.Type) == Context.
Resolver.ResolveCoreType(typeof(
System.
Runtime.InteropServices.DllImportAttribute).FullName).AsReflection())
687 if (m.Annotations !=
null)
689 foreach (
object[] annot
in m.Annotations)
691 if (
"Lcli/System/Runtime/InteropServices/DllImportAttribute$Annotation;".Equals(annot[1]))
700 internal override MethodBase LinkMethod(RuntimeJavaMethod mw)
703 return impl.LinkMethod(mw);
706 internal override FieldInfo LinkField(RuntimeJavaField fw)
709 return impl.LinkField(fw);
712 internal override void EmitRunClassConstructor(CodeEmitter ilgen)
714 impl.EmitRunClassConstructor(ilgen);
717 internal override string GetGenericSignature()
719 return impl.GetGenericSignature();
722 internal override string GetGenericMethodSignature(RuntimeJavaMethod method)
724 var methods = GetMethods();
725 for (
int i = 0; i < methods.Length; i++)
726 if (methods[i] == method)
727 return impl.GetGenericMethodSignature(i);
729 Debug.Fail(
"Unreachable code");
733 internal override string GetGenericFieldSignature(RuntimeJavaField field)
735 var fields = GetFields();
736 for (
int i = 0; i < fields.Length; i++)
737 if (fields[i] == field)
738 return impl.GetGenericFieldSignature(i);
740 Debug.Fail(
"Unreachable code");
744 internal override MethodParametersEntry[] GetMethodParameters(RuntimeJavaMethod method)
746 var methods = GetMethods();
747 for (
int i = 0; i < methods.Length; i++)
748 if (methods[i] == method)
749 return impl.GetMethodParameters(i);
751 Debug.Fail(
"Unreachable code");
757 internal override string[] GetEnclosingMethod()
759 return impl.GetEnclosingMethod();
766 internal override string GetSourceFileName()
768 return sourceFileName;
778 if (mb is MethodBuilder mbld)
781 return mbld.GetToken().Token;
785 return mbld.GetMetadataToken();
787 catch (InvalidOperationException)
789 if (MetadataTokenInternalPropertyInfo !=
null)
790 return (
int)MetadataTokenInternalPropertyInfo.GetValue(mbld);
796 return mb.MetadataToken;
798 return mb.GetMetadataToken();
808 internal override int GetSourceLineNumber(
MethodBase mb,
int ilOffset)
810 if (lineNumberTables !=
null)
812 var token = GetMethodBaseToken(mb);
813 var methods = GetMethods();
814 for (
int i = 0; i < methods.Length; i++)
816 if (GetMethodBaseToken(methods[i].GetMethod()) == token)
818 if (lineNumberTables[i] !=
null)
829 object[] DecodeAnnotations(
object[] definitions)
831 if (definitions ==
null)
834 var loader = ClassLoader.GetJavaClassLoader();
835 var annotations =
new List<object>();
837 for (
int i = 0; i < definitions.Length; i++)
839 var obj = JVM.NewAnnotation(loader, definitions[i]);
841 annotations.Add(obj);
844 return annotations.ToArray();
847 internal override object[] GetDeclaredAnnotations()
849 return DecodeAnnotations(impl.GetDeclaredAnnotations());
852 internal override object[] GetMethodAnnotations(RuntimeJavaMethod mw)
854 RuntimeJavaMethod[] methods = GetMethods();
855 for (
int i = 0; i < methods.Length; i++)
857 if (methods[i] == mw)
859 return DecodeAnnotations(impl.GetMethodAnnotations(i));
862 Debug.Fail(
"Unreachable code");
866 internal override object[][] GetParameterAnnotations(RuntimeJavaMethod mw)
868 RuntimeJavaMethod[] methods = GetMethods();
869 for (
int i = 0; i < methods.Length; i++)
871 if (methods[i] == mw)
873 object[][] annotations = impl.GetParameterAnnotations(i);
874 if (annotations !=
null)
876 object[][] objs =
new object[annotations.Length][];
877 for (
int j = 0; j < annotations.Length; j++)
879 objs[j] = DecodeAnnotations(annotations[j]);
886 Debug.Fail(
"Unreachable code");
890 internal override object[] GetFieldAnnotations(RuntimeJavaField fw)
892 RuntimeJavaField[] fields = GetFields();
893 for (
int i = 0; i < fields.Length; i++)
897 return DecodeAnnotations(impl.GetFieldAnnotations(i));
900 Debug.Fail(
"Unreachable code");
904 internal override object GetAnnotationDefault(RuntimeJavaMethod mw)
906 RuntimeJavaMethod[] methods = GetMethods();
907 for (
int i = 0; i < methods.Length; i++)
909 if (methods[i] == mw)
911 object defVal = impl.GetMethodDefaultValue(i);
914 return JVM.NewAnnotationElementValue(mw.DeclaringType.ClassLoader.GetJavaClassLoader(), mw.ReturnType.ClassObject, defVal);
919 Debug.Fail(
"Unreachable code");
923 private Type GetBaseTypeForDefineType()
925 return BaseTypeWrapper.TypeAsBaseType;
932 protected virtual Type GetBaseTypeForDefineType()
934 return BaseTypeWrapper.TypeAsBaseType;
937 internal virtual RuntimeJavaMethod[] GetReplacedMethodsFor(RuntimeJavaMethod mw)
944 internal override MethodBase GetSerializationConstructor()
946 return automagicSerializationCtor;
949 private Type[] GetModOpt(RuntimeJavaType tw,
bool mustBePublic)
951 return GetModOpt(ClassLoader.GetTypeWrapperFactory(), tw, mustBePublic);
954 internal static Type[] GetModOpt(RuntimeJavaTypeFactory context, RuntimeJavaType tw,
bool mustBePublic)
959 if (((RuntimeUnloadableJavaType)tw).
MissingType ==
null)
961 modopt =
new Type[] { ((RuntimeUnloadableJavaType)tw).GetCustomModifier(context) };
966 RuntimeJavaType tw1 = tw.IsArray ? tw.GetUltimateElementTypeWrapper() : tw;
967 if (tw1.IsErasedOrBoxedPrimitiveOrRemapped || tw.IsGhostArray || (mustBePublic && !tw1.IsPublic))
970 modopt =
new Type[tw.ArrayRank + 1];
971 modopt[0] = GetModOptHelper(tw1);
972 for (
int i = 1; i < modopt.Length; i++)
974 modopt[i] = tw.Context.Types.Array;
981 private static Type GetModOptHelper(RuntimeJavaType tw)
983 Debug.Assert(!tw.IsUnloadable);
986 return RuntimeArrayJavaType.MakeArrayType(GetModOptHelper(tw.GetUltimateElementTypeWrapper()), tw.ArrayRank);
994 return tw.TypeAsBaseType;
999 private bool NeedsType2AccessStub(RuntimeJavaField fw)
1001 Debug.Assert(this.IsPublic && fw.DeclaringType ==
this);
1002 return fw.IsType2FinalField
1003 || (fw.HasNonPublicTypeInSignature
1004 && (fw.IsPublic || (fw.IsProtected && !this.IsFinal))
1005 && (fw.FieldTypeWrapper.IsUnloadable || fw.FieldTypeWrapper.IsAccessibleFrom(
this) || fw.FieldTypeWrapper.InternalsVisibleTo(
this)));
1009 internal static bool RequiresDynamicReflectionCallerClass(
string classFile,
string method,
string signature)
1011 return (classFile ==
"java.lang.ClassLoader" && method ==
"getParent" && signature ==
"()Ljava.lang.ClassLoader;")
1012 || (classFile ==
"java.lang.Thread" && method ==
"getContextClassLoader" && signature ==
"()Ljava.lang.ClassLoader;")
1013 || (classFile ==
"java.io.ObjectStreamField" && method ==
"getType" && signature ==
"()Ljava.lang.Class;")
1014 || (classFile ==
"javax.sql.rowset.serial.SerialJavaObject" && method ==
"getFields" && signature ==
"()[Ljava.lang.reflect.Field;")
1019 internal override object[] GetConstantPool()
1022 return impl.GetConstantPool();
1025 internal override byte[] GetRawTypeAnnotations()
1028 return impl.GetRawTypeAnnotations();
1031 internal override byte[] GetMethodRawTypeAnnotations(RuntimeJavaMethod mw)
1034 return impl.GetMethodRawTypeAnnotations(Array.IndexOf(GetMethods(), mw));
1037 internal override byte[] GetFieldRawTypeAnnotations(RuntimeJavaField fw)
1040 return impl.GetFieldRawTypeAnnotations(Array.IndexOf(GetFields(), fw));
1043#if !IMPORTER && !EXPORTER
1044 internal override RuntimeJavaType Host
1046 get {
return impl.Host; }
1050 [Conditional(
"IMPORTER")]
1051 internal void EmitLevel4Warning(
HardError error,
string message)
1054 if (ClassLoader.WarningLevelHigh)
1059 ClassLoader.Diagnostics.EmittedAbstractMethodError(this.
Name, message);
1061 case HardError.IncompatibleClassChangeError:
1062 ClassLoader.Diagnostics.EmittedIncompatibleClassChangeError(this.
Name, message);
1065 throw new InvalidOperationException();
java.security.ProtectionDomain ProtectionDomain
IKVM.Reflection.Type Type
IKVM.Reflection.FieldInfo FieldInfo
IKVM.Reflection.PropertyInfo PropertyInfo
IKVM.Reflection.MethodInfo MethodInfo
IKVM.Reflection.MethodBase MethodBase
global::java.lang.invoke.LambdaForm.Name Name
int GetLineNumber(int ilOffset)
CodeEmitter Create(MethodBuilder mb)
Creates a new instance.
static ParameterBuilder[] GetParameterBuilders(MethodBuilder mb, int parameterCount, string[] parameterNames)
static void GetParameterNamesFromSig(string sig, string[] parameterNames)
static void GetParameterNamesFromLVT(ClassFile.Method m, string[] parameterNames)
readonly RuntimeClassLoader classLoader
Runtime support for a class loader.
RuntimeContext Context
Gets a reference to the RuntimeContext that this RuntimeClassLoader is hosted within.
CodeEmitterFactory CodeEmitterFactory
Gets the CodeEmitterFactory associated with this instance of the runtime.
Types Types
Gets the Types associated with this instance of the runtime.
RuntimeVerifierJavaTypeFactory VerifierJavaTypeFactory
Gets the RuntimeVerifierJavaTypeFactory associated with this instance of the runtime.
ISymbolResolver Resolver
Gets the ISymbolResolver associated with this instance of the runtime.
CoreClasses JavaBase
Gets the CoreClasses associated with this instance of the runtime.
@ IncompatibleClassChangeError
static DiagnosticEvent MissingBaseTypeReference(string arg0, string arg1, Exception? exception=null, DiagnosticLocation location=default)
The 'MissingBaseTypeReference' diagnostic.
static DiagnosticEvent MissingBaseType(string arg0, string arg1, string arg2, string arg3, Exception? exception=null, DiagnosticLocation location=default)
The 'MissingBaseType' diagnostic.