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

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

Public Member Functions

 ReflectionSymbolContext ()
 Initializes a new instance.
 
ReflectionAssemblySymbol GetOrCreateAssemblySymbol (Assembly assembly)
 Gets or creates a ReflectionAssemblySymbol for the specified Assembly.
 
ReflectionModuleSymbol GetOrCreateModuleSymbol (Module module)
 Gets or creates a ReflectionModuleSymbol for the specified Module.
 
ReflectionTypeSymbol GetOrCreateTypeSymbol (Type type)
 Gets or creates a ReflectionTypeSymbol for the specified Type.
 
ReflectionConstructorSymbol GetOrCreateConstructorSymbol (ConstructorInfo ctor)
 Gets or creates a ReflectionConstructorSymbol for the specified ConstructorInfo.
 
ReflectionMethodSymbol GetOrCreateMethodSymbol (MethodInfo method)
 Gets or creates a ReflectionMethodBaseSymbol for the specified MethodInfo.
 
ReflectionParameterSymbol GetOrCreateParameterSymbol (ParameterInfo parameter)
 Gets or creates a ReflectionParameterSymbol for the specified ParameterInfo.
 
ReflectionFieldSymbol GetOrCreateFieldSymbol (FieldInfo field)
 Gets or creates a ReflectionFieldSymbol for the specified FieldInfo.
 
ReflectionPropertySymbol GetOrCreatePropertySymbol (PropertyInfo property)
 Gets or creates a ReflectionPropertySymbol for the specified PropertyInfo.
 
ReflectionEventSymbol GetOrCreateEventSymbol (EventInfo @event)
 Gets or creates a ReflectionEventSymbol for the specified EventInfo.
 

Detailed Description

Holds references to symbols derived from System.Reflection.

Definition at line 11 of file ReflectionSymbolContext.cs.

Constructor & Destructor Documentation

◆ ReflectionSymbolContext()

IKVM.CoreLib.Symbols.Reflection.ReflectionSymbolContext.ReflectionSymbolContext ( )

Initializes a new instance.

Definition at line 19 of file ReflectionSymbolContext.cs.

20 {
21
22 }

Member Function Documentation

◆ GetOrCreateAssemblySymbol()

ReflectionAssemblySymbol IKVM.CoreLib.Symbols.Reflection.ReflectionSymbolContext.GetOrCreateAssemblySymbol ( Assembly assembly)

Gets or creates a ReflectionAssemblySymbol for the specified Assembly.

Parameters
assembly
Returns

Definition at line 29 of file ReflectionSymbolContext.cs.

30 {
31 return _assemblies.GetValue(assembly, _ => new ReflectionAssemblySymbol(this, _));
32 }

◆ GetOrCreateConstructorSymbol()

ReflectionConstructorSymbol IKVM.CoreLib.Symbols.Reflection.ReflectionSymbolContext.GetOrCreateConstructorSymbol ( ConstructorInfo ctor)

Gets or creates a ReflectionConstructorSymbol for the specified ConstructorInfo.

Parameters
ctor
Returns

Definition at line 59 of file ReflectionSymbolContext.cs.

60 {
61 return GetOrCreateAssemblySymbol(ctor.Module.Assembly).GetOrCreateModuleSymbol(ctor.Module).GetOrCreateTypeSymbol(ctor.DeclaringType!).GetOrCreateConstructorSymbol(ctor);
62 }
ReflectionAssemblySymbol GetOrCreateAssemblySymbol(Assembly assembly)
Gets or creates a ReflectionAssemblySymbol for the specified Assembly.

◆ GetOrCreateEventSymbol()

ReflectionEventSymbol IKVM.CoreLib.Symbols.Reflection.ReflectionSymbolContext.GetOrCreateEventSymbol ( EventInfo @ event)

Gets or creates a ReflectionEventSymbol for the specified EventInfo.

Parameters
event
Returns

Definition at line 109 of file ReflectionSymbolContext.cs.

110 {
111 return GetOrCreateAssemblySymbol(@event.Module.Assembly).GetOrCreateModuleSymbol(@event.Module).GetOrCreateTypeSymbol(@event.DeclaringType!).GetOrCreateEventSymbol(@event);
112 }

◆ GetOrCreateFieldSymbol()

ReflectionFieldSymbol IKVM.CoreLib.Symbols.Reflection.ReflectionSymbolContext.GetOrCreateFieldSymbol ( FieldInfo field)

Gets or creates a ReflectionFieldSymbol for the specified FieldInfo.

Parameters
field
Returns

Definition at line 89 of file ReflectionSymbolContext.cs.

90 {
91 return GetOrCreateAssemblySymbol(field.Module.Assembly).GetOrCreateModuleSymbol(field.Module).GetOrCreateTypeSymbol(field.DeclaringType!).GetOrCreateFieldSymbol(field);
92 }

◆ GetOrCreateMethodSymbol()

ReflectionMethodSymbol IKVM.CoreLib.Symbols.Reflection.ReflectionSymbolContext.GetOrCreateMethodSymbol ( MethodInfo method)

Gets or creates a ReflectionMethodBaseSymbol for the specified MethodInfo.

Parameters
method
Returns

Definition at line 69 of file ReflectionSymbolContext.cs.

70 {
71 return GetOrCreateAssemblySymbol(method.Module.Assembly).GetOrCreateModuleSymbol(method.Module).GetOrCreateTypeSymbol(method.DeclaringType!).GetOrCreateMethodSymbol(method);
72 }

◆ GetOrCreateModuleSymbol()

ReflectionModuleSymbol IKVM.CoreLib.Symbols.Reflection.ReflectionSymbolContext.GetOrCreateModuleSymbol ( Module module)

Gets or creates a ReflectionModuleSymbol for the specified Module.

Parameters
module
Returns

Definition at line 39 of file ReflectionSymbolContext.cs.

40 {
41 return GetOrCreateAssemblySymbol(module.Assembly).GetOrCreateModuleSymbol(module);
42 }

◆ GetOrCreateParameterSymbol()

ReflectionParameterSymbol IKVM.CoreLib.Symbols.Reflection.ReflectionSymbolContext.GetOrCreateParameterSymbol ( ParameterInfo parameter)

Gets or creates a ReflectionParameterSymbol for the specified ParameterInfo.

Parameters
parameter
Returns

Definition at line 79 of file ReflectionSymbolContext.cs.

80 {
81 return GetOrCreateAssemblySymbol(parameter.Member.Module.Assembly).GetOrCreateModuleSymbol(parameter.Member.Module).GetOrCreateTypeSymbol(parameter.Member.DeclaringType!).GetOrCreateMethodBaseSymbol((MethodBase)parameter.Member).GetOrCreateParameterSymbol(parameter);
82 }
IKVM.Reflection.MethodBase MethodBase

◆ GetOrCreatePropertySymbol()

ReflectionPropertySymbol IKVM.CoreLib.Symbols.Reflection.ReflectionSymbolContext.GetOrCreatePropertySymbol ( PropertyInfo property)

Gets or creates a ReflectionPropertySymbol for the specified PropertyInfo.

Parameters
property
Returns

Definition at line 99 of file ReflectionSymbolContext.cs.

100 {
101 return GetOrCreateAssemblySymbol(property.Module.Assembly).GetOrCreateModuleSymbol(property.Module).GetOrCreateTypeSymbol(property.DeclaringType!).GetOrCreatePropertySymbol(property);
102 }

◆ GetOrCreateTypeSymbol()

ReflectionTypeSymbol IKVM.CoreLib.Symbols.Reflection.ReflectionSymbolContext.GetOrCreateTypeSymbol ( Type type)

Gets or creates a ReflectionTypeSymbol for the specified Type.

Parameters
type
Returns

Definition at line 49 of file ReflectionSymbolContext.cs.

50 {
51 return GetOrCreateModuleSymbol(type.Module).GetOrCreateTypeSymbol(type);
52 }
ReflectionModuleSymbol GetOrCreateModuleSymbol(Module module)
Gets or creates a ReflectionModuleSymbol for the specified Module.

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