void OutputPacketComposer::WriteUntaggedValue()

in modules/jpda/src/main/native/jdwp/common/agent/core/PacketParser.cpp [621:675]


void OutputPacketComposer::WriteUntaggedValue(JNIEnv *jni, jdwpTag tag, jvalue value) 
throw (OutOfMemoryException) {
    //The first byte is a signature byte which is used to identify the type
    switch (tag) {
    case JDWP_TAG_ARRAY:
        WriteObjectID(jni, value.l);
        break;
    case JDWP_TAG_BYTE:
        WriteByte(value.b);
        break;
    case JDWP_TAG_CHAR:
        WriteChar(value.c);
        break;
    case JDWP_TAG_OBJECT:
        WriteObjectID(jni, value.l);
        break;
    case JDWP_TAG_FLOAT:
        WriteFloat(value.f);
        break;
    case JDWP_TAG_DOUBLE:
        WriteDouble(value.d);
        break;
    case JDWP_TAG_INT:
        WriteInt(value.i);
        break;
    case JDWP_TAG_LONG:
        WriteLong(value.j);
        break;
    case JDWP_TAG_SHORT:
        WriteShort(value.s);
        break;
    case JDWP_TAG_VOID:
        // read nothing
        break;
    case JDWP_TAG_BOOLEAN:
        WriteBoolean(value.z);
        break;
    case JDWP_TAG_STRING:
        WriteObjectID(jni, value.l);
        break;
    case JDWP_TAG_THREAD:
        WriteObjectID(jni, value.l);
        break;
    case JDWP_TAG_THREAD_GROUP:
        WriteObjectID(jni, value.l);
        break;
    case JDWP_TAG_CLASS_LOADER:
        WriteObjectID(jni, value.l);
        break;
    case JDWP_TAG_CLASS_OBJECT:
        WriteObjectID(jni, value.l);
        break;
    default: JDWP_ERROR("Illegal jdwp-tag value: " << tag);
    }
}