//
// This file was generated by //third_party/jni_zero/jni_zero.py
//
package org.jni_zero.extrapackage;
import org.jni_zero.CheckDiscard;
import org.jni_zero.GEN_JNI;
import org.jni_zero.JniStaticTestMocker;
import org.jni_zero.NativeLibraryLoadedStatus;
@CheckDiscard("crbug.com/993421")
class ImportsTinySampleJni implements ImportsTinySample.Natives {
private static ImportsTinySample.Natives testInstance;
public static final JniStaticTestMocker<ImportsTinySample.Natives> TEST_HOOKS =
new JniStaticTestMocker<ImportsTinySample.Natives>() {
@Override
public void setInstanceForTesting(ImportsTinySample.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 void asdf() {
GEN_JNI.org_jni_1zero_extrapackage_ImportsTinySample_asdf();
}
public static ImportsTinySample.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 ImportsTinySample.Natives. "
+ "The current configuration requires implementations be mocked.");
}
}
NativeLibraryLoadedStatus.checkLoaded();
return new ImportsTinySampleJni();
}
}