IKVM11  11
Java SE 11 Virtual Machine for .NET
Loading...
Searching...
No Matches
IKVM.CoreLib.Symbols.Reflection.ReflectionParameterSymbol Class Reference
Inheritance diagram for IKVM.CoreLib.Symbols.Reflection.ReflectionParameterSymbol:
IKVM.CoreLib.Symbols.Reflection.ReflectionSymbol IKVM.CoreLib.Symbols.IParameterSymbol IKVM.CoreLib.Symbols.ISymbol IKVM.CoreLib.Symbols.ISymbol IKVM.CoreLib.Symbols.ICustomAttributeSymbolProvider

Public Member Functions

 ReflectionParameterSymbol (ReflectionSymbolContext context, ReflectionMethodBaseSymbol method, ParameterInfo underlyingParameter)
 Initializes a new instance.
 
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.
 
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.
 
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.Reflection.ReflectionSymbol
 ReflectionSymbol (ReflectionSymbolContext context)
 Initializes a new instance.
 
- Public Member Functions inherited from IKVM.CoreLib.Symbols.ICustomAttributeSymbolProvider

Properties

ParameterAttributes Attributes [get]
 Gets the attributes for this parameter.
 
object? DefaultValue [get]
 Gets a value indicating the default value if the parameter has a default value.
 
bool HasDefaultValue [get]
 Gets a value that indicates whether this parameter has a default value.
 
bool IsIn [get]
 Gets a value indicating whether this is an input parameter.
 
bool IsLcid [get]
 Gets a value indicating whether this parameter is a locale identifier (lcid).
 
bool IsOptional [get]
 Gets a value indicating whether this parameter is optional.
 
bool IsOut [get]
 Gets a value indicating whether this is an output parameter.
 
bool IsRetval [get]
 Gets a value indicating whether this is a Retval parameter.
 
IMemberSymbol Member [get]
 Gets a value indicating the member in which the parameter is implemented.
 
int MetadataToken [get]
 Gets a value that identifies this parameter in metadata.
 
string? Name [get]
 Gets the name of the parameter.
 
ITypeSymbol ParameterType [get]
 Gets the Type of this parameter.
 
int Position [get]
 Gets the zero-based position of the parameter in the formal parameter list.
 
- Properties inherited from IKVM.CoreLib.Symbols.Reflection.ReflectionSymbol
ReflectionSymbolContext Context [get]
 Gets the associated ReflectionSymbolContext.
 
virtual bool IsMissing [get]
 Returns true if the symbol is missing.
 
- Properties inherited from IKVM.CoreLib.Symbols.ISymbol
- Properties inherited from IKVM.CoreLib.Symbols.IParameterSymbol

Additional Inherited Members

- Protected Member Functions inherited from IKVM.CoreLib.Symbols.Reflection.ReflectionSymbol
virtual ReflectionMemberSymbol ResolveMemberSymbol (MemberInfo member)
 Resolves the symbol for the specified type.
 
- Package Functions inherited from IKVM.CoreLib.Symbols.Reflection.ReflectionSymbol

Detailed Description

Definition at line 9 of file ReflectionParameterSymbol.cs.

Constructor & Destructor Documentation

◆ ReflectionParameterSymbol()

IKVM.CoreLib.Symbols.Reflection.ReflectionParameterSymbol.ReflectionParameterSymbol ( ReflectionSymbolContext context,
ReflectionMethodBaseSymbol method,
ParameterInfo underlyingParameter )

Initializes a new instance.

Parameters
context
method
underlyingParameter

Definition at line 21 of file ReflectionParameterSymbol.cs.

21 :
22 base(context)
23 {
24 _method = method ?? throw new ArgumentNullException(nameof(method));
25 _underlyingParameter = underlyingParameter ?? throw new ArgumentNullException(nameof(underlyingParameter));
26 }

Member Function Documentation

◆ GetCustomAttributes() [1/2]

ImmutableArray< CustomAttributeSymbol > IKVM.CoreLib.Symbols.Reflection.ReflectionParameterSymbol.GetCustomAttributes ( )

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 56 of file ReflectionParameterSymbol.cs.

57 {
58 return ResolveCustomAttributes(_underlyingParameter.GetCustomAttributesData());
59 }

◆ GetCustomAttributes() [2/2]

ImmutableArray< CustomAttributeSymbol > IKVM.CoreLib.Symbols.Reflection.ReflectionParameterSymbol.GetCustomAttributes ( 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.

Parameters
attributeType
Returns

Implements IKVM.CoreLib.Symbols.ICustomAttributeSymbolProvider.

Definition at line 61 of file ReflectionParameterSymbol.cs.

62 {
63 return ResolveCustomAttributes(_underlyingParameter.GetCustomAttributesData()).Where(i => i.AttributeType == attributeType).ToImmutableArray();
64 }

◆ IsDefined()

bool IKVM.CoreLib.Symbols.Reflection.ReflectionParameterSymbol.IsDefined ( ITypeSymbol attributeType)

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

Parameters
attributeType
Returns

Implements IKVM.CoreLib.Symbols.ICustomAttributeSymbolProvider.

Definition at line 66 of file ReflectionParameterSymbol.cs.

67 {
68 return _underlyingParameter.IsDefined(((ReflectionTypeSymbol)attributeType).UnderlyingType);
69 }

Property Documentation

◆ Attributes

ParameterAttributes IKVM.CoreLib.Symbols.Reflection.ReflectionParameterSymbol.Attributes
get

Gets the attributes for this parameter.

Implements IKVM.CoreLib.Symbols.IParameterSymbol.

Definition at line 30 of file ReflectionParameterSymbol.cs.

◆ DefaultValue

object? IKVM.CoreLib.Symbols.Reflection.ReflectionParameterSymbol.DefaultValue
get

Gets a value indicating the default value if the parameter has a default value.

Implements IKVM.CoreLib.Symbols.IParameterSymbol.

Definition at line 32 of file ReflectionParameterSymbol.cs.

◆ HasDefaultValue

bool IKVM.CoreLib.Symbols.Reflection.ReflectionParameterSymbol.HasDefaultValue
get

Gets a value that indicates whether this parameter has a default value.

Implements IKVM.CoreLib.Symbols.IParameterSymbol.

Definition at line 34 of file ReflectionParameterSymbol.cs.

◆ IsIn

bool IKVM.CoreLib.Symbols.Reflection.ReflectionParameterSymbol.IsIn
get

Gets a value indicating whether this is an input parameter.

Implements IKVM.CoreLib.Symbols.IParameterSymbol.

Definition at line 36 of file ReflectionParameterSymbol.cs.

◆ IsLcid

bool IKVM.CoreLib.Symbols.Reflection.ReflectionParameterSymbol.IsLcid
get

Gets a value indicating whether this parameter is a locale identifier (lcid).

Implements IKVM.CoreLib.Symbols.IParameterSymbol.

Definition at line 38 of file ReflectionParameterSymbol.cs.

◆ IsOptional

bool IKVM.CoreLib.Symbols.Reflection.ReflectionParameterSymbol.IsOptional
get

Gets a value indicating whether this parameter is optional.

Implements IKVM.CoreLib.Symbols.IParameterSymbol.

Definition at line 40 of file ReflectionParameterSymbol.cs.

◆ IsOut

bool IKVM.CoreLib.Symbols.Reflection.ReflectionParameterSymbol.IsOut
get

Gets a value indicating whether this is an output parameter.

Implements IKVM.CoreLib.Symbols.IParameterSymbol.

Definition at line 42 of file ReflectionParameterSymbol.cs.

◆ IsRetval

bool IKVM.CoreLib.Symbols.Reflection.ReflectionParameterSymbol.IsRetval
get

Gets a value indicating whether this is a Retval parameter.

Implements IKVM.CoreLib.Symbols.IParameterSymbol.

Definition at line 44 of file ReflectionParameterSymbol.cs.

◆ Member

IMemberSymbol IKVM.CoreLib.Symbols.Reflection.ReflectionParameterSymbol.Member
get

Gets a value indicating the member in which the parameter is implemented.

Implements IKVM.CoreLib.Symbols.IParameterSymbol.

Definition at line 46 of file ReflectionParameterSymbol.cs.

◆ MetadataToken

int IKVM.CoreLib.Symbols.Reflection.ReflectionParameterSymbol.MetadataToken
get

Gets a value that identifies this parameter in metadata.

Implements IKVM.CoreLib.Symbols.IParameterSymbol.

Definition at line 48 of file ReflectionParameterSymbol.cs.

◆ Name

string? IKVM.CoreLib.Symbols.Reflection.ReflectionParameterSymbol.Name
get

Gets the name of the parameter.

Implements IKVM.CoreLib.Symbols.IParameterSymbol.

Definition at line 50 of file ReflectionParameterSymbol.cs.

◆ ParameterType

ITypeSymbol IKVM.CoreLib.Symbols.Reflection.ReflectionParameterSymbol.ParameterType
get

Gets the Type of this parameter.

Implements IKVM.CoreLib.Symbols.IParameterSymbol.

Definition at line 52 of file ReflectionParameterSymbol.cs.

◆ Position

int IKVM.CoreLib.Symbols.Reflection.ReflectionParameterSymbol.Position
get

Gets the zero-based position of the parameter in the formal parameter list.

Implements IKVM.CoreLib.Symbols.IParameterSymbol.

Definition at line 54 of file ReflectionParameterSymbol.cs.


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