IKVM11  11
Java SE 11 Virtual Machine for .NET
Loading...
Searching...
No Matches
IkvmReflectionFieldSymbol.cs
Go to the documentation of this file.
1using System;
2
4
6{
7
9 {
10
11 readonly FieldInfo _underlyingField;
12
20 base(context, type.ContainingModule, type, underlyingField)
21 {
22 _underlyingField = underlyingField ?? throw new ArgumentNullException(nameof(underlyingField));
23 }
24
25 internal FieldInfo UnderlyingField => _underlyingField;
26
27 public global::System.Reflection.FieldAttributes Attributes => (global::System.Reflection.FieldAttributes)_underlyingField.Attributes;
28
29 public ITypeSymbol FieldType => ResolveTypeSymbol(_underlyingField.FieldType);
30
31 public bool IsAssembly => _underlyingField.IsAssembly;
32
33 public bool IsFamily => _underlyingField.IsFamily;
34
35 public bool IsFamilyAndAssembly => _underlyingField.IsFamilyAndAssembly;
36
37 public bool IsFamilyOrAssembly => _underlyingField.IsFamilyOrAssembly;
38
39 public bool IsInitOnly => _underlyingField.IsInitOnly;
40
41 public bool IsLiteral => _underlyingField.IsLiteral;
42
43#pragma warning disable SYSLIB0050 // Type or member is obsolete
44 public bool IsNotSerialized => _underlyingField.IsNotSerialized;
45#pragma warning restore SYSLIB0050 // Type or member is obsolete
46
47 public bool IsPinvokeImpl => _underlyingField.IsPinvokeImpl;
48
49 public bool IsPrivate => _underlyingField.IsPrivate;
50
51 public bool IsPublic => _underlyingField.IsPublic;
52
53 public bool IsSpecialName => _underlyingField.IsSpecialName;
54
55 public bool IsStatic => _underlyingField.IsStatic;
56
58 {
59 return ResolveTypeSymbols(_underlyingField.GetOptionalCustomModifiers());
60 }
61
62 public object? GetRawConstantValue()
63 {
64 return _underlyingField.GetRawConstantValue();
65 }
66
68 {
69 return ResolveTypeSymbols(_underlyingField.GetRequiredCustomModifiers());
70 }
71
72 }
73
74}
IKVM.Reflection.FieldInfo FieldInfo
object? GetRawConstantValue()
Returns a literal value associated with the field by a compiler.
bool IsNotSerialized
Gets a value indicating whether this field has the NotSerialized attribute.
bool IsStatic
Gets a value indicating whether the field is static.
bool IsPrivate
Gets a value indicating whether the field is private.
bool IsFamilyOrAssembly
Gets a value indicating whether the potential visibility of this field is described by FieldAttribute...
bool IsSpecialName
Gets a value indicating whether the corresponding SpecialName attribute is set in the FieldAttributes...
IkvmReflectionFieldSymbol(IkvmReflectionSymbolContext context, IkvmReflectionTypeSymbol type, FieldInfo underlyingField)
Initializes a new instance.
bool IsFamily
Gets a value indicating whether the visibility of this field is described by FieldAttributes....
ITypeSymbol[] GetRequiredCustomModifiers()
Gets an array of types that identify the required custom modifiers of the property.
bool IsAssembly
Gets a value indicating whether the potential visibility of this field is described by FieldAttribute...
global::System.Reflection.FieldAttributes Attributes
Gets the attributes associated with this field.
bool IsLiteral
Gets a value indicating whether the value is written at compile time and cannot be changed.
bool IsInitOnly
Gets a value indicating whether the field can only be set in the body of the constructor.
bool IsPinvokeImpl
Gets a value indicating whether the corresponding PinvokeImpl attribute is set in FieldAttributes.
ITypeSymbol[] GetOptionalCustomModifiers()
Gets an array of types that identify the optional custom modifiers of the field.
bool IsPublic
Gets a value indicating whether the field is public.
bool IsFamilyAndAssembly
Gets a value indicating whether the visibility of this field is described by FieldAttributes....
Holds references to symbols derived from System.Reflection.
Discovers the attributes of a field and provides access to field metadata.
Represents type declarations: class types, interface types, array types, value types,...