2 // Mono.ILASM.BaseTypeRef
4 // Interface that all Type references must implement
7 // Jackson Harper (Jackson@LatitudeGeo.com)
9 // (C) 2003 Jackson Harper, All rights reserved
14 using System
.Collections
;
16 namespace Mono
.ILASM
{
18 public interface ITypeRef
{
21 /// The full name of the type, <namespace>.<name>
22 /// ie System.Collections.ArrayList
24 string FullName { get; }
26 bool IsPinned { get; }
29 bool UseTypeSpec { get; }
32 /// The PEAPI.Type of this typeref, this is not guaranteed
33 /// to be correct untill after this is resolved.
35 PEAPI
.Type PeapiType { get; }
38 /// Convert this typeref into a zero based array
43 /// Convert this typeref into a bound array. The ArrayList
44 /// should be in the format Entry (lower_bound, upper_bound) with
45 /// null being used for unset bounds.
47 void MakeBoundArray (ArrayList bounds
);
50 /// Convert this typeref into a reference
52 void MakeManagedPointer ();
55 /// Convert this typeref into an unmanaged pointer
57 void MakeUnmanagedPointer ();
60 /// Convert this typeref into a CustomModifiedType
62 void MakeCustomModified (CodeGen code_gen
,
63 PEAPI
.CustomModifier modifier
, IClassRef klass
);
66 /// Make this typeref pinned.
70 void Resolve (CodeGen code_gen
);
72 BaseMethodRef
GetMethodRef (ITypeRef ret_type
, PEAPI
.CallConv call_conv
,
73 string name
, ITypeRef
[] param
, int gen_param_count
);
75 IFieldRef
GetFieldRef (ITypeRef ret_type
, string name
);
78 /// Convert this typeref to a classref if not possible
79 /// throw an exception
81 // IClassRef AsClassRef (CodeGen code_gen);