jboolean* JPJavaEnv::GetBooleanArrayElements(jbooleanArray array, jboolean* isCopy)
{
    JNIEnv* env = getJNIEnv(); 
    jboolean* res = env->functions->GetBooleanArrayElements(env, array, isCopy);
    JAVA_CHECK("GetBooleanArrayElements");
    return res;
}
jbooleanArray JPJavaEnv::NewBooleanArray(jint len)
{
    JNIEnv* env = getJNIEnv(); 
    jbooleanArray res = env->functions->NewBooleanArray(env, len);
    JAVA_CHECK("NewBooleanArray");
    return res;
}
jdouble JPJavaEnv::GetStaticDoubleField(jclass clazz, jfieldID fid) 
{
    JNIEnv* env = getJNIEnv(); 
    jdouble res = env->functions->GetStaticDoubleField(env, clazz, fid);
    JAVA_CHECK("GetStaticDoubleField");
    return res;
}
jboolean JPJavaEnv::GetStaticBooleanField(jclass clazz, jfieldID fid) 
{
    JNIEnv* env = getJNIEnv(); 
    jboolean res = env->functions->GetStaticBooleanField(env, clazz, fid);
    JAVA_CHECK("GetStaticBooleanField");
    return res;
}
jobject JPJavaEnv::GetObjectField(jobject clazz, jfieldID fid)
{
    JNIEnv* env = getJNIEnv(); 
    jobject res = env->functions->GetObjectField(env, clazz, fid);
    JAVA_CHECK("GetObjectField");
    return res;
}
Example #6
0
jint JPJavaEnv::AttachCurrentThreadAsDaemon()
{
	// TODO find a way to get A JVM once JPJavaEnv is not a singleton anymore ...
	JNIEnv* env;
	jint res = jvm->functions->AttachCurrentThreadAsDaemon(jvm, (void**)&env, NULL);
	JAVA_CHECK("AttachCurrentThreadAsDaemon");
	return res;
}
const jchar* JPJavaEnv::GetStringChars(jstring a0, jboolean* a1)
{
	const jchar* res;
	JNIEnv* env = getJNIEnv();
	res = env->functions->GetStringChars(env, a0, a1);
JAVA_CHECK("GetStringChars");
	return res;
}
jsize JPJavaEnv::GetStringLength(jstring a0)
{
	jsize res;
	JNIEnv* env = getJNIEnv();
	res = env->functions->GetStringLength(env, a0);
JAVA_CHECK("GetStringLength");
	return res;
}
Example #9
0
jobject JPJavaEnv::NewObject(jclass a0, jmethodID a1)
{     jobject res;
    JNIEnv* env = getJNIEnv();
    void* _save = JPEnv::getHost()->gotoExternal();

	res = env->functions->AllocObject(env, a0);
	JAVA_CHECK("NewObject");

	env->functions->CallVoidMethod(env, res, a1);

	if (ExceptionCheck())
	{
		DeleteLocalRef(res);
	}

    JPEnv::getHost()->returnExternal(_save);
    JAVA_CHECK("NewObject");
    return res;
}
Example #10
0
jobject JPJavaEnv::NewDirectByteBuffer(void* address, jlong capacity)
{
	TRACE_IN("JPJavaEnv::NewDirectByteBuffer");
	JNIEnv* env = getJNIEnv(); 
    jobject res = env->functions->NewDirectByteBuffer(env, address, capacity);
    JAVA_CHECK("NewDirectByteBuffer");
	TRACE1((long)res);
    return res;	
	TRACE_OUT;
}
Example #11
0
void JPJavaEnv::CallVoidMethod(jobject a0, jmethodID a1)
{ 
    JNIEnv* env = getJNIEnv();
    void* _save = JPEnv::getHost()->gotoExternal();

	env->functions->CallVoidMethod(env, a0, a1);
 
    JPEnv::getHost()->returnExternal(_save);
    JAVA_CHECK("CallVoidMethod");

}
Example #12
0
void JPJavaEnv::CallStaticVoidMethodA(jclass a0, jmethodID a1, jvalue* a2)
{ 
    JNIEnv* env = getJNIEnv();
    void* _save = JPEnv::getHost()->gotoExternal();

	env->functions->CallStaticVoidMethodA(env, a0, a1, a2);
 
    JPEnv::getHost()->returnExternal(_save);
    JAVA_CHECK("CallStaticVoidMethodA");

}
Example #13
0
void JPJavaEnv::SetObjectArrayElement(jobjectArray a0, int a1, jobject a2)
{ 
    JNIEnv* env = getJNIEnv();
    void* _save = JPEnv::getHost()->gotoExternal();

	env->functions->SetObjectArrayElement(env, a0, a1, a2);
 
    JPEnv::getHost()->returnExternal(_save);
    JAVA_CHECK("SetObjectArrayElement");

}
Example #14
0
void JPJavaEnv::ReleaseStringUTFChars(jstring a0, const char* a1)
{ 
    JNIEnv* env = getJNIEnv();
    void* _save = JPEnv::getHost()->gotoExternal();

	env->functions->ReleaseStringUTFChars(env, a0, a1);
 
    JPEnv::getHost()->returnExternal(_save);
    JAVA_CHECK("ReleaseStringUTFChars");

}
Example #15
0
jclass JPJavaEnv::DefineClass(const char* a0, jobject a1, const jbyte* a2, jsize a3)
{     jclass res;

    JNIEnv* env = getJNIEnv();
    void* _save = JPEnv::getHost()->gotoExternal();

	res = env->functions->DefineClass(env, a0, a1, a2, a3);
 
    JPEnv::getHost()->returnExternal(_save);
    JAVA_CHECK("DefineClass");
    return res;

}
Example #16
0
jobjectArray JPJavaEnv::NewObjectArray(int a0, jclass a1, jobject a2)
{     jobjectArray res;

    JNIEnv* env = getJNIEnv();
    void* _save = JPEnv::getHost()->gotoExternal();

	res = env->functions->NewObjectArray(env, a0, a1, a2);
 
    JPEnv::getHost()->returnExternal(_save);
    JAVA_CHECK("NewObjectArray");
    return res;

}
Example #17
0
jboolean JPJavaEnv::IsInstanceOf(jobject a0, jclass a1)
{     jboolean res;

    JNIEnv* env = getJNIEnv();
    void* _save = JPEnv::getHost()->gotoExternal();

	res = env->functions->IsInstanceOf(env, a0, a1);
 
    JPEnv::getHost()->returnExternal(_save);
    JAVA_CHECK("IsInstanceOf");
    return res;

}
Example #18
0
jclass JPJavaEnv::GetObjectClass(jobject a0)
{     jclass res;

    JNIEnv* env = getJNIEnv();
    void* _save = JPEnv::getHost()->gotoExternal();

	res = env->functions->GetObjectClass(env, a0);
 
    JPEnv::getHost()->returnExternal(_save);
    JAVA_CHECK("GetObjectClass");
    return res;

}
Example #19
0
jfieldID JPJavaEnv::GetStaticFieldID(jclass a0, const char* a1, const char* a2)
{     jfieldID res;

    JNIEnv* env = getJNIEnv();
    void* _save = JPEnv::getHost()->gotoExternal();

	res = env->functions->GetStaticFieldID(env, a0, a1, a2);
 
    JPEnv::getHost()->returnExternal(_save);
    JAVA_CHECK("GetStaticFieldID");
    return res;

}
Example #20
0
jclass JPJavaEnv::FindClass(const char* a0)
{     jclass res;

    JNIEnv* env = getJNIEnv();
    void* _save = JPEnv::getHost()->gotoExternal();

	res = env->functions->FindClass(env, a0);
 
    JPEnv::getHost()->returnExternal(_save);
    JAVA_CHECK("FindClass");
    return res;

}
Example #21
0
jsize JPJavaEnv::GetArrayLength(jarray a0)
{     jsize res;

    JNIEnv* env = getJNIEnv();
    void* _save = JPEnv::getHost()->gotoExternal();

	res = env->functions->GetArrayLength(env, a0);
 
    JPEnv::getHost()->returnExternal(_save);
    JAVA_CHECK("GetArrayLength");
    return res;

}
Example #22
0
jboolean JPJavaEnv::IsAssignableFrom(jclass a0, jclass a1)
{     jboolean res;

    JNIEnv* env = getJNIEnv();
    void* _save = JPEnv::getHost()->gotoExternal();

	res = env->functions->IsAssignableFrom(env, a0, a1);
 
    JPEnv::getHost()->returnExternal(_save);
    JAVA_CHECK("IsAssignableFrom");
    return res;

}
Example #23
0
jint JPJavaEnv::RegisterNatives(jclass a0, const JNINativeMethod* a1, jint a2)
{     jint res;

    JNIEnv* env = getJNIEnv();
    void* _save = JPEnv::getHost()->gotoExternal();

	res = env->functions->RegisterNatives(env, a0, a1, a2);
 
    JPEnv::getHost()->returnExternal(_save);
    JAVA_CHECK("RegisterNatives");
    return res;

}
Example #24
0
jstring JPJavaEnv::NewString(const jchar* a0, int a1)
{     jstring res;

    JNIEnv* env = getJNIEnv();
    void* _save = JPEnv::getHost()->gotoExternal();

	res = env->functions->NewString(env, a0, a1);
 
    JPEnv::getHost()->returnExternal(_save);
    JAVA_CHECK("NewString");
    return res;

}
Example #25
0
int JPJavaEnv::MonitorExit(jobject a0)
{     int res;

    JNIEnv* env = getJNIEnv();
    void* _save = JPEnv::getHost()->gotoExternal();

	res = env->functions->MonitorExit(env, a0);
 
    JPEnv::getHost()->returnExternal(_save);
    JAVA_CHECK("MonitorExit");
    return res;

}
Example #26
0
jobject JPJavaEnv::GetObjectArrayElement(jobjectArray a0, int a1)
{     jobject res;

    JNIEnv* env = getJNIEnv();
    void* _save = JPEnv::getHost()->gotoExternal();

	res = env->functions->GetObjectArrayElement(env, a0, a1);
 
    JPEnv::getHost()->returnExternal(_save);
    JAVA_CHECK("GetObjectArrayElement");
    return res;

}
Example #27
0
const char* JPJavaEnv::GetStringUTFChars(jstring a0, jboolean* a1)
{     const char* res;

    JNIEnv* env = getJNIEnv();
    void* _save = JPEnv::getHost()->gotoExternal();

	res = env->functions->GetStringUTFChars(env, a0, a1);
 
    JPEnv::getHost()->returnExternal(_save);
    JAVA_CHECK("GetStringUTFChars");
    return res;

}
Example #28
0
jfieldID JPJavaEnv::FromReflectedField(jobject a0)
{     jfieldID res;

    JNIEnv* env = getJNIEnv();
    void* _save = JPEnv::getHost()->gotoExternal();

	res = env->functions->FromReflectedField(env, a0);
 
    JPEnv::getHost()->returnExternal(_save);
    JAVA_CHECK("FromReflectedField");
    return res;

}
Example #29
0
jboolean JPJavaEnv::CallNonvirtualBooleanMethod(jobject obj, jclass claz, jmethodID mid)
{
        jboolean res;

    JNIEnv* env = getJNIEnv();
    void* _save = JPEnv::getHost()->gotoExternal();
 
    res = env->functions->CallNonvirtualBooleanMethod(env, obj, claz, mid); 
    
    JPEnv::getHost()->returnExternal(_save);
    JAVA_CHECK("Boolean");
    return res;
 
}
Example #30
0
jboolean JPJavaEnv::CallBooleanMethodA(jobject obj, jmethodID mid, jvalue* val)
{
        jboolean res;

    JNIEnv* env = getJNIEnv();
    void* _save = JPEnv::getHost()->gotoExternal();
 
    res = env->functions->CallBooleanMethodA(env, obj, mid, val); 
    
    JPEnv::getHost()->returnExternal(_save);
    JAVA_CHECK("Boolean");
    return res;
 
}