IKVM11  11
Java SE 11 Virtual Machine for .NET
Loading...
Searching...
No Matches
IKVM.CoreLib.Symbols.IkvmReflection.IkvmReflectionSymbolContext Class Reference

Holds references to symbols derived from System.Reflection. More...

Public Member Functions

 IkvmReflectionSymbolContext ()
 Initializes a new instance.
 
IkvmReflectionAssemblySymbol GetOrCreateAssemblySymbol (Assembly assembly)
 Gets or creates a IkvmReflectionAssemblySymbol for the specified Assembly.
 
IkvmReflectionModuleSymbol GetOrCreateModuleSymbol (Module module)
 Gets or creates a IkvmReflectionModuleSymbol for the specified Module.
 
IkvmReflectionTypeSymbol GetOrCreateTypeSymbol (Type type)
 Gets or creates a IkvmReflectionTypeSymbol for the specified Type.
 
IkvmReflectionConstructorSymbol GetOrCreateConstructorSymbol (ConstructorInfo ctor)
 Gets or creates a IkvmReflectionConstructorSymbol for the specified ConstructorInfo.
 
IkvmReflectionMethodSymbol GetOrCreateMethodSymbol (MethodInfo method)
 Gets or creates a IkvmReflectionMethodBaseSymbol for the specified MethodInfo.
 
IkvmReflectionParameterSymbol GetOrCreateParameterSymbol (ParameterInfo parameter)
 Gets or creates a IkvmReflectionParameterSymbol for the specified ParameterInfo.
 
IkvmReflectionFieldSymbol GetOrCreateFieldSymbol (FieldInfo field)
 Gets or creates a IkvmReflectionFieldSymbol for the specified FieldInfo.
 
IkvmReflectionPropertySymbol GetOrCreatePropertySymbol (PropertyInfo property)
 Gets or creates a IkvmReflectionPropertySymbol for the specified PropertyInfo.
 
IkvmReflectionEventSymbol GetOrCreateEventSymbol (EventInfo @event)
 Gets or creates a IkvmReflectionEventSymbol for the specified EventInfo.
 

Detailed Description

Holds references to symbols derived from System.Reflection.

Definition at line 21 of file IkvmReflectionSymbolContext.cs.

Constructor & Destructor Documentation

◆ IkvmReflectionSymbolContext()

IKVM.CoreLib.Symbols.IkvmReflection.IkvmReflectionSymbolContext.IkvmReflectionSymbolContext ( )

Initializes a new instance.

Definition at line 29 of file IkvmReflectionSymbolContext.cs.

30 {
31
32 }

Member Function Documentation

◆ GetOrCreateAssemblySymbol()

IkvmReflectionAssemblySymbol IKVM.CoreLib.Symbols.IkvmReflection.IkvmReflectionSymbolContext.GetOrCreateAssemblySymbol ( Assembly assembly)

Gets or creates a IkvmReflectionAssemblySymbol for the specified Assembly.

Parameters
assembly
Returns

Definition at line 39 of file IkvmReflectionSymbolContext.cs.

40 {
41 if (assembly is null)
42 throw new ArgumentNullException(nameof(assembly));
43
44 return _assemblies.GetValue(assembly, _ => new IkvmReflectionAssemblySymbol(this, _));
45 }

◆ GetOrCreateConstructorSymbol()

IkvmReflectionConstructorSymbol IKVM.CoreLib.Symbols.IkvmReflection.IkvmReflectionSymbolContext.GetOrCreateConstructorSymbol ( ConstructorInfo ctor)

Gets or creates a IkvmReflectionConstructorSymbol for the specified ConstructorInfo.

Parameters
ctor
Returns

Definition at line 78 of file IkvmReflectionSymbolContext.cs.

79 {
80 if (ctor is null)
81 throw new ArgumentNullException(nameof(ctor));
82
83 return GetOrCreateAssemblySymbol(ctor.Module.Assembly).GetOrCreateModuleSymbol(ctor.Module).GetOrCreateTypeSymbol(ctor.DeclaringType!).GetOrCreateConstructorSymbol(ctor);
84 }
IkvmReflectionAssemblySymbol GetOrCreateAssemblySymbol(Assembly assembly)
Gets or creates a IkvmReflectionAssemblySymbol for the specified Assembly.

◆ GetOrCreateEventSymbol()

IkvmReflectionEventSymbol IKVM.CoreLib.Symbols.IkvmReflection.IkvmReflectionSymbolContext.GetOrCreateEventSymbol ( EventInfo @ event)

Gets or creates a IkvmReflectionEventSymbol for the specified EventInfo.

Parameters
event
Returns

Definition at line 143 of file IkvmReflectionSymbolContext.cs.

144 {
145 if (@event is null)
146 throw new ArgumentNullException(nameof(@event));
147
148 return GetOrCreateAssemblySymbol(@event.Module.Assembly).GetOrCreateModuleSymbol(@event.Module).GetOrCreateTypeSymbol(@event.DeclaringType!).GetOrCreateEventSymbol(@event);
149 }

◆ GetOrCreateFieldSymbol()

IkvmReflectionFieldSymbol IKVM.CoreLib.Symbols.IkvmReflection.IkvmReflectionSymbolContext.GetOrCreateFieldSymbol ( FieldInfo field)

Gets or creates a IkvmReflectionFieldSymbol for the specified FieldInfo.

Parameters
field
Returns

Definition at line 117 of file IkvmReflectionSymbolContext.cs.

118 {
119 if (field is null)
120 throw new ArgumentNullException(nameof(field));
121
122 return GetOrCreateAssemblySymbol(field.Module.Assembly).GetOrCreateModuleSymbol(field.Module).GetOrCreateTypeSymbol(field.DeclaringType!).GetOrCreateFieldSymbol(field);
123 }

◆ GetOrCreateMethodSymbol()

IkvmReflectionMethodSymbol IKVM.CoreLib.Symbols.IkvmReflection.IkvmReflectionSymbolContext.GetOrCreateMethodSymbol ( MethodInfo method)

Gets or creates a IkvmReflectionMethodBaseSymbol for the specified MethodInfo.

Parameters
method
Returns

Definition at line 91 of file IkvmReflectionSymbolContext.cs.

92 {
93 if (method is null)
94 throw new ArgumentNullException(nameof(method));
95
96 return GetOrCreateAssemblySymbol(method.Module.Assembly).GetOrCreateModuleSymbol(method.Module).GetOrCreateTypeSymbol(method.DeclaringType!).GetOrCreateMethodSymbol(method);
97 }

◆ GetOrCreateModuleSymbol()

IkvmReflectionModuleSymbol IKVM.CoreLib.Symbols.IkvmReflection.IkvmReflectionSymbolContext.GetOrCreateModuleSymbol ( Module module)

Gets or creates a IkvmReflectionModuleSymbol for the specified Module.

Parameters
module
Returns

Definition at line 52 of file IkvmReflectionSymbolContext.cs.

53 {
54 if (module is null)
55 throw new ArgumentNullException(nameof(module));
56
57 return GetOrCreateAssemblySymbol(module.Assembly).GetOrCreateModuleSymbol(module);
58 }

◆ GetOrCreateParameterSymbol()

IkvmReflectionParameterSymbol IKVM.CoreLib.Symbols.IkvmReflection.IkvmReflectionSymbolContext.GetOrCreateParameterSymbol ( ParameterInfo parameter)

Gets or creates a IkvmReflectionParameterSymbol for the specified ParameterInfo.

Parameters
parameter
Returns

Definition at line 104 of file IkvmReflectionSymbolContext.cs.

105 {
106 if (parameter is null)
107 throw new ArgumentNullException(nameof(parameter));
108
109 return GetOrCreateAssemblySymbol(parameter.Member.Module.Assembly).GetOrCreateModuleSymbol(parameter.Member.Module).GetOrCreateTypeSymbol(parameter.Member.DeclaringType!).GetOrCreateMethodBaseSymbol((MethodBase)parameter.Member).GetOrCreateParameterSymbol(parameter);
110 }
IKVM.Reflection.MethodBase MethodBase

◆ GetOrCreatePropertySymbol()

IkvmReflectionPropertySymbol IKVM.CoreLib.Symbols.IkvmReflection.IkvmReflectionSymbolContext.GetOrCreatePropertySymbol ( PropertyInfo property)

Gets or creates a IkvmReflectionPropertySymbol for the specified PropertyInfo.

Parameters
property
Returns

Definition at line 130 of file IkvmReflectionSymbolContext.cs.

131 {
132 if (property is null)
133 throw new ArgumentNullException(nameof(property));
134
135 return GetOrCreateAssemblySymbol(property.Module.Assembly).GetOrCreateModuleSymbol(property.Module).GetOrCreateTypeSymbol(property.DeclaringType!).GetOrCreatePropertySymbol(property);
136 }

◆ GetOrCreateTypeSymbol()

IkvmReflectionTypeSymbol IKVM.CoreLib.Symbols.IkvmReflection.IkvmReflectionSymbolContext.GetOrCreateTypeSymbol ( Type type)

Gets or creates a IkvmReflectionTypeSymbol for the specified Type.

Parameters
type
Returns

Definition at line 65 of file IkvmReflectionSymbolContext.cs.

66 {
67 if (type is null)
68 throw new ArgumentNullException(nameof(type));
69
70 return GetOrCreateModuleSymbol(type.Module).GetOrCreateTypeSymbol(type);
71 }
IkvmReflectionModuleSymbol GetOrCreateModuleSymbol(Module module)
Gets or creates a IkvmReflectionModuleSymbol for the specified Module.

The documentation for this class was generated from the following file: