35 #if defined(ENABLE_JNI_HEADERS)
36 # include "native/vm/include/java_lang_reflect_VMField.h"
39 #if defined(ENABLE_ANNOTATIONS)
76 if (
override ==
false) {
125 #define _FIELD_GET_TYPE(name, type, uniontype) \
126 static inline type _field_get_##name(fieldinfo *f, java_handle_t* h) \
129 if (f->flags & ACC_STATIC) { \
130 ret = f->value->uniontype; \
132 LLNI_CRITICAL_START; \
133 ret = *(type *) (((intptr_t) LLNI_DIRECT(h)) + f->offset); \
171 #define _FIELD_SET_TYPE(name, type, uniontype) \
172 static inline void _field_set_##name(fieldinfo* f, java_handle_t* h, type value) \
174 if (f->flags & ACC_STATIC) { \
175 f->value->uniontype = value; \
177 LLNI_CRITICAL_START; \
178 *(type *) (((intptr_t) LLNI_DIRECT(h)) + f->offset) = value; \
263 value.
i = _field_get_int(f, o);
267 value.
l = _field_get_long(f, o);
271 value.
f = _field_get_float(f, o);
275 value.
d = _field_get_double(f, o);
310 return (jint) _field_get_int(f, o);
335 return (jint) _field_get_int(f, o);
360 return (jint) _field_get_int(f, o);
386 return (jint) _field_get_int(f, o);
414 return (jint) _field_get_int(f, o);
442 return (jlong) _field_get_int(f, o);
444 return (jlong) _field_get_long(f, o);
472 return (jfloat) _field_get_int(f, o);
474 return (jfloat) _field_get_long(f, o);
476 return (jfloat) _field_get_float(f, o);
504 return (jdouble) _field_get_int(f, o);
506 return (jdouble) _field_get_long(f, o);
508 return (jdouble) _field_get_float(f, o);
510 return (jdouble) _field_get_double(f, o);
563 _field_set_int(df, o, val);
582 _field_set_int(df, o, val);
601 _field_set_int(df, o, val);
625 _field_set_int(df, o, val);
655 _field_set_int(df, o, val);
688 _field_set_long(df, o, val);
724 _field_set_float(df, o, val);
763 _field_set_double(df, o, val);
805 _field_set_int(f, o, value);
832 _field_set_int(f, o, value);
835 _field_set_long(f, o, value);
838 _field_set_float(f, o, value);
841 _field_set_double(f, o, value);
867 _field_set_int(f, o, value);
870 _field_set_long(f, o, value);
873 _field_set_float(f, o, value);
876 _field_set_double(f, o, value);
902 _field_set_int(f, o, value);
905 _field_set_long(f, o, value);
908 _field_set_float(f, o, value);
911 _field_set_double(f, o, value);
936 _field_set_int(f, o, value);
939 _field_set_long(f, o, value);
942 _field_set_float(f, o, value);
945 _field_set_double(f, o, value);
970 _field_set_long(f, o, value);
973 _field_set_float(f, o, value);
976 _field_set_double(f, o, value);
1001 _field_set_float(f, o, value);
1004 _field_set_double(f, o, value);
1029 _field_set_double(f, o, value);
1058 #if defined(ENABLE_ANNOTATIONS)
1071 if (declaredAnnotations == NULL) {
1081 return (
jobject) declaredAnnotations;
1112 #if defined(ENABLE_ANNOTATIONS)
void exceptions_throw_illegalargumentexception(void)
static java_handle_t * get_declaredannotations(java_handle_bytearray_t *annotations, classinfo *declaringClass, classinfo *referer)
static void _field_set_handle(fieldinfo *f, java_handle_t *h, java_handle_t *hvalue)
JNIEXPORT void JNICALL Java_java_lang_reflect_VMField_setInt(JNIEnv *env, jobject _this, jobject o, jint value)
bool builtin_instanceof(java_handle_t *o, classinfo *c)
JNIEnv jthread jmethodID jlocation jclass jobject object
JNIEXPORT jbyte JNICALL Java_java_lang_reflect_VMField_getByte(JNIEnv *env, jobject _this, jobject o)
Table containing all native methods registered with the VM.
JNIEXPORT void JNICALL Java_java_lang_reflect_VMField_set(JNIEnv *env, jobject _this, jobject o, jobject value)
NativeMethods & get_nativemethods()
void register_methods(Utf8String classname, const JNINativeMethod *methods, size_t count)
Register native methods with the VM.
JNIEXPORT void JNICALL Java_java_lang_reflect_VMField_setDouble(JNIEnv *env, jobject _this, jobject o, jdouble value)
#define NATIVE_METHODS_COUNT
JNIEXPORT void JNICALL Java_java_lang_reflect_VMField_setFloat(JNIEnv *env, jobject _this, jobject o, jfloat value)
static JavaString from_utf8(Utf8String)
classinfo * get_clazz() const
JNIEXPORT void JNICALL Java_java_lang_reflect_VMField_setByte(JNIEnv *env, jobject _this, jobject o, jbyte value)
JNIEXPORT jint JNICALL Java_java_lang_reflect_VMField_getModifiersInternal(JNIEnv *env, jobject _this)
java_handle_t * get_declaredAnnotations() const
JNIEXPORT void JNICALL Java_java_lang_reflect_VMField_setChar(JNIEnv *env, jobject _this, jobject o, jchar value)
java_handle_bytearray_t * get_annotations() const
GNU Classpath java/lang/reflect/Field.
void _Jv_java_lang_reflect_VMField_init(void)
classinfo * get_Class() const
#define _FIELD_SET_TYPE(name, type, uniontype)
JNIEXPORT jboolean JNICALL Java_java_lang_reflect_VMField_getBoolean(JNIEnv *env, jobject _this, jobject o)
#define LLNI_CRITICAL_END
static java_handle_t * box(int type, imm_union value)
Box a primitive of the given type.
JNIEXPORT void JNICALL Java_java_lang_reflect_VMField_setLong(JNIEnv *env, jobject _this, jobject o, jlong value)
static const JNINativeMethod methods[]
bool resolve_class_from_typedesc(typedesc *d, bool checkaccess, bool link, classinfo **result)
#define LLNI_classinfo_wrap(classinfo)
#define LLNI_class_get(obj, variable)
fieldinfo * class_findfield_by_name(classinfo *c, Utf8String name, bool throwexception)
JNIEXPORT jlong JNICALL Java_java_lang_reflect_VMField_getLong(JNIEnv *env, jobject _this, jobject o)
java_handle_t * get_f() const
fieldinfo * get_field() const
JNIEXPORT jshort JNICALL Java_java_lang_reflect_VMField_getShort(JNIEnv *env, jobject _this, jobject o)
JNIEXPORT void JNICALL Java_java_lang_reflect_VMField_setShort(JNIEnv *env, jobject _this, jobject o, jshort value)
static PassRegistry< BasicBlockPrinterPass > Z("BasicBlockPrinterPass")
#define _FIELD_GET_TYPE(name, type, uniontype)
void exceptions_throw_nullpointerexception(void)
fieldinfo * class_findfield(classinfo *c, Utf8String name, Utf8String desc)
void set_declaredAnnotations(java_handle_t *value)
static Utf8String from_utf8(const char *, size_t)
JNIEXPORT jfloat JNICALL Java_java_lang_reflect_VMField_getFloat(JNIEnv *env, jobject _this, jobject o)
JNIEXPORT jint JNICALL Java_java_lang_reflect_VMField_getInt(JNIEnv *env, jobject _this, jobject o)
JNIEXPORT jdouble JNICALL Java_java_lang_reflect_VMField_getDouble(JNIEnv *env, jobject _this, jobject o)
static bool _field_access_check(const java_lang_reflect_VMField &rvmf, fieldinfo *f, java_handle_t *o)
bool initialize_class(classinfo *c)
JNIEXPORT jstring JNICALL Java_java_lang_reflect_VMField_getSignature(JNIEnv *env, jobject _this)
bool access_check_field(fieldinfo *f, int callerdepth)
JNIEXPORT jchar JNICALL Java_java_lang_reflect_VMField_getChar(JNIEnv *env, jobject _this, jobject o)
#define LLNI_CRITICAL_START
JNIEXPORT jobject JNICALL Java_java_lang_reflect_VMField_declaredAnnotations(JNIEnv *env, jobject _this)
JNIEXPORT jclass JNICALL Java_java_lang_reflect_VMField_getType(JNIEnv *env, jobject _this)
static java_handle_t * _field_get_handle(fieldinfo *f, java_handle_t *h)
JNIEXPORT void JNICALL Java_java_lang_reflect_VMField_setBoolean(JNIEnv *env, jobject _this, jobject o, jboolean value)
PrimitiveType primitivetype
GNU Classpath java/lang/reflect/VMField.
static VM * get_current()
JNIEXPORT jobject JNICALL Java_java_lang_reflect_VMField_get(JNIEnv *env, jobject _this, jobject o)