Пример #1
0
LObject NewObjectArray(jsize length,const AbstractObject& elementClass,const AbstractObject& initialElement) {
    jclass jElementClass=(jclass)elementClass.GetJObject();
    jobject jInitialElement=initialElement.GetJObject();
    jobject array=GetEnv()->NewObjectArray(length,jElementClass,jInitialElement);
    TranslateJavaException();
    return LObject::WrapLocal(array);
}
Пример #2
0
void Throw(const AbstractObject& throwable) {
    jthrowable jThrowable=(jthrowable)throwable.GetJObject();
    int error=GetEnv()->Throw(jThrowable);
    if (error) {
        FatalError("Throw() failed with %d error.",error);
    }
}
Пример #3
0
void SetBoolArrayRegion(const AbstractObject& array,jsize start,jsize length,const bool* buffer) {
    jbooleanArray jArray=(jbooleanArray)array.GetJObject();
    if (JBooleanIsBool) {
        GetEnv()->SetBooleanArrayRegion(jArray,start,length,(const jboolean*)buffer);
    } else {
        FatalError("jni::SetBoolArrayRegion is not implemented yet.");
    }
}
Пример #4
0
void ReleaseBoolArrayElements(const AbstractObject& array,bool* elements,jint mode) {
    jbooleanArray jArray=(jbooleanArray)array.GetJObject();
    if (JBooleanIsBool) {
        GetEnv()->ReleaseBooleanArrayElements(jArray,(jboolean*)elements,mode);
    } else {
        FatalError("jni::ReleaseBoolArrayElements is not implemented yet.");
    }
}
Пример #5
0
void SetObjectArrayElement(const AbstractObject& array,jsize index,const AbstractObject& value) {
    jobjectArray jArray=(jobjectArray)array.GetJObject();
    jobject jValue=value.GetJObject();
    GetEnv()->SetObjectArrayElement(jArray,index,jValue);
    TranslateJavaException();
}
Пример #6
0
LObject GetObjectArrayElement(const AbstractObject& array,jsize index) {
    jobjectArray jArray=(jobjectArray)array.GetJObject();
    jobject object=GetEnv()->GetObjectArrayElement(jArray,index);
    TranslateJavaException();
    return LObject::WrapLocal(object);
}
Пример #7
0
jsize GetArrayLength(const AbstractObject& array) {
    jarray jArray=(jarray)array.GetJObject();
    return GetEnv()->GetArrayLength(jArray);
}
Пример #8
0
jfieldID GetStaticFieldID(const AbstractObject& clazz,const char* name,const char* signature) {
    jclass jClazz=(jclass)clazz.GetJObject();
    jfieldID result=GetEnv()->GetStaticFieldID(jClazz,name,signature);
    TranslateJavaException();
    return result;
}
Пример #9
0
bool IsSameObject(const AbstractObject& object1,const AbstractObject& object2) {
    jobject jObject1=object1.GetJObject();
    jobject jObject2=object2.GetJObject();
    return GetEnv()->IsSameObject(jObject1,jObject2)==JNI_TRUE;
}
Пример #10
0
bool IsAssignableFrom(const AbstractObject& clazz,const AbstractObject& clazzFrom) {
    jclass jClazz=(jclass)clazz.GetJObject();
    jclass jClazzFrom=(jclass)clazzFrom.GetJObject();
    return GetEnv()->IsAssignableFrom(jClazz,jClazzFrom)==JNI_TRUE;
}
Пример #11
0
LObject GetSuperclass(const AbstractObject& clazz) {
    jclass jClazz=(jclass)clazz.GetJObject();
    return LObject::WrapLocal(GetEnv()->GetSuperclass(jClazz));
}
Пример #12
0
LObject GetObjectClass(const AbstractObject& object) {
    jobject javaObject=object.GetJObject();
    return LObject::WrapLocal(GetEnv()->GetObjectClass(javaObject));
}