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

Public Member Functions

 ReflectionPropertySymbol (ReflectionSymbolContext context, ReflectionTypeSymbol type, PropertyInfo underlyingProperty)
 Initializes a new instance.
 
object? GetRawConstantValue ()
 Returns a literal value associated with the property by a compiler.
Returns

 
IMethodSymbol[] GetAccessors ()
 Returns an array whose elements reflect the public get and set accessors of the property reflected by the current instance.
Returns

 
IMethodSymbol[] GetAccessors (bool nonPublic)
 Returns an array whose elements reflect the public and, if specified, non-public get and set accessors of the property reflected by the current instance.
Parameters
nonPublic
Returns

 
IParameterSymbol[] GetIndexParameters ()
 When overridden in a derived class, returns an array of all the index parameters for the property.
Returns

 
IMethodSymbolGetGetMethod ()
 Returns the public get accessor for this property.
Returns

 
IMethodSymbolGetGetMethod (bool nonPublic)
 When overridden in a derived class, returns the public or non-public get accessor for this property.
Parameters
nonPublic
Returns

 
IMethodSymbolGetSetMethod ()
 Returns the public set accessor for this property.
Returns

 
IMethodSymbolGetSetMethod (bool nonPublic)
 When overridden in a derived class, returns the set accessor for this property.
Parameters
nonPublic
Returns

 
ITypeSymbol GetModifiedPropertyType ()
 Gets the modified type of this property object.
Returns

 
ITypeSymbol[] GetOptionalCustomModifiers ()
 Returns an array of types representing the optional custom modifiers of the property.
Returns

 
ITypeSymbol[] GetRequiredCustomModifiers ()
 Returns an array of types representing the required custom modifiers of the property.
Returns

 
- Public Member Functions inherited from IKVM.CoreLib.Symbols.Reflection.ReflectionMemberSymbol
 ReflectionMemberSymbol (ReflectionSymbolContext context, ReflectionModuleSymbol module, ReflectionTypeSymbol? 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.
Returns

 
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.
Parameters
attributeType
Returns

 
virtual bool IsDefined (ITypeSymbol attributeType)
 Indicates whether one or more instance of attributeType is defined on this member.
Parameters
attributeType
Returns

 
- 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
- Public Member Functions inherited from IKVM.CoreLib.Symbols.IPropertySymbol

Properties

PropertyAttributes Attributes [get]
 Gets the attributes for this property.
 
bool CanRead [get]
 Gets a value indicating whether the property can be read.
 
bool CanWrite [get]
 Gets a value indicating whether the property can be written to.
 
bool IsSpecialName [get]
 Gets a value indicating whether the property is the special name.
 
ITypeSymbol PropertyType [get]
 Gets the type of this property.
 
IMethodSymbolGetMethod [get]
 Gets the get accessor for this property.
 
IMethodSymbolSetMethod [get]
 Gets the set accessor for this property.
 
- Properties inherited from IKVM.CoreLib.Symbols.Reflection.ReflectionMemberSymbol
virtual IModuleSymbol Module [get]
 Gets the module in which the type that declares the member represented by the current is defined.
 
virtual ? ITypeSymbol DeclaringType [get]
 Gets the class that declares this member.
 
virtual 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 string Name [get]
 Gets the name of the current member.
 
- 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.IMemberSymbol
- Properties inherited from IKVM.CoreLib.Symbols.IPropertySymbol

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.ReflectionMemberSymbol
- Package Functions inherited from IKVM.CoreLib.Symbols.Reflection.ReflectionSymbol

Detailed Description

Definition at line 7 of file ReflectionPropertySymbol.cs.

Constructor & Destructor Documentation

◆ ReflectionPropertySymbol()

IKVM.CoreLib.Symbols.Reflection.ReflectionPropertySymbol.ReflectionPropertySymbol ( ReflectionSymbolContext context,
ReflectionTypeSymbol type,
PropertyInfo underlyingProperty )

Initializes a new instance.

Parameters
context
type
underlyingProperty

Definition at line 18 of file ReflectionPropertySymbol.cs.

18 :
19 base(context, type.ContainingModule, type, underlyingProperty)
20 {
21 _underlyingProperty = underlyingProperty ?? throw new ArgumentNullException(nameof(underlyingProperty));
22 }

Member Function Documentation

◆ GetAccessors() [1/2]

IMethodSymbol[] IKVM.CoreLib.Symbols.Reflection.ReflectionPropertySymbol.GetAccessors ( )

Returns an array whose elements reflect the public get and set accessors of the property reflected by the current instance.

Returns

Implements IKVM.CoreLib.Symbols.IPropertySymbol.

Definition at line 57 of file ReflectionPropertySymbol.cs.

58 {
59 return ResolveMethodSymbols(_underlyingProperty.GetAccessors());
60 }

◆ GetAccessors() [2/2]

IMethodSymbol[] IKVM.CoreLib.Symbols.Reflection.ReflectionPropertySymbol.GetAccessors ( bool nonPublic)

Returns an array whose elements reflect the public and, if specified, non-public get and set accessors of the property reflected by the current instance.

Parameters
nonPublic
Returns

Implements IKVM.CoreLib.Symbols.IPropertySymbol.

Definition at line 63 of file ReflectionPropertySymbol.cs.

64 {
65 return ResolveMethodSymbols(_underlyingProperty.GetAccessors(nonPublic));
66 }

◆ GetGetMethod() [1/2]

IMethodSymbol? IKVM.CoreLib.Symbols.Reflection.ReflectionPropertySymbol.GetGetMethod ( )

Returns the public get accessor for this property.

Returns

Implements IKVM.CoreLib.Symbols.IPropertySymbol.

Definition at line 75 of file ReflectionPropertySymbol.cs.

76 {
77 return _underlyingProperty.GetGetMethod() is MethodInfo m ? ResolveMethodSymbol(m) : null;
78 }
IKVM.Reflection.MethodInfo MethodInfo

◆ GetGetMethod() [2/2]

IMethodSymbol? IKVM.CoreLib.Symbols.Reflection.ReflectionPropertySymbol.GetGetMethod ( bool nonPublic)

When overridden in a derived class, returns the public or non-public get accessor for this property.

Parameters
nonPublic
Returns

Implements IKVM.CoreLib.Symbols.IPropertySymbol.

Definition at line 81 of file ReflectionPropertySymbol.cs.

82 {
83 return _underlyingProperty.GetGetMethod(nonPublic) is MethodInfo m ? ResolveMethodSymbol(m) : null;
84 }

◆ GetIndexParameters()

IParameterSymbol[] IKVM.CoreLib.Symbols.Reflection.ReflectionPropertySymbol.GetIndexParameters ( )

When overridden in a derived class, returns an array of all the index parameters for the property.

Returns

Implements IKVM.CoreLib.Symbols.IPropertySymbol.

Definition at line 69 of file ReflectionPropertySymbol.cs.

70 {
71 return ResolveParameterSymbols(_underlyingProperty.GetIndexParameters());
72 }

◆ GetModifiedPropertyType()

ITypeSymbol IKVM.CoreLib.Symbols.Reflection.ReflectionPropertySymbol.GetModifiedPropertyType ( )

Gets the modified type of this property object.

Returns

Implements IKVM.CoreLib.Symbols.IPropertySymbol.

Definition at line 99 of file ReflectionPropertySymbol.cs.

100 {
101 throw new NotImplementedException();
102 }

◆ GetOptionalCustomModifiers()

ITypeSymbol[] IKVM.CoreLib.Symbols.Reflection.ReflectionPropertySymbol.GetOptionalCustomModifiers ( )

Returns an array of types representing the optional custom modifiers of the property.

Returns

Implements IKVM.CoreLib.Symbols.IPropertySymbol.

Definition at line 105 of file ReflectionPropertySymbol.cs.

106 {
107 return ResolveTypeSymbols(_underlyingProperty.GetOptionalCustomModifiers());
108 }

◆ GetRawConstantValue()

object? IKVM.CoreLib.Symbols.Reflection.ReflectionPropertySymbol.GetRawConstantValue ( )

Returns a literal value associated with the property by a compiler.

Returns

Implements IKVM.CoreLib.Symbols.IPropertySymbol.

Definition at line 51 of file ReflectionPropertySymbol.cs.

52 {
53 return _underlyingProperty.GetRawConstantValue();
54 }

◆ GetRequiredCustomModifiers()

ITypeSymbol[] IKVM.CoreLib.Symbols.Reflection.ReflectionPropertySymbol.GetRequiredCustomModifiers ( )

Returns an array of types representing the required custom modifiers of the property.

Returns

Implements IKVM.CoreLib.Symbols.IPropertySymbol.

Definition at line 111 of file ReflectionPropertySymbol.cs.

112 {
113 return ResolveTypeSymbols(_underlyingProperty.GetRequiredCustomModifiers());
114 }

◆ GetSetMethod() [1/2]

IMethodSymbol? IKVM.CoreLib.Symbols.Reflection.ReflectionPropertySymbol.GetSetMethod ( )

Returns the public set accessor for this property.

Returns

Implements IKVM.CoreLib.Symbols.IPropertySymbol.

Definition at line 87 of file ReflectionPropertySymbol.cs.

88 {
89 return _underlyingProperty.GetSetMethod() is MethodInfo m ? ResolveMethodSymbol(m) : null;
90 }

◆ GetSetMethod() [2/2]

IMethodSymbol? IKVM.CoreLib.Symbols.Reflection.ReflectionPropertySymbol.GetSetMethod ( bool nonPublic)

When overridden in a derived class, returns the set accessor for this property.

Parameters
nonPublic
Returns

Implements IKVM.CoreLib.Symbols.IPropertySymbol.

Definition at line 93 of file ReflectionPropertySymbol.cs.

94 {
95 return _underlyingProperty.GetSetMethod(nonPublic) is MethodInfo m ? ResolveMethodSymbol(m) : null;
96 }

Property Documentation

◆ Attributes

PropertyAttributes IKVM.CoreLib.Symbols.Reflection.ReflectionPropertySymbol.Attributes
get

Gets the attributes for this property.

Implements IKVM.CoreLib.Symbols.IPropertySymbol.

Definition at line 30 of file ReflectionPropertySymbol.cs.

◆ CanRead

bool IKVM.CoreLib.Symbols.Reflection.ReflectionPropertySymbol.CanRead
get

Gets a value indicating whether the property can be read.

Implements IKVM.CoreLib.Symbols.IPropertySymbol.

Definition at line 33 of file ReflectionPropertySymbol.cs.

◆ CanWrite

bool IKVM.CoreLib.Symbols.Reflection.ReflectionPropertySymbol.CanWrite
get

Gets a value indicating whether the property can be written to.

Implements IKVM.CoreLib.Symbols.IPropertySymbol.

Definition at line 36 of file ReflectionPropertySymbol.cs.

◆ GetMethod

IMethodSymbol? IKVM.CoreLib.Symbols.Reflection.ReflectionPropertySymbol.GetMethod
get

Gets the get accessor for this property.

Implements IKVM.CoreLib.Symbols.IPropertySymbol.

Definition at line 45 of file ReflectionPropertySymbol.cs.

45{ } m ? ResolveMethodSymbol(m) : null;

◆ IsSpecialName

bool IKVM.CoreLib.Symbols.Reflection.ReflectionPropertySymbol.IsSpecialName
get

Gets a value indicating whether the property is the special name.

Implements IKVM.CoreLib.Symbols.IPropertySymbol.

Definition at line 39 of file ReflectionPropertySymbol.cs.

◆ PropertyType

ITypeSymbol IKVM.CoreLib.Symbols.Reflection.ReflectionPropertySymbol.PropertyType
get

Gets the type of this property.

Implements IKVM.CoreLib.Symbols.IPropertySymbol.

Definition at line 42 of file ReflectionPropertySymbol.cs.

◆ SetMethod

IMethodSymbol? IKVM.CoreLib.Symbols.Reflection.ReflectionPropertySymbol.SetMethod
get

Gets the set accessor for this property.

Implements IKVM.CoreLib.Symbols.IPropertySymbol.

Definition at line 48 of file ReflectionPropertySymbol.cs.

48{ } m ? ResolveMethodSymbol(m) : null;

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