# HG changeset patch
# User Ernst Reissner <rei3ner@arcor.de>
# Date 1471571091 -7200
#      Fri Aug 19 03:44:51 2016 +0200
# Node ID 1683b5708b1712023d3ffe6018b5a3585131a833
# Parent  615dcd0f501aa6075c97ed9ed995096f46f08a1c
renamed methods unbox/box into oct2javaTypes and java2octTypes.
because of documentation: there the terms unboxing/boxing
are used in the context of the java language.

diff -r 615dcd0f501a -r 1683b5708b17 libinterp/octave-value/ov-java.cc
--- a/libinterp/octave-value/ov-java.cc	Fri Aug 19 03:03:14 2016 +0200
+++ b/libinterp/octave-value/ov-java.cc	Fri Aug 19 03:44:51 2016 +0200
@@ -134,17 +134,17 @@
 jstring_to_string (JNIEnv* jni_env, jobject obj);
 
 static octave_value
-box (JNIEnv* jni_env, void *jobj, void *jcls_arg = 0);
+java2octType (JNIEnv* jni_env, void *jobj, void *jcls_arg = 0);
 
 static octave_value
-box_more (JNIEnv* jni_env, void *jobj_arg, void *jcls_arg = 0);
+java2octType_more (JNIEnv* jni_env, void *jobj_arg, void *jcls_arg = 0);
 
 static void
-unbox (JNIEnv* jni_env, const octave_value& val, jobject_ref& jobj,
+oct2javaType (JNIEnv* jni_env, const octave_value& val, jobject_ref& jobj,
        jclass_ref& jcls);
 
 static void
-unbox (JNIEnv* jni_env, const octave_value_list& args,
+oct2javaType (JNIEnv* jni_env, const octave_value_list& args,
        jobjectArray_ref& jobjs, jobjectArray_ref& jclss);
 
 extern "C"
@@ -973,7 +973,7 @@
     (helperClass, mID, jobj, jobject (java_idx));
 
   if (resObj)
-    retval = box (jni_env, resObj);
+    retval = java2octType (jni_env, resObj);
   else
     retval = check_exception (jni_env);
 
@@ -993,7 +993,7 @@
   jobject_ref rhsObj (jni_env);
   jobject_ref java_idx (jni_env, make_java_index (jni_env, idx));
 
-  unbox (jni_env, rhs, rhsObj, rhsCls);
+  oct2javaType (jni_env, rhs, rhsObj, rhsCls);
   jclass_ref helperClass (jni_env,
                           find_octave_class (jni_env,
                                              "org/octave/ClassHelper"));
@@ -1004,7 +1004,7 @@
     (helperClass, mID, jobj, jobject (java_idx), jobject (rhsObj));
 
   if (resObj)
-    retval = box (jni_env, resObj);
+    retval = java2octType (jni_env, resObj);
   else
     retval = check_exception (jni_env);
 
@@ -1187,7 +1187,7 @@
 //!   @arg Octave object if @c jobj_arg is of type @c org.octave.OctaveReference
 //!   @arg @c octave_java object wrapping the Java object otherwise
 static octave_value
-box (JNIEnv *jni_env, void *jobj_arg, void *jcls_arg)
+java2octType (JNIEnv *jni_env, void *jobj_arg, void *jcls_arg)
 {
   octave_value retval;
 
@@ -1383,12 +1383,12 @@
 }
 
 static octave_value
-box_more (JNIEnv *jni_env, void *jobj_arg, void *jcls_arg)
+java2octType_more (JNIEnv *jni_env, void *jobj_arg, void *jcls_arg)
 {
   jobject jobj = TO_JOBJECT (jobj_arg);
   jclass jcls = TO_JCLASS (jcls_arg);
 
-  octave_value retval = box (jni_env, jobj, jcls);
+  octave_value retval = java2octType (jni_env, jobj, jcls);
 
   if (retval.is_java ())
     {
@@ -1534,7 +1534,7 @@
 //!    the class of the according object @c jobj. 
 // conversion from octave to java 
 static void
-unbox (JNIEnv *jni_env, const octave_value& val, jobject_ref& jobj,
+oct2javaType (JNIEnv *jni_env, const octave_value& val, jobject_ref& jobj,
        jclass_ref& jcls)
 {
   if (val.is_java ())
@@ -1830,7 +1830,7 @@
 }
 
 static void
-unbox (JNIEnv *jni_env, const octave_value_list& args,
+oct2javaType (JNIEnv *jni_env, const octave_value_list& args,
        jobjectArray_ref& jobjs, jobjectArray_ref& jclss)
 {
   jclass_ref ocls (jni_env, jni_env->FindClass ("java/lang/Object"));
@@ -1846,7 +1846,7 @@
     {
       jobject_ref jobj (jni_env);
       jclass_ref  jcls (jni_env);
-      unbox (jni_env, args(i), jobj, jcls);
+      oct2javaType (jni_env, args(i), jobj, jcls);
 
       jni_env->SetObjectArrayElement (jobjs, i, jobj);
       jni_env->SetObjectArrayElement (jclss, i, jcls);
@@ -1935,7 +1935,7 @@
   octave_value_list varargin, varargout;
 
   for (int i = 0; i < nargin; i++)
-    varargin(i) = box (env, env->GetObjectArrayElement (argin, i), 0);
+    varargin(i) = java2octType (env, env->GetObjectArrayElement (argin, i), 0);
 
   // this is the core of this method 
   varargout = feval (fname, varargin, nargout);
@@ -1944,9 +1944,9 @@
   jobjectArray_ref out_objs (env, argout), out_clss (env);
   out_objs.detach ();
 
-  // unbox (JNIEnv *env, const octave_value_list , // input
+  // oct2javaType (JNIEnv *env, const octave_value_list , // input
   //        jobjectArray_ref&, jobjectArray_ref)   // output 
-  unbox (env, varargout, out_objs, out_clss);
+  oct2javaType (env, varargout, out_objs, out_clss);
 }
 
 JNIEXPORT void JNICALL
@@ -1970,7 +1970,7 @@
       for (int i = 0; i < len; i++)
         {
           jobject_ref jobj (env, env->GetObjectArrayElement (args, i));
-          oct_args(i) = box (env, jobj, 0);
+          oct_args(i) = java2octType (env, jobj, 0);
         }
 
       BEGIN_INTERRUPT_WITH_EXCEPTIONS;
@@ -2359,7 +2359,7 @@
   if (jni_env)
     {
       jobjectArray_ref arg_objs (jni_env), arg_types (jni_env);
-      unbox (jni_env, args, arg_objs, arg_types);
+      oct2javaType (jni_env, args, arg_objs, arg_types);
       jclass_ref helperClass (jni_env, 
                               find_octave_class (jni_env, 
                                                  "org/octave/ClassHelper"));
@@ -2379,7 +2379,7 @@
                                  jobjectArray (arg_objs), 
                                  jobjectArray (arg_types))));
       if (resObj)
-        retval = box (jni_env, resObj);
+        retval = java2octType (jni_env, resObj);
       else
         retval = check_exception (jni_env);
 
@@ -2437,7 +2437,7 @@
   if (jni_env)
     {
       jobjectArray_ref arg_objs (jni_env), arg_types (jni_env);
-      unbox (jni_env, args, arg_objs, arg_types);
+      oct2javaType (jni_env, args, arg_objs, arg_types);
       jclass_ref helperClass (jni_env, 
                               find_octave_class (jni_env, 
                                                  "org/octave/ClassHelper"));
@@ -2452,7 +2452,7 @@
                            jstring (clsName), jstring (methName),
                            jobjectArray (arg_objs), jobjectArray (arg_types)));
       if (resObj)
-        retval = box (jni_env, resObj);
+        retval = java2octType (jni_env, resObj);
       else
         retval = check_exception (jni_env);
 
@@ -2513,7 +2513,7 @@
   if (jni_env)
     {
       jobjectArray_ref arg_objs (jni_env), arg_types (jni_env);
-      unbox (jni_env, args, arg_objs, arg_types);
+      oct2javaType (jni_env, args, arg_objs, arg_types);
       jclass_ref helperClass (jni_env, find_octave_class 
                               (jni_env, "org/octave/ClassHelper"));
       jmethodID mID = jni_env->GetStaticMethodID 
@@ -2588,7 +2588,7 @@
           to_java (), jstring (fName)));
 
       if (resObj)
-        retval = box (jni_env, resObj);
+        retval = java2octType (jni_env, resObj);
       else
         retval = check_exception (jni_env);
 
@@ -2649,7 +2649,7 @@
       jobject_ref resObj (jni_env, jni_env->CallStaticObjectMethod (helperClass, mID,
           jstring (cName), jstring (fName)));
       if (resObj)
-        retval = box (jni_env, resObj);
+        retval = java2octType (jni_env, resObj);
       else
         retval = check_exception (jni_env);
 
@@ -2706,7 +2706,7 @@
     {
       jobject_ref jobj (jni_env);
       jclass_ref jcls (jni_env);
-      unbox (jni_env, val, jobj, jcls);
+      oct2javaType (jni_env, val, jobj, jcls);
       jclass_ref helperClass (jni_env, 
                               find_octave_class (jni_env, 
                                                  "org/octave/ClassHelper"));
@@ -2771,7 +2771,7 @@
     {
       jobject_ref jobj (jni_env);
       jclass_ref jcls (jni_env);
-      unbox (jni_env, val, jobj, jcls);
+      oct2javaType (jni_env, val, jobj, jcls);
       jclass_ref helperClass (jni_env, find_octave_class 
                               (jni_env, "org/octave/ClassHelper"));
       jmethodID mID = jni_env->GetStaticMethodID 
@@ -3219,7 +3219,7 @@
   if (args(0).is_java ())
     {
       octave_java *jobj = TO_JAVA (args(0));
-      retval = ovl (box_more (current_env, jobj->to_java (), 0));
+      retval = ovl (java2octType_more (current_env, jobj->to_java (), 0));
     }
   else
     retval = ovl (args(0));
