use of com.oracle.svm.jni.nativeapi.JNIFieldId in project graal by oracle.
the class JNIFunctions method FromReflectedField.
/*
* jfieldID FromReflectedField(JNIEnv *env, jobject field);
*/
@CEntryPoint
@CEntryPointOptions(prologue = JNIEnvironmentEnterPrologue.class, exceptionHandler = JNIExceptionHandlerReturnNullWord.class, publishAs = Publish.NotPublished, include = CEntryPointOptions.NotIncludedAutomatically.class)
static JNIFieldId FromReflectedField(JNIEnvironment env, JNIObjectHandle fieldHandle) {
JNIFieldId fieldId = Word.zero();
if (JNIAccessFeature.singleton().haveJavaRuntimeReflectionSupport()) {
Field obj = JNIObjectHandles.getObject(fieldHandle);
if (obj != null) {
boolean isStatic = Modifier.isStatic(obj.getModifiers());
fieldId = JNIReflectionDictionary.singleton().getFieldID(obj.getDeclaringClass(), obj.getName());
}
}
return fieldId;
}
Aggregations