//
// This file was generated by //third_party/jni_zero/jni_zero.py
//
package org.jni_zero;

import android.content.Context;
import android.view.View;
import org.jni_zero.CheckDiscard;
import org.jni_zero.GEN_JNI;
import org.jni_zero.JniStaticTestMocker;
import org.jni_zero.NativeLibraryLoadedStatus;
import org.jni_zero.SampleForAnnotationProcessor;
import org.stubs.MyClass;

@CheckDiscard("crbug.com/993421")
class SampleForAnnotationProcessorJni implements SampleForAnnotationProcessor.Natives {
  private static SampleForAnnotationProcessor.Natives testInstance;

  public static final JniStaticTestMocker<SampleForAnnotationProcessor.Natives> TEST_HOOKS =
      new JniStaticTestMocker<SampleForAnnotationProcessor.Natives>() {
    @Override
    public void setInstanceForTesting(SampleForAnnotationProcessor.Natives instance) {
      if (!GEN_JNI.TESTING_ENABLED) {
        throw new RuntimeException(
            "Tried to set a JNI mock when mocks aren't enabled!");
      }
      testInstance = instance;
    }
  };

  @Override
  public SampleForAnnotationProcessor bar(SampleForAnnotationProcessor sample) {
    return (SampleForAnnotationProcessor) GEN_JNI.org_jni_1zero_SampleForAnnotationProcessor_bar(sample);
  }

  @Override
  public void foo() {
    GEN_JNI.org_jni_1zero_SampleForAnnotationProcessor_foo();
  }

  @Override
  public boolean hasPhalange() {
    return (boolean) GEN_JNI.org_jni_1zero_SampleForAnnotationProcessor_hasPhalange();
  }

  @Override
  public Class returnClass() {
    return (Class) GEN_JNI.org_jni_1zero_SampleForAnnotationProcessor_returnClass();
  }

  @Override
  public Class[] returnClasses() {
    return (Class[]) GEN_JNI.org_jni_1zero_SampleForAnnotationProcessor_returnClasses();
  }

  @Override
  public SampleForAnnotationProcessor[] returnConvertedAppObjects() {
    return (SampleForAnnotationProcessor[]) GEN_JNI.org_jni_1zero_SampleForAnnotationProcessor_returnConvertedAppObjects(SampleForAnnotationProcessor.class);
  }

  @Override
  public int[] returnConvertedInts() {
    return (int[]) GEN_JNI.org_jni_1zero_SampleForAnnotationProcessor_returnConvertedInts();
  }

  @Override
  public String returnConvertedString() {
    return (String) GEN_JNI.org_jni_1zero_SampleForAnnotationProcessor_returnConvertedString();
  }

  @Override
  public String[] returnConvertedStrings() {
    return (String[]) GEN_JNI.org_jni_1zero_SampleForAnnotationProcessor_returnConvertedStrings();
  }

  @Override
  public Object returnObject() {
    return (Object) GEN_JNI.org_jni_1zero_SampleForAnnotationProcessor_returnObject();
  }

  @Override
  public Object[] returnObjects() {
    return (Object[]) GEN_JNI.org_jni_1zero_SampleForAnnotationProcessor_returnObjects();
  }

  @Override
  public String returnString() {
    return (String) GEN_JNI.org_jni_1zero_SampleForAnnotationProcessor_returnString();
  }

  @Override
  public String[] returnStrings() {
    return (String[]) GEN_JNI.org_jni_1zero_SampleForAnnotationProcessor_returnStrings();
  }

  @Override
  public SampleForAnnotationProcessor.TestStruct returnStruct() {
    return (SampleForAnnotationProcessor.TestStruct) GEN_JNI.org_jni_1zero_SampleForAnnotationProcessor_returnStruct();
  }

  @Override
  public SampleForAnnotationProcessor.TestStruct[] returnStructs() {
    return (SampleForAnnotationProcessor.TestStruct[]) GEN_JNI.org_jni_1zero_SampleForAnnotationProcessor_returnStructs();
  }

  @Override
  public Throwable returnThrowable() {
    return (Throwable) GEN_JNI.org_jni_1zero_SampleForAnnotationProcessor_returnThrowable();
  }

  @Override
  public Throwable[] returnThrowables() {
    return (Throwable[]) GEN_JNI.org_jni_1zero_SampleForAnnotationProcessor_returnThrowables();
  }

  @Override
  public String revString(String stringToReverse) {
    return (String) GEN_JNI.org_jni_1zero_SampleForAnnotationProcessor_revString(stringToReverse);
  }

  @Override
  public SampleForAnnotationProcessor[] sendSamplesToNative(SampleForAnnotationProcessor[] strs) {
    return (SampleForAnnotationProcessor[]) GEN_JNI.org_jni_1zero_SampleForAnnotationProcessor_sendSamplesToNative(strs);
  }

  @Override
  public String[] sendToNative(String[] strs) {
    return (String[]) GEN_JNI.org_jni_1zero_SampleForAnnotationProcessor_sendToNative(strs);
  }

  @Override
  public int[] testAllPrimitives(int zint, int[] ints, long zlong, long[] longs, short zshort, short[] shorts, char zchar, char[] chars, byte zbyte, byte[] bytes, double zdouble, double[] doubles, float zfloat, float[] floats, boolean zbool, boolean[] bools) {
    return (int[]) GEN_JNI.org_jni_1zero_SampleForAnnotationProcessor_testAllPrimitives(zint, ints, zlong, longs, zshort, shorts, zchar, chars, zbyte, bytes, zdouble, doubles, zfloat, floats, zbool, bools);
  }

  @Override
  public void testSpecialTypes(Class clazz, Class[] classes, Throwable throwable, Throwable[] throwables, String string, String[] strings, String convertedString, String[] convertedStrings, String optionalString, SampleForAnnotationProcessor.TestStruct tStruct, SampleForAnnotationProcessor.TestStruct[] structs, Object obj, Object convertedObj, Object[] objects, MyClass.SecondNestedInterface nestedInterface, View view, Context context, Object[] convertedObjects) {
    GEN_JNI.org_jni_1zero_SampleForAnnotationProcessor_testSpecialTypes(clazz, classes, throwable, throwables, string, strings, convertedString, convertedStrings, optionalString, tStruct, structs, obj, convertedObj, objects, nestedInterface, view, context, convertedObjects);
  }

  public static SampleForAnnotationProcessor.Natives get() {
    if (GEN_JNI.TESTING_ENABLED) {
      if (testInstance != null) {
        return testInstance;
      }
      if (GEN_JNI.REQUIRE_MOCK) {
        throw new UnsupportedOperationException(
            "No mock found for the native implementation of SampleForAnnotationProcessor.Natives. "
            + "The current configuration requires implementations be mocked.");
      }
    }
    NativeLibraryLoadedStatus.checkLoaded();
    return new SampleForAnnotationProcessorJni();
  }
}
