IKVM11  11
Java SE 11 Virtual Machine for .NET
Loading...
Searching...
No Matches
RuntimeManagedJavaType.AttributeAnnotationJavaType.cs
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2015 Jeroen Frijters
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions:
11
12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution.
19
20 Jeroen Frijters
21 jeroen@frijters.net
22
23*/
24using System;
25using System.Collections.Generic;
26
28
29#if IMPORTER || EXPORTER
30using IKVM.Reflection;
32
33using Type = IKVM.Reflection.Type;
34
35#else
36using System.Reflection;
37using System.Reflection.Emit;
38#endif
39
40#if IMPORTER
42#endif
43
44#if EXPORTER
46#endif
47
48namespace IKVM.Runtime
49{
50
51 sealed partial class RuntimeManagedJavaType
52 {
53
54 sealed partial class AttributeAnnotationJavaType : AttributeAnnotationJavaTypeBase
55 {
56
57 readonly Type fakeType;
58 readonly Type attributeType;
59 volatile RuntimeJavaType[] innerClasses;
60
66 internal AttributeAnnotationJavaType(RuntimeContext context, string name, Type attributeType) :
67 base(context, name)
68 {
69#if IMPORTER || EXPORTER
70 this.fakeType = context.FakeTypes.GetAttributeType(attributeType);
71#elif !FIRST_PASS
72 this.fakeType = typeof(ikvm.@internal.AttributeAnnotation<>).MakeGenericType(attributeType);
73#endif
74 this.attributeType = attributeType;
75 }
76
77 static bool IsSupportedType(RuntimeContext context, Type type)
78 {
79 // Java annotations only support one-dimensional arrays
80 if (ReflectUtil.IsVector(type))
81 type = type.GetElementType();
82
83 return type == context.Types.String
84 || type == context.Types.Boolean
85 || type == context.Types.Byte
86 || type == context.Types.Char
87 || type == context.Types.Int16
88 || type == context.Types.Int32
89 || type == context.Types.Single
90 || type == context.Types.Int64
91 || type == context.Types.Double
92 || type == context.Types.Type
93 || type.IsEnum;
94 }
95
96 internal static void GetConstructors(RuntimeContext context, Type type, out ConstructorInfo defCtor, out ConstructorInfo singleOneArgCtor)
97 {
98 defCtor = null;
99 int oneArgCtorCount = 0;
100 ConstructorInfo oneArgCtor = null;
101 ConstructorInfo[] constructors = type.GetConstructors(BindingFlags.Public | BindingFlags.Instance);
102 // HACK we have a special rule to make some additional custom attributes from mscorlib usable:
103 // Attributes that have two constructors, one an enum and another one taking a byte, short or int,
104 // we only expose the enum constructor.
105 if (constructors.Length == 2 && type.Assembly == context.Types.Object.Assembly)
106 {
107 ParameterInfo[] p0 = constructors[0].GetParameters();
108 ParameterInfo[] p1 = constructors[1].GetParameters();
109 if (p0.Length == 1 && p1.Length == 1)
110 {
111 Type t0 = p0[0].ParameterType;
112 Type t1 = p1[0].ParameterType;
113 bool swapped = false;
114 if (t1.IsEnum)
115 {
116 Type tmp = t0;
117 t0 = t1;
118 t1 = tmp;
119 swapped = true;
120 }
121 if (t0.IsEnum && (t1 == context.Types.Byte || t1 == context.Types.Int16 || t1 == context.Types.Int32))
122 {
123 if (swapped)
124 {
125 singleOneArgCtor = constructors[1];
126 }
127 else
128 {
129 singleOneArgCtor = constructors[0];
130 }
131 return;
132 }
133 }
134 }
135
136 if (type.Assembly == context.Types.Object.Assembly)
137 {
138 if (type.FullName == "System.Runtime.CompilerServices.MethodImplAttribute")
139 {
140 foreach (ConstructorInfo ci in constructors)
141 {
142 ParameterInfo[] p = ci.GetParameters();
143 if (p.Length == 1 && p[0].ParameterType.IsEnum)
144 {
145 singleOneArgCtor = ci;
146 return;
147 }
148 }
149 }
150 }
151
152 foreach (ConstructorInfo ci in constructors)
153 {
154 ParameterInfo[] args = ci.GetParameters();
155 if (args.Length == 0)
156 {
157 defCtor = ci;
158 }
159 else if (args.Length == 1)
160 {
161 if (IsSupportedType(context, args[0].ParameterType))
162 {
163 oneArgCtor = ci;
164 oneArgCtorCount++;
165 }
166 else
167 {
168 // set to two to make sure we don't see the oneArgCtor as viable
169 oneArgCtorCount = 2;
170 }
171 }
172 }
173 singleOneArgCtor = oneArgCtorCount == 1 ? oneArgCtor : null;
174 }
175
176 sealed class AttributeAnnotationJavaMethod : DynamicOnlyJavaMethod
177 {
178
179 readonly bool optional;
180
188 internal AttributeAnnotationJavaMethod(AttributeAnnotationJavaType tw, string name, Type type, bool optional) :
189 this(tw, name, MapType(tw.Context, type, false), optional)
190 {
191
192 }
193
194 static RuntimeJavaType MapType(RuntimeContext context, Type type, bool isArray)
195 {
196 if (type == context.Types.String)
197 {
198 return context.JavaBase.TypeOfJavaLangString;
199 }
200 else if (type == context.Types.Boolean)
201 {
202 return context.PrimitiveJavaTypeFactory.BOOLEAN;
203 }
204 else if (type == context.Types.Byte)
205 {
206 return context.PrimitiveJavaTypeFactory.BYTE;
207 }
208 else if (type == context.Types.Char)
209 {
210 return context.PrimitiveJavaTypeFactory.CHAR;
211 }
212 else if (type == context.Types.Int16)
213 {
214 return context.PrimitiveJavaTypeFactory.SHORT;
215 }
216 else if (type == context.Types.Int32)
217 {
218 return context.PrimitiveJavaTypeFactory.INT;
219 }
220 else if (type == context.Types.Single)
221 {
222 return context.PrimitiveJavaTypeFactory.FLOAT;
223 }
224 else if (type == context.Types.Int64)
225 {
226 return context.PrimitiveJavaTypeFactory.LONG;
227 }
228 else if (type == context.Types.Double)
229 {
230 return context.PrimitiveJavaTypeFactory.DOUBLE;
231 }
232 else if (type == context.Types.Type)
233 {
234 return context.JavaBase.TypeOfJavaLangClass;
235 }
236 else if (type.IsEnum)
237 {
238 foreach (RuntimeJavaType tw in context.ClassLoaderFactory.GetJavaTypeFromType(type).InnerClasses)
239 {
240 if (tw is EnumEnumJavaType)
241 {
242 if (!isArray && type.IsDefined(context.Resolver.ResolveCoreType(typeof(FlagsAttribute).FullName).AsReflection(), false))
243 {
244 return tw.MakeArrayType(1);
245 }
246 return tw;
247 }
248 }
249 throw new InvalidOperationException();
250 }
251 else if (!isArray && ReflectUtil.IsVector(type))
252 {
253 return MapType(context, type.GetElementType(), true).MakeArrayType(1);
254 }
255 else
256 {
257 throw new NotImplementedException();
258 }
259 }
260
268 private AttributeAnnotationJavaMethod(AttributeAnnotationJavaType tw, string name, RuntimeJavaType returnType, bool optional) :
269 base(tw, name, "()" + returnType.SigName, returnType, Array.Empty<RuntimeJavaType>(), MemberFlags.None)
270 {
271 this.optional = optional;
272 }
273
274 internal override bool IsOptionalAttributeAnnotationValue
275 {
276 get { return optional; }
277 }
278 }
279
280 protected override void LazyPublishMembers()
281 {
282 var methods = new List<RuntimeJavaMethod>();
283 GetConstructors(Context, attributeType, out var defCtor, out var singleOneArgCtor);
284
285 if (singleOneArgCtor != null)
286 methods.Add(new AttributeAnnotationJavaMethod(this, "value", singleOneArgCtor.GetParameters()[0].ParameterType, defCtor != null));
287
288 foreach (var pi in attributeType.GetProperties(BindingFlags.Instance | BindingFlags.Public))
289 {
290 // the getter and setter methods both need to be public
291 // the getter signature must be: <PropertyType> Getter()
292 // the setter signature must be: void Setter(<PropertyType>)
293 // the property type needs to be a supported type
294 var getter = pi.GetGetMethod();
295 var setter = pi.GetSetMethod();
296 ParameterInfo[] parameters;
297 if (getter != null && getter.GetParameters().Length == 0 && getter.ReturnType == pi.PropertyType && setter != null && (parameters = setter.GetParameters()).Length == 1 && parameters[0].ParameterType == pi.PropertyType && setter.ReturnType == Context.Types.Void && IsSupportedType(Context, pi.PropertyType))
298 AddMethodIfUnique(methods, new AttributeAnnotationJavaMethod(this, pi.Name, pi.PropertyType, true));
299 }
300
301 foreach (var fi in attributeType.GetFields(BindingFlags.Public | BindingFlags.Instance))
302 if (!fi.IsInitOnly && IsSupportedType(Context, fi.FieldType))
303 AddMethodIfUnique(methods, new AttributeAnnotationJavaMethod(this, fi.Name, fi.FieldType, true));
304
305 SetMethods(methods.ToArray());
306
307 base.LazyPublishMembers();
308 }
309
310 static void AddMethodIfUnique(List<RuntimeJavaMethod> methods, RuntimeJavaMethod method)
311 {
312 foreach (var mw in methods)
313 {
314 if (mw.Name == method.Name && mw.Signature == method.Signature)
315 {
316 // ignore duplicate
317 return;
318 }
319 }
320
321 methods.Add(method);
322 }
323
324#if !IMPORTER && !FIRST_PASS && !EXPORTER
325
326 internal override object GetAnnotationDefault(RuntimeJavaMethod mw)
327 {
328 if (mw.IsOptionalAttributeAnnotationValue)
329 {
330 if (mw.ReturnType == Context.PrimitiveJavaTypeFactory.BOOLEAN)
331 {
332 return java.lang.Boolean.FALSE;
333 }
334 else if (mw.ReturnType == Context.PrimitiveJavaTypeFactory.BYTE)
335 {
336 return java.lang.Byte.valueOf((byte)0);
337 }
338 else if (mw.ReturnType == Context.PrimitiveJavaTypeFactory.CHAR)
339 {
340 return java.lang.Character.valueOf((char)0);
341 }
342 else if (mw.ReturnType == Context.PrimitiveJavaTypeFactory.SHORT)
343 {
344 return java.lang.Short.valueOf((short)0);
345 }
346 else if (mw.ReturnType == Context.PrimitiveJavaTypeFactory.INT)
347 {
348 return java.lang.Integer.valueOf(0);
349 }
350 else if (mw.ReturnType == Context.PrimitiveJavaTypeFactory.FLOAT)
351 {
352 return java.lang.Float.valueOf(0F);
353 }
354 else if (mw.ReturnType == Context.PrimitiveJavaTypeFactory.LONG)
355 {
356 return java.lang.Long.valueOf(0L);
357 }
358 else if (mw.ReturnType == Context.PrimitiveJavaTypeFactory.DOUBLE)
359 {
360 return java.lang.Double.valueOf(0D);
361 }
362 else if (mw.ReturnType == Context.JavaBase.TypeOfJavaLangString)
363 {
364 return "";
365 }
366 else if (mw.ReturnType == Context.JavaBase.TypeOfJavaLangClass)
367 {
368 return (java.lang.Class)typeof(ikvm.@internal.__unspecified);
369 }
370 else if (mw.ReturnType is EnumEnumJavaType)
371 {
372 EnumEnumJavaType eetw = (EnumEnumJavaType)mw.ReturnType;
373 return eetw.GetUnspecifiedValue();
374 }
375 else if (mw.ReturnType.IsArray)
376 {
377 return Array.CreateInstance(mw.ReturnType.TypeAsArrayType, 0);
378 }
379 }
380
381 return null;
382 }
383
384#endif // !IMPORTER && !FIRST_PASS && !EXPORTER
385
386 internal override RuntimeJavaType DeclaringTypeWrapper => Context.ClassLoaderFactory.GetJavaTypeFromType(attributeType);
387
388 internal override Type TypeAsTBD => fakeType;
389
390 internal override RuntimeJavaType[] InnerClasses => innerClasses ??= GetInnerClasses();
391
392 RuntimeJavaType[] GetInnerClasses()
393 {
394 List<RuntimeJavaType> list = new List<RuntimeJavaType>();
395 AttributeUsageAttribute attr = GetAttributeUsage();
396 if ((attr.ValidOn & AttributeTargets.ReturnValue) != 0)
397 {
398 list.Add(ClassLoader.RegisterInitiatingLoader(new ReturnValueAnnotationJavaType(Context, this)));
399 }
400 if (attr.AllowMultiple)
401 {
402 list.Add(ClassLoader.RegisterInitiatingLoader(new MultipleAnnotationJavaType(Context, this)));
403 }
404 return list.ToArray();
405 }
406
407 internal override bool IsFakeTypeContainer => true;
408
409 AttributeUsageAttribute GetAttributeUsage()
410 {
411 AttributeTargets validOn = AttributeTargets.All;
412 bool allowMultiple = false;
413 bool inherited = true;
414 foreach (CustomAttributeData cad in CustomAttributeData.GetCustomAttributes(attributeType))
415 {
416 if (cad.Constructor.DeclaringType == Context.Resolver.ResolveCoreType(typeof(AttributeUsageAttribute).FullName).AsReflection())
417 {
418 if (cad.ConstructorArguments.Count == 1 && cad.ConstructorArguments[0].ArgumentType == Context.Resolver.ResolveCoreType(typeof(AttributeTargets).FullName).AsReflection())
419 {
420 validOn = (AttributeTargets)cad.ConstructorArguments[0].Value;
421 }
422 foreach (CustomAttributeNamedArgument cana in cad.NamedArguments)
423 {
424 if (cana.MemberInfo.Name == "AllowMultiple")
425 {
426 allowMultiple = (bool)cana.TypedValue.Value;
427 }
428 else if (cana.MemberInfo.Name == "Inherited")
429 {
430 inherited = (bool)cana.TypedValue.Value;
431 }
432 }
433 }
434 }
435 AttributeUsageAttribute attr = new AttributeUsageAttribute(validOn);
436 attr.AllowMultiple = allowMultiple;
437 attr.Inherited = inherited;
438 return attr;
439 }
440
441#if !IMPORTER && !FIRST_PASS && !EXPORTER
442 internal override object[] GetDeclaredAnnotations()
443 {
444 // note that AttributeUsageAttribute.Inherited does not map to java.lang.annotation.Inherited
445 AttributeTargets validOn = GetAttributeUsage().ValidOn;
446 List<java.lang.annotation.ElementType> targets = new List<java.lang.annotation.ElementType>();
447 if ((validOn & (AttributeTargets.Class | AttributeTargets.Interface | AttributeTargets.Struct | AttributeTargets.Enum | AttributeTargets.Delegate | AttributeTargets.Assembly)) != 0)
448 {
449 targets.Add(java.lang.annotation.ElementType.TYPE);
450 }
451 if ((validOn & AttributeTargets.Constructor) != 0)
452 {
453 targets.Add(java.lang.annotation.ElementType.CONSTRUCTOR);
454 }
455 if ((validOn & AttributeTargets.Field) != 0)
456 {
457 targets.Add(java.lang.annotation.ElementType.FIELD);
458 }
459 if ((validOn & AttributeTargets.Method) != 0)
460 {
461 targets.Add(java.lang.annotation.ElementType.METHOD);
462 }
463 if ((validOn & AttributeTargets.Parameter) != 0)
464 {
465 targets.Add(java.lang.annotation.ElementType.PARAMETER);
466 }
467 java.util.HashMap targetMap = new java.util.HashMap();
468 targetMap.put("value", targets.ToArray());
469 java.util.HashMap retentionMap = new java.util.HashMap();
470 retentionMap.put("value", java.lang.annotation.RetentionPolicy.RUNTIME);
471 return new object[] {
472 java.lang.reflect.Proxy.newProxyInstance(null, new java.lang.Class[] { typeof(java.lang.annotation.Target) }, new sun.reflect.annotation.AnnotationInvocationHandler(typeof(java.lang.annotation.Target), targetMap)),
473 java.lang.reflect.Proxy.newProxyInstance(null, new java.lang.Class[] { typeof(java.lang.annotation.Retention) }, new sun.reflect.annotation.AnnotationInvocationHandler(typeof(java.lang.annotation.Retention), retentionMap))
474 };
475 }
476#endif
477
478 sealed class AttributeAnnotation : Annotation
479 {
480
481 readonly Type type;
482
487 internal AttributeAnnotation(Type type)
488 {
489 this.type = type;
490 }
491
492 CustomAttributeBuilder MakeCustomAttributeBuilder(RuntimeClassLoader loader, object annotation)
493 {
494 object[] arr = (object[])annotation;
495 ConstructorInfo defCtor;
496 ConstructorInfo singleOneArgCtor;
497 object ctorArg = null;
498 GetConstructors(loader.Context, type, out defCtor, out singleOneArgCtor);
499 List<PropertyInfo> properties = new List<PropertyInfo>();
500 List<object> propertyValues = new List<object>();
501 List<FieldInfo> fields = new List<FieldInfo>();
502 List<object> fieldValues = new List<object>();
503 for (int i = 2; i < arr.Length; i += 2)
504 {
505 string name = (string)arr[i];
506 if (name == "value" && singleOneArgCtor != null)
507 {
508 ctorArg = ConvertValue(loader, singleOneArgCtor.GetParameters()[0].ParameterType, arr[i + 1]);
509 }
510 else
511 {
512 PropertyInfo pi = type.GetProperty(name, BindingFlags.Public | BindingFlags.Instance);
513 if (pi != null)
514 {
515 properties.Add(pi);
516 propertyValues.Add(ConvertValue(loader, pi.PropertyType, arr[i + 1]));
517 }
518 else
519 {
520 FieldInfo fi = type.GetField(name, BindingFlags.Public | BindingFlags.Instance);
521 if (fi != null)
522 {
523 fields.Add(fi);
524 fieldValues.Add(ConvertValue(loader, fi.FieldType, arr[i + 1]));
525 }
526 }
527 }
528 }
529 if (ctorArg == null && defCtor == null)
530 {
531 // TODO required argument is missing
532 }
533 return new CustomAttributeBuilder(ctorArg == null ? defCtor : singleOneArgCtor,
534 ctorArg == null ? new object[0] : new object[] { ctorArg },
535 properties.ToArray(),
536 propertyValues.ToArray(),
537 fields.ToArray(),
538 fieldValues.ToArray());
539 }
540
541 internal override void Apply(RuntimeClassLoader loader, TypeBuilder tb, object annotation)
542 {
543 if (type == loader.Context.Resolver.ResolveCoreType(typeof(System.Runtime.InteropServices.StructLayoutAttribute).FullName).AsReflection() && tb.BaseType != loader.Context.Types.Object)
544 {
545 // we have to handle this explicitly, because if we apply an illegal StructLayoutAttribute,
546 // TypeBuilder.CreateType() will later on throw an exception.
547#if IMPORTER
548 loader.Diagnostics.IgnoredCustomAttribute(type.FullName, $"Type '{tb.FullName}' does not extend cli.System.Object");
549#else
550 loader.Diagnostics.GenericRuntimeError($"StructLayoutAttribute cannot be applied to {tb.FullName}, because it does not directly extend cli.System.Object");
551#endif
552 return;
553 }
554
555 tb.SetCustomAttribute(MakeCustomAttributeBuilder(loader, annotation));
556 }
557
558 internal override void Apply(RuntimeClassLoader loader, MethodBuilder mb, object annotation)
559 {
560 mb.SetCustomAttribute(MakeCustomAttributeBuilder(loader, annotation));
561 }
562
563 internal override void Apply(RuntimeClassLoader loader, FieldBuilder fb, object annotation)
564 {
565 fb.SetCustomAttribute(MakeCustomAttributeBuilder(loader, annotation));
566 }
567
568 internal override void Apply(RuntimeClassLoader loader, ParameterBuilder pb, object annotation)
569 {
570 // TODO with the current custom attribute annotation restrictions it is impossible to use this CA,
571 // but if we make it possible, we should also implement it here
572 if (type == loader.Context.Resolver.ResolveCoreType(typeof(System.Runtime.InteropServices.DefaultParameterValueAttribute).FullName).AsReflection())
573 throw new NotImplementedException();
574 else
575 pb.SetCustomAttribute(MakeCustomAttributeBuilder(loader, annotation));
576 }
577
578 internal override void Apply(RuntimeClassLoader loader, AssemblyBuilder ab, object annotation)
579 {
580#if IMPORTER
581 if (type == loader.Context.Resolver.ResolveCoreType(typeof(System.Runtime.CompilerServices.TypeForwardedToAttribute).FullName).AsReflection())
582 {
583 ab.__AddTypeForwarder((Type)ConvertValue(loader, loader.Context.Types.Type, ((object[])annotation)[3]));
584 }
585 else if (type == loader.Context.Resolver.ResolveCoreType(typeof(System.Reflection.AssemblyVersionAttribute).FullName).AsReflection())
586 {
587 string str = (string)ConvertValue(loader, loader.Context.Types.String, ((object[])annotation)[3]);
588 Version version;
589 if (ImportContext.TryParseVersion(str, out version))
590 {
591 ab.__SetAssemblyVersion(version);
592 }
593 else
594 {
595 loader.Diagnostics.InvalidCustomAttribute(type.FullName, "The version '" + str + "' is invalid.");
596 }
597 }
598 else if (type == loader.Context.Resolver.ResolveCoreType(typeof(System.Reflection.AssemblyCultureAttribute).FullName).AsReflection())
599 {
600 string str = (string)ConvertValue(loader, loader.Context.Types.String, ((object[])annotation)[3]);
601 if (str != "")
602 {
603 ab.__SetAssemblyCulture(str);
604 }
605 }
606 else if (type == loader.Context.Resolver.ResolveCoreType(typeof(System.Reflection.AssemblyDelaySignAttribute).FullName).AsReflection()
607 || type == loader.Context.Resolver.ResolveCoreType(typeof(System.Reflection.AssemblyKeyFileAttribute).FullName).AsReflection()
608 || type == loader.Context.Resolver.ResolveCoreType(typeof(System.Reflection.AssemblyKeyNameAttribute).FullName).AsReflection())
609 {
610 loader.Diagnostics.IgnoredCustomAttribute(type.FullName, "Please use the corresponding compiler switch.");
611 }
612 else if (type == loader.Context.Resolver.ResolveCoreType(typeof(System.Reflection.AssemblyAlgorithmIdAttribute).FullName).AsReflection())
613 {
614 // this attribute is currently not exposed as an annotation and isn't very interesting
615 throw new NotImplementedException();
616 }
617 else if (type == loader.Context.Resolver.ResolveCoreType(typeof(System.Reflection.AssemblyFlagsAttribute).FullName).AsReflection())
618 {
619 // this attribute is currently not exposed as an annotation and isn't very interesting
620 throw new NotImplementedException();
621 }
622 else
623 {
624 ab.SetCustomAttribute(MakeCustomAttributeBuilder(loader, annotation));
625 }
626#else
627 ab.SetCustomAttribute(MakeCustomAttributeBuilder(loader, annotation));
628#endif
629 }
630
631 internal override void Apply(RuntimeClassLoader loader, PropertyBuilder pb, object annotation)
632 {
633 pb.SetCustomAttribute(MakeCustomAttributeBuilder(loader, annotation));
634 }
635
636 internal override bool IsCustomAttribute => true;
637
638 }
639
640 internal override Annotation Annotation => new AttributeAnnotation(attributeType);
641
642 internal override AttributeTargets AttributeTargets => GetAttributeUsage().ValidOn;
643
644 }
645
646 }
647
648}
IKVM.Reflection.Type Type
IKVM.Reflection.ConstructorInfo ConstructorInfo
IKVM.Reflection.FieldInfo FieldInfo
IKVM.Reflection.PropertyInfo PropertyInfo
IKVM.Reflection.ParameterInfo ParameterInfo
static object ConvertValue(RuntimeClassLoader loader, Type targetType, object obj)
Types Types
Gets the Types associated with this instance of the runtime.
RuntimePrimitiveJavaTypeFactory PrimitiveJavaTypeFactory
Gets the RuntimePrimitiveJavaTypeFactory 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.
Represents the context of an import operation outputing a single assembly.
MemberFlags
Describes various options applied to a member.