src/libtsduck/java/private/tsjni.cpp
//----------------------------------------------------------------------------
// Get/set the value of 'int' fields in a Java object.
//----------------------------------------------------------------------------
Get/set the value of 'int' fields in a Java object.
Get / set the value of ' int ' fields in a Java object .
jint ts::jni::GetIntField(JNIEnv* env, jobject obj, const char* fieldName)
{
    if (env == nullptr || obj == nullptr || fieldName == nullptr || env->ExceptionCheck()) {
        return 0;
    }
    const jfieldID fid = env->GetFieldID(env->GetObjectClass(obj), fieldName, JCS_INT);
    if (fid == nullptr) {
        return 0;
    }
    return env->GetIntField(obj, fid);
}
jint ts :: jni :: GetIntField ( JNIEnv * env , jobject obj , const char * fieldName ) { if ( env == nullptr || obj == nullptr || fieldName == nullptr || env -> ExceptionCheck ( ) ) { return 0 ; } const jfieldID fid = env -> GetFieldID ( env -> GetObjectClass ( obj ) , fieldName , JCS_INT ) ; if ( fid == nullptr ) { return 0 ; } return env -> GetIntField ( obj , fid ) ; }
Get/set the value of 'int' fields in a Java object.
Get / set the value of ' int ' fields in a Java object .