\#include "pch.h" \#include"cstring" \#include \#include "framework.h" \#include \#include \#include \#include \#include"${pyName}Jni.h" JNIEXPORT jobject JNICALL Java_${pkgName.replace('.','_')}_impl_${pyName}Impl_${pyName}Train(JNIEnv* env, jobject object1, jobjectArray data_train, jobject settings) { jclass class_hashmap = env->FindClass("java/util/HashMap"); jmethodID hashmap_construct_method = env->GetMethodID(class_hashmap, "", "()V"); jobject obj_hashmap = env->NewObject(class_hashmap, hashmap_construct_method, ""); env->DeleteLocalRef(class_hashmap); obj_hashmap = ${pyName}_train(env, data_train, settings); return obj_hashmap; } JNIEXPORT jobject JNICALL Java_${pkgName.replace('.','_')}_impl_${pyName}Impl_${pyName}Predict(JNIEnv* env, jobject object1, #{foreach} ($column in [1..$dataLength])jobjectArray data${column}, #{end}jobject model_path_, jobject settings) { jclass class_hashmap = env->FindClass("java/util/HashMap"); jmethodID hashmap_construct_method = env->GetMethodID(class_hashmap, "", "()V"); jobject obj_hashmap = env->NewObject(class_hashmap, hashmap_construct_method, ""); env->DeleteLocalRef(class_hashmap); obj_hashmap = ${pyName}_predict(env, #{foreach} ($column in [1..$dataLength])data${column}, #{end}model_path_, settings); return obj_hashmap; }