2
using System.Collections.Generic;
4
using Debugger.MetaData;
6
namespace ikvm.debugger.win
8
internal class TargetType
10
private static int typeIdCounter;
11
private static Dictionary<int, TargetType> typeList = new Dictionary<int, TargetType>();
13
private readonly int typeId;
14
private readonly DebugType type;
16
internal TargetType(DebugType type)
18
this.typeId = ++typeIdCounter;
20
typeList.Add(typeId, this);
23
internal static TargetType GetTargetType(int typeId)
25
return typeList[typeId];
30
get { return typeId; }
33
internal bool Identical(DebugType type)
35
return this.type.Equals(type);
38
internal String GetJniSignature()
40
//TODO if it is not a class
41
return 'L' + type.Name.Replace('.', '/') + ';';
44
internal IList<TargetMethod> GetMethods()
46
List<TargetMethod> result = new List<TargetMethod>();
47
IList<MethodInfo> methods = type.GetMethods(BindingFlags.All);
48
foreach (MethodInfo method in methods)
50
result.Add(new TargetMethod(method));