chromium/third_party/jni_zero/test/golden/testEndToEndProxyHashed-SampleForAnnotationProcessor_jni.h.golden

// This file was generated by
//     //third_party/jni_zero/jni_zero.py
// For
//     org.jni_zero.SampleForAnnotationProcessor

#ifndef org_jni_1zero_SampleForAnnotationProcessor_JNI
#define org_jni_1zero_SampleForAnnotationProcessor_JNI

#include <jni.h>

#include "third_party/jni_zero/jni_export.h"
#include "third_party/jni_zero/jni_zero_helper.h"
// Class Accessors.
#ifndef org_jni_1zero_SampleForAnnotationProcessor_clazz_defined
#define org_jni_1zero_SampleForAnnotationProcessor_clazz_defined
inline jclass org_jni_1zero_SampleForAnnotationProcessor_clazz(JNIEnv* env) {
  static const char kClassName[] = "org/jni_zero/SampleForAnnotationProcessor";
  static std::atomic<jclass> cached_class;
  return jni_zero::internal::LazyGetClass(env, kClassName, &cached_class);
}
#endif

// Java to native functions
// Forward declaration. To be implemented by the including .cc file.
static jni_zero::ScopedJavaLocalRef<jobject> JNI_SampleForAnnotationProcessor_Bar(
    JNIEnv* env,
    const jni_zero::JavaParamRef<jobject>& sample);

JNI_POSSIBLE_BOUNDARY_EXPORT jobject Java_org_jni_1zero_GEN_1JNI_org_1jni_11zero_1SampleForAnnotationProcessor_1bar(
    JNIEnv* env,
    jclass jcaller,
    jobject sample) {
  auto _ret = JNI_SampleForAnnotationProcessor_Bar(
      env,
      jni_zero::JavaParamRef<jobject>(env, sample));
  return _ret.ReleaseLocal();
}

// Forward declaration. To be implemented by the including .cc file.
static void JNI_SampleForAnnotationProcessor_Foo(JNIEnv* env);

JNI_POSSIBLE_BOUNDARY_EXPORT void Java_org_jni_1zero_GEN_1JNI_org_1jni_11zero_1SampleForAnnotationProcessor_1foo(
    JNIEnv* env,
    jclass jcaller) {
  JNI_SampleForAnnotationProcessor_Foo(env);
}

// Forward declaration. To be implemented by the including .cc file.
static jboolean JNI_SampleForAnnotationProcessor_HasPhalange(JNIEnv* env);

JNI_POSSIBLE_BOUNDARY_EXPORT jboolean Java_org_jni_1zero_GEN_1JNI_org_1jni_11zero_1SampleForAnnotationProcessor_1hasPhalange(
    JNIEnv* env,
    jclass jcaller) {
  auto _ret = JNI_SampleForAnnotationProcessor_HasPhalange(env);
  return _ret;
}

// Forward declaration. To be implemented by the including .cc file.
static jni_zero::ScopedJavaLocalRef<jclass> JNI_SampleForAnnotationProcessor_ReturnClass(
    JNIEnv* env);

JNI_POSSIBLE_BOUNDARY_EXPORT jobject Java_org_jni_1zero_GEN_1JNI_org_1jni_11zero_1SampleForAnnotationProcessor_1returnClass(
    JNIEnv* env,
    jclass jcaller) {
  auto _ret = JNI_SampleForAnnotationProcessor_ReturnClass(env);
  return _ret.ReleaseLocal();
}

// Forward declaration. To be implemented by the including .cc file.
static jni_zero::ScopedJavaLocalRef<jobjectArray> JNI_SampleForAnnotationProcessor_ReturnClasses(
    JNIEnv* env);

JNI_POSSIBLE_BOUNDARY_EXPORT jobject Java_org_jni_1zero_GEN_1JNI_org_1jni_11zero_1SampleForAnnotationProcessor_1returnClasses(
    JNIEnv* env,
    jclass jcaller) {
  auto _ret = JNI_SampleForAnnotationProcessor_ReturnClasses(env);
  return _ret.ReleaseLocal();
}

// Forward declaration. To be implemented by the including .cc file.
static std::vector<jni_zero::ScopedJavaLocalRef<jobject>> JNI_SampleForAnnotationProcessor_ReturnConvertedAppObjects(
    JNIEnv* env);

JNI_POSSIBLE_BOUNDARY_EXPORT jobject Java_org_jni_1zero_GEN_1JNI_org_1jni_11zero_1SampleForAnnotationProcessor_1returnConvertedAppObjects(
    JNIEnv* env,
    jclass jcaller,
    jclass __arrayClazz) {
  auto _ret = JNI_SampleForAnnotationProcessor_ReturnConvertedAppObjects(env);
  jobject converted_ret = jni_zero::ToJniArray(env, _ret, __arrayClazz).Release();
  return converted_ret;
}

// Forward declaration. To be implemented by the including .cc file.
static std::vector<jint> JNI_SampleForAnnotationProcessor_ReturnConvertedInts(
    JNIEnv* env);

JNI_POSSIBLE_BOUNDARY_EXPORT jobject Java_org_jni_1zero_GEN_1JNI_org_1jni_11zero_1SampleForAnnotationProcessor_1returnConvertedInts(
    JNIEnv* env,
    jclass jcaller) {
  auto _ret = JNI_SampleForAnnotationProcessor_ReturnConvertedInts(env);
  jobject converted_ret = jni_zero::ToJniArray(env, _ret).Release();
  return converted_ret;
}

// Forward declaration. To be implemented by the including .cc file.
static std::string JNI_SampleForAnnotationProcessor_ReturnConvertedString(
    JNIEnv* env);

JNI_POSSIBLE_BOUNDARY_EXPORT jobject Java_org_jni_1zero_GEN_1JNI_org_1jni_11zero_1SampleForAnnotationProcessor_1returnConvertedString(
    JNIEnv* env,
    jclass jcaller) {
  auto _ret = JNI_SampleForAnnotationProcessor_ReturnConvertedString(env);
  jobject converted_ret = jni_zero::ToJniType(env, _ret).Release();
  return converted_ret;
}

// Forward declaration. To be implemented by the including .cc file.
static std::vector<std::string> JNI_SampleForAnnotationProcessor_ReturnConvertedStrings(
    JNIEnv* env);

JNI_POSSIBLE_BOUNDARY_EXPORT jobject Java_org_jni_1zero_GEN_1JNI_org_1jni_11zero_1SampleForAnnotationProcessor_1returnConvertedStrings(
    JNIEnv* env,
    jclass jcaller) {
  auto _ret = JNI_SampleForAnnotationProcessor_ReturnConvertedStrings(env);
  jobject converted_ret = jni_zero::ToJniArray(
      env,
      _ret,
      jni_zero::g_string_class).Release();
  return converted_ret;
}

// Forward declaration. To be implemented by the including .cc file.
static jni_zero::ScopedJavaLocalRef<jobject> JNI_SampleForAnnotationProcessor_ReturnObject(
    JNIEnv* env);

JNI_POSSIBLE_BOUNDARY_EXPORT jobject Java_org_jni_1zero_GEN_1JNI_org_1jni_11zero_1SampleForAnnotationProcessor_1returnObject(
    JNIEnv* env,
    jclass jcaller) {
  auto _ret = JNI_SampleForAnnotationProcessor_ReturnObject(env);
  return _ret.ReleaseLocal();
}

// Forward declaration. To be implemented by the including .cc file.
static jni_zero::ScopedJavaLocalRef<jobjectArray> JNI_SampleForAnnotationProcessor_ReturnObjects(
    JNIEnv* env);

JNI_POSSIBLE_BOUNDARY_EXPORT jobject Java_org_jni_1zero_GEN_1JNI_org_1jni_11zero_1SampleForAnnotationProcessor_1returnObjects(
    JNIEnv* env,
    jclass jcaller) {
  auto _ret = JNI_SampleForAnnotationProcessor_ReturnObjects(env);
  return _ret.ReleaseLocal();
}

// Forward declaration. To be implemented by the including .cc file.
static jni_zero::ScopedJavaLocalRef<jstring> JNI_SampleForAnnotationProcessor_ReturnString(
    JNIEnv* env);

JNI_POSSIBLE_BOUNDARY_EXPORT jobject Java_org_jni_1zero_GEN_1JNI_org_1jni_11zero_1SampleForAnnotationProcessor_1returnString(
    JNIEnv* env,
    jclass jcaller) {
  auto _ret = JNI_SampleForAnnotationProcessor_ReturnString(env);
  return _ret.ReleaseLocal();
}

// Forward declaration. To be implemented by the including .cc file.
static jni_zero::ScopedJavaLocalRef<jobjectArray> JNI_SampleForAnnotationProcessor_ReturnStrings(
    JNIEnv* env);

JNI_POSSIBLE_BOUNDARY_EXPORT jobject Java_org_jni_1zero_GEN_1JNI_org_1jni_11zero_1SampleForAnnotationProcessor_1returnStrings(
    JNIEnv* env,
    jclass jcaller) {
  auto _ret = JNI_SampleForAnnotationProcessor_ReturnStrings(env);
  return _ret.ReleaseLocal();
}

// Forward declaration. To be implemented by the including .cc file.
static jni_zero::ScopedJavaLocalRef<jobject> JNI_SampleForAnnotationProcessor_ReturnStruct(
    JNIEnv* env);

JNI_POSSIBLE_BOUNDARY_EXPORT jobject Java_org_jni_1zero_GEN_1JNI_org_1jni_11zero_1SampleForAnnotationProcessor_1returnStruct(
    JNIEnv* env,
    jclass jcaller) {
  auto _ret = JNI_SampleForAnnotationProcessor_ReturnStruct(env);
  return _ret.ReleaseLocal();
}

// Forward declaration. To be implemented by the including .cc file.
static jni_zero::ScopedJavaLocalRef<jobjectArray> JNI_SampleForAnnotationProcessor_ReturnStructs(
    JNIEnv* env);

JNI_POSSIBLE_BOUNDARY_EXPORT jobject Java_org_jni_1zero_GEN_1JNI_org_1jni_11zero_1SampleForAnnotationProcessor_1returnStructs(
    JNIEnv* env,
    jclass jcaller) {
  auto _ret = JNI_SampleForAnnotationProcessor_ReturnStructs(env);
  return _ret.ReleaseLocal();
}

// Forward declaration. To be implemented by the including .cc file.
static jni_zero::ScopedJavaLocalRef<jthrowable> JNI_SampleForAnnotationProcessor_ReturnThrowable(
    JNIEnv* env);

JNI_POSSIBLE_BOUNDARY_EXPORT jobject Java_org_jni_1zero_GEN_1JNI_org_1jni_11zero_1SampleForAnnotationProcessor_1returnThrowable(
    JNIEnv* env,
    jclass jcaller) {
  auto _ret = JNI_SampleForAnnotationProcessor_ReturnThrowable(env);
  return _ret.ReleaseLocal();
}

// Forward declaration. To be implemented by the including .cc file.
static jni_zero::ScopedJavaLocalRef<jobjectArray> JNI_SampleForAnnotationProcessor_ReturnThrowables(
    JNIEnv* env);

JNI_POSSIBLE_BOUNDARY_EXPORT jobject Java_org_jni_1zero_GEN_1JNI_org_1jni_11zero_1SampleForAnnotationProcessor_1returnThrowables(
    JNIEnv* env,
    jclass jcaller) {
  auto _ret = JNI_SampleForAnnotationProcessor_ReturnThrowables(env);
  return _ret.ReleaseLocal();
}

// Forward declaration. To be implemented by the including .cc file.
static jni_zero::ScopedJavaLocalRef<jstring> JNI_SampleForAnnotationProcessor_RevString(
    JNIEnv* env,
    const jni_zero::JavaParamRef<jstring>& stringToReverse);

JNI_POSSIBLE_BOUNDARY_EXPORT jobject Java_org_jni_1zero_GEN_1JNI_org_1jni_11zero_1SampleForAnnotationProcessor_1revString(
    JNIEnv* env,
    jclass jcaller,
    jobject stringToReverse) {
  auto _ret = JNI_SampleForAnnotationProcessor_RevString(
      env,
      jni_zero::JavaParamRef<jstring>(env, static_cast<jstring>(stringToReverse)));
  return _ret.ReleaseLocal();
}

// Forward declaration. To be implemented by the including .cc file.
static jni_zero::ScopedJavaLocalRef<jobjectArray> JNI_SampleForAnnotationProcessor_SendSamplesToNative(
    JNIEnv* env,
    const jni_zero::JavaParamRef<jobjectArray>& strs);

JNI_POSSIBLE_BOUNDARY_EXPORT jobject Java_org_jni_1zero_GEN_1JNI_org_1jni_11zero_1SampleForAnnotationProcessor_1sendSamplesToNative(
    JNIEnv* env,
    jclass jcaller,
    jobject strs) {
  auto _ret = JNI_SampleForAnnotationProcessor_SendSamplesToNative(
      env,
      jni_zero::JavaParamRef<jobjectArray>(env, static_cast<jobjectArray>(strs)));
  return _ret.ReleaseLocal();
}

// Forward declaration. To be implemented by the including .cc file.
static jni_zero::ScopedJavaLocalRef<jobjectArray> JNI_SampleForAnnotationProcessor_SendToNative(
    JNIEnv* env,
    const jni_zero::JavaParamRef<jobjectArray>& strs);

JNI_POSSIBLE_BOUNDARY_EXPORT jobject Java_org_jni_1zero_GEN_1JNI_org_1jni_11zero_1SampleForAnnotationProcessor_1sendToNative(
    JNIEnv* env,
    jclass jcaller,
    jobject strs) {
  auto _ret = JNI_SampleForAnnotationProcessor_SendToNative(
      env,
      jni_zero::JavaParamRef<jobjectArray>(env, static_cast<jobjectArray>(strs)));
  return _ret.ReleaseLocal();
}

// Forward declaration. To be implemented by the including .cc file.
static std::vector<int32_t> JNI_SampleForAnnotationProcessor_TestAllPrimitives(
    JNIEnv* env,
    int zint,
    std::vector<int32_t>& ints,
    jlong zlong,
    const jni_zero::JavaParamRef<jlongArray>& longs,
    jshort zshort,
    const jni_zero::JavaParamRef<jshortArray>& shorts,
    int zchar,
    const jni_zero::JavaParamRef<jcharArray>& chars,
    jbyte zbyte,
    const jni_zero::JavaParamRef<jbyteArray>& bytes,
    jdouble zdouble,
    const jni_zero::JavaParamRef<jdoubleArray>& doubles,
    jfloat zfloat,
    const jni_zero::JavaParamRef<jfloatArray>& floats,
    jboolean zbool,
    const jni_zero::JavaParamRef<jbooleanArray>& bools);

JNI_POSSIBLE_BOUNDARY_EXPORT jobject Java_org_jni_1zero_GEN_1JNI_org_1jni_11zero_1SampleForAnnotationProcessor_1testAllPrimitives(
    JNIEnv* env,
    jclass jcaller,
    jint zint,
    jobject ints,
    jlong zlong,
    jobject longs,
    jshort zshort,
    jobject shorts,
    jchar zchar,
    jobject chars,
    jbyte zbyte,
    jobject bytes,
    jdouble zdouble,
    jobject doubles,
    jfloat zfloat,
    jobject floats,
    jboolean zbool,
    jobject bools) {
  int zint_converted = static_cast<int>(zint);
  std::vector<int32_t> ints_converted = jni_zero::FromJniArray<std::vector<int32_t>>(
      env,
      jni_zero::JavaParamRef<jintArray>(env, static_cast<jintArray>(ints)));
  int zchar_converted = static_cast<int>(zchar);
  auto _ret = JNI_SampleForAnnotationProcessor_TestAllPrimitives(
      env,
      zint_converted,
      ints_converted,
      zlong,
      jni_zero::JavaParamRef<jlongArray>(env, static_cast<jlongArray>(longs)),
      zshort,
      jni_zero::JavaParamRef<jshortArray>(env, static_cast<jshortArray>(shorts)),
      zchar_converted,
      jni_zero::JavaParamRef<jcharArray>(env, static_cast<jcharArray>(chars)),
      zbyte,
      jni_zero::JavaParamRef<jbyteArray>(env, static_cast<jbyteArray>(bytes)),
      zdouble,
      jni_zero::JavaParamRef<jdoubleArray>(env, static_cast<jdoubleArray>(doubles)),
      zfloat,
      jni_zero::JavaParamRef<jfloatArray>(env, static_cast<jfloatArray>(floats)),
      zbool,
      jni_zero::JavaParamRef<jbooleanArray>(env, static_cast<jbooleanArray>(bools)));
  jobject converted_ret = jni_zero::ToJniArray(env, _ret).Release();
  return converted_ret;
}

// Forward declaration. To be implemented by the including .cc file.
static void JNI_SampleForAnnotationProcessor_TestSpecialTypes(
    JNIEnv* env,
    const jni_zero::JavaParamRef<jclass>& clazz,
    const jni_zero::JavaParamRef<jobjectArray>& classes,
    const jni_zero::JavaParamRef<jthrowable>& throwable,
    const jni_zero::JavaParamRef<jobjectArray>& throwables,
    const jni_zero::JavaParamRef<jstring>& string,
    const jni_zero::JavaParamRef<jobjectArray>& strings,
    std::string& convertedString,
    std::vector<std::string>& convertedStrings,
    std::optional<std::string>& optionalString,
    const jni_zero::JavaParamRef<jobject>& tStruct,
    const jni_zero::JavaParamRef<jobjectArray>& structs,
    const jni_zero::JavaParamRef<jobject>& obj,
    jni_zero::tests::CPPClass& convertedObj,
    const jni_zero::JavaParamRef<jobjectArray>& objects,
    const jni_zero::JavaParamRef<jobject>& nestedInterface,
    const jni_zero::JavaParamRef<jobject>& view,
    const jni_zero::JavaParamRef<jobject>& context,
    std::vector<jni_zero::tests::CPPClass>& convertedObjects);

JNI_POSSIBLE_BOUNDARY_EXPORT void Java_org_jni_1zero_GEN_1JNI_org_1jni_11zero_1SampleForAnnotationProcessor_1testSpecialTypes(
    JNIEnv* env,
    jclass jcaller,
    jobject clazz,
    jobject classes,
    jobject throwable,
    jobject throwables,
    jobject string,
    jobject strings,
    jobject convertedString,
    jobject convertedStrings,
    jobject optionalString,
    jobject tStruct,
    jobject structs,
    jobject obj,
    jobject convertedObj,
    jobject objects,
    jobject nestedInterface,
    jobject view,
    jobject context,
    jobject convertedObjects) {
  std::string convertedString_converted = jni_zero::FromJniType<std::string>(
      env,
      jni_zero::JavaParamRef<jobject>(env, convertedString));
  std::vector<std::string> convertedStrings_converted = jni_zero::FromJniArray<std::vector<std::string>>(
      env,
      jni_zero::JavaParamRef<jobjectArray>(env, static_cast<jobjectArray>(convertedStrings)));
  std::optional<std::string> optionalString_converted = jni_zero::FromJniType<std::optional<std::string>>(
      env,
      jni_zero::JavaParamRef<jobject>(env, optionalString));
  jni_zero::tests::CPPClass convertedObj_converted = jni_zero::FromJniType<jni_zero::tests::CPPClass>(
      env,
      jni_zero::JavaParamRef<jobject>(env, convertedObj));
  std::vector<jni_zero::tests::CPPClass> convertedObjects_converted = jni_zero::FromJniArray<std::vector<jni_zero::tests::CPPClass>>(
      env,
      jni_zero::JavaParamRef<jobjectArray>(env, static_cast<jobjectArray>(convertedObjects)));
  JNI_SampleForAnnotationProcessor_TestSpecialTypes(
      env,
      jni_zero::JavaParamRef<jclass>(env, static_cast<jclass>(clazz)),
      jni_zero::JavaParamRef<jobjectArray>(env, static_cast<jobjectArray>(classes)),
      jni_zero::JavaParamRef<jthrowable>(env, static_cast<jthrowable>(throwable)),
      jni_zero::JavaParamRef<jobjectArray>(env, static_cast<jobjectArray>(throwables)),
      jni_zero::JavaParamRef<jstring>(env, static_cast<jstring>(string)),
      jni_zero::JavaParamRef<jobjectArray>(env, static_cast<jobjectArray>(strings)),
      convertedString_converted,
      convertedStrings_converted,
      optionalString_converted,
      jni_zero::JavaParamRef<jobject>(env, tStruct),
      jni_zero::JavaParamRef<jobjectArray>(env, static_cast<jobjectArray>(structs)),
      jni_zero::JavaParamRef<jobject>(env, obj),
      convertedObj_converted,
      jni_zero::JavaParamRef<jobjectArray>(env, static_cast<jobjectArray>(objects)),
      jni_zero::JavaParamRef<jobject>(env, nestedInterface),
      jni_zero::JavaParamRef<jobject>(env, view),
      jni_zero::JavaParamRef<jobject>(env, context),
      convertedObjects_converted);
}


#endif  // org_jni_1zero_SampleForAnnotationProcessor_JNI