IKVM11  11
Java SE 11 Virtual Machine for .NET
Loading...
Searching...
No Matches
ReflectionSymbolContext.cs
Go to the documentation of this file.
1using System;
2using System.Reflection;
4
6{
7
12 {
13
14 readonly ConditionalWeakTable<Assembly, ReflectionAssemblySymbol> _assemblies = new();
15
20 {
21
22 }
23
30 {
31 return _assemblies.GetValue(assembly, _ => new ReflectionAssemblySymbol(this, _));
32 }
33
40 {
41 return GetOrCreateAssemblySymbol(module.Assembly).GetOrCreateModuleSymbol(module);
42 }
43
50 {
51 return GetOrCreateModuleSymbol(type.Module).GetOrCreateTypeSymbol(type);
52 }
53
60 {
61 return GetOrCreateAssemblySymbol(ctor.Module.Assembly).GetOrCreateModuleSymbol(ctor.Module).GetOrCreateTypeSymbol(ctor.DeclaringType!).GetOrCreateConstructorSymbol(ctor);
62 }
63
70 {
71 return GetOrCreateAssemblySymbol(method.Module.Assembly).GetOrCreateModuleSymbol(method.Module).GetOrCreateTypeSymbol(method.DeclaringType!).GetOrCreateMethodSymbol(method);
72 }
73
80 {
81 return GetOrCreateAssemblySymbol(parameter.Member.Module.Assembly).GetOrCreateModuleSymbol(parameter.Member.Module).GetOrCreateTypeSymbol(parameter.Member.DeclaringType!).GetOrCreateMethodBaseSymbol((MethodBase)parameter.Member).GetOrCreateParameterSymbol(parameter);
82 }
83
90 {
91 return GetOrCreateAssemblySymbol(field.Module.Assembly).GetOrCreateModuleSymbol(field.Module).GetOrCreateTypeSymbol(field.DeclaringType!).GetOrCreateFieldSymbol(field);
92 }
93
100 {
101 return GetOrCreateAssemblySymbol(property.Module.Assembly).GetOrCreateModuleSymbol(property.Module).GetOrCreateTypeSymbol(property.DeclaringType!).GetOrCreatePropertySymbol(property);
102 }
103
110 {
111 return GetOrCreateAssemblySymbol(@event.Module.Assembly).GetOrCreateModuleSymbol(@event.Module).GetOrCreateTypeSymbol(@event.DeclaringType!).GetOrCreateEventSymbol(@event);
112 }
113
114 }
115
116}
IKVM.Reflection.Module Module
IKVM.Reflection.Type Type
IKVM.Reflection.Assembly Assembly
IKVM.Reflection.ConstructorInfo ConstructorInfo
IKVM.Reflection.EventInfo EventInfo
IKVM.Reflection.FieldInfo FieldInfo
IKVM.Reflection.PropertyInfo PropertyInfo
IKVM.Reflection.MethodInfo MethodInfo
IKVM.Reflection.ParameterInfo ParameterInfo
IKVM.Reflection.MethodBase MethodBase
Implementation of IModuleSymbol derived from System.Reflection.
Holds references to symbols derived from System.Reflection.
ReflectionModuleSymbol GetOrCreateModuleSymbol(Module module)
Gets or creates a ReflectionModuleSymbol for the specified Module.
ReflectionConstructorSymbol GetOrCreateConstructorSymbol(ConstructorInfo ctor)
Gets or creates a ReflectionConstructorSymbol for the specified ConstructorInfo.
ReflectionPropertySymbol GetOrCreatePropertySymbol(PropertyInfo property)
Gets or creates a ReflectionPropertySymbol for the specified PropertyInfo.
ReflectionMethodSymbol GetOrCreateMethodSymbol(MethodInfo method)
Gets or creates a ReflectionMethodBaseSymbol for the specified MethodInfo.
ReflectionFieldSymbol GetOrCreateFieldSymbol(FieldInfo field)
Gets or creates a ReflectionFieldSymbol for the specified FieldInfo.
ReflectionEventSymbol GetOrCreateEventSymbol(EventInfo @event)
Gets or creates a ReflectionEventSymbol for the specified EventInfo.
ReflectionAssemblySymbol GetOrCreateAssemblySymbol(Assembly assembly)
Gets or creates a ReflectionAssemblySymbol for the specified Assembly.
ReflectionParameterSymbol GetOrCreateParameterSymbol(ParameterInfo parameter)
Gets or creates a ReflectionParameterSymbol for the specified ParameterInfo.
ReflectionTypeSymbol GetOrCreateTypeSymbol(Type type)
Gets or creates a ReflectionTypeSymbol for the specified Type.