/// <summary> /// Gets the type reference from a module from a java type names. /// </summary> /// <param name="module">The module.</param> /// <param name="jc">Java class.</param> /// <returns>The type reference.</returns> public static TypeReference ResolveBaseType(this ModuleDefinition module, JavaClass jc) { Guard.NotNull(ref module, nameof(module)); Guard.NotNull(ref jc, nameof(jc)); string superName = jc.GetSuperName(); if (superName == jc.GetName()) { return(module.TypeSystem.Object); } if (superName != "java/lang/Object" || !jc.AccessFlags.HasFlag(JavaClassAccessFlags.Interface)) { return(module.GetJavaType(superName)); } return(null); }