AbstractVmClassLoader clc,
VmClassLoader clc,
	private static final VmType decodeClass(		byte[] data,		int offset,		int class_image_length,		boolean rejectNatives,		AbstractVmClassLoader clc,		SelectorMap selectorMap,		VmStatics statics)		throws ClassFormatError {		if (data == null) {			throw new ClassFormatError("ClassDecoder.decodeClass: data==null");		}		final int[] pos = new int[1];		final int slotSize = clc.getArchitecture().getReferenceSize();		pos[0] = offset;		final int magic = cl_readu4(data, pos);		if (magic != 0xCAFEBABE) {			throw new ClassFormatError("invalid magic");		}		final int min_version = cl_readu2(data, pos);		final int maj_version = cl_readu2(data, pos);		if (false) {			BootLog.debug("Class file version " + maj_version + ";" + min_version);		}		final int cpcount = cl_readu2(data, pos);		// allocate enough space for the CP		final byte[] tags = new byte[cpcount];		final VmCP cp = new VmCP(cpcount, tags);		for (int i = 1; i < cpcount; i++) {			final int tag = cl_readu1(data, pos);			tags[i] = (byte) tag;			switch (tag) {				case 1 : // Utf8					cp.setUTF8(i, new String(readUTF(data, pos)));					break;				case 3 : // int					cp.setInt(i, cl_readu4(data, pos));					break;				case 4 : // float					cp.setInt(i, cl_readu4(data, pos));					break;				case 5 : // long					cp.setLong(i, cl_readu8(data, pos));					i++;					break;				case 6 : // double					cp.setLong(i, cl_readu8(data, pos));					i++;					break;				case 7 : // class					cp.setConstClass(i, new VmConstClass(cp, i, cl_readu2(data, pos)));					break;				case 8 : // String					cp.setInt(i, cl_readu2(data, pos));					break;				case 9 : // Fieldref					{						final int clsIdx = cl_readu2(data, pos);						final int ntIdx = cl_readu2(data, pos);						cp.setConstFieldRef(i, new VmConstFieldRef(cp, i, clsIdx, ntIdx));					}					break;				case 10 : // Methodref					{						final int clsIdx = cl_readu2(data, pos);						final int ntIdx = cl_readu2(data, pos);						cp.setConstMethodRef(i, new VmConstMethodRef(cp, i, clsIdx, ntIdx));					}					break;				case 11 : // IMethodref					{						final int clsIdx = cl_readu2(data, pos);						final int ntIdx = cl_readu2(data, pos);						cp.setConstIMethodRef(i, new VmConstIMethodRef(cp, i, clsIdx, ntIdx));					}					break;				case 12 : // Name and Type					{						final int nIdx = cl_readu2(data, pos);						final int dIdx = cl_readu2(data, pos);						cp.setConstNameAndType(i, new VmConstNameAndType(cp, nIdx, dIdx));					}					break;				default :					throw new ClassFormatError("Invalid constantpool tag: " + tags[i]);			}		}		// Now patch the required entries		for (int i = 1; i < cpcount; i++) {			switch (tags[i]) {				case 8 : // String					final int idx = cp.getInt(i);					cp.setString(i, cp.getUTF8(idx));					break;			}		}		final int classModifiers = cl_readu2(data, pos);		final VmConstClass this_class = cp.getConstClass(cl_readu2(data, pos));		final String clsName = this_class.getClassName();		final VmConstClass super_class = cp.getConstClass(cl_readu2(data, pos));		final String superClassName;		if (super_class != null) {			superClassName = super_class.getClassName();		} else {			superClassName = null;		}		// Allocate the class object		final VmType cls;		if (Modifier.isInterface(classModifiers)) {			cls = new VmInterfaceClass(clsName, superClassName, clc, classModifiers);		} else {			cls = new VmNormalClass(clsName, superClassName, clc, classModifiers);		}		cls.setCp(cp);		// Interface table		readInterfaces(data, pos, cls, cp);		// Field table		readFields(data, pos, cls, cp, statics, slotSize);		// Method Table		readMethods(data, rejectNatives, pos, cls, cp, selectorMap, statics);		return cls;	}