(lite) Move the JNIFlatBufferVerifier class into an anonymous namespace.

It belongs there because is an implementation detail, not part of the API;
previously, this was defined in the global namespace (presumably unintentionally),
but not declared in a header file.

PiperOrigin-RevId: 386616635
Change-Id: Ic8b901257cc48ca12d8472db1813022f7005d1ff
diff --git a/tensorflow/lite/java/src/main/native/nativeinterpreterwrapper_jni.cc b/tensorflow/lite/java/src/main/native/nativeinterpreterwrapper_jni.cc
index ff8cf5f..99fdbcc 100644
--- a/tensorflow/lite/java/src/main/native/nativeinterpreterwrapper_jni.cc
+++ b/tensorflow/lite/java/src/main/native/nativeinterpreterwrapper_jni.cc
@@ -217,6 +217,19 @@
 }
 #endif  // TFLITE_DISABLE_SELECT_JAVA_APIS
 
+// Verifies whether the model is a flatbuffer file.
+class JNIFlatBufferVerifier : public tflite::TfLiteVerifier {
+ public:
+  bool Verify(const char* data, int length,
+              tflite::ErrorReporter* reporter) override {
+    if (!VerifyModel(data, length)) {
+      reporter->Report("The model is not a valid Flatbuffer file");
+      return false;
+    }
+    return true;
+  }
+};
+
 }  // namespace
 
 extern "C" {
@@ -637,19 +650,6 @@
   return reinterpret_cast<jlong>(error_reporter);
 }
 
-// Verifies whether the model is a flatbuffer file.
-class JNIFlatBufferVerifier : public tflite::TfLiteVerifier {
- public:
-  bool Verify(const char* data, int length,
-              tflite::ErrorReporter* reporter) override {
-    if (!VerifyModel(data, length)) {
-      reporter->Report("The model is not a valid Flatbuffer file");
-      return false;
-    }
-    return true;
-  }
-};
-
 JNIEXPORT jlong JNICALL
 Java_org_tensorflow_lite_NativeInterpreterWrapper_createModel(
     JNIEnv* env, jclass clazz, jstring model_file, jlong error_handle) {