IKVM11  11
Java SE 11 Virtual Machine for .NET
Loading...
Searching...
No Matches
IkvmReflectionParameterSymbol.cs
Go to the documentation of this file.
1using System;
2using System.Collections.Immutable;
3
5
7{
8
10 {
11
12 readonly ParameterInfo _underlyingParameter;
13 readonly IkvmReflectionMethodBaseSymbol _method;
14
22 base(context)
23 {
24 _method = method ?? throw new ArgumentNullException(nameof(method));
25 _underlyingParameter = underlyingParameter ?? throw new ArgumentNullException(nameof(underlyingParameter));
26 }
27
28 internal IkvmReflectionMethodBaseSymbol ContainingMethod => _method;
29
30 public global::System.Reflection.ParameterAttributes Attributes => (global::System.Reflection.ParameterAttributes)_underlyingParameter.Attributes;
31
32 public object DefaultValue => _underlyingParameter.RawDefaultValue;
33
34 public bool HasDefaultValue => _underlyingParameter.HasDefaultValue;
35
36 public bool IsIn => _underlyingParameter.IsIn;
37
38 public bool IsLcid => _underlyingParameter.IsLcid;
39
40 public bool IsOptional => _underlyingParameter.IsOptional;
41
42 public bool IsOut => _underlyingParameter.IsOut;
43
44 public bool IsRetval => _underlyingParameter.IsRetval;
45
46 public IMemberSymbol Member => ResolveMemberSymbol(_underlyingParameter.Member);
47
48 public int MetadataToken => _underlyingParameter.MetadataToken;
49
50 public string? Name => _underlyingParameter.Name;
51
52 public ITypeSymbol ParameterType => ResolveTypeSymbol(_underlyingParameter.ParameterType);
53
54 public int Position => _underlyingParameter.Position;
55
56 public ImmutableArray<CustomAttributeSymbol> GetCustomAttributes()
57 {
58 return ResolveCustomAttributes(_underlyingParameter.GetCustomAttributesData());
59 }
60
61 public ImmutableArray<CustomAttributeSymbol> GetCustomAttributes(ITypeSymbol attributeType)
62 {
63 return ResolveCustomAttributes(_underlyingParameter.__GetCustomAttributes(((IkvmReflectionTypeSymbol)attributeType).UnderlyingType, false));
64 }
65
66 public bool IsDefined(ITypeSymbol attributeType)
67 {
68 return _underlyingParameter.IsDefined(((IkvmReflectionTypeSymbol)attributeType).UnderlyingType, false);
69 }
70
71 }
72
73}
IKVM.Reflection.ParameterInfo ParameterInfo
global::java.lang.invoke.LambdaForm.Name Name
IkvmReflectionParameterSymbol(IkvmReflectionSymbolContext context, IkvmReflectionMethodBaseSymbol method, ParameterInfo underlyingParameter)
Initializes a new instance.
bool IsDefined(ITypeSymbol attributeType)
Indicates whether one or more instance of attributeType is defined on this member.
int MetadataToken
Gets a value that identifies this parameter in metadata.
object DefaultValue
Gets a value indicating the default value if the parameter has a default value.
bool HasDefaultValue
Gets a value that indicates whether this parameter has a default value.
global::System.Reflection.ParameterAttributes Attributes
Gets the attributes for this parameter.
ImmutableArray< CustomAttributeSymbol > GetCustomAttributes(ITypeSymbol attributeType)
Returns an array of custom attributes defined on this member, identified by type, or an empty array i...
bool IsOut
Gets a value indicating whether this is an output parameter.
bool IsRetval
Gets a value indicating whether this is a Retval parameter.
int Position
Gets the zero-based position of the parameter in the formal parameter list.
bool IsLcid
Gets a value indicating whether this parameter is a locale identifier (lcid).
IMemberSymbol Member
Gets a value indicating the member in which the parameter is implemented.
bool IsIn
Gets a value indicating whether this is an input parameter.
bool IsOptional
Gets a value indicating whether this parameter is optional.
ImmutableArray< CustomAttributeSymbol > GetCustomAttributes()
Returns an array of all of the custom attributes defined on this member, excluding named attributes,...
Holds references to symbols derived from System.Reflection.
virtual IkvmReflectionMemberSymbol ResolveMemberSymbol(MemberInfo member)
Resolves the symbol for the specified type.
Obtains information about the attributes of a member and provides access to member metadata.
Discovers the attributes of a parameter and provides access to parameter metadata.
Represents type declarations: class types, interface types, array types, value types,...