jvalue InputPacketParser::ReadUntaggedValue()

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


jvalue InputPacketParser::ReadUntaggedValue(JNIEnv *jni, jdwpTag tagPtr)  throw (AgentException) {
    jvalue value;

    switch (tagPtr) {
    case JDWP_TAG_ARRAY:
        value.l = ReadObjectIDOrNull(jni);
        break;
    case JDWP_TAG_BYTE:
        value.b = ReadByte();
        break;
    case JDWP_TAG_CHAR:
        value.c = ReadChar();
        break;
    case JDWP_TAG_OBJECT:
        value.l = ReadObjectIDOrNull(jni);
        break;
    case JDWP_TAG_FLOAT:
        value.f = ReadFloat();
        break;
    case JDWP_TAG_DOUBLE:
        value.d = ReadDouble();
        break;
    case JDWP_TAG_INT:
        value.i = ReadInt();
        break;
    case JDWP_TAG_LONG:
        value.j = ReadLong();
        break;
    case JDWP_TAG_SHORT:
        value.s = ReadShort();
        break;
    case JDWP_TAG_VOID:
        // read nothing
        break;
    case JDWP_TAG_BOOLEAN:
        value.z = ReadBoolean();
        break;
    case JDWP_TAG_STRING:
        value.l = ReadObjectIDOrNull(jni);
        break;
    case JDWP_TAG_THREAD:
        value.l = ReadObjectIDOrNull(jni);
        break;
    case JDWP_TAG_THREAD_GROUP:
        value.l = ReadObjectIDOrNull(jni);
        break;
    case JDWP_TAG_CLASS_LOADER:
        value.l = ReadObjectIDOrNull(jni);
        break;
    case JDWP_TAG_CLASS_OBJECT:
        value.l = ReadObjectIDOrNull(jni);
        break;
    default: JDWP_ERROR("Illegal jdwp-tag value: " << tagPtr);
    }
    return value;
}