IKVM11  11
Java SE 11 Virtual Machine for .NET
Loading...
Searching...
No Matches
IKVM.Reflection.ArrayType Class Referencesealed
Inheritance diagram for IKVM.Reflection.ArrayType:
IKVM.Reflection.ElementHolderType

Public Member Functions

override Type[] __GetDeclaredInterfaces ()
 
override MethodBase[] __GetDeclaredMethods ()
 
override int GetArrayRank ()
 
override bool Equals (object o)
 
override int GetHashCode ()
 
- Public Member Functions inherited from IKVM.Reflection.ElementHolderType
override CustomModifiers __GetCustomModifiers ()
 
override string ToString ()
 
override Type GetElementType ()
 

Protected Member Functions

override Type Wrap (Type type, CustomModifiers mods)
 
- Protected Member Functions inherited from IKVM.Reflection.ElementHolderType
 ElementHolderType (Type elementType, CustomModifiers mods, byte sigElementType)
 Initializes a new instance.
 
bool EqualsHelper (ElementHolderType other)
 
Type Wrap (Type type, CustomModifiers mods)
 

Properties

override Type BaseType [get]
 
override TypeAttributes Attributes [get]
 
- Properties inherited from IKVM.Reflection.ElementHolderType
override string Name [get]
 
override string Namespace [get]
 
override string FullName [get]
 
override Module Module [get]
 
override bool ContainsGenericParameters [get]
 
override bool ContainsMissingTypeImpl [get]
 
override bool IsValueTypeImpl [get]
 

Additional Inherited Members

- Protected Attributes inherited from IKVM.Reflection.ElementHolderType
readonly Type elementType
 
- Package Functions inherited from IKVM.Reflection.ElementHolderType

Detailed Description

Definition at line 30 of file ArrayType.cs.

Member Function Documentation

◆ __GetDeclaredInterfaces()

override Type[] IKVM.Reflection.ArrayType.__GetDeclaredInterfaces ( )

Definition at line 54 of file ArrayType.cs.

55 {
56 return new Type[] {
57 Module.Universe.Import(typeof(IList<>)).MakeGenericType(elementType),
58 Module.Universe.Import(typeof(ICollection<>)).MakeGenericType(elementType),
59 Module.Universe.Import(typeof(IEnumerable<>)).MakeGenericType(elementType)
60 };
61 }
IKVM.Reflection.Module Module
IKVM.Reflection.Type Type

◆ __GetDeclaredMethods()

override MethodBase[] IKVM.Reflection.ArrayType.__GetDeclaredMethods ( )

Definition at line 63 of file ArrayType.cs.

64 {
65 var int32 = new Type[] { Module.Universe.System_Int32 };
66 var list = new List<MethodBase>();
67 list.Add(new BuiltinArrayMethod(Module, this, "Set", CallingConventions.Standard | CallingConventions.HasThis, Module.Universe.System_Void, new Type[] { Module.Universe.System_Int32, elementType }));
68 list.Add(new BuiltinArrayMethod(Module, this, "Address", CallingConventions.Standard | CallingConventions.HasThis, elementType.MakeByRefType(), int32));
69 list.Add(new BuiltinArrayMethod(Module, this, "Get", CallingConventions.Standard | CallingConventions.HasThis, elementType, int32));
70 list.Add(new ConstructorInfoImpl(new BuiltinArrayMethod(Module, this, ".ctor", CallingConventions.Standard | CallingConventions.HasThis, Module.Universe.System_Void, int32)));
71
72 for (var type = elementType; type.IsSZArray; type = type.GetElementType())
73 {
74 Array.Resize(ref int32, int32.Length + 1);
75 int32[int32.Length - 1] = int32[0];
76 list.Add(new ConstructorInfoImpl(new BuiltinArrayMethod(Module, this, ".ctor", CallingConventions.Standard | CallingConventions.HasThis, Module.Universe.System_Void, int32)));
77 }
78
79 return list.ToArray();
80 }

◆ Equals()

override bool IKVM.Reflection.ArrayType.Equals ( object o)

Definition at line 92 of file ArrayType.cs.

93 {
94 return EqualsHelper(o as ArrayType);
95 }
bool EqualsHelper(ElementHolderType other)

◆ GetArrayRank()

override int IKVM.Reflection.ArrayType.GetArrayRank ( )

Definition at line 87 of file ArrayType.cs.

88 {
89 return 1;
90 }

◆ GetHashCode()

override int IKVM.Reflection.ArrayType.GetHashCode ( )

Definition at line 97 of file ArrayType.cs.

98 {
99 return elementType.GetHashCode() * 5;
100 }

◆ Wrap()

override Type IKVM.Reflection.ArrayType.Wrap ( Type type,
CustomModifiers mods )
protected

Definition at line 107 of file ArrayType.cs.

108 {
109 return Make(type, mods);
110 }

Property Documentation

◆ Attributes

override TypeAttributes IKVM.Reflection.ArrayType.Attributes
get

Definition at line 82 of file ArrayType.cs.

83 {
84 get { return TypeAttributes.Public | TypeAttributes.Sealed | TypeAttributes.Serializable; }
85 }

◆ BaseType

override Type IKVM.Reflection.ArrayType.BaseType
get

Definition at line 49 of file ArrayType.cs.

50 {
51 get { return elementType.Module.Universe.System_Array; }
52 }

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