class ClassInfo

pri name : String;

pri CP : CpList; %Constant Pool

pri super : ClassInfo;

pri fstMeth : MethodList;

pri fstField : FieldList;

 

meth SetSuper =^ ( val s: ClassInfo ·

super:= s;

)

end

meth GetSuper =^ ( res s: ClassInfo ·

s:= super;

)

end

meth SetName =^ ( val n: String ·

name:= n;

)

end

meth GetName =^ ( res n: String ·

n:= name;

)

end

meth SetCP =^ ( val c: CpList ·

CP:= c;

)

end

meth GetCP =^ ( res c: CpList ·

c:= CP;

)

end

meth SetfstMeth =^ ( val f: MethodList ·

fstMeth:= f;

)

end

 

meth GetfstMeth =^ ( res f: MethodList ·

f:= fstMeth;

)

end

meth SetfstField =^ ( val f: FieldList ·

fstField:= f;

)

end

 

meth GetfstField =^ ( res f: FieldList ·

f:= fstField;

)

end

meth FindCPList =^ (val index: Int; res entry : CPList ·

CP.FindCPList(index, entry);

)

end

meth Conforms =^ ( val Tyname : string;

res found : Boolean ·

var name : String ·

 

self.GetName(name);

if [] name = Tyname ® found:=true;

[] (super <> null) and (name <> Tyname) ®

super.Conforms(tyname, found);

fi

end

)

end

meth MtdLookup =^ ( val name : string;

val descriptor : string;

res mtd : MethodInfo;

res found : Boolean ·

fstMeth.FindMethod(name, descriptor,mtd,found);

if [] not Found ®

if [] super <> null ®

super.MtdLookup(name, descriptor, mtd, found);

fi

fi

)

end

end