/*-------------------- Constructors ---------------------------------*/
internal ClassSpec(Class clType, Type[] gPars)
{
this.typeIndex = GENERICINST;
genClass = clType;
genericParams = new ArrayList(gPars);
tabIx = MDTable.TypeSpec;
typeIndex = GENERICINST;
ArrayList classMethods = clType.GetMethodList();
ArrayList classFields = clType.GetFieldList();
for (int i=0; i < classMethods.Count; i++) {
MethSig mSig = ((Method)classMethods[i]).GetSig(); //.InstantiateGenTypes(this,gPars);
if (mSig != null) {
MethodRef newMeth = new MethodRef(mSig);
newMeth.SetParent(this);
newMeth.GenericParams = ((Method)classMethods[i]).GenericParams;
methods.Add(newMeth);
}
}
for (int i=0; i < classFields.Count; i++) {
Type fType = ((Field)classFields[i]).GetFieldType();
//if ((fType is GenericParam) && (((GenericParam)fType).GetParent() == genClass)) {
// fType = gPars[((GenericParam)fType).Index];
//}
fields.Add(new FieldRef(this,((Field)classFields[i]).Name(),fType));
}
}