IKVM11  11
Java SE 11 Virtual Machine for .NET
Loading...
Searching...
No Matches
IKVM.CoreLib.Symbols.Reflection.ReflectionFieldSymbol Class Reference
Inheritance diagram for IKVM.CoreLib.Symbols.Reflection.ReflectionFieldSymbol:
IKVM.CoreLib.Symbols.Reflection.ReflectionMemberSymbol IKVM.CoreLib.Symbols.IFieldSymbol 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

 ReflectionFieldSymbol (ReflectionSymbolContext context, ReflectionTypeSymbol type, FieldInfo underlyingField)
 Initializes a new instance.
 
ITypeSymbol[] GetOptionalCustomModifiers ()
 Gets an array of types that identify the optional custom modifiers of the field.
Returns

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

 
object? GetRawConstantValue ()
 Returns a literal value associated with the field by a compiler.
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.IFieldSymbol

Properties

FieldAttributes Attributes [get]
 Gets the attributes associated with this field.
 
ITypeSymbol FieldType [get]
 Gets the type of this field object.
 
bool IsSpecialName [get]
 Gets a value indicating whether the corresponding SpecialName attribute is set in the FieldAttributes enumerator.
 
bool IsAssembly [get]
 Gets a value indicating whether the potential visibility of this field is described by FieldAttributes.Assembly; that is, the field is visible at most to other types in the same assembly, and is not visible to derived types outside the assembly.
 
bool IsFamily [get]
 Gets a value indicating whether the visibility of this field is described by FieldAttributes.Family; that is, the field is visible only within its class and derived classes.
 
bool IsFamilyAndAssembly [get]
 Gets a value indicating whether the visibility of this field is described by FieldAttributes.FamANDAssem; that is, the field can be accessed from derived classes, but only if they are in the same assembly.
 
bool IsFamilyOrAssembly [get]
 Gets a value indicating whether the potential visibility of this field is described by FieldAttributes.FamORAssem; that is, the field can be accessed by derived classes wherever they are, and by classes in the same assembly.
 
bool IsInitOnly [get]
 Gets a value indicating whether the field can only be set in the body of the constructor.
 
bool IsLiteral [get]
 Gets a value indicating whether the value is written at compile time and cannot be changed.
 
bool IsNotSerialized [get]
 Gets a value indicating whether this field has the NotSerialized attribute.
 
bool IsPinvokeImpl [get]
 Gets a value indicating whether the corresponding PinvokeImpl attribute is set in FieldAttributes.
 
bool IsPrivate [get]
 Gets a value indicating whether the field is private.
 
bool IsPublic [get]
 Gets a value indicating whether the field is public.
 
bool IsStatic [get]
 Gets a value indicating whether the field is static.
 
- 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.IFieldSymbol

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 ReflectionFieldSymbol.cs.

Constructor & Destructor Documentation

◆ ReflectionFieldSymbol()

IKVM.CoreLib.Symbols.Reflection.ReflectionFieldSymbol.ReflectionFieldSymbol ( ReflectionSymbolContext context,
ReflectionTypeSymbol type,
FieldInfo underlyingField )

Initializes a new instance.

Parameters
context
type
underlyingField

Definition at line 18 of file ReflectionFieldSymbol.cs.

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

Member Function Documentation

◆ GetOptionalCustomModifiers()

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

Gets an array of types that identify the optional custom modifiers of the field.

Returns

Implements IKVM.CoreLib.Symbols.IFieldSymbol.

Definition at line 74 of file ReflectionFieldSymbol.cs.

75 {
76 return ResolveTypeSymbols(_underlyingField.GetOptionalCustomModifiers());
77 }

◆ GetRawConstantValue()

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

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

Returns

Implements IKVM.CoreLib.Symbols.IFieldSymbol.

Definition at line 86 of file ReflectionFieldSymbol.cs.

87 {
88 return _underlyingField.GetRawConstantValue();
89 }

◆ GetRequiredCustomModifiers()

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

Gets an array of types that identify the required custom modifiers of the property.

Returns

Implements IKVM.CoreLib.Symbols.IFieldSymbol.

Definition at line 80 of file ReflectionFieldSymbol.cs.

81 {
82 return ResolveTypeSymbols(_underlyingField.GetRequiredCustomModifiers());
83 }

Property Documentation

◆ Attributes

FieldAttributes IKVM.CoreLib.Symbols.Reflection.ReflectionFieldSymbol.Attributes
get

Gets the attributes associated with this field.

Implements IKVM.CoreLib.Symbols.IFieldSymbol.

Definition at line 30 of file ReflectionFieldSymbol.cs.

◆ FieldType

ITypeSymbol IKVM.CoreLib.Symbols.Reflection.ReflectionFieldSymbol.FieldType
get

Gets the type of this field object.

Implements IKVM.CoreLib.Symbols.IFieldSymbol.

Definition at line 33 of file ReflectionFieldSymbol.cs.

◆ IsAssembly

bool IKVM.CoreLib.Symbols.Reflection.ReflectionFieldSymbol.IsAssembly
get

Gets a value indicating whether the potential visibility of this field is described by FieldAttributes.Assembly; that is, the field is visible at most to other types in the same assembly, and is not visible to derived types outside the assembly.

Implements IKVM.CoreLib.Symbols.IFieldSymbol.

Definition at line 39 of file ReflectionFieldSymbol.cs.

◆ IsFamily

bool IKVM.CoreLib.Symbols.Reflection.ReflectionFieldSymbol.IsFamily
get

Gets a value indicating whether the visibility of this field is described by FieldAttributes.Family; that is, the field is visible only within its class and derived classes.

Implements IKVM.CoreLib.Symbols.IFieldSymbol.

Definition at line 42 of file ReflectionFieldSymbol.cs.

◆ IsFamilyAndAssembly

bool IKVM.CoreLib.Symbols.Reflection.ReflectionFieldSymbol.IsFamilyAndAssembly
get

Gets a value indicating whether the visibility of this field is described by FieldAttributes.FamANDAssem; that is, the field can be accessed from derived classes, but only if they are in the same assembly.

Implements IKVM.CoreLib.Symbols.IFieldSymbol.

Definition at line 45 of file ReflectionFieldSymbol.cs.

◆ IsFamilyOrAssembly

bool IKVM.CoreLib.Symbols.Reflection.ReflectionFieldSymbol.IsFamilyOrAssembly
get

Gets a value indicating whether the potential visibility of this field is described by FieldAttributes.FamORAssem; that is, the field can be accessed by derived classes wherever they are, and by classes in the same assembly.

Implements IKVM.CoreLib.Symbols.IFieldSymbol.

Definition at line 48 of file ReflectionFieldSymbol.cs.

◆ IsInitOnly

bool IKVM.CoreLib.Symbols.Reflection.ReflectionFieldSymbol.IsInitOnly
get

Gets a value indicating whether the field can only be set in the body of the constructor.

Implements IKVM.CoreLib.Symbols.IFieldSymbol.

Definition at line 51 of file ReflectionFieldSymbol.cs.

◆ IsLiteral

bool IKVM.CoreLib.Symbols.Reflection.ReflectionFieldSymbol.IsLiteral
get

Gets a value indicating whether the value is written at compile time and cannot be changed.

Implements IKVM.CoreLib.Symbols.IFieldSymbol.

Definition at line 54 of file ReflectionFieldSymbol.cs.

◆ IsNotSerialized

bool IKVM.CoreLib.Symbols.Reflection.ReflectionFieldSymbol.IsNotSerialized
get

Gets a value indicating whether this field has the NotSerialized attribute.

Implements IKVM.CoreLib.Symbols.IFieldSymbol.

Definition at line 58 of file ReflectionFieldSymbol.cs.

◆ IsPinvokeImpl

bool IKVM.CoreLib.Symbols.Reflection.ReflectionFieldSymbol.IsPinvokeImpl
get

Gets a value indicating whether the corresponding PinvokeImpl attribute is set in FieldAttributes.

Implements IKVM.CoreLib.Symbols.IFieldSymbol.

Definition at line 62 of file ReflectionFieldSymbol.cs.

◆ IsPrivate

bool IKVM.CoreLib.Symbols.Reflection.ReflectionFieldSymbol.IsPrivate
get

Gets a value indicating whether the field is private.

Implements IKVM.CoreLib.Symbols.IFieldSymbol.

Definition at line 65 of file ReflectionFieldSymbol.cs.

◆ IsPublic

bool IKVM.CoreLib.Symbols.Reflection.ReflectionFieldSymbol.IsPublic
get

Gets a value indicating whether the field is public.

Implements IKVM.CoreLib.Symbols.IFieldSymbol.

Definition at line 68 of file ReflectionFieldSymbol.cs.

◆ IsSpecialName

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

Gets a value indicating whether the corresponding SpecialName attribute is set in the FieldAttributes enumerator.

Implements IKVM.CoreLib.Symbols.IFieldSymbol.

Definition at line 36 of file ReflectionFieldSymbol.cs.

◆ IsStatic

bool IKVM.CoreLib.Symbols.Reflection.ReflectionFieldSymbol.IsStatic
get

Gets a value indicating whether the field is static.

Implements IKVM.CoreLib.Symbols.IFieldSymbol.

Definition at line 71 of file ReflectionFieldSymbol.cs.


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