25using System.Collections.Generic;
26using System.Diagnostics;
35#if IMPORTER || EXPORTER
41using System.Reflection;
42using System.Reflection.Emit;
63 this.context = context ??
throw new ArgumentNullException(nameof(context));
76 if (type.IsValueType && context.AttributeHelper.IsGhostInterface(type))
80 else if (context.AttributeHelper.IsRemappedType(type))
100 RuntimeJavaType baseTypeWrapper;
101 volatile RuntimeJavaType[] interfaces;
103 volatile bool clinitMethodSet;
114 if (type.HasElementType)
116 if (type.IsGenericType)
125 var name = attr.InnerClassName;
131 if (type.DeclaringType !=
null)
132 return GetName(context, type.DeclaringType) +
"$" +
TypeNameUtil.Unescape(type.Name);
139 if (type.IsInterface || context.
AttributeHelper.IsGhostInterface(type))
143 else if (type.BaseType ==
null)
146 return context.
JavaBase.TypeOfJavaLangObject;
156 return context.
JavaBase.TypeOfJavaLangObject;
164 RuntimeJavaType tw =
null;
167 type = type.BaseType;
194 this(context, GetModifiers(context, type), name)
196 Debug.Assert(!(type is TypeBuilder));
197 Debug.Assert(!type.Name.EndsWith(
"[]"));
202 internal override RuntimeJavaType BaseTypeWrapper
207 return baseTypeWrapper;
209 return baseTypeWrapper = GetBaseTypeWrapper(Context, type);
213 internal override RuntimeClassLoader ClassLoader => Context.AssemblyClassLoaderFactory.FromAssembly(type.Assembly);
225 if (type.IsPublic || type.IsNestedPublic)
237 if (type.IsInterface)
249 internal override bool HasStaticInitializer
253 if (!clinitMethodSet)
257 clinitMethod = type.GetMethod(
"__<clinit>", BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic);
263 clinitMethodSet =
true;
265 return clinitMethod !=
null;
269 internal override RuntimeJavaType[] Interfaces
273 if (interfaces ==
null)
275 interfaces = GetInterfaces();
281 private RuntimeJavaType[] GetInterfaces()
290 if (BaseTypeWrapper == Context.
JavaBase.TypeOfJavaLangObject)
291 return GetImplementedInterfacesAsTypeWrappers(Context, type);
293 return Array.Empty<RuntimeJavaType>();
297 var interfaceWrappers =
new RuntimeJavaType[interfaceNames.Length];
300 for (
int i = 0; i < interfaceWrappers.Length; i++)
301 interfaceWrappers[i] = Context.
ClassLoaderFactory.LoadClassCritical(interfaceNames[i]);
305 var typeWrappers = GetImplementedInterfacesAsTypeWrappers(Context, type);
306 for (
int i = 0; i < interfaceWrappers.Length; i++)
308 for (
int j = 0; j < typeWrappers.Length; j++)
310 if (typeWrappers[j].
Name == interfaceNames[i])
312 interfaceWrappers[i] = typeWrappers[j];
317 if (interfaceWrappers[i] ==
null)
322 throw new InternalException($
"Unable to resolve interface {interfaceNames[i]} on type {this}");
328 return interfaceWrappers;
331 private bool IsNestedTypeAnonymousOrLocalClass(
Type type)
333 switch (type.Attributes & (TypeAttributes.SpecialName | TypeAttributes.VisibilityMask))
335 case TypeAttributes.SpecialName | TypeAttributes.NestedPublic:
336 case TypeAttributes.SpecialName | TypeAttributes.NestedAssembly:
343 private bool IsAnnotationAttribute(
Type type)
345 return type.Name.EndsWith(
"Attribute", StringComparison.Ordinal) && type.IsClass && type.BaseType.FullName ==
"ikvm.internal.AnnotationAttributeBase";
348 internal override RuntimeJavaType[] InnerClasses
352 var wrappers =
new List<RuntimeJavaType>();
353 foreach (var nested
in type.GetNestedTypes(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.DeclaredOnly))
355 if (IsAnnotationAttribute(nested))
360 else if (IsNestedTypeAnonymousOrLocalClass(nested))
373 foreach (
string s
in Context.
AttributeHelper.GetNonNestedInnerClasses(type))
375 wrappers.Add(ClassLoader.LoadClassByName(s));
378 return wrappers.ToArray();
382 internal override RuntimeJavaType DeclaringTypeWrapper
386 if (IsNestedTypeAnonymousOrLocalClass(type))
390 Type declaringType = type.DeclaringType;
391 if (declaringType !=
null)
398 return ClassLoader.LoadClassByName(decl);
406 private static bool IsAnonymousClassName(
string name)
408 int index = name.LastIndexOf(
'$') + 1;
409 if (index > 1 && index < name.Length)
411 while (index < name.Length)
413 if (
"0123456789".IndexOf(name[index++]) == -1)
426 internal static Modifiers PredictReflectiveModifiers(RuntimeJavaType tw)
428 Modifiers modifiers = Modifiers.Static | (tw.Modifiers & (Modifiers.Public | Modifiers.Abstract |
Modifiers.Interface));
430 if (tw.IsFinal && !IsAnonymousClassName(tw.Name))
437 if (fw.Name ==
"this$0")
446 internal override Modifiers ReflectiveModifiers
450 if (reflectiveModifiers == 0)
458 mods = attr.Modifiers & (
Modifiers)0x761F;
460 else if (type.DeclaringType !=
null)
462 mods = PredictReflectiveModifiers(
this);
474 reflectiveModifiers = mods;
476 return reflectiveModifiers;
480 internal override Type TypeAsBaseType
488 private void SigTypePatchUp(
string sigtype,
ref RuntimeJavaType type)
490 if (sigtype != type.SigName)
496 type = ClassLoader.FieldTypeWrapperFromSig(sigtype,
LoadMode.LoadOrThrow);
498 else if (type.IsPrimitive)
501 if (sigtype != type.SigName)
503 throw new InvalidOperationException();
506 else if (type.IsNonPrimitiveValueType)
511 throw new InvalidOperationException();
515 if (sigtype[0] ==
'L')
517 sigtype = sigtype.Substring(1, sigtype.Length - 2);
521 RuntimeJavaType tw = ClassLoader.TryLoadClassByName(sigtype);
522 if (tw !=
null && tw.IsRemapped)
536 private static void ParseSig(
string sig, out
string[] sigparam, out
string sigret)
538 List<string> list =
new List<string>();
546 int end = sig.IndexOf(
';', pos) + 1;
547 list.Add(sig.Substring(pos, end - pos));
554 while (sig[pos + skip] ==
'[') skip++;
555 if (sig[pos + skip] ==
'L')
557 int end = sig.IndexOf(
';', pos) + 1;
558 list.Add(sig.Substring(pos, end - pos));
564 list.Add(sig.Substring(pos, skip));
570 sigparam = list.ToArray();
571 sigret = sig.Substring(pos + 1);
574 list.Add(sig.Substring(pos, 1));
584 return type.FullName ==
"ikvm.internal.CallerID";
586 return type == context.
JavaBase.TypeOfIkvmInternalCallerID.TypeAsSignatureType;
590 private static bool IsCallerSensitive(
MethodBase mb)
594#elif IMPORTER || EXPORTER
595 foreach (CustomAttributeData cad
in mb.GetCustomAttributesData())
597 if (cad.AttributeType.FullName ==
"sun.reflect.CallerSensitiveAttribute")
604 return mb.IsDefined(typeof(global::sun.reflect.CallerSensitiveAttribute),
false);
608 void GetNameSigFromMethodBase(
MethodBase method, out
string name, out
string sig, out RuntimeJavaType retType, out RuntimeJavaType[] paramTypes,
ref MemberFlags flags)
610 retType = method is
ConstructorInfo ? Context.PrimitiveJavaTypeFactory.VOID : GetParameterTypeWrapper(Context, ((
MethodInfo)method).ReturnParameter);
611 var parameters = method.GetParameters();
612 int len = parameters.Length;
613 if (len > 0 && IsCallerID(Context, parameters[len - 1].ParameterType) && ClassLoader == Context.
ClassLoaderFactory.GetBootstrapClassLoader() && IsCallerSensitive(method))
618 paramTypes =
new RuntimeJavaType[len];
619 for (
int i = 0; i < len; i++)
620 paramTypes[i] = GetParameterTypeWrapper(Context, parameters[i]);
627 ParseSig(sig, out var sigparams, out var sigret);
629 if (name ==
"<init>")
631 SigTypePatchUp(sigret,
ref retType);
634 if (paramTypes.Length == sigparams.Length + 1)
635 paramTypes =
ArrayUtil.DropFirst(paramTypes);
637 Debug.Assert(sigparams.Length == paramTypes.Length);
638 for (
int i = 0; i < sigparams.Length; i++)
639 SigTypePatchUp(sigparams[i],
ref paramTypes[i]);
645 name = method.IsStatic ?
"<clinit>" :
"<init>";
650 if (name.StartsWith(
NamePrefix.Bridge, StringComparison.Ordinal))
651 name = name.Substring(
NamePrefix.Bridge.Length);
652 if (method.IsSpecialName)
653 name =
UnicodeUtil.UnescapeInvalidSurrogates(name);
656 if (method.IsSpecialName && method.Name.StartsWith(
NamePrefix.DefaultMethod, StringComparison.Ordinal))
657 paramTypes =
ArrayUtil.DropFirst(paramTypes);
659 var sb =
new ValueStringBuilder();
661 foreach (var tw
in paramTypes)
662 sb.Append(tw.SigName);
664 sb.Append(retType.SigName);
671 const BindingFlags flags = BindingFlags.DeclaredOnly | BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.Instance;
674 var methods =
new List<RuntimeJavaMethod>();
676 foreach (var ctor
in type.GetConstructors(flags))
678 var hideFromJavaFlags = Context.
AttributeHelper.GetHideFromJavaFlags(ctor);
679 if (isDelegate && !ctor.IsStatic && (hideFromJavaFlags &
HideFromJavaFlags.Code) == 0)
680 methods.Add(
new DelegateConstructorJavaMethod(
this, ctor));
682 AddMethodOrConstructor(ctor, hideFromJavaFlags, methods);
685 AddMethods(type.GetMethods(flags), methods);
687 if (type.IsInterface && (type.IsPublic || type.IsNestedPublic))
689 var privateInterfaceMethods = type.GetNestedType(
NestedTypeName.PrivateInterfaceMethods, BindingFlags.NonPublic);
690 if (privateInterfaceMethods !=
null)
691 AddMethods(privateInterfaceMethods.GetMethods(flags), methods);
694 SetMethods(methods.ToArray());
697 private void AddMethods(
MethodInfo[] add, List<RuntimeJavaMethod> methods)
699 foreach (var method
in add)
700 AddMethodOrConstructor(method, Context.
AttributeHelper.GetHideFromJavaFlags(method), methods);
707 if (method.Name.StartsWith(
NamePrefix.Incomplete, StringComparison.Ordinal))
709 SetHasIncompleteInterfaceImplementation();
714 if (method.IsSpecialName && (method.Name.StartsWith(
"__<", StringComparison.Ordinal) || method.Name.StartsWith(
NamePrefix.DefaultMethod, StringComparison.Ordinal)))
721 var hideFromReflection = mi !=
null && (hideFromJavaFlags &
HideFromJavaFlags.Reflection) != 0;
722 var flags = hideFromReflection ? MemberFlags.HideFromReflection :
MemberFlags.None;
723 GetNameSigFromMethodBase(method, out var name, out var sig, out var retType, out var paramTypes,
ref flags);
729 if (hideFromReflection && name.StartsWith(
NamePrefix.AccessStub, StringComparison.Ordinal))
731 int id = Int32.Parse(name.Substring(
NamePrefix.AccessStub.Length, name.IndexOf(
'|',
NamePrefix.AccessStub.Length) -
NamePrefix.AccessStub.Length));
732 name = name.Substring(name.IndexOf(
'|',
NamePrefix.AccessStub.Length) + 1);
734 MethodInfo nonvirt = type.GetMethod(
NamePrefix.NonVirtual +
id, BindingFlags.NonPublic | BindingFlags.DeclaredOnly | BindingFlags.Instance);
743 var types =
new Type[paramTypes.Length];
744 for (
int i = 0; i < types.Length; i++)
745 types[i] = paramTypes[i].TypeAsSignatureType;
747 var ifmethod = TypeAsBaseType.GetMethod(method.Name, types);
752 else if (method.IsSpecialName && method.Name.StartsWith(
NamePrefix.PrivateInterfaceInstanceMethod, StringComparison.Ordinal))
756 else if (IsInterface && method.IsAbstract && (mods.Modifiers &
Modifiers.Abstract) == 0 && (impl = GetDefaultInterfaceMethodImpl(mi, sig)) !=
null)
764 if (mw.HasNonPublicTypeInSignature)
770 if (GetType2AccessStubs(name, sig, out stubVirt, out stubNonVirt))
772 mw =
new RuntimeAccessStubJavaMethod(
this, name, sig, mi, stubVirt, stubNonVirt ?? stubVirt, retType, paramTypes, mw.Modifiers, flags);
778 if (GetType2AccessStub(sig, out stub))
791 foreach (
MethodInfo candidate
in method.DeclaringType.GetMethods(BindingFlags.Public | BindingFlags.Static | BindingFlags.DeclaredOnly))
793 if (candidate.IsSpecialName
794 && candidate.Name.StartsWith(
NamePrefix.DefaultMethod, StringComparison.Ordinal)
795 && candidate.Name.Length == method.Name.Length +
NamePrefix.DefaultMethod.Length
796 && candidate.Name.EndsWith(method.Name, StringComparison.Ordinal))
800 RuntimeJavaType retType;
801 RuntimeJavaType[] paramTypes;
803 GetNameSigFromMethodBase(candidate, out name, out sig, out retType, out paramTypes,
ref flags);
804 if (sig == expectedSig)
813 bool GetType2AccessStubs(
string name,
string sig, out
MethodInfo stubVirt, out
MethodInfo stubNonVirt)
815 const BindingFlags flags = BindingFlags.DeclaredOnly | BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.Instance;
819 foreach (var method
in type.GetMethods(flags))
824 if (attr !=
null && attr.Name == name && attr.Sig == sig)
826 if (method.Name.StartsWith(
NamePrefix.NonVirtual, StringComparison.Ordinal))
828 stubNonVirt = method;
838 return stubVirt !=
null;
843 const BindingFlags flags = BindingFlags.DeclaredOnly | BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance;
846 foreach (var ctor
in type.GetConstructors(flags))
851 if (attr !=
null && attr.Sig == sig)
863 return field1.MetadataToken.CompareTo(field2.MetadataToken);
868 const BindingFlags flags = BindingFlags.DeclaredOnly | BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.Instance;
870 var fields =
new List<RuntimeJavaField>();
871 var rawfields = type.GetFields(flags);
872 Array.Sort(rawfields, SortFieldByToken);
876 var properties = type.GetProperties(flags);
877 foreach (var field
in rawfields)
879 var hideFromJavaFlags = Context.
AttributeHelper.GetHideFromJavaFlags(field);
882 if (field.Name.StartsWith(
NamePrefix.Type2AccessStubBackingField, StringComparison.Ordinal))
884 var tw = GetFieldTypeWrapper(Context, field);
885 var name = field.Name.Substring(
NamePrefix.Type2AccessStubBackingField.Length);
886 for (
int i = 0; i < properties.Length; i++)
888 if (properties[i] !=
null && name == properties[i].
Name && MatchTypes(tw, GetPropertyTypeWrapper(properties[i])))
891 properties[i] =
null;
899 if (field.IsSpecialName && field.Name.StartsWith(
"__<", StringComparison.Ordinal))
905 fields.Add(CreateFieldWrapper(field, hideFromJavaFlags));
910 foreach (var property
in properties)
911 if (property !=
null)
912 AddPropertyFieldWrapper(fields, property,
null);
914 SetFields(fields.ToArray());
917 static bool MatchTypes(RuntimeJavaType tw1, RuntimeJavaType tw2)
919 return tw1 == tw2 || (tw1.IsUnloadable && tw2.IsUnloadable && tw1.Name == tw2.Name);
926 var hideFromJavaFlags = Context.
AttributeHelper.GetHideFromJavaFlags(property);
947 RuntimeJavaType tw =
null;
948 foreach (var type
in modopt)
973 tw = tw.MakeArrayType(rank);
978 RuntimeJavaType GetPropertyTypeWrapper(
PropertyInfo property)
980 return TypeWrapperFromModOpt(Context, property.GetOptionalCustomModifiers()) ?? Context.
ClassLoaderFactory.GetJavaTypeFromType(property.PropertyType);
985 return TypeWrapperFromModOpt(context, field.GetOptionalCustomModifiers()) ?? context.
ClassLoaderFactory.GetJavaTypeFromType(field.FieldType);
990 var tw = TypeWrapperFromModOpt(context, param.GetOptionalCustomModifiers());
994 var parameterType = param.ParameterType;
995 if (parameterType.IsByRef)
998 parameterType = parameterType.GetElementType().MakeArrayType();
1007 var type = GetFieldTypeWrapper(Context, field);
1008 var name = field.Name;
1010 if (field.IsSpecialName)
1011 name =
UnicodeUtil.UnescapeInvalidSurrogates(name);
1013 if (field.IsLiteral)
1020 if (modifiers.IsInternal)
1028 return RuntimeJavaField.Create(
this, type, field, name, type.SigName, modifiers);
1032 internal override Type TypeAsTBD => type;
1034 internal override bool IsMapUnsafeException => Context.AttributeHelper.IsExceptionIsUnsafeForMapping(type);
1038 internal override void EmitRunClassConstructor(
CodeEmitter ilgen)
1040 if (HasStaticInitializer)
1042 ilgen.Emit(OpCodes.Call, clinitMethod);
1048 internal override string GetGenericSignature()
1059 if (method is RemappedJavaMethod remappedMethod)
1060 return remappedMethod.GetGenericSignature();
1062 var methodBase = method.GetMethod();
1063 if (methodBase !=
null)
1075 var fi = field.GetField();
1088 var mb = method.GetMethod();
1095 if (attr.IsMalformed)
1098 var parameters = mb.GetParameters();
1100 for (
int i = 0; i < mp.Length; i++)
1102 mp[i].name = i < parameters.Length ? parameters[i].Name :
null;
1103 mp[i].accessFlags = (AccessFlag)attr.Modifiers[i];
1109#if !IMPORTER && !EXPORTER
1111 internal override string[] GetEnclosingMethod()
1115 return new string[] { enc.ClassName, enc.MethodName, enc.MethodSignature };
1120 internal override object[] GetDeclaredAnnotations()
1122 return type.GetCustomAttributes(
false);
1127 var mb = mw.GetMethod();
1134 return mb.GetCustomAttributes(
false);
1139 var mb = mw.GetMethod();
1146 var parameters = mb.GetParameters();
1148 if (mb.IsStatic && !mw.IsStatic && mw.Name !=
"<init>")
1155 var attribs =
new object[parameters.Length - skip - skipEnd][];
1156 for (
int i = skip; i < parameters.Length - skipEnd; i++)
1157 attribs[i - skip] = parameters[i].GetCustomAttributes(
false);
1164 var field = fw.GetField();
1166 return field.GetCustomAttributes(
false);
1169 return prop.GetProperty().GetCustomAttributes(
false);
1171 return Array.Empty<
object>();
1176 internal sealed class CompiledAnnotation :
Annotation
1189 this.context = context ??
throw new ArgumentNullException(nameof(context));
1190 constructor = type.GetConstructor(
new Type[] { context.
Resolver.ResolveCoreType(typeof(
object).FullName).MakeArrayType().AsReflection() });
1193 private CustomAttributeBuilder MakeCustomAttributeBuilder(
RuntimeClassLoader loader,
object annotation)
1198 internal override void Apply(
RuntimeClassLoader loader, TypeBuilder tb,
object annotation)
1200 tb.SetCustomAttribute(MakeCustomAttributeBuilder(loader, annotation));
1203 internal override void Apply(
RuntimeClassLoader loader, MethodBuilder mb,
object annotation)
1205 mb.SetCustomAttribute(MakeCustomAttributeBuilder(loader, annotation));
1208 internal override void Apply(
RuntimeClassLoader loader, FieldBuilder fb,
object annotation)
1210 fb.SetCustomAttribute(MakeCustomAttributeBuilder(loader, annotation));
1213 internal override void Apply(
RuntimeClassLoader loader, ParameterBuilder pb,
object annotation)
1215 pb.SetCustomAttribute(MakeCustomAttributeBuilder(loader, annotation));
1218 internal override void Apply(
RuntimeClassLoader loader, AssemblyBuilder ab,
object annotation)
1220 ab.SetCustomAttribute(MakeCustomAttributeBuilder(loader, annotation));
1223 internal override void Apply(
RuntimeClassLoader loader, PropertyBuilder pb,
object annotation)
1225 pb.SetCustomAttribute(MakeCustomAttributeBuilder(loader, annotation));
1228 internal override bool IsCustomAttribute
1230 get {
return false; }
1238 var annotationAttribute = Context.
AttributeHelper.GetAnnotationAttributeType(type);
1239 if (annotationAttribute !=
null)
1240 return new CompiledAnnotation(Context, type.Assembly.GetType(annotationAttribute,
true));
1246 internal override Type EnumType
1251 return type.GetNestedType(
"__Enum");
1257#if !IMPORTER && !EXPORTER
1259 internal override string GetSourceFileName()
1262 if (attr.Length == 1)
1265 if (DeclaringTypeWrapper !=
null)
1266 return DeclaringTypeWrapper.GetSourceFileName();
1268 if (IsNestedTypeAnonymousOrLocalClass(type))
1269 return Context.
ClassLoaderFactory.GetJavaTypeFromType(type.DeclaringType).GetSourceFileName();
1272 return type.Name +
".java";
1277 internal override int GetSourceLineNumber(
MethodBase mb,
int ilOffset)
1280 if (attr.Length == 1)
1287 internal override bool IsFastClassLiteralSafe
1289 get {
return true; }
1292 internal override object[] GetConstantPool()
1297 internal override byte[] GetRawTypeAnnotations()
1299 return Context.
AttributeHelper.GetRuntimeVisibleTypeAnnotations(type);
1305 return mb ==
null ? null : Context.
AttributeHelper.GetRuntimeVisibleTypeAnnotations(mb);
1311 return fi ==
null ? null : Context.
AttributeHelper.GetRuntimeVisibleTypeAnnotations(fi);
IKVM.Reflection.Type Type
IKVM.Reflection.ConstructorInfo ConstructorInfo
IKVM.Reflection.FieldInfo FieldInfo
IKVM.Reflection.PropertyInfo PropertyInfo
IKVM.Reflection.MethodInfo MethodInfo
IKVM.Reflection.ParameterInfo ParameterInfo
IKVM.Reflection.MethodBase MethodBase
global::java.lang.invoke.LambdaForm.Name Name
static object QualifyClassNames(RuntimeClassLoader loader, object annotation)
Represents an internal error that occurred within IKVM.
.NET exception that corresponds to a Java exception.
Runtime support for a class loader.
Maintains services relevant to an instane of the IKVM runtime.
AttributeHelper AttributeHelper
Gets the AttributeHelper associated with this instance of the runtime.
Types Types
Gets the Types associated with this instance of the runtime.
RuntimeManagedJavaTypeFactory ManagedJavaTypeFactory
Gets the RuntimeManagedJavaTypeFactory associated with this instance of the runtime.
RuntimePrimitiveJavaTypeFactory PrimitiveJavaTypeFactory
Gets the RuntimePrimitiveJavaTypeFactory 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.
RuntimeClassLoaderFactory ClassLoaderFactory
Gets the RuntimeClassLoaderFactory associated with this instance of the runtime.
RuntimeManagedByteCodeJavaType newInstance(string name, Type type)
Creates a new instance of the appropriate runtime type.
RuntimeManagedByteCodeJavaTypeFactory(RuntimeContext context)
Initializes a new instance.
Represents a runtime Java type derived from a .NET assembly which was the result of the IKVM compiler...
RuntimeManagedByteCodeJavaType(RuntimeContext context, ExModifiers exmod, string name)
Initializes a new instance.
RuntimeManagedByteCodeJavaType(RuntimeContext context, string name, Type type)
Initializes a new instance.
override void LazyPublishMethods()
override void LazyPublishFields()
Represents a .NET property defined in Java with the 'ikvm.lang.Property' annotation.
RuntimeJavaType GetJavaTypeFromManagedType(Type type)
Gets the RuntimeJavaType associated with the specified managed type, or creates one on demand.
MemberFlags
Describes various options applied to a member.
@ InternalAccess
Member should be generated with "internal" .NET access.
static DiagnosticEvent UnableToResolveInterface(string arg0, string arg1, Exception? exception=null, DiagnosticLocation location=default)
The 'UnableToResolveInterface' diagnostic.
Provides methods to parse a Java class name.