emitObject(cls, obj);
try { emitObject(cls, obj); } catch (JNodeClassNotFoundException ex) { throw new BuildException(ex); }
	public final void emitObject(Object obj) throws BuildException, ClassNotFoundException {		if (obj == null) {			return;		}		final Class cls = obj.getClass();		testForValidEmit(obj, cls.getName());		if (debugWriter != null) {			debugWriter.println("$" + Integer.toHexString(os.getLength()));			if (obj instanceof char[]) {				final char[] a = (char[]) obj;				for (int i = 0; i < a.length; i++) {					debugWriter.print("'" + a[i] + "' ");				}				debugWriter.println();			} else if (obj instanceof byte[]) {				final byte[] a = (byte[]) obj;				for (int i = 0; i < a.length; i++) {					debugWriter.print("" + a[i] + ' ');				}				debugWriter.println();			} else {				debugWriter.println(obj);			}		}		if (obj instanceof VmSystemObject) {			((VmSystemObject) obj).verifyBeforeEmit();		}		// Writeout the header		final VmClassType vmClass = (VmClassType) loaderContext.loadClass(cls.getName(), true);		vmClass.incInstanceCount();		final X86Stream.ObjectInfo oInfo = os.startObject(vmClass);		os.setObjectRef(obj);		// If the object is a VmClass, force the loading of the		// correspondig java.lang.Class		if (cls.equals(VmType.class)) {			VmType vmCls = (VmType) obj;			String name = vmCls.getName().replace('/', '.');			if (!name.startsWith("java.lang")) {				vmCls.asClassDuringBootstrap();			}		}		// Writeout object contents		if (cls.equals(String.class)) {			emitString((String) obj);		} else if (cls.equals(Integer.class)) {			emitInteger((Integer) obj);		} else if (cls.equals(Long.class)) {			emitLong((Long) obj);		} else if (cls.equals(Class.class)) {			emitClass((Class) obj);		} else if (cls.isArray()) {		    emitArray(cls, obj, (VmArrayClass)vmClass);		} else {			emitObject(cls, obj);		}		oInfo.markEnd();				if (debugWriter != null) {		    debugWriter.println();		}	}