blob: 0c47f6c510ff65cab3ec5ec0a0bad2b824389f66 [file] [log] [blame]
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// This file is autogenerated by
// weex_core_debug/Source/WeexCore/platform/android/jniprebuild/jni_generator.py
// For
// com/taobao/weex/layout/MeasureMode
#ifndef com_taobao_weex_layout_MeasureMode_JNI
#define com_taobao_weex_layout_MeasureMode_JNI
#include <jni.h>
//#include "base/android/jni_int_wrapper.h"
// Step 1: forward declarations.
namespace {
const char kMeasureModeClassPath[] = "com/taobao/weex/layout/MeasureMode";
// Leaking this jclass as we cannot use LazyInstance from some threads.
jclass g_MeasureMode_clazz = NULL;
#define MeasureMode_clazz(env) g_MeasureMode_clazz
} // namespace
// Step 2: method stubs.
static intptr_t g_MeasureMode_getEXACTLY = 0;
static jint Java_MeasureMode_getEXACTLY(JNIEnv* env) {
/* Must call RegisterNativesImpl() */
//CHECK_CLAZZ(env, MeasureMode_clazz(env),
// MeasureMode_clazz(env), 0);
jmethodID method_id =
base::android::GetMethod(
env, MeasureMode_clazz(env),
base::android::STATIC_METHOD,
"getEXACTLY",
"("
")"
"I",
&g_MeasureMode_getEXACTLY);
jint ret =
env->CallStaticIntMethod(MeasureMode_clazz(env),
method_id);
base::android::CheckException(env);
return ret;
}
static intptr_t g_MeasureMode_getUNSPECIFIED = 0;
static jint Java_MeasureMode_getUNSPECIFIED(JNIEnv* env) {
/* Must call RegisterNativesImpl() */
//CHECK_CLAZZ(env, MeasureMode_clazz(env),
// MeasureMode_clazz(env), 0);
jmethodID method_id =
base::android::GetMethod(
env, MeasureMode_clazz(env),
base::android::STATIC_METHOD,
"getUNSPECIFIED",
"("
")"
"I",
&g_MeasureMode_getUNSPECIFIED);
jint ret =
env->CallStaticIntMethod(MeasureMode_clazz(env),
method_id);
base::android::CheckException(env);
return ret;
}
// Step 3: RegisterNatives.
static bool RegisterNativesImpl(JNIEnv* env) {
g_MeasureMode_clazz = reinterpret_cast<jclass>(env->NewGlobalRef(
base::android::GetClass(env, kMeasureModeClassPath).Get()));
return true;
}
#endif // com_taobao_weex_layout_MeasureMode_JNI