(*jEnv)->GetStatic##Type##Field(jEnv, java_obj, fieldID);        \
(*jEnv)->GetStatic##Type##Field(jEnv, (*jEnv)->GetObjectClass(jEnv, java_obj), fieldID);        \
jsj_GetJavaFieldValue(JSContext *cx, JNIEnv *jEnv, JavaFieldSpec *field_spec,                      jobject java_obj, jsval *vp){    JSBool is_static_field, success;    jvalue java_value;    JavaSignature *signature;    JavaSignatureChar field_type;    jfieldID fieldID = field_spec->fieldID;    is_static_field = field_spec->modifiers & ACC_STATIC;#define GET_JAVA_FIELD(Type,member)                                          \    JS_BEGIN_MACRO                                                           \    if (is_static_field)                                                     \        java_value.member =                                                  \            (*jEnv)->GetStatic##Type##Field(jEnv, java_obj, fieldID);        \    else                                                                     \        java_value.member =                                                  \            (*jEnv)->Get##Type##Field(jEnv, java_obj, fieldID);              \    if ((*jEnv)->ExceptionOccurred(jEnv)) {                                  \        jsj_UnexpectedJavaError(cx, jEnv, "Error reading Java field");           \        return JS_FALSE;                                                     \    }                                                                        \    JS_END_MACRO    signature = field_spec->signature;    field_type = signature->type;    switch(field_type) {    case JAVA_SIGNATURE_BYTE:        GET_JAVA_FIELD(Byte,b);        break;    case JAVA_SIGNATURE_CHAR:        GET_JAVA_FIELD(Char,c);        break;    case JAVA_SIGNATURE_SHORT:        GET_JAVA_FIELD(Short,s);        break;    case JAVA_SIGNATURE_INT:        GET_JAVA_FIELD(Int,i);        break;    case JAVA_SIGNATURE_BOOLEAN:        GET_JAVA_FIELD(Boolean,z);        break;    case JAVA_SIGNATURE_LONG:        GET_JAVA_FIELD(Long,j);        break;      case JAVA_SIGNATURE_FLOAT:        GET_JAVA_FIELD(Float,f);        break;    case JAVA_SIGNATURE_DOUBLE:        GET_JAVA_FIELD(Double,d);        break;         case JAVA_SIGNATURE_UNKNOWN:    case JAVA_SIGNATURE_VOID:        JS_ASSERT(0);        /* Unknown java type signature */        return JS_FALSE;            /* Non-primitive (reference) type */    default:        JS_ASSERT(IS_REFERENCE_TYPE(field_type));        GET_JAVA_FIELD(Object,l);        success = jsj_ConvertJavaObjectToJSValue(cx, jEnv, java_value.l, vp);        (*jEnv)->DeleteLocalRef(jEnv, java_value.l);        return success;    }    #undef GET_JAVA_FIELD    return jsj_ConvertJavaValueToJSValue(cx, jEnv, signature, &java_value, vp);}