blob: 1ac340eed10fca3903456b0c656c467365290fce [file] [log] [blame]
// Copyright (c) 2012 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
// base/android/jni_generator/jni_generator.py
// For
// java/util/HashSet
#ifndef java_util_HashSet_JNI
#define java_util_HashSet_JNI
#include <jni.h>
#include "base/android/jni_generator/jni_generator_helper.h"
// Step 1: forward declarations.
namespace {
const char kHashSetClassPath[] = "java/util/HashSet";
// Leaking this jclass as we cannot use LazyInstance from some threads.
jclass g_HashSet_clazz = NULL;
} // namespace
namespace JNI_HashSet {
// Step 2: method stubs.
static base::subtle::AtomicWord g_HashSet_dummy = 0;
static void Java_HashSet_dummy(JNIEnv* env, jobject obj) __attribute__
((unused));
static void Java_HashSet_dummy(JNIEnv* env, jobject obj) {
/* Must call RegisterNativesImpl() */
CHECK_CLAZZ(env, obj,
g_HashSet_clazz);
jmethodID method_id =
base::android::MethodID::LazyGet<
base::android::MethodID::TYPE_INSTANCE>(
env, g_HashSet_clazz,
"dummy",
"()V",
&g_HashSet_dummy);
env->CallVoidMethod(obj,
method_id);
jni_generator::CheckException(env);
}
// Step 3: RegisterNatives.
static bool RegisterNativesImpl(JNIEnv* env) {
g_HashSet_clazz = reinterpret_cast<jclass>(env->NewGlobalRef(
base::android::GetClass(env, kHashSetClassPath).obj()));
return true;
}
} // namespace JNI_HashSet
#endif // java_util_HashSet_JNI