summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xjava/jvpp/gen/jvppgen/enums_gen.py4
-rwxr-xr-xjava/jvpp/gen/jvppgen/jni_type_handlers_gen.py2
2 files changed, 5 insertions, 1 deletions
diff --git a/java/jvpp/gen/jvppgen/enums_gen.py b/java/jvpp/gen/jvppgen/enums_gen.py
index 8ba9655..6689497 100755
--- a/java/jvpp/gen/jvppgen/enums_gen.py
+++ b/java/jvpp/gen/jvppgen/enums_gen.py
@@ -64,6 +64,10 @@ $constants;
}
return null;
}
+
+ public $value_type getValue() {
+ return value;
+ }
}
""")
diff --git a/java/jvpp/gen/jvppgen/jni_type_handlers_gen.py b/java/jvpp/gen/jvppgen/jni_type_handlers_gen.py
index 05c3e52..d733dd5 100755
--- a/java/jvpp/gen/jvppgen/jni_type_handlers_gen.py
+++ b/java/jvpp/gen/jvppgen/jni_type_handlers_gen.py
@@ -121,7 +121,7 @@ $json_definition
static inline void _host_to_net_${c_name}(JNIEnv * env, jobject _host, vl_api_${c_name}_t * _net)
{
jclass enumClass = (*env)->FindClass(env, "${class_FQN}");
- jmethodID getValueMethod = (*env)->GetMethodID(env, enumClass, "ordinal", "()I");
+ jmethodID getValueMethod = (*env)->GetMethodID(env, enumClass, "getValue", "()I");
${jni_type} value = (*env)->CallIntMethod(env, _host, getValueMethod);
${swap};
}""")