本文整理汇总了C++中AbstractObject::GetJObject方法的典型用法代码示例。如果您正苦于以下问题:C++ AbstractObject::GetJObject方法的具体用法?C++ AbstractObject::GetJObject怎么用?C++ AbstractObject::GetJObject使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AbstractObject
的用法示例。
在下文中一共展示了AbstractObject::GetJObject方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: NewObjectArray
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: Throw
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: SetBoolArrayRegion
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: ReleaseBoolArrayElements
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: SetObjectArrayElement
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: GetObjectArrayElement
LObject GetObjectArrayElement(const AbstractObject& array,jsize index) {
jobjectArray jArray=(jobjectArray)array.GetJObject();
jobject object=GetEnv()->GetObjectArrayElement(jArray,index);
TranslateJavaException();
return LObject::WrapLocal(object);
}
示例7: GetArrayLength
jsize GetArrayLength(const AbstractObject& array) {
jarray jArray=(jarray)array.GetJObject();
return GetEnv()->GetArrayLength(jArray);
}
示例8: GetStaticFieldID
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: IsSameObject
bool IsSameObject(const AbstractObject& object1,const AbstractObject& object2) {
jobject jObject1=object1.GetJObject();
jobject jObject2=object2.GetJObject();
return GetEnv()->IsSameObject(jObject1,jObject2)==JNI_TRUE;
}
示例10: IsAssignableFrom
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: GetSuperclass
LObject GetSuperclass(const AbstractObject& clazz) {
jclass jClazz=(jclass)clazz.GetJObject();
return LObject::WrapLocal(GetEnv()->GetSuperclass(jClazz));
}
示例12: GetObjectClass
LObject GetObjectClass(const AbstractObject& object) {
jobject javaObject=object.GetJObject();
return LObject::WrapLocal(GetEnv()->GetObjectClass(javaObject));
}