java_lang_reflect_VMField rvmf(_this);
fieldinfo* f = rvmf.get_field();
- java_handle_t* ho = (java_handle_t*) o;
-
- /* check if the field can be accessed */
-
- if (!_field_access_check(rvmf, f, ho))
+ // Check if the field can be accessed.
+ if (!_field_access_check(rvmf, f, o))
return NULL;
imm_union value;
case PRIMITIVETYPE_CHAR:
case PRIMITIVETYPE_SHORT:
case PRIMITIVETYPE_INT:
- value.i = _field_get_int(f, ho);
+ value.i = _field_get_int(f, o);
break;
case PRIMITIVETYPE_LONG:
- value.l = _field_get_long(f, ho);
+ value.l = _field_get_long(f, o);
break;
case PRIMITIVETYPE_FLOAT:
- value.f = _field_get_float(f, ho);
+ value.f = _field_get_float(f, o);
break;
case PRIMITIVETYPE_DOUBLE:
- value.d = _field_get_double(f, ho);
+ value.d = _field_get_double(f, o);
break;
case TYPE_ADR:
- return (jobject) _field_get_handle(f, ho);
+ return (jobject) _field_get_handle(f, o);
}
- /* Now box the primitive types. */
-
+ // Now box the primitive types.
java_handle_t* object = Primitive::box(f->parseddesc->primitivetype, value);
- return (jobject) object;
+ return object;
}
java_lang_reflect_VMField rvmf(_this);
fieldinfo* f = rvmf.get_field();
- java_handle_t* ho = (java_handle_t*) o;
-
- /* check if the field can be accessed */
-
- if (!_field_access_check(rvmf, f, ho))
+ // Check if the field can be accessed.
+ if (!_field_access_check(rvmf, f, o))
return 0;
- /* check the field type and return the value */
-
+ // Check the field type and return the value.
switch (f->parseddesc->primitivetype) {
case PRIMITIVETYPE_BOOLEAN:
- return (int32_t) _field_get_int(f, ho);
+ return (jint) _field_get_int(f, o);
default:
exceptions_throw_illegalargumentexception();
return 0;
java_lang_reflect_VMField rvmf(_this);
fieldinfo* f = rvmf.get_field();
- java_handle_t* ho = (java_handle_t*) o;
-
- /* check if the field can be accessed */
-
- if (!_field_access_check(rvmf, f, ho))
+ // Check if the field can be accessed.
+ if (!_field_access_check(rvmf, f, o))
return 0;
- /* check the field type and return the value */
-
+ // Check the field type and return the value.
switch (f->parseddesc->primitivetype) {
case PRIMITIVETYPE_BYTE:
- return (int32_t) _field_get_int(f, ho);
+ return (jint) _field_get_int(f, o);
default:
exceptions_throw_illegalargumentexception();
return 0;
java_lang_reflect_VMField rvmf(_this);
fieldinfo* f = rvmf.get_field();
- java_handle_t* ho = (java_handle_t*) o;
-
- /* check if the field can be accessed */
-
- if (!_field_access_check(rvmf, f, ho))
+ // Check if the field can be accessed.
+ if (!_field_access_check(rvmf, f, o))
return 0;
- /* check the field type and return the value */
-
+ // Check the field type and return the value.
switch (f->parseddesc->primitivetype) {
case PRIMITIVETYPE_CHAR:
- return (int32_t) _field_get_int(f, ho);
+ return (jint) _field_get_int(f, o);
default:
exceptions_throw_illegalargumentexception();
return 0;
java_lang_reflect_VMField rvmf(_this);
fieldinfo* f = rvmf.get_field();
- java_handle_t* ho = (java_handle_t*) o;
-
- /* check if the field can be accessed */
-
- if (!_field_access_check(rvmf, f, ho))
+ // Check if the field can be accessed.
+ if (!_field_access_check(rvmf, f, o))
return 0;
- /* check the field type and return the value */
-
+ // Check the field type and return the value.
switch (f->parseddesc->primitivetype) {
case PRIMITIVETYPE_BYTE:
case PRIMITIVETYPE_SHORT:
- return (int32_t) _field_get_int(f, ho);
+ return (jint) _field_get_int(f, o);
default:
exceptions_throw_illegalargumentexception();
return 0;
java_lang_reflect_VMField rvmf(_this);
fieldinfo* f = rvmf.get_field();
- java_handle_t* ho = (java_handle_t*) o;
-
- /* check if the field can be accessed */
-
- if (!_field_access_check(rvmf, f, ho))
+ // Check if the field can be accessed.
+ if (!_field_access_check(rvmf, f, o))
return 0;
- /* check the field type and return the value */
-
+ // Check the field type and return the value.
switch (f->parseddesc->primitivetype) {
case PRIMITIVETYPE_BYTE:
case PRIMITIVETYPE_CHAR:
case PRIMITIVETYPE_SHORT:
case PRIMITIVETYPE_INT:
- return (int32_t) _field_get_int(f, ho);
+ return (jint) _field_get_int(f, o);
default:
exceptions_throw_illegalargumentexception();
return 0;
java_lang_reflect_VMField rvmf(_this);
fieldinfo* f = rvmf.get_field();
- java_handle_t* ho = (java_handle_t*) o;
-
- /* check if the field can be accessed */
-
- if (!_field_access_check(rvmf, f, ho))
+ // Check if the field can be accessed.
+ if (!_field_access_check(rvmf, f, o))
return 0;
- /* check the field type and return the value */
-
+ // Check the field type and return the value.
switch (f->parseddesc->primitivetype) {
case PRIMITIVETYPE_BYTE:
case PRIMITIVETYPE_CHAR:
case PRIMITIVETYPE_SHORT:
case PRIMITIVETYPE_INT:
- return (int64_t) _field_get_int(f, ho);
+ return (jlong) _field_get_int(f, o);
case PRIMITIVETYPE_LONG:
- return (int64_t) _field_get_long(f, ho);
+ return (jlong) _field_get_long(f, o);
default:
exceptions_throw_illegalargumentexception();
return 0;
java_lang_reflect_VMField rvmf(_this);
fieldinfo* f = rvmf.get_field();
- java_handle_t* ho = (java_handle_t*) o;
-
- /* check if the field can be accessed */
-
- if (!_field_access_check(rvmf, f, ho))
+ // Check if the field can be accessed.
+ if (!_field_access_check(rvmf, f, o))
return 0;
- /* check the field type and return the value */
-
+ // Check the field type and return the value.
switch (f->parseddesc->primitivetype) {
case PRIMITIVETYPE_BYTE:
case PRIMITIVETYPE_CHAR:
case PRIMITIVETYPE_SHORT:
case PRIMITIVETYPE_INT:
- return (float) _field_get_int(f, ho);
+ return (jfloat) _field_get_int(f, o);
case PRIMITIVETYPE_LONG:
- return (float) _field_get_long(f, ho);
+ return (jfloat) _field_get_long(f, o);
case PRIMITIVETYPE_FLOAT:
- return (float) _field_get_float(f, ho);
+ return (jfloat) _field_get_float(f, o);
default:
exceptions_throw_illegalargumentexception();
return 0;
java_lang_reflect_VMField rvmf(_this);
fieldinfo* f = rvmf.get_field();
- java_handle_t* ho = (java_handle_t*) o;
-
- /* check if the field can be accessed */
-
- if (!_field_access_check(rvmf, f, ho))
+ // Check if the field can be accessed.
+ if (!_field_access_check(rvmf, f, o))
return 0;
- /* check the field type and return the value */
-
+ // Check the field type and return the value.
switch (f->parseddesc->primitivetype) {
case PRIMITIVETYPE_BYTE:
case PRIMITIVETYPE_CHAR:
case PRIMITIVETYPE_SHORT:
case PRIMITIVETYPE_INT:
- return (jdouble) _field_get_int(f, ho);
+ return (jdouble) _field_get_int(f, o);
case PRIMITIVETYPE_LONG:
- return (jdouble) _field_get_long(f, ho);
+ return (jdouble) _field_get_long(f, o);
case PRIMITIVETYPE_FLOAT:
- return (jdouble) _field_get_float(f, ho);
+ return (jdouble) _field_get_float(f, o);
case PRIMITIVETYPE_DOUBLE:
- return (jdouble) _field_get_double(f, ho);
+ return (jdouble) _field_get_double(f, o);
default:
exceptions_throw_illegalargumentexception();
return 0;
java_lang_reflect_VMField rvmf(_this);
fieldinfo* df = rvmf.get_field();
- java_handle_t* ho = (java_handle_t*) o;
- java_handle_t* hvalue = (java_handle_t*) value;
-
classinfo *sc;
fieldinfo *sf;
- /* check if the field can be accessed */
-
- if (!_field_access_check(rvmf, df, ho))
+ // Check if the field can be accessed.
+ if (!_field_access_check(rvmf, df, o))
return;
- /* get the source classinfo from the object */
-
- if (hvalue == NULL)
+ // Get the source classinfo from the object.
+ if (value == NULL)
sc = NULL;
else
- LLNI_class_get(hvalue, sc);
+ LLNI_class_get(value, sc);
/* The fieldid is used to set the new value, for primitive
types the value has to be retrieved from the wrapping
switch (sf->parseddesc->primitivetype) {
case PRIMITIVETYPE_BOOLEAN:
- val = java_lang_Boolean(hvalue).get_value();
+ val = java_lang_Boolean(value).get_value();
break;
default:
exceptions_throw_illegalargumentexception();
return;
}
- _field_set_int(df, ho, val);
+ _field_set_int(df, o, val);
return;
}
switch (sf->parseddesc->primitivetype) {
case PRIMITIVETYPE_BYTE:
- val = java_lang_Byte(hvalue).get_value();
+ val = java_lang_Byte(value).get_value();
break;
default:
exceptions_throw_illegalargumentexception();
return;
}
- _field_set_int(df, ho, val);
+ _field_set_int(df, o, val);
return;
}
switch (sf->parseddesc->primitivetype) {
case PRIMITIVETYPE_CHAR:
- val = java_lang_Character(hvalue).get_value();
+ val = java_lang_Character(value).get_value();
break;
default:
exceptions_throw_illegalargumentexception();
return;
}
- _field_set_int(df, ho, val);
+ _field_set_int(df, o, val);
return;
}
switch (sf->parseddesc->primitivetype) {
case PRIMITIVETYPE_BYTE:
- val = java_lang_Byte(hvalue).get_value();
+ val = java_lang_Byte(value).get_value();
break;
case PRIMITIVETYPE_SHORT:
- val = java_lang_Short(hvalue).get_value();
+ val = java_lang_Short(value).get_value();
break;
default:
exceptions_throw_illegalargumentexception();
return;
}
- _field_set_int(df, ho, val);
+ _field_set_int(df, o, val);
return;
}
switch (sf->parseddesc->primitivetype) {
case PRIMITIVETYPE_BYTE:
- val = java_lang_Byte(hvalue).get_value();
+ val = java_lang_Byte(value).get_value();
break;
case PRIMITIVETYPE_CHAR:
- val = java_lang_Character(hvalue).get_value();
+ val = java_lang_Character(value).get_value();
break;
case PRIMITIVETYPE_SHORT:
- val = java_lang_Short(hvalue).get_value();
+ val = java_lang_Short(value).get_value();
break;
case PRIMITIVETYPE_INT:
- val = java_lang_Integer(hvalue).get_value();
+ val = java_lang_Integer(value).get_value();
break;
default:
exceptions_throw_illegalargumentexception();
return;
}
- _field_set_int(df, ho, val);
+ _field_set_int(df, o, val);
return;
}
switch (sf->parseddesc->primitivetype) {
case PRIMITIVETYPE_BYTE:
- val = java_lang_Byte(hvalue).get_value();
+ val = java_lang_Byte(value).get_value();
break;
case PRIMITIVETYPE_CHAR:
- val = java_lang_Character(hvalue).get_value();
+ val = java_lang_Character(value).get_value();
break;
case PRIMITIVETYPE_SHORT:
- val = java_lang_Short(hvalue).get_value();
+ val = java_lang_Short(value).get_value();
break;
case PRIMITIVETYPE_INT:
- val = java_lang_Integer(hvalue).get_value();
+ val = java_lang_Integer(value).get_value();
break;
case PRIMITIVETYPE_LONG:
- val = java_lang_Long(hvalue).get_value();
+ val = java_lang_Long(value).get_value();
break;
default:
exceptions_throw_illegalargumentexception();
return;
}
- _field_set_long(df, ho, val);
+ _field_set_long(df, o, val);
return;
}
switch (sf->parseddesc->primitivetype) {
case PRIMITIVETYPE_BYTE:
- val = java_lang_Byte(hvalue).get_value();
+ val = java_lang_Byte(value).get_value();
break;
case PRIMITIVETYPE_CHAR:
- val = java_lang_Character(hvalue).get_value();
+ val = java_lang_Character(value).get_value();
break;
case PRIMITIVETYPE_SHORT:
- val = java_lang_Short(hvalue).get_value();
+ val = java_lang_Short(value).get_value();
break;
case PRIMITIVETYPE_INT:
- val = java_lang_Integer(hvalue).get_value();
+ val = java_lang_Integer(value).get_value();
break;
case PRIMITIVETYPE_LONG:
- val = java_lang_Long(hvalue).get_value();
+ val = java_lang_Long(value).get_value();
break;
case PRIMITIVETYPE_FLOAT:
- val = java_lang_Float(hvalue).get_value();
+ val = java_lang_Float(value).get_value();
break;
default:
exceptions_throw_illegalargumentexception();
return;
}
- _field_set_float(df, ho, val);
+ _field_set_float(df, o, val);
return;
}
switch (sf->parseddesc->primitivetype) {
case PRIMITIVETYPE_BYTE:
- val = java_lang_Byte(hvalue).get_value();
+ val = java_lang_Byte(value).get_value();
break;
case PRIMITIVETYPE_CHAR:
- val = java_lang_Character(hvalue).get_value();
+ val = java_lang_Character(value).get_value();
break;
case PRIMITIVETYPE_SHORT:
- val = java_lang_Short(hvalue).get_value();
+ val = java_lang_Short(value).get_value();
break;
case PRIMITIVETYPE_INT:
- val = java_lang_Integer(hvalue).get_value();
+ val = java_lang_Integer(value).get_value();
break;
case PRIMITIVETYPE_LONG:
- val = java_lang_Long(hvalue).get_value();
+ val = java_lang_Long(value).get_value();
break;
case PRIMITIVETYPE_FLOAT:
- val = java_lang_Float(hvalue).get_value();
+ val = java_lang_Float(value).get_value();
break;
case PRIMITIVETYPE_DOUBLE:
- val = java_lang_Double(hvalue).get_value();
+ val = java_lang_Double(value).get_value();
break;
default:
exceptions_throw_illegalargumentexception();
return;
}
- _field_set_double(df, ho, val);
+ _field_set_double(df, o, val);
return;
}
/* if (!builtin_instanceof((java_handle_t *) value, df->class)) */
/* break; */
- _field_set_handle(df, ho, hvalue);
+ _field_set_handle(df, o, value);
return;
}
java_lang_reflect_VMField rvmf(_this);
fieldinfo* f = rvmf.get_field();
- java_handle_t* ho = (java_handle_t*) o;
-
- /* check if the field can be accessed */
-
- if (!_field_access_check(rvmf, f, ho))
+ // Check if the field can be accessed.
+ if (!_field_access_check(rvmf, f, o))
return;
- /* check the field type and set the value */
-
+ // Check the field type and set the value.
switch (f->parseddesc->primitivetype) {
case PRIMITIVETYPE_BOOLEAN:
- _field_set_int(f, ho, value);
+ _field_set_int(f, o, value);
break;
default:
exceptions_throw_illegalargumentexception();
java_lang_reflect_VMField rvmf(_this);
fieldinfo* f = rvmf.get_field();
- java_handle_t* ho = (java_handle_t*) o;
-
- /* check if the field can be accessed */
-
- if (!_field_access_check(rvmf, f, ho))
+ // Check if the field can be accessed.
+ if (!_field_access_check(rvmf, f, o))
return;
- /* check the field type and set the value */
-
+ // Check the field type and set the value.
switch (f->parseddesc->primitivetype) {
case PRIMITIVETYPE_BYTE:
case PRIMITIVETYPE_SHORT:
case PRIMITIVETYPE_INT:
- _field_set_int(f, ho, value);
+ _field_set_int(f, o, value);
break;
case PRIMITIVETYPE_LONG:
- _field_set_long(f, ho, value);
+ _field_set_long(f, o, value);
break;
case PRIMITIVETYPE_FLOAT:
- _field_set_float(f, ho, value);
+ _field_set_float(f, o, value);
break;
case PRIMITIVETYPE_DOUBLE:
- _field_set_double(f, ho, value);
+ _field_set_double(f, o, value);
break;
default:
exceptions_throw_illegalargumentexception();
java_lang_reflect_VMField rvmf(_this);
fieldinfo* f = rvmf.get_field();
- java_handle_t* ho = (java_handle_t*) o;
-
- /* check if the field can be accessed */
-
- if (!_field_access_check(rvmf, f, ho))
+ // Check if the field can be accessed.
+ if (!_field_access_check(rvmf, f, o))
return;
- /* check the field type and set the value */
-
+ // Check the field type and set the value.
switch (f->parseddesc->primitivetype) {
case PRIMITIVETYPE_CHAR:
case PRIMITIVETYPE_INT:
- _field_set_int(f, ho, value);
+ _field_set_int(f, o, value);
break;
case PRIMITIVETYPE_LONG:
- _field_set_long(f, ho, value);
+ _field_set_long(f, o, value);
break;
case PRIMITIVETYPE_FLOAT:
- _field_set_float(f, ho, value);
+ _field_set_float(f, o, value);
break;
case PRIMITIVETYPE_DOUBLE:
- _field_set_double(f, ho, value);
+ _field_set_double(f, o, value);
break;
default:
exceptions_throw_illegalargumentexception();
java_lang_reflect_VMField rvmf(_this);
fieldinfo* f = rvmf.get_field();
- java_handle_t* ho = (java_handle_t*) o;
-
- /* check if the field can be accessed */
-
- if (!_field_access_check(rvmf, f, ho))
+ // Check if the field can be accessed.
+ if (!_field_access_check(rvmf, f, o))
return;
- /* check the field type and set the value */
-
+ // Check the field type and set the value.
switch (f->parseddesc->primitivetype) {
case PRIMITIVETYPE_SHORT:
case PRIMITIVETYPE_INT:
- _field_set_int(f, ho, value);
+ _field_set_int(f, o, value);
break;
case PRIMITIVETYPE_LONG:
- _field_set_long(f, ho, value);
+ _field_set_long(f, o, value);
break;
case PRIMITIVETYPE_FLOAT:
- _field_set_float(f, ho, value);
+ _field_set_float(f, o, value);
break;
case PRIMITIVETYPE_DOUBLE:
- _field_set_double(f, ho, value);
+ _field_set_double(f, o, value);
break;
default:
exceptions_throw_illegalargumentexception();
java_lang_reflect_VMField rvmf(_this);
fieldinfo* f = rvmf.get_field();
- java_handle_t* ho = (java_handle_t*) o;
-
- /* check if the field can be accessed */
-
- if (!_field_access_check(rvmf, f, ho))
+ // Check if the field can be accessed.
+ if (!_field_access_check(rvmf, f, o))
return;
- /* check the field type and set the value */
-
+ // Check the field type and set the value.
switch (f->parseddesc->primitivetype) {
case PRIMITIVETYPE_INT:
- _field_set_int(f, ho, value);
+ _field_set_int(f, o, value);
break;
case PRIMITIVETYPE_LONG:
- _field_set_long(f, ho, value);
+ _field_set_long(f, o, value);
break;
case PRIMITIVETYPE_FLOAT:
- _field_set_float(f, ho, value);
+ _field_set_float(f, o, value);
break;
case PRIMITIVETYPE_DOUBLE:
- _field_set_double(f, ho, value);
+ _field_set_double(f, o, value);
break;
default:
exceptions_throw_illegalargumentexception();
java_lang_reflect_VMField rvmf(_this);
fieldinfo* f = rvmf.get_field();
- java_handle_t* ho = (java_handle_t*) o;
-
- /* check if the field can be accessed */
-
- if (!_field_access_check(rvmf, f, ho))
+ // Check if the field can be accessed.
+ if (!_field_access_check(rvmf, f, o))
return;
- /* check the field type and set the value */
-
+ // Check the field type and set the value.
switch (f->parseddesc->primitivetype) {
case PRIMITIVETYPE_LONG:
- _field_set_long(f, ho, value);
+ _field_set_long(f, o, value);
break;
case PRIMITIVETYPE_FLOAT:
- _field_set_float(f, ho, value);
+ _field_set_float(f, o, value);
break;
case PRIMITIVETYPE_DOUBLE:
- _field_set_double(f, ho, value);
+ _field_set_double(f, o, value);
break;
default:
exceptions_throw_illegalargumentexception();
java_lang_reflect_VMField rvmf(_this);
fieldinfo* f = rvmf.get_field();
- java_handle_t* ho = (java_handle_t*) o;
-
- /* check if the field can be accessed */
-
- if (!_field_access_check(rvmf, f, ho))
+ // Check if the field can be accessed.
+ if (!_field_access_check(rvmf, f, o))
return;
- /* check the field type and set the value */
-
+ // Check the field type and set the value.
switch (f->parseddesc->primitivetype) {
case PRIMITIVETYPE_FLOAT:
- _field_set_float(f, ho, value);
+ _field_set_float(f, o, value);
break;
case PRIMITIVETYPE_DOUBLE:
- _field_set_double(f, ho, value);
+ _field_set_double(f, o, value);
break;
default:
exceptions_throw_illegalargumentexception();
java_lang_reflect_VMField rvmf(_this);
fieldinfo* f = rvmf.get_field();
- java_handle_t* ho = (java_handle_t*) o;
-
- /* check if the field can be accessed */
-
- if (!_field_access_check(rvmf, f, ho))
+ // Check if the field can be accessed.
+ if (!_field_access_check(rvmf, f, o))
return;
- /* check the field type and set the value */
-
+ // Check the field type and set the value.
switch (f->parseddesc->primitivetype) {
case PRIMITIVETYPE_DOUBLE:
- _field_set_double(f, ho, value);
+ _field_set_double(f, o, value);
break;
default:
exceptions_throw_illegalargumentexception();
/* in error case o is NULL */
- return (jstring) o;
+ return o;
}