IKVM11  11
Java SE 11 Virtual Machine for .NET
Loading...
Searching...
No Matches
IKVM.CoreLib.Symbols.IkvmReflection.IkvmReflectionMemberSymbol Class Referenceabstract
Inheritance diagram for IKVM.CoreLib.Symbols.IkvmReflection.IkvmReflectionMemberSymbol:
IKVM.CoreLib.Symbols.IkvmReflection.IkvmReflectionSymbol IKVM.CoreLib.Symbols.IMemberSymbol IKVM.CoreLib.Symbols.ISymbol IKVM.CoreLib.Symbols.ISymbol IKVM.CoreLib.Symbols.ICustomAttributeSymbolProvider IKVM.CoreLib.Symbols.IkvmReflection.IkvmReflectionEventSymbol IKVM.CoreLib.Symbols.IkvmReflection.IkvmReflectionFieldSymbol IKVM.CoreLib.Symbols.IkvmReflection.IkvmReflectionMethodBaseSymbol IKVM.CoreLib.Symbols.IkvmReflection.IkvmReflectionPropertySymbol IKVM.CoreLib.Symbols.IkvmReflection.IkvmReflectionTypeSymbol IKVM.CoreLib.Symbols.IkvmReflection.IkvmReflectionConstructorSymbol IKVM.CoreLib.Symbols.IkvmReflection.IkvmReflectionMethodSymbol

Public Member Functions

 IkvmReflectionMemberSymbol (IkvmReflectionSymbolContext context, IkvmReflectionModuleSymbol module, IkvmReflectionTypeSymbol? type, MemberInfo underlyingMember)
 Initializes a new instance.
 
virtual ImmutableArray< CustomAttributeSymbolGetCustomAttributes ()
 Returns an array of all of the custom attributes defined on this member, excluding named attributes, or an empty array if there are no custom attributes.
 
virtual ImmutableArray< CustomAttributeSymbolGetCustomAttributes (ITypeSymbol attributeType)
 Returns an array of custom attributes defined on this member, identified by type, or an empty array if there are no custom attributes of that type.
 
virtual bool IsDefined (ITypeSymbol attributeType)
 Indicates whether one or more instance of attributeType is defined on this member.
 
- Public Member Functions inherited from IKVM.CoreLib.Symbols.IkvmReflection.IkvmReflectionSymbol
 IkvmReflectionSymbol (IkvmReflectionSymbolContext context)
 Initializes a new instance.
 
- Public Member Functions inherited from IKVM.CoreLib.Symbols.ICustomAttributeSymbolProvider

Properties

virtual ? ITypeSymbol DeclaringType [get]
 Gets the class that declares this member.
 
virtual global::System.Reflection.MemberTypes MemberType [get]
 When overridden in a derived class, gets a value indicating the type of the member - method, constructor, event, and so on.
 
virtual int MetadataToken [get]
 Gets a value that identifies a metadata element.
 
virtual IModuleSymbol Module [get]
 Gets the module in which the type that declares the member represented by the current is defined.
 
virtual string Name [get]
 Gets the name of the current member.
 
override bool IsMissing [get]
 Returns true if the symbol is missing.
 
- Properties inherited from IKVM.CoreLib.Symbols.IkvmReflection.IkvmReflectionSymbol
IkvmReflectionSymbolContext Context [get]
 Gets the associated IkvmReflectionSymbolContext.
 
virtual bool IsMissing [get]
 Returns true if the symbol is missing.
 
- Properties inherited from IKVM.CoreLib.Symbols.ISymbol
- Properties inherited from IKVM.CoreLib.Symbols.IMemberSymbol

Additional Inherited Members

- Protected Member Functions inherited from IKVM.CoreLib.Symbols.IkvmReflection.IkvmReflectionSymbol
virtual IkvmReflectionMemberSymbol ResolveMemberSymbol (MemberInfo member)
 Resolves the symbol for the specified type.
 
- Package Functions inherited from IKVM.CoreLib.Symbols.IkvmReflection.IkvmReflectionSymbol

Detailed Description

Definition at line 16 of file IkvmReflectionMemberSymbol.cs.

Constructor & Destructor Documentation

◆ IkvmReflectionMemberSymbol()

IKVM.CoreLib.Symbols.IkvmReflection.IkvmReflectionMemberSymbol.IkvmReflectionMemberSymbol ( IkvmReflectionSymbolContext context,
IkvmReflectionModuleSymbol module,
IkvmReflectionTypeSymbol? type,
MemberInfo underlyingMember )

Initializes a new instance.

Parameters
context
module
type
underlyingMember

Definition at line 30 of file IkvmReflectionMemberSymbol.cs.

30 :
31 base(context)
32 {
33 _module = module ?? throw new ArgumentNullException(nameof(module));
34 _type = type;
35 _underlyingMember = underlyingMember ?? throw new ArgumentNullException(nameof(underlyingMember));
36 }

Member Function Documentation

◆ GetCustomAttributes() [1/2]

virtual ImmutableArray< CustomAttributeSymbol > IKVM.CoreLib.Symbols.IkvmReflection.IkvmReflectionMemberSymbol.GetCustomAttributes ( )
virtual

Returns an array of all of the custom attributes defined on this member, excluding named attributes, or an empty array if there are no custom attributes.

Returns

Implements IKVM.CoreLib.Symbols.ICustomAttributeSymbolProvider.

Definition at line 148 of file IkvmReflectionMemberSymbol.cs.

149 {
150 return ResolveCustomAttributes(_underlyingMember.GetCustomAttributesData());
151 }

◆ GetCustomAttributes() [2/2]

virtual ImmutableArray< CustomAttributeSymbol > IKVM.CoreLib.Symbols.IkvmReflection.IkvmReflectionMemberSymbol.GetCustomAttributes ( ITypeSymbol attributeType)
virtual

Returns an array of custom attributes defined on this member, identified by type, or an empty array if there are no custom attributes of that type.

Parameters
attributeType
Returns

Implements IKVM.CoreLib.Symbols.ICustomAttributeSymbolProvider.

Definition at line 153 of file IkvmReflectionMemberSymbol.cs.

154 {
155 return ResolveCustomAttributes(_underlyingMember.GetCustomAttributesData()).Where(i => i.AttributeType == attributeType).ToImmutableArray();
156 }

◆ IsDefined()

virtual bool IKVM.CoreLib.Symbols.IkvmReflection.IkvmReflectionMemberSymbol.IsDefined ( ITypeSymbol attributeType)
virtual

Indicates whether one or more instance of attributeType is defined on this member.

Parameters
attributeType
Returns

Implements IKVM.CoreLib.Symbols.ICustomAttributeSymbolProvider.

Definition at line 158 of file IkvmReflectionMemberSymbol.cs.

159 {
160 return _underlyingMember.IsDefined(((IkvmReflectionTypeSymbol)attributeType).UnderlyingType, false);
161 }

Property Documentation

◆ DeclaringType

virtual ? ITypeSymbol IKVM.CoreLib.Symbols.IkvmReflection.IkvmReflectionMemberSymbol.DeclaringType
get

Gets the class that declares this member.

Implements IKVM.CoreLib.Symbols.IMemberSymbol.

Definition at line 136 of file IkvmReflectionMemberSymbol.cs.

◆ IsMissing

override bool IKVM.CoreLib.Symbols.IkvmReflection.IkvmReflectionMemberSymbol.IsMissing
get

Returns true if the symbol is missing.

Implements IKVM.CoreLib.Symbols.ISymbol.

Definition at line 146 of file IkvmReflectionMemberSymbol.cs.

◆ MemberType

virtual global.System.Reflection.MemberTypes IKVM.CoreLib.Symbols.IkvmReflection.IkvmReflectionMemberSymbol.MemberType
get

◆ MetadataToken

virtual int IKVM.CoreLib.Symbols.IkvmReflection.IkvmReflectionMemberSymbol.MetadataToken
get

Gets a value that identifies a metadata element.

Implements IKVM.CoreLib.Symbols.IMemberSymbol.

Definition at line 140 of file IkvmReflectionMemberSymbol.cs.

◆ Module

virtual IModuleSymbol IKVM.CoreLib.Symbols.IkvmReflection.IkvmReflectionMemberSymbol.Module
get

Gets the module in which the type that declares the member represented by the current is defined.

Implements IKVM.CoreLib.Symbols.IMemberSymbol.

Definition at line 142 of file IkvmReflectionMemberSymbol.cs.

◆ Name

virtual string IKVM.CoreLib.Symbols.IkvmReflection.IkvmReflectionMemberSymbol.Name
get

Gets the name of the current member.

Implements IKVM.CoreLib.Symbols.IMemberSymbol.

Definition at line 144 of file IkvmReflectionMemberSymbol.cs.


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