public static MetaDataDescriptor ReadExternal(EmmaBinaryReader ebr) { CoverageOptionsDescriptor options = CoverageOptionsDescriptor.ReadExternal(ebr); bool hasSrcFileInfo = ebr.ReadBoolean(); bool hasLineNumberInfo = ebr.ReadBoolean(); int size = ebr.ReadInt32(); Dictionary<string, ClassDescriptor> classMap = new Dictionary<string, ClassDescriptor>(); for (int i = 0; i < size; ++i) { string className = ebr.ReadUTF(); ClassDescriptor cls = ClassDescriptor.ReadExternal(ebr); classMap.Add(className, cls); } return new MetaDataDescriptor(options, classMap, hasSrcFileInfo, hasLineNumberInfo); }
public static CoverageDataDescriptor ReadExternal(EmmaBinaryReader ebr) { int size = ebr.ReadInt32(); Dictionary<string, DataHolder> coverageMap = new Dictionary<string, DataHolder>(); for (int i = 0; i < size; ++i) { string classVMName = ebr.ReadUTF(); long stamp = ebr.ReadLong(); int length = ebr.ReadInt32(); bool[][] coverage = new bool[length][]; for (int c = 0; c < length; ++c) { coverage[c] = DataFactory.readBooleanArray(ebr); } coverageMap.Add(classVMName, new DataHolder(coverage, stamp)); } return new CoverageDataDescriptor(coverageMap); }
public static ClassDescriptor ReadExternal(EmmaBinaryReader ebr) { string packageVMName = ebr.ReadUTF(); string name = ebr.ReadUTF(); long stamp = ebr.ReadLong(); sbyte srcFileNameFlag = ebr.ReadSbyte(); string srcFileName = srcFileNameFlag != 0 ? ebr.ReadUTF() : null; int length = ebr.ReadInt32(); MethodDescriptor[] methods = new MethodDescriptor[length]; for (int i = 0; i < length; ++i) { methods[i] = MethodDescriptor.ReadExternal(ebr); } return new ClassDescriptor(packageVMName,name,stamp,srcFileName,methods); }
public static MethodDescriptor ReadExternal(EmmaBinaryReader ebr) { string name = ebr.ReadUTF(); string descriptor = ebr.ReadUTF(); int status = ebr.ReadInt32(); int[] blockSizes = null; int[][] blockMap = null; int firstLine = 0; if ((status & DataConstants.METHOD_NO_BLOCK_DATA) == 0) { blockSizes = DataFactory.ReadIntArray(ebr); if ((status & DataConstants.METHOD_NO_LINE_DATA) == 0) { int length = ebr.ReadInt32(); blockMap = new int[length][]; for (int i = 0; i < length; ++i) { blockMap[i] = DataFactory.ReadIntArray(ebr); } firstLine = ebr.ReadInt32(); } } return new MethodDescriptor(name,descriptor,status,blockSizes,blockMap,firstLine); }