---input---
/* -----------------------------------------------------------------------------
 * java.swg
 *
 * Java typemaps
 * ----------------------------------------------------------------------------- */

%include <javahead.swg>

/* The jni, jtype and jstype typemaps work together and so there should be one of each. 
 * The jni typemap contains the JNI type used in the JNI (C/C++) code. 
 * The jtype typemap contains the Java type used in the JNI intermediary class. 
 * The jstype typemap contains the Java type used in the Java proxy classes, type wrapper classes and module class. */

/* Fragments */
%fragment("SWIG_PackData", "header") {
/* Pack binary data into a string */
SWIGINTERN char * SWIG_PackData(char *c, void *ptr, size_t sz) {
  static const char hex[17] = "0123456789abcdef";
  register const unsigned char *u = (unsigned char *) ptr;
  register const unsigned char *eu =  u + sz;
  for (; u != eu; ++u) {
    register unsigned char uu = *u;
    *(c++) = hex[(uu & 0xf0) >> 4];
    *(c++) = hex[uu & 0xf];
  }
  return c;
}
}

%fragment("SWIG_UnPackData", "header") {
/* Unpack binary data from a string */
SWIGINTERN const char * SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
  register unsigned char *u = (unsigned char *) ptr;
  register const unsigned char *eu = u + sz;
  for (; u != eu; ++u) {
    register char d = *(c++);
    register unsigned char uu;
    if ((d >= '0') && (d <= '9'))
      uu = ((d - '0') << 4);
    else if ((d >= 'a') && (d <= 'f'))
      uu = ((d - ('a'-10)) << 4);
    else 
      return (char *) 0;
    d = *(c++);
    if ((d >= '0') && (d <= '9'))
      uu |= (d - '0');
    else if ((d >= 'a') && (d <= 'f'))
      uu |= (d - ('a'-10));
    else 
      return (char *) 0;
    *u = uu;
  }
  return c;
}
}

/* Primitive types */
%typemap(jni) bool,               const bool &               "jboolean"
%typemap(jni) char,               const char &               "jchar"
%typemap(jni) signed char,        const signed char &        "jbyte"
%typemap(jni) unsigned char,      const unsigned char &      "jshort"
%typemap(jni) short,              const short &              "jshort"
%typemap(jni) unsigned short,     const unsigned short &     "jint"
%typemap(jni) int,                const int &                "jint"
%typemap(jni) unsigned int,       const unsigned int &       "jlong"
%typemap(jni) long,               const long &               "jint"
%typemap(jni) unsigned long,      const unsigned long &      "jlong"
%typemap(jni) long long,          const long long &          "jlong"
%typemap(jni) unsigned long long, const unsigned long long & "jobject"
%typemap(jni) float,              const float &              "jfloat"
%typemap(jni) double,             const double &             "jdouble"
%typemap(jni) void                                           "void"

%typemap(jtype) bool,               const bool &               "boolean"
%typemap(jtype) char,               const char &               "char"
%typemap(jtype) signed char,        const signed char &        "byte"
%typemap(jtype) unsigned char,      const unsigned char &      "short"
%typemap(jtype) short,              const short &              "short"
%typemap(jtype) unsigned short,     const unsigned short &     "int"
%typemap(jtype) int,                const int &                "int"
%typemap(jtype) unsigned int,       const unsigned int &       "long"
%typemap(jtype) long,               const long &               "int"
%typemap(jtype) unsigned long,      const unsigned long &      "long"
%typemap(jtype) long long,          const long long &          "long"
%typemap(jtype) unsigned long long, const unsigned long long & "java.math.BigInteger"
%typemap(jtype) float,              const float &              "float"
%typemap(jtype) double,             const double &             "double"
%typemap(jtype) void                                           "void"

%typemap(jstype) bool,               const bool &               "boolean"
%typemap(jstype) char,               const char &               "char"
%typemap(jstype) signed char,        const signed char &        "byte"
%typemap(jstype) unsigned char,      const unsigned char &      "short"
%typemap(jstype) short,              const short &              "short"
%typemap(jstype) unsigned short,     const unsigned short &     "int"
%typemap(jstype) int,                const int &                "int"
%typemap(jstype) unsigned int,       const unsigned int &       "long"
%typemap(jstype) long,               const long &               "int"
%typemap(jstype) unsigned long,      const unsigned long &      "long"
%typemap(jstype) long long,          const long long &          "long"
%typemap(jstype) unsigned long long, const unsigned long long & "java.math.BigInteger"
%typemap(jstype) float,              const float &              "float"
%typemap(jstype) double,             const double &             "double"
%typemap(jstype) void                                           "void"

%typemap(jni) char *, char *&, char[ANY], char[]               "jstring"
%typemap(jtype) char *, char *&, char[ANY], char[]               "String"
%typemap(jstype) char *, char *&, char[ANY], char[]               "String"

/* JNI types */
%typemap(jni) jboolean      "jboolean"
%typemap(jni) jchar         "jchar"
%typemap(jni) jbyte         "jbyte"
%typemap(jni) jshort        "jshort"
%typemap(jni) jint          "jint"
%typemap(jni) jlong         "jlong"
%typemap(jni) jfloat        "jfloat"
%typemap(jni) jdouble       "jdouble"
%typemap(jni) jstring       "jstring"
%typemap(jni) jobject       "jobject"
%typemap(jni) jbooleanArray "jbooleanArray"
%typemap(jni) jcharArray    "jcharArray"
%typemap(jni) jbyteArray    "jbyteArray"
%typemap(jni) jshortArray   "jshortArray"
%typemap(jni) jintArray     "jintArray"
%typemap(jni) jlongArray    "jlongArray"
%typemap(jni) jfloatArray   "jfloatArray"
%typemap(jni) jdoubleArray  "jdoubleArray"
%typemap(jni) jobjectArray  "jobjectArray"

%typemap(jtype) jboolean      "boolean"
%typemap(jtype) jchar         "char"
%typemap(jtype) jbyte         "byte"
%typemap(jtype) jshort        "short"
%typemap(jtype) jint          "int"
%typemap(jtype) jlong         "long"
%typemap(jtype) jfloat        "float"
%typemap(jtype) jdouble       "double"
%typemap(jtype) jstring       "String"
%typemap(jtype) jobject       "Object"
%typemap(jtype) jbooleanArray "boolean[]"
%typemap(jtype) jcharArray    "char[]"
%typemap(jtype) jbyteArray    "byte[]"
%typemap(jtype) jshortArray   "short[]"
%typemap(jtype) jintArray     "int[]"
%typemap(jtype) jlongArray    "long[]"
%typemap(jtype) jfloatArray   "float[]"
%typemap(jtype) jdoubleArray  "double[]"
%typemap(jtype) jobjectArray  "Object[]"

%typemap(jstype) jboolean      "boolean"
%typemap(jstype) jchar         "char"
%typemap(jstype) jbyte         "byte"
%typemap(jstype) jshort        "short"
%typemap(jstype) jint          "int"
%typemap(jstype) jlong         "long"
%typemap(jstype) jfloat        "float"
%typemap(jstype) jdouble       "double"
%typemap(jstype) jstring       "String"
%typemap(jstype) jobject       "Object"
%typemap(jstype) jbooleanArray "boolean[]"
%typemap(jstype) jcharArray    "char[]"
%typemap(jstype) jbyteArray    "byte[]"
%typemap(jstype) jshortArray   "short[]"
%typemap(jstype) jintArray     "int[]"
%typemap(jstype) jlongArray    "long[]"
%typemap(jstype) jfloatArray   "float[]"
%typemap(jstype) jdoubleArray  "double[]"
%typemap(jstype) jobjectArray  "Object[]"

/* Non primitive types */
%typemap(jni) SWIGTYPE "jlong"
%typemap(jtype) SWIGTYPE "long"
%typemap(jstype) SWIGTYPE "$&javaclassname"

%typemap(jni) SWIGTYPE [] "jlong"
%typemap(jtype) SWIGTYPE [] "long"
%typemap(jstype) SWIGTYPE [] "$javaclassname"

%typemap(jni) SWIGTYPE * "jlong"
%typemap(jtype) SWIGTYPE * "long"
%typemap(jstype) SWIGTYPE * "$javaclassname"

%typemap(jni) SWIGTYPE & "jlong"
%typemap(jtype) SWIGTYPE & "long"
%typemap(jstype) SWIGTYPE & "$javaclassname"

/* pointer to a class member */
%typemap(jni) SWIGTYPE (CLASS::*) "jstring"
%typemap(jtype) SWIGTYPE (CLASS::*) "String"
%typemap(jstype) SWIGTYPE (CLASS::*) "$javaclassname"

/* The following are the in, out, freearg, argout typemaps. These are the JNI code generating typemaps for converting from Java to C and visa versa. */

/* primitive types */
%typemap(in) bool
%{ $1 = $input ? true : false; %}

%typemap(directorout) bool
%{ $result = $input ? true : false; %}

%typemap(javadirectorin) bool "$jniinput"
%typemap(javadirectorout) bool "$javacall"

%typemap(in) char, 
             signed char, 
             unsigned char, 
             short, 
             unsigned short, 
             int, 
             unsigned int, 
             long, 
             unsigned long, 
             long long, 
             float, 
             double
%{ $1 = ($1_ltype)$input; %}

%typemap(directorout) char, 
             signed char, 
             unsigned char, 
             short, 
             unsigned short, 
             int, 
             unsigned int, 
             long, 
             unsigned long, 
             long long, 
             float, 
             double
%{ $result = ($1_ltype)$input; %}

%typemap(directorin, descriptor="Z") bool             "$input = (jboolean) $1;"
%typemap(directorin, descriptor="C") char             "$input = (jint) $1;"
%typemap(directorin, descriptor="B") signed char      "$input = (jbyte) $1;"
%typemap(directorin, descriptor="S") unsigned char    "$input = (jshort) $1;"
%typemap(directorin, descriptor="S") short            "$input = (jshort) $1;"
%typemap(directorin, descriptor="I") unsigned short   "$input = (jint) $1;"
%typemap(directorin, descriptor="I") int              "$input = (jint) $1;"
%typemap(directorin, descriptor="J") unsigned int     "$input = (jlong) $1;"
%typemap(directorin, descriptor="I") long             "$input = (jint) $1;"
%typemap(directorin, descriptor="J") unsigned long    "$input = (jlong) $1;"
%typemap(directorin, descriptor="J") long long        "$input = (jlong) $1;"
%typemap(directorin, descriptor="F") float            "$input = (jfloat) $1;"
%typemap(directorin, descriptor="D") double           "$input = (jdouble) $1;"

%typemap(javadirectorin) char, 
                         signed char, 
                         unsigned char, 
                         short, 
                         unsigned short, 
                         int, 
                         unsigned int, 
                         long, 
                         unsigned long, 
                         long long, 
                         float, 
                         double
  "$jniinput"

%typemap(javadirectorout) char, 
                          signed char, 
                          unsigned char, 
                          short, 
                          unsigned short, 
                          int, 
                          unsigned int, 
                          long, 
                          unsigned long, 
                          long long, 
                          float, 
                          double
  "$javacall"

%typemap(out) bool           %{ $result = (jboolean)$1; %}
%typemap(out) char           %{ $result = (jchar)$1; %}
%typemap(out) signed char    %{ $result = (jbyte)$1; %}
%typemap(out) unsigned char  %{ $result = (jshort)$1; %}
%typemap(out) short          %{ $result = (jshort)$1; %}
%typemap(out) unsigned short %{ $result = (jint)$1; %}
%typemap(out) int            %{ $result = (jint)$1; %}
%typemap(out) unsigned int   %{ $result = (jlong)$1; %}
%typemap(out) long           %{ $result = (jint)$1; %}
%typemap(out) unsigned long  %{ $result = (jlong)$1; %}
%typemap(out) long long      %{ $result = (jlong)$1; %}
%typemap(out) float          %{ $result = (jfloat)$1; %}
%typemap(out) double         %{ $result = (jdouble)$1; %}

/* unsigned long long */
/* Convert from BigInteger using the toByteArray member function */
%typemap(in) unsigned long long { 
  jclass clazz;
  jmethodID mid;
  jbyteArray ba;
  jbyte* bae;
  jsize sz;
  int i;

  if (!$input) {
    SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "BigInteger null");
    return $null;
  }
  clazz = JCALL1(GetObjectClass, jenv, $input);
  mid = JCALL3(GetMethodID, jenv, clazz, "toByteArray", "()[B");
  ba = (jbyteArray)JCALL2(CallObjectMethod, jenv, $input, mid);
  bae = JCALL2(GetByteArrayElements, jenv, ba, 0);
  sz = JCALL1(GetArrayLength, jenv, ba);
  $1 = 0;
  for(i=0; i<sz; i++) {
    $1 = ($1 << 8) | ($1_type)(unsigned char)bae[i];
  }
  JCALL3(ReleaseByteArrayElements, jenv, ba, bae, 0);
}

%typemap(directorout) unsigned long long { 
  jclass clazz;
  jmethodID mid;
  jbyteArray ba;
  jbyte* bae;
  jsize sz;
  int i;

  if (!$input) {
    SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "BigInteger null");
    return $null;
  }
  clazz = JCALL1(GetObjectClass, jenv, $input);
  mid = JCALL3(GetMethodID, jenv, clazz, "toByteArray", "()[B");
  ba = (jbyteArray)JCALL2(CallObjectMethod, jenv, $input, mid);
  bae = JCALL2(GetByteArrayElements, jenv, ba, 0);
  sz = JCALL1(GetArrayLength, jenv, ba);
  $result = 0;
  for(i=0; i<sz; i++) {
    $result = ($result << 8) | ($1_type)(unsigned char)bae[i];
  }
  JCALL3(ReleaseByteArrayElements, jenv, ba, bae, 0);
}


/* Convert to BigInteger - byte array holds number in 2's complement big endian format */
%typemap(out) unsigned long long { 
  jbyteArray ba = JCALL1(NewByteArray, jenv, 9);
  jbyte* bae = JCALL2(GetByteArrayElements, jenv, ba, 0);
  jclass clazz = JCALL1(FindClass, jenv, "java/math/BigInteger");
  jmethodID mid = JCALL3(GetMethodID, jenv, clazz, "<init>", "([B)V");
  jobject bigint;
  int i;

  bae[0] = 0;
  for(i=1; i<9; i++ ) {
    bae[i] = (jbyte)($1>>8*(8-i));
  }

  JCALL3(ReleaseByteArrayElements, jenv, ba, bae, 0);
  bigint = JCALL3(NewObject, jenv, clazz, mid, ba);
  $result = bigint;
}

/* Convert to BigInteger (see out typemap) */
%typemap(directorin, descriptor="Ljava/math/BigInteger;") unsigned long long, const unsigned long long & {
  jbyteArray ba = JCALL1(NewByteArray, jenv, 9);
  jbyte* bae = JCALL2(GetByteArrayElements, jenv, ba, 0);
  jclass clazz = JCALL1(FindClass, jenv, "java/math/BigInteger");
  jmethodID mid = JCALL3(GetMethodID, jenv, clazz, "<init>", "([B)V");
  jobject bigint;
  int swig_i;

  bae[0] = 0;
  for(swig_i=1; swig_i<9; swig_i++ ) {
    bae[swig_i] = (jbyte)($1>>8*(8-swig_i));
  }

  JCALL3(ReleaseByteArrayElements, jenv, ba, bae, 0);
  bigint = JCALL3(NewObject, jenv, clazz, mid, ba);
  $input = bigint;
}

%typemap(javadirectorin) unsigned long long "$jniinput"
%typemap(javadirectorout) unsigned long long "$javacall"

/* char * - treat as String */
%typemap(in, noblock=1) char * {
 $1 = 0;
  if ($input) {
    $1 = ($1_ltype)JCALL2(GetStringUTFChars, jenv, $input, 0);
    if (!$1) return $null;
  }
}

%typemap(directorout, noblock=1, warning=SWIGWARN_TYPEMAP_DIRECTOROUT_PTR_MSG) char * {
  $1 = 0;
  if ($input) {
    $result = ($1_ltype)JCALL2(GetStringUTFChars, jenv, $input, 0);
    if (!$result) return $null;
  }
}

%typemap(directorin, descriptor="Ljava/lang/String;", noblock=1) char * {
 $input = 0;
  if ($1) {
    $input = JCALL1(NewStringUTF, jenv, (const char *)$1);
    if (!$input) return $null;
  }
}

%typemap(freearg, noblock=1) char * { if ($1) JCALL2(ReleaseStringUTFChars, jenv, $input, (const char *)$1); }
%typemap(out, noblock=1) char * { if ($1) $result = JCALL1(NewStringUTF, jenv, (const char *)$1); }
%typemap(javadirectorin) char * "$jniinput"
%typemap(javadirectorout) char * "$javacall"

/* char *& - treat as String */
%typemap(in, noblock=1) char *& ($*1_ltype temp = 0) {
 $1 = 0;
  if ($input) {
    temp = ($*1_ltype)JCALL2(GetStringUTFChars, jenv, $input, 0);
    if (!temp) return $null;
  }
  $1 = &temp;
}
%typemap(freearg, noblock=1) char *& { if ($1 && *$1) JCALL2(ReleaseStringUTFChars, jenv, $input, (const char *)*$1); }
%typemap(out, noblock=1) char *& { if (*$1) $result = JCALL1(NewStringUTF, jenv, (const char *)*$1); }

%typemap(out) void ""
%typemap(javadirectorin) void "$jniinput"
%typemap(javadirectorout) void "$javacall"
%typemap(directorin, descriptor="V") void ""

/* primitive types by reference */
%typemap(in) const bool & ($*1_ltype temp)
%{ temp = $input ? true : false; 
   $1 = &temp; %}

%typemap(directorout,warning=SWIGWARN_TYPEMAP_THREAD_UNSAFE_MSG) const bool &
%{ static $*1_ltype temp;
   temp = $input ? true : false; 
   $result = &temp; %}

%typemap(javadirectorin) const bool & "$jniinput"
%typemap(javadirectorout) const bool & "$javacall"

%typemap(in) const char & ($*1_ltype temp), 
             const signed char & ($*1_ltype temp), 
             const unsigned char & ($*1_ltype temp), 
             const short & ($*1_ltype temp), 
             const unsigned short & ($*1_ltype temp), 
             const int & ($*1_ltype temp), 
             const unsigned int & ($*1_ltype temp), 
             const long & ($*1_ltype temp), 
             const unsigned long & ($*1_ltype temp), 
             const long long & ($*1_ltype temp), 
             const float & ($*1_ltype temp), 
             const double & ($*1_ltype temp)
%{ temp = ($*1_ltype)$input; 
   $1 = &temp; %}

%typemap(directorout,warning=SWIGWARN_TYPEMAP_THREAD_UNSAFE_MSG) const char &,
             const signed char &,
             const unsigned char &,
             const short &,
             const unsigned short &,
             const int &,
             const unsigned int &,
             const long &,
             const unsigned long &,
             const long long &,
             const float &,
             const double &
%{ static $*1_ltype temp;
   temp = ($*1_ltype)$input; 
   $result = &temp; %}

%typemap(directorin, descriptor="Z") const bool &           "$input = (jboolean)$1;"
%typemap(directorin, descriptor="C") const char &           "$input = (jchar)$1;"
%typemap(directorin, descriptor="B") const signed char &    "$input = (jbyte)$1;"
%typemap(directorin, descriptor="S") const unsigned char &  "$input = (jshort)$1;"
%typemap(directorin, descriptor="S") const short &          "$input = (jshort)$1;"
%typemap(directorin, descriptor="I") const unsigned short & "$input = (jint)$1;"
%typemap(directorin, descriptor="I") const int &            "$input = (jint)$1;"
%typemap(directorin, descriptor="J") const unsigned int &   "$input = (jlong)$1;"
%typemap(directorin, descriptor="I") const long &           "$input = (jint)$1;"
%typemap(directorin, descriptor="J") const unsigned long &  "$input = (jlong)$1;"
%typemap(directorin, descriptor="J") const long long &      "$input = (jlong)$1;"
%typemap(directorin, descriptor="F") const float &          "$input = (jfloat)$1;"
%typemap(directorin, descriptor="D") const double &         "$input = (jdouble)$1;"

%typemap(javadirectorin) const char & ($*1_ltype temp), 
                         const signed char & ($*1_ltype temp), 
                         const unsigned char & ($*1_ltype temp), 
                         const short & ($*1_ltype temp), 
                         const unsigned short & ($*1_ltype temp), 
                         const int & ($*1_ltype temp), 
                         const unsigned int & ($*1_ltype temp), 
                         const long & ($*1_ltype temp), 
                         const unsigned long & ($*1_ltype temp), 
                         const long long & ($*1_ltype temp), 
                         const float & ($*1_ltype temp), 
                         const double & ($*1_ltype temp)
  "$jniinput"

%typemap(javadirectorout) const char & ($*1_ltype temp), 
                          const signed char & ($*1_ltype temp), 
                          const unsigned char & ($*1_ltype temp), 
                          const short & ($*1_ltype temp), 
                          const unsigned short & ($*1_ltype temp), 
                          const int & ($*1_ltype temp), 
                          const unsigned int & ($*1_ltype temp), 
                          const long & ($*1_ltype temp), 
                          const unsigned long & ($*1_ltype temp), 
                          const long long & ($*1_ltype temp), 
                          const float & ($*1_ltype temp), 
                          const double & ($*1_ltype temp)
  "$javacall"


%typemap(out) const bool &           %{ $result = (jboolean)*$1; %}
%typemap(out) const char &           %{ $result = (jchar)*$1; %}
%typemap(out) const signed char &    %{ $result = (jbyte)*$1; %}
%typemap(out) const unsigned char &  %{ $result = (jshort)*$1; %}
%typemap(out) const short &          %{ $result = (jshort)*$1; %}
%typemap(out) const unsigned short & %{ $result = (jint)*$1; %}
%typemap(out) const int &            %{ $result = (jint)*$1; %}
%typemap(out) const unsigned int &   %{ $result = (jlong)*$1; %}
%typemap(out) const long &           %{ $result = (jint)*$1; %}
%typemap(out) const unsigned long &  %{ $result = (jlong)*$1; %}
%typemap(out) const long long &      %{ $result = (jlong)*$1; %}
%typemap(out) const float &          %{ $result = (jfloat)*$1; %}
%typemap(out) const double &         %{ $result = (jdouble)*$1; %}

/* const unsigned long long & */
/* Similar to unsigned long long */
%typemap(in) const unsigned long long & ($*1_ltype temp) { 
  jclass clazz;
  jmethodID mid;
  jbyteArray ba;
  jbyte* bae;
  jsize sz;
  int i;

  if (!$input) {
    SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "BigInteger null");
    return $null;
  }
  clazz = JCALL1(GetObjectClass, jenv, $input);
  mid = JCALL3(GetMethodID, jenv, clazz, "toByteArray", "()[B");
  ba = (jbyteArray)JCALL2(CallObjectMethod, jenv, $input, mid);
  bae = JCALL2(GetByteArrayElements, jenv, ba, 0);
  sz = JCALL1(GetArrayLength, jenv, ba);
  $1 = &temp;
  temp = 0;
  for(i=0; i<sz; i++) {
    temp = (temp << 8) | ($*1_ltype)(unsigned char)bae[i];
  }
  JCALL3(ReleaseByteArrayElements, jenv, ba, bae, 0);
}

%typemap(directorout,warning=SWIGWARN_TYPEMAP_THREAD_UNSAFE_MSG) const unsigned long long & { 
  static $*1_ltype temp;
  jclass clazz;
  jmethodID mid;
  jbyteArray ba;
  jbyte* bae;
  jsize sz;
  int i;

  if (!$input) {
    SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "BigInteger null");
    return $null;
  }
  clazz = JCALL1(GetObjectClass, jenv, $input);
  mid = JCALL3(GetMethodID, jenv, clazz, "toByteArray", "()[B");
  ba = (jbyteArray)JCALL2(CallObjectMethod, jenv, $input, mid);
  bae = JCALL2(GetByteArrayElements, jenv, ba, 0);
  sz = JCALL1(GetArrayLength, jenv, ba);
  $result = &temp;
  temp = 0;
  for(i=0; i<sz; i++) {
    temp = (temp << 8) | ($*1_ltype)(unsigned char)bae[i];
  }
  JCALL3(ReleaseByteArrayElements, jenv, ba, bae, 0);
}

%typemap(out) const unsigned long long & { 
  jbyteArray ba = JCALL1(NewByteArray, jenv, 9);
  jbyte* bae = JCALL2(GetByteArrayElements, jenv, ba, 0);
  jclass clazz = JCALL1(FindClass, jenv, "java/math/BigInteger");
  jmethodID mid = JCALL3(GetMethodID, jenv, clazz, "<init>", "([B)V");
  jobject bigint;
  int i;

  bae[0] = 0;
  for(i=1; i<9; i++ ) {
    bae[i] = (jbyte)(*$1>>8*(8-i));
  }

  JCALL3(ReleaseByteArrayElements, jenv, ba, bae, 0);
  bigint = JCALL3(NewObject, jenv, clazz, mid, ba);
  $result = bigint;
}

%typemap(javadirectorin) const unsigned long long & "$jniinput"
%typemap(javadirectorout) const unsigned long long & "$javacall"

/* Default handling. Object passed by value. Convert to a pointer */
%typemap(in) SWIGTYPE ($&1_type argp)
%{ argp = *($&1_ltype*)&$input; 
   if (!argp) {
     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "Attempt to dereference null $1_type");
     return $null;
   }
   $1 = *argp; %}

%typemap(directorout) SWIGTYPE ($&1_type argp)
%{ argp = *($&1_ltype*)&$input; 
   if (!argp) {
     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "Unexpected null return for type $1_type");
     return $null;
   }
   $result = *argp; %}

%typemap(out) SWIGTYPE 
#ifdef __cplusplus
%{ *($&1_ltype*)&$result = new $1_ltype((const $1_ltype &)$1); %}
#else
{
  $&1_ltype $1ptr = ($&1_ltype) malloc(sizeof($1_ltype));
  memmove($1ptr, &$1, sizeof($1_type));
  *($&1_ltype*)&$result = $1ptr;
}
#endif

%typemap(directorin,descriptor="L$packagepath/$&javaclassname;") SWIGTYPE 
%{ $input = 0;
   *(($&1_ltype*)&$input) = &$1; %}
%typemap(javadirectorin) SWIGTYPE "new $&javaclassname($jniinput, false)"
%typemap(javadirectorout) SWIGTYPE "$&javaclassname.getCPtr($javacall)"

/* Generic pointers and references */
%typemap(in) SWIGTYPE * %{ $1 = *($&1_ltype)&$input; %}
%typemap(in, fragment="SWIG_UnPackData") SWIGTYPE (CLASS::*) { 
  const char *temp = 0;
  if ($input) {
    temp = JCALL2(GetStringUTFChars, jenv, $input, 0);
    if (!temp) return $null;
  }
  SWIG_UnpackData(temp, (void *)&$1, sizeof($1));
}
%typemap(in) SWIGTYPE & %{ $1 = *($&1_ltype)&$input;
  if (!$1) {
    SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "$1_type reference is null");
    return $null;
  } %}
%typemap(out) SWIGTYPE *
%{ *($&1_ltype)&$result = $1; %} 
%typemap(out, fragment="SWIG_PackData", noblock=1) SWIGTYPE (CLASS::*) {
  char buf[128];
  char *data = SWIG_PackData(buf, (void *)&$1, sizeof($1));
  *data = '\0';
  $result = JCALL1(NewStringUTF, jenv, buf);
}
%typemap(out) SWIGTYPE &
%{ *($&1_ltype)&$result = $1; %} 

%typemap(directorout, warning=SWIGWARN_TYPEMAP_DIRECTOROUT_PTR_MSG) SWIGTYPE *
%{ $result = *($&1_ltype)&$input; %}
%typemap(directorout, warning=SWIGWARN_TYPEMAP_DIRECTOROUT_PTR_MSG) SWIGTYPE (CLASS::*)
%{ $result = *($&1_ltype)&$input; %}

%typemap(directorin,descriptor="L$packagepath/$javaclassname;") SWIGTYPE *
%{ *(($&1_ltype)&$input) = ($1_ltype) $1; %}
%typemap(directorin,descriptor="L$packagepath/$javaclassname;") SWIGTYPE (CLASS::*)
%{ *(($&1_ltype)&$input) = ($1_ltype) $1; %}

%typemap(directorout, warning=SWIGWARN_TYPEMAP_DIRECTOROUT_PTR_MSG) SWIGTYPE &
%{ if (!$input) {
     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "Unexpected null return for type $1_type");
     return $null;
   }
   $result = *($&1_ltype)&$input; %}
%typemap(directorin,descriptor="L$packagepath/$javaclassname;") SWIGTYPE &
%{ *($&1_ltype)&$input = ($1_ltype) &$1; %}

%typemap(javadirectorin) SWIGTYPE *, SWIGTYPE (CLASS::*) "($jniinput == 0) ? null : new $javaclassname($jniinput, false)"
%typemap(javadirectorin) SWIGTYPE & "new $javaclassname($jniinput, false)"
%typemap(javadirectorout) SWIGTYPE *, SWIGTYPE (CLASS::*), SWIGTYPE & "$javaclassname.getCPtr($javacall)"

/* Default array handling */
%typemap(in) SWIGTYPE [] %{ $1 = *($&1_ltype)&$input; %}
%typemap(out) SWIGTYPE [] %{ *($&1_ltype)&$result = $1; %} 
%typemap(freearg) SWIGTYPE [ANY], SWIGTYPE [] ""

/* char arrays - treat as String */
%typemap(in, noblock=1) char[ANY], char[] {
  $1 = 0;
  if ($input) {
    $1 = ($1_ltype)JCALL2(GetStringUTFChars, jenv, $input, 0);
    if (!$1) return $null;
  }
}

%typemap(directorout, noblock=1) char[ANY], char[] {
  $1 = 0;
  if ($input) {
    $result = ($1_ltype)JCALL2(GetStringUTFChars, jenv, $input, 0);
    if (!$result) return $null;
  }
}

%typemap(directorin, descriptor="Ljava/lang/String;", noblock=1) char[ANY], char[] {
  $input = 0;
  if ($1) {
    $input = JCALL1(NewStringUTF, jenv, (const char *)$1);
    if (!$input) return $null;
  }
}

%typemap(argout) char[ANY], char[] ""
%typemap(freearg, noblock=1) char[ANY], char[] { if ($1) JCALL2(ReleaseStringUTFChars, jenv, $input, (const char *)$1); }
%typemap(out, noblock=1) char[ANY], char[] { if ($1) $result = JCALL1(NewStringUTF, jenv, (const char *)$1); }
%typemap(javadirectorin) char[ANY], char[] "$jniinput"
%typemap(javadirectorout) char[ANY], char[] "$javacall"

/* JNI types */
%typemap(in) jboolean,
             jchar,
             jbyte,
             jshort,
             jint,
             jlong,
             jfloat,
             jdouble,
             jstring,
             jobject,
             jbooleanArray,
             jcharArray,
             jbyteArray,
             jshortArray,
             jintArray,
             jlongArray,
             jfloatArray,
             jdoubleArray,
             jobjectArray
%{ $1 = $input; %}

%typemap(directorout) jboolean,
             jchar,
             jbyte,
             jshort,
             jint,
             jlong,
             jfloat,
             jdouble,
             jstring,
             jobject,
             jbooleanArray,
             jcharArray,
             jbyteArray,
             jshortArray,
             jintArray,
             jlongArray,
             jfloatArray,
             jdoubleArray,
             jobjectArray
%{ $result = $input; %}

%typemap(out) jboolean,
              jchar,
              jbyte,
              jshort,
              jint,
              jlong,
              jfloat,
              jdouble,
              jstring,
              jobject,
              jbooleanArray,
              jcharArray,
              jbyteArray,
              jshortArray,
              jintArray,
              jlongArray,
              jfloatArray,
              jdoubleArray,
              jobjectArray
%{ $result = $1; %}

%typemap(directorin,descriptor="Z")  jboolean       "$input = $1;"
%typemap(directorin,descriptor="C")  jchar          "$input = $1;"
%typemap(directorin,descriptor="B")  jbyte          "$input = $1;"
%typemap(directorin,descriptor="S")  jshort         "$input = $1;"
%typemap(directorin,descriptor="I")  jint           "$input = $1;"
%typemap(directorin,descriptor="J")  jlong          "$input = $1;"
%typemap(directorin,descriptor="F")  jfloat         "$input = $1;"
%typemap(directorin,descriptor="D")  jdouble        "$input = $1;"
%typemap(directorin,descriptor="Ljava/lang/String;")            jstring        "$input = $1;"
%typemap(directorin,descriptor="Ljava/lang/Object;",nouse="1")  jobject        "$input = $1;"
%typemap(directorin,descriptor="[Z")  jbooleanArray "$input = $1;"
%typemap(directorin,descriptor="[C")  jcharArray    "$input = $1;"
%typemap(directorin,descriptor="[B")  jbyteArray    "$input = $1;"
%typemap(directorin,descriptor="[S")  jshortArray   "$input = $1;"
%typemap(directorin,descriptor="[I")  jintArray     "$input = $1;"
%typemap(directorin,descriptor="[J")  jlongArray    "$input = $1;"
%typemap(directorin,descriptor="[F")  jfloatArray   "$input = $1;"
%typemap(directorin,descriptor="[D")  jdoubleArray  "$input = $1;"
%typemap(directorin,descriptor="[Ljava/lang/Object;",nouse="1") jobjectArray   "$input = $1;"

%typemap(javadirectorin) jboolean,
                         jchar,
                         jbyte,
                         jshort,
                         jint,
                         jlong,
                         jfloat,
                         jdouble,
                         jstring,
                         jobject,
                         jbooleanArray,
                         jcharArray,
                         jbyteArray,
                         jshortArray,
                         jintArray,
                         jlongArray,
                         jfloatArray,
                         jdoubleArray,
                         jobjectArray
  "$jniinput"

%typemap(javadirectorout) jboolean,
                          jchar,
                          jbyte,
                          jshort,
                          jint,
                          jlong,
                          jfloat,
                          jdouble,
                          jstring,
                          jobject,
                          jbooleanArray,
                          jcharArray,
                          jbyteArray,
                          jshortArray,
                          jintArray,
                          jlongArray,
                          jfloatArray,
                          jdoubleArray,
                          jobjectArray
  "$javacall"

/* Typecheck typemaps - The purpose of these is merely to issue a warning for overloaded C++ functions 
 * that cannot be overloaded in Java as more than one C++ type maps to a single Java type */

%typecheck(SWIG_TYPECHECK_BOOL) /* Java boolean */
    jboolean,
    bool,
    const bool &
    ""

%typecheck(SWIG_TYPECHECK_CHAR) /* Java char */
    jchar,
    char, 
    const char &
    ""

%typecheck(SWIG_TYPECHECK_INT8) /* Java byte */
    jbyte,
    signed char,
    const signed char &
    ""

%typecheck(SWIG_TYPECHECK_INT16) /* Java short */
    jshort,
    unsigned char, 
    short, 
    const unsigned char &, 
    const short &
    ""

%typecheck(SWIG_TYPECHECK_INT32) /* Java int */
    jint,
    unsigned short, 
    int, 
    long, 
    const unsigned short &, 
    const int &, 
    const long &
    ""

%typecheck(SWIG_TYPECHECK_INT64) /* Java long */
    jlong,
    unsigned int, 
    unsigned long, 
    long long, 
    const unsigned int &, 
    const unsigned long &, 
    const long long &
    ""

%typecheck(SWIG_TYPECHECK_INT128) /* Java BigInteger */
    unsigned long long,
    const unsigned long long &
    ""

%typecheck(SWIG_TYPECHECK_FLOAT) /* Java float */
    jfloat,
    float,
    const float &
    ""

%typecheck(SWIG_TYPECHECK_DOUBLE) /* Java double */
    jdouble,
    double,
    const double &
    ""

%typecheck(SWIG_TYPECHECK_STRING) /* Java String */
    jstring,
    char *,
    char *&,
    char[ANY],
    char []
    ""

%typecheck(SWIG_TYPECHECK_BOOL_ARRAY) /* Java boolean[] */
    jbooleanArray
    ""

%typecheck(SWIG_TYPECHECK_CHAR_ARRAY) /* Java char[] */
    jcharArray
    ""

%typecheck(SWIG_TYPECHECK_INT8_ARRAY) /* Java byte[] */
    jbyteArray
    ""

%typecheck(SWIG_TYPECHECK_INT16_ARRAY) /* Java short[] */
    jshortArray
    ""

%typecheck(SWIG_TYPECHECK_INT32_ARRAY) /* Java int[] */
    jintArray
    ""

%typecheck(SWIG_TYPECHECK_INT64_ARRAY) /* Java long[] */
    jlongArray
    ""

%typecheck(SWIG_TYPECHECK_FLOAT_ARRAY) /* Java float[] */
    jfloatArray
    ""

%typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY) /* Java double[] */
    jdoubleArray
    ""

%typecheck(SWIG_TYPECHECK_OBJECT_ARRAY) /* Java jobject[] */
    jobjectArray
    ""

%typecheck(SWIG_TYPECHECK_POINTER) /* Default */
    SWIGTYPE, 
    SWIGTYPE *, 
    SWIGTYPE &, 
    SWIGTYPE *const&, 
    SWIGTYPE [],
    SWIGTYPE (CLASS::*)
    ""


/* Exception handling */

%typemap(throws) int, 
                 long, 
                 short, 
                 unsigned int, 
                 unsigned long, 
                 unsigned short
%{ char error_msg[256];
   sprintf(error_msg, "C++ $1_type exception thrown, value: %d", $1);
   SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, error_msg);
   return $null; %}

%typemap(throws) SWIGTYPE, SWIGTYPE &, SWIGTYPE *, SWIGTYPE [], SWIGTYPE [ANY]
%{ (void)$1;
   SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, "C++ $1_type exception thrown");
   return $null; %}

%typemap(throws) char *
%{ SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, $1);
   return $null; %}


/* Typemaps for code generation in proxy classes and Java type wrapper classes */

/* The javain typemap is used for converting function parameter types from the type 
 * used in the proxy, module or type wrapper class to the type used in the JNI class. */
%typemap(javain) bool,               const bool &,
                 char,               const char &,
                 signed char,        const signed char &,
                 unsigned char,      const unsigned char &,
                 short,              const short &,
                 unsigned short,     const unsigned short &,
                 int,                const int &,
                 unsigned int,       const unsigned int &,
                 long,               const long &,
                 unsigned long,      const unsigned long &,
                 long long,          const long long &,
                 unsigned long long, const unsigned long long &,
                 float,              const float &,
                 double,             const double &
    "$javainput"
%typemap(javain) char *, char *&, char[ANY], char[] "$javainput"
%typemap(javain) jboolean,
                 jchar,
                 jbyte,
                 jshort,
                 jint,
                 jlong,
                 jfloat,
                 jdouble,
                 jstring,
                 jobject,
                 jbooleanArray,
                 jcharArray,
                 jbyteArray,
                 jshortArray,
                 jintArray,
                 jlongArray,
                 jfloatArray,
                 jdoubleArray,
                 jobjectArray
    "$javainput"
%typemap(javain) SWIGTYPE "$&javaclassname.getCPtr($javainput)"
%typemap(javain) SWIGTYPE *, SWIGTYPE &, SWIGTYPE [] "$javaclassname.getCPtr($javainput)"
%typemap(javain) SWIGTYPE (CLASS::*) "$javaclassname.getCMemberPtr($javainput)"

/* The javaout typemap is used for converting function return types from the return type
 * used in the JNI class to the type returned by the proxy, module or type wrapper class. */
%typemap(javaout) bool,               const bool &,
                  char,               const char &,
                  signed char,        const signed char &,
                  unsigned char,      const unsigned char &,
                  short,              const short &,
                  unsigned short,     const unsigned short &,
                  int,                const int &,
                  unsigned int,       const unsigned int &,
                  long,               const long &,
                  unsigned long,      const unsigned long &,
                  long long,          const long long &,
                  unsigned long long, const unsigned long long &,
                  float,              const float &,
                  double,             const double & {
    return $jnicall;
  }
%typemap(javaout) char *, char *&, char[ANY], char[] {
    return $jnicall;
  }
%typemap(javaout) jboolean,
                  jchar,
                  jbyte,
                  jshort,
                  jint,
                  jlong,
                  jfloat,
                  jdouble,
                  jstring,
                  jobject,
                  jbooleanArray,
                  jcharArray,
                  jbyteArray,
                  jshortArray,
                  jintArray,
                  jlongArray,
                  jfloatArray,
                  jdoubleArray,
                  jobjectArray {
    return $jnicall;
  }
%typemap(javaout) void {
    $jnicall;
  }
%typemap(javaout) SWIGTYPE {
    return new $&javaclassname($jnicall, true);
  }
%typemap(javaout) SWIGTYPE & {
    return new $javaclassname($jnicall, $owner);
  }
%typemap(javaout) SWIGTYPE *, SWIGTYPE [] {
    long cPtr = $jnicall;
    return (cPtr == 0) ? null : new $javaclassname(cPtr, $owner);
  }
%typemap(javaout) SWIGTYPE (CLASS::*) {
    String cMemberPtr = $jnicall;
    return (cMemberPtr == null) ? null : new $javaclassname(cMemberPtr, $owner);
  }

/* Pointer reference typemaps */
%typemap(jni) SWIGTYPE *const& "jlong"
%typemap(jtype) SWIGTYPE *const& "long"
%typemap(jstype) SWIGTYPE *const& "$*javaclassname"
%typemap(javain) SWIGTYPE *const& "$*javaclassname.getCPtr($javainput)"
%typemap(javaout) SWIGTYPE *const& {
    long cPtr = $jnicall;
    return (cPtr == 0) ? null : new $*javaclassname(cPtr, $owner);
  }
%typemap(in) SWIGTYPE *const& ($*1_ltype temp = 0)
%{ temp = *($1_ltype)&$input;
   $1 = ($1_ltype)&temp; %}
%typemap(out) SWIGTYPE *const&
%{ *($1_ltype)&$result = *$1; %} 

/* Typemaps used for the generation of proxy and type wrapper class code */
%typemap(javabase)             SWIGTYPE, SWIGTYPE *, SWIGTYPE &, SWIGTYPE [], SWIGTYPE (CLASS::*) ""
%typemap(javaclassmodifiers)   SWIGTYPE, SWIGTYPE *, SWIGTYPE &, SWIGTYPE [], SWIGTYPE (CLASS::*) "public class"
%typemap(javacode)             SWIGTYPE, SWIGTYPE *, SWIGTYPE &, SWIGTYPE [], SWIGTYPE (CLASS::*) ""
%typemap(javaimports)          SWIGTYPE, SWIGTYPE *, SWIGTYPE &, SWIGTYPE [], SWIGTYPE (CLASS::*) ""
%typemap(javainterfaces)       SWIGTYPE, SWIGTYPE *, SWIGTYPE &, SWIGTYPE [], SWIGTYPE (CLASS::*) ""

/* javabody typemaps */

%define SWIG_JAVABODY_METHODS(PTRCTOR_VISIBILITY, CPTR_VISIBILITY, TYPE...) SWIG_JAVABODY_PROXY(PTRCTOR_VISIBILITY, CPTR_VISIBILITY, TYPE) %enddef // legacy name

%define SWIG_JAVABODY_PROXY(PTRCTOR_VISIBILITY, CPTR_VISIBILITY, TYPE...)
// Base proxy classes
%typemap(javabody) TYPE %{
  private long swigCPtr;
  protected boolean swigCMemOwn;

  PTRCTOR_VISIBILITY $javaclassname(long cPtr, boolean cMemoryOwn) {
    swigCMemOwn = cMemoryOwn;
    swigCPtr = cPtr;
  }

  CPTR_VISIBILITY static long getCPtr($javaclassname obj) {
    return (obj == null) ? 0 : obj.swigCPtr;
  }
%}

// Derived proxy classes
%typemap(javabody_derived) TYPE %{
  private long swigCPtr;

  PTRCTOR_VISIBILITY $javaclassname(long cPtr, boolean cMemoryOwn) {
    super($imclassname.$javaclazznameSWIGUpcast(cPtr), cMemoryOwn);
    swigCPtr = cPtr;
  }

  CPTR_VISIBILITY static long getCPtr($javaclassname obj) {
    return (obj == null) ? 0 : obj.swigCPtr;
  }
%}
%enddef

%define SWIG_JAVABODY_TYPEWRAPPER(PTRCTOR_VISIBILITY, DEFAULTCTOR_VISIBILITY, CPTR_VISIBILITY, TYPE...)
// Typewrapper classes
%typemap(javabody) TYPE *, TYPE &, TYPE [] %{
  private long swigCPtr;

  PTRCTOR_VISIBILITY $javaclassname(long cPtr, boolean futureUse) {
    swigCPtr = cPtr;
  }

  DEFAULTCTOR_VISIBILITY $javaclassname() {
    swigCPtr = 0;
  }

  CPTR_VISIBILITY static long getCPtr($javaclassname obj) {
    return (obj == null) ? 0 : obj.swigCPtr;
  }
%}

%typemap(javabody) TYPE (CLASS::*) %{
  private String swigCMemberPtr;

  PTRCTOR_VISIBILITY $javaclassname(String cMemberPtr, boolean futureUse) {
    swigCMemberPtr = cMemberPtr;
  }

  DEFAULTCTOR_VISIBILITY $javaclassname() {
    swigCMemberPtr = null;
  }

  CPTR_VISIBILITY static String getCMemberPtr($javaclassname obj) {
    return obj.swigCMemberPtr;
  }
%}
%enddef

/* Set the default javabody typemaps to use protected visibility.
   Use the macros to change to public if using multiple modules. */
SWIG_JAVABODY_PROXY(protected, protected, SWIGTYPE)
SWIG_JAVABODY_TYPEWRAPPER(protected, protected, protected, SWIGTYPE)

%typemap(javafinalize) SWIGTYPE %{
  protected void finalize() {
    delete();
  }
%}

/*
 * Java constructor typemaps:
 *
 * The javaconstruct typemap is inserted when a proxy class's constructor is generated.
 * This typemap allows control over what code is executed in the constructor as
 * well as specifying who owns the underlying C/C++ object. Normally, Java has
 * ownership and the underlying C/C++ object is deallocated when the Java object
 * is finalized (swigCMemOwn is true.) If swigCMemOwn is false, C/C++ is
 * ultimately responsible for deallocating the underlying object's memory.
 *
 * The SWIG_PROXY_CONSTRUCTOR macro defines the javaconstruct typemap for a proxy
 * class for a particular TYPENAME. OWNERSHIP is passed as the value of
 * swigCMemOwn to the pointer constructor method.  WEAKREF determines which kind
 * of Java object reference will be used by the C++ director class (WeakGlobalRef
 * vs. GlobalRef.)
 *
 * The SWIG_DIRECTOR_OWNED macro sets the ownership of director-based proxy
 * classes and the weak reference flag to false, meaning that the underlying C++
 * object will be reclaimed by C++.
 */

%define SWIG_PROXY_CONSTRUCTOR(OWNERSHIP, WEAKREF, TYPENAME...)
%typemap(javaconstruct,directorconnect="\n    $imclassname.$javaclazznamedirector_connect(this, swigCPtr, swigCMemOwn, WEAKREF);") TYPENAME {
    this($imcall, OWNERSHIP);$directorconnect
  }
%enddef

%define SWIG_DIRECTOR_OWNED(TYPENAME...)
SWIG_PROXY_CONSTRUCTOR(true, false, TYPENAME)
%enddef

// Set the default for SWIGTYPE: Java owns the C/C++ object.
SWIG_PROXY_CONSTRUCTOR(true, true, SWIGTYPE)

%typemap(javadestruct, methodname="delete", methodmodifiers="public synchronized") SWIGTYPE {
    if (swigCPtr != 0) {
      if (swigCMemOwn) {
        swigCMemOwn = false;
        $jnicall;
      }
      swigCPtr = 0;
    }
  }

%typemap(javadestruct_derived, methodname="delete", methodmodifiers="public synchronized") SWIGTYPE {
    if (swigCPtr != 0) {
      if (swigCMemOwn) {
        swigCMemOwn = false;
        $jnicall;
      }
      swigCPtr = 0;
    }
    super.delete();
  }

%typemap(directordisconnect, methodname="swigDirectorDisconnect") SWIGTYPE %{
  protected void $methodname() {
    swigCMemOwn = false;
    $jnicall;
  }
%}

%typemap(directorowner_release, methodname="swigReleaseOwnership") SWIGTYPE %{
  public void $methodname() {
    swigCMemOwn = false;
    $jnicall;
  }
%}

%typemap(directorowner_take, methodname="swigTakeOwnership") SWIGTYPE %{
  public void $methodname() {
    swigCMemOwn = true;
    $jnicall;
  }
%}

/* Java specific directives */
#define %javaconst(flag)            %feature("java:const","flag")
#define %javaconstvalue(value)      %feature("java:constvalue",value)
#define %javaenum(wrapapproach)     %feature("java:enum","wrapapproach")
#define %javamethodmodifiers        %feature("java:methodmodifiers")
#define %javaexception(exceptionclasses) %feature("except",throws=exceptionclasses)
#define %nojavaexception            %feature("except","0",throws="")
#define %clearjavaexception         %feature("except","",throws="")

%pragma(java) jniclassclassmodifiers="public class"
%pragma(java) moduleclassmodifiers="public class"

/* Some ANSI C typemaps */

%apply unsigned long { size_t };
%apply const unsigned long & { const size_t & };

/* Array reference typemaps */
%apply SWIGTYPE & { SWIGTYPE ((&)[ANY]) }

/* const pointers */
%apply SWIGTYPE * { SWIGTYPE *const }

/* String & length */
%typemap(jni)     (char *STRING, size_t LENGTH) "jbyteArray"
%typemap(jtype)   (char *STRING, size_t LENGTH) "byte[]"
%typemap(jstype)  (char *STRING, size_t LENGTH) "byte[]"
%typemap(javain)  (char *STRING, size_t LENGTH) "$javainput"
%typemap(freearg) (char *STRING, size_t LENGTH) ""
%typemap(in)      (char *STRING, size_t LENGTH) {
  if ($input) {
    $1 = (char *) JCALL2(GetByteArrayElements, jenv, $input, 0);
    $2 = (size_t) JCALL1(GetArrayLength, jenv, $input);
  } else {
    $1 = 0;
    $2 = 0;
  }
}
%typemap(argout)  (char *STRING, size_t LENGTH) {
  if ($input) JCALL3(ReleaseByteArrayElements, jenv, $input, (jbyte *)$1, 0);
}
%typemap(directorin, descriptor="[B") (char *STRING, size_t LENGTH) {
  jbyteArray jb = (jenv)->NewByteArray($2);
  (jenv)->SetByteArrayRegion(jb, 0, $2, (jbyte *)$1);
  $input = jb;
}
%typemap(directorargout) (char *STRING, size_t LENGTH)
%{(jenv)->GetByteArrayRegion($input, 0, $2, (jbyte *)$1); %}
%apply (char *STRING, size_t LENGTH) { (char *STRING, int LENGTH) }

/* java keywords */
%include <javakw.swg>

// Default enum handling
%include <enumtypesafe.swg>


---tokens---
'/* -----------------------------------------------------------------------------\n * java.swg\n *\n * Java typemaps\n * ----------------------------------------------------------------------------- */' Comment.Multiline
'\n'          Text

'\n'          Text

'%include'    Name.Function
' '           Text
'<'           Operator
'javahead'    Name
'.'           Punctuation
'swg'         Name
'>'           Operator
'\n'          Text

'\n'          Text

'/* The jni, jtype and jstype typemaps work together and so there should be one of each. \n * The jni typemap contains the JNI type used in the JNI (C/C++) code. \n * The jtype typemap contains the Java type used in the JNI intermediary class. \n * The jstype typemap contains the Java type used in the Java proxy classes, type wrapper classes and module class. */' Comment.Multiline
'\n'          Text

'\n'          Text

'/* Fragments */' Comment.Multiline
'\n'          Text

'%fragment'   Name.Function
'('           Punctuation
'"'           Literal.String
'SWIG_PackData' Literal.String
'"'           Literal.String
','           Punctuation
' '           Text
'"'           Literal.String
'header'      Literal.String
'"'           Literal.String
')'           Punctuation
' '           Text
'{'           Punctuation
'\n'          Text

'/* Pack binary data into a string */' Comment.Multiline
'\n'          Text

'SWIGINTERN'  Name
' '           Text
'char'        Keyword.Type
' '           Text
'*'           Operator
' '           Text
'SWIG_PackData' Name
'('           Punctuation
'char'        Keyword.Type
' '           Text
'*'           Operator
'c'           Name
','           Punctuation
' '           Text
'void'        Keyword.Type
' '           Text
'*'           Operator
'ptr'         Name
','           Punctuation
' '           Text
'size_t'      Keyword.Type
' '           Text
'sz'          Name
')'           Punctuation
' '           Text
'{'           Punctuation
'\n'          Text

'  '          Text
'static'      Keyword
' '           Text
'const'       Keyword
' '           Text
'char'        Keyword.Type
' '           Text
'hex'         Name
'['           Punctuation
'17'          Literal.Number.Integer
']'           Punctuation
' '           Text
'='           Operator
' '           Text
'"'           Literal.String
'0123456789abcdef' Literal.String
'"'           Literal.String
';'           Punctuation
'\n'          Text

'  '          Text
'register'    Keyword
' '           Text
'const'       Keyword
' '           Text
'unsigned'    Keyword.Type
' '           Text
'char'        Keyword.Type
' '           Text
'*'           Operator
'u'           Name
' '           Text
'='           Operator
' '           Text
'('           Punctuation
'unsigned'    Keyword.Type
' '           Text
'char'        Keyword.Type
' '           Text
'*'           Operator
')'           Punctuation
' '           Text
'ptr'         Name
';'           Punctuation
'\n'          Text

'  '          Text
'register'    Keyword
' '           Text
'const'       Keyword
' '           Text
'unsigned'    Keyword.Type
' '           Text
'char'        Keyword.Type
' '           Text
'*'           Operator
'eu'          Name
' '           Text
'='           Operator
'  '          Text
'u'           Name
' '           Text
'+'           Operator
' '           Text
'sz'          Name
';'           Punctuation
'\n'          Text

'  '          Text
'for'         Keyword
' '           Text
'('           Punctuation
';'           Punctuation
' '           Text
'u'           Name
' '           Text
'!'           Operator
'='           Operator
' '           Text
'eu'          Name
';'           Punctuation
' '           Text
'+'           Operator
'+'           Operator
'u'           Name
')'           Punctuation
' '           Text
'{'           Punctuation
'\n'          Text

'    '        Text
'register'    Keyword
' '           Text
'unsigned'    Keyword.Type
' '           Text
'char'        Keyword.Type
' '           Text
'uu'          Name
' '           Text
'='           Operator
' '           Text
'*'           Operator
'u'           Name
';'           Punctuation
'\n'          Text

'    '        Text
'*'           Operator
'('           Punctuation
'c'           Name
'+'           Operator
'+'           Operator
')'           Punctuation
' '           Text
'='           Operator
' '           Text
'hex'         Name
'['           Punctuation
'('           Punctuation
'uu'          Name
' '           Text
'&'           Operator
' '           Text
'0xf0'        Literal.Number.Hex
')'           Punctuation
' '           Text
'>'           Operator
'>'           Operator
' '           Text
'4'           Literal.Number.Integer
']'           Punctuation
';'           Punctuation
'\n'          Text

'    '        Text
'*'           Operator
'('           Punctuation
'c'           Name
'+'           Operator
'+'           Operator
')'           Punctuation
' '           Text
'='           Operator
' '           Text
'hex'         Name
'['           Punctuation
'uu'          Name
' '           Text
'&'           Operator
' '           Text
'0xf'         Literal.Number.Hex
']'           Punctuation
';'           Punctuation
'\n'          Text

'  '          Text
'}'           Punctuation
'\n'          Text

'  '          Text
'return'      Keyword
' '           Text
'c'           Name
';'           Punctuation
'\n'          Text

'}'           Punctuation
'\n'          Text

'}'           Punctuation
'\n'          Text

'\n'          Text

'%fragment'   Name.Function
'('           Punctuation
'"'           Literal.String
'SWIG_UnPackData' Literal.String
'"'           Literal.String
','           Punctuation
' '           Text
'"'           Literal.String
'header'      Literal.String
'"'           Literal.String
')'           Punctuation
' '           Text
'{'           Punctuation
'\n'          Text

'/* Unpack binary data from a string */' Comment.Multiline
'\n'          Text

'SWIGINTERN'  Name
' '           Text
'const'       Keyword
' '           Text
'char'        Keyword.Type
' '           Text
'*'           Operator
' '           Text
'SWIG_UnpackData' Name
'('           Punctuation
'const'       Keyword
' '           Text
'char'        Keyword.Type
' '           Text
'*'           Operator
'c'           Name
','           Punctuation
' '           Text
'void'        Keyword.Type
' '           Text
'*'           Operator
'ptr'         Name
','           Punctuation
' '           Text
'size_t'      Keyword.Type
' '           Text
'sz'          Name
')'           Punctuation
' '           Text
'{'           Punctuation
'\n'          Text

'  '          Text
'register'    Keyword
' '           Text
'unsigned'    Keyword.Type
' '           Text
'char'        Keyword.Type
' '           Text
'*'           Operator
'u'           Name
' '           Text
'='           Operator
' '           Text
'('           Punctuation
'unsigned'    Keyword.Type
' '           Text
'char'        Keyword.Type
' '           Text
'*'           Operator
')'           Punctuation
' '           Text
'ptr'         Name
';'           Punctuation
'\n'          Text

'  '          Text
'register'    Keyword
' '           Text
'const'       Keyword
' '           Text
'unsigned'    Keyword.Type
' '           Text
'char'        Keyword.Type
' '           Text
'*'           Operator
'eu'          Name
' '           Text
'='           Operator
' '           Text
'u'           Name
' '           Text
'+'           Operator
' '           Text
'sz'          Name
';'           Punctuation
'\n'          Text

'  '          Text
'for'         Keyword
' '           Text
'('           Punctuation
';'           Punctuation
' '           Text
'u'           Name
' '           Text
'!'           Operator
'='           Operator
' '           Text
'eu'          Name
';'           Punctuation
' '           Text
'+'           Operator
'+'           Operator
'u'           Name
')'           Punctuation
' '           Text
'{'           Punctuation
'\n'          Text

'    '        Text
'register'    Keyword
' '           Text
'char'        Keyword.Type
' '           Text
'd'           Name
' '           Text
'='           Operator
' '           Text
'*'           Operator
'('           Punctuation
'c'           Name
'+'           Operator
'+'           Operator
')'           Punctuation
';'           Punctuation
'\n'          Text

'    '        Text
'register'    Keyword
' '           Text
'unsigned'    Keyword.Type
' '           Text
'char'        Keyword.Type
' '           Text
'uu'          Name
';'           Punctuation
'\n'          Text

'    '        Text
'if'          Keyword
' '           Text
'('           Punctuation
'('           Punctuation
'd'           Name
' '           Text
'>'           Operator
'='           Operator
' '           Text
"'"           Literal.String.Char
'0'           Literal.String.Char
"'"           Literal.String.Char
')'           Punctuation
' '           Text
'&'           Operator
'&'           Operator
' '           Text
'('           Punctuation
'd'           Name
' '           Text
'<'           Operator
'='           Operator
' '           Text
"'"           Literal.String.Char
'9'           Literal.String.Char
"'"           Literal.String.Char
')'           Punctuation
')'           Punctuation
'\n'          Text

'      '      Text
'uu'          Name
' '           Text
'='           Operator
' '           Text
'('           Punctuation
'('           Punctuation
'd'           Name
' '           Text
'-'           Operator
' '           Text
"'"           Literal.String.Char
'0'           Literal.String.Char
"'"           Literal.String.Char
')'           Punctuation
' '           Text
'<'           Operator
'<'           Operator
' '           Text
'4'           Literal.Number.Integer
')'           Punctuation
';'           Punctuation
'\n'          Text

'    '        Text
'else'        Keyword
' '           Text
'if'          Name.Function
' '           Text
'('           Punctuation
'('           Punctuation
'd'           Name
' '           Text
'>'           Operator
'='           Operator
' '           Text
"'"           Literal.String.Char
'a'           Literal.String.Char
"'"           Literal.String.Char
')'           Punctuation
' '           Text
'&'           Operator
'&'           Operator
' '           Text
'('           Punctuation
'd'           Name
' '           Text
'<'           Operator
'='           Operator
' '           Text
"'"           Literal.String.Char
'f'           Literal.String.Char
"'"           Literal.String.Char
')'           Punctuation
')'           Punctuation
'\n'          Text

'      '      Text
'uu'          Name
' '           Text
'='           Operator
' '           Text
'('           Punctuation
'('           Punctuation
'd'           Name
' '           Text
'-'           Operator
' '           Text
'('           Punctuation
"'"           Literal.String.Char
'a'           Literal.String.Char
"'"           Literal.String.Char
'-10'         Literal.Number.Integer
')'           Punctuation
')'           Punctuation
' '           Text
'<'           Operator
'<'           Operator
' '           Text
'4'           Literal.Number.Integer
')'           Punctuation
';'           Punctuation
'\n'          Text

'    '        Text
'else'        Keyword
' \n      '   Text
'return'      Name.Function
' '           Text
'('           Punctuation
'char'        Keyword.Type
' '           Text
'*'           Operator
')'           Punctuation
' '           Text
'0'           Literal.Number.Integer
';'           Punctuation
'\n'          Text

'    '        Text
'd'           Name
' '           Text
'='           Operator
' '           Text
'*'           Operator
'('           Punctuation
'c'           Name
'+'           Operator
'+'           Operator
')'           Punctuation
';'           Punctuation
'\n'          Text

'    '        Text
'if'          Keyword
' '           Text
'('           Punctuation
'('           Punctuation
'd'           Name
' '           Text
'>'           Operator
'='           Operator
' '           Text
"'"           Literal.String.Char
'0'           Literal.String.Char
"'"           Literal.String.Char
')'           Punctuation
' '           Text
'&'           Operator
'&'           Operator
' '           Text
'('           Punctuation
'd'           Name
' '           Text
'<'           Operator
'='           Operator
' '           Text
"'"           Literal.String.Char
'9'           Literal.String.Char
"'"           Literal.String.Char
')'           Punctuation
')'           Punctuation
'\n'          Text

'      '      Text
'uu'          Name
' '           Text
'|'           Operator
'='           Operator
' '           Text
'('           Punctuation
'd'           Name
' '           Text
'-'           Operator
' '           Text
"'"           Literal.String.Char
'0'           Literal.String.Char
"'"           Literal.String.Char
')'           Punctuation
';'           Punctuation
'\n'          Text

'    '        Text
'else'        Keyword
' '           Text
'if'          Name.Function
' '           Text
'('           Punctuation
'('           Punctuation
'd'           Name
' '           Text
'>'           Operator
'='           Operator
' '           Text
"'"           Literal.String.Char
'a'           Literal.String.Char
"'"           Literal.String.Char
')'           Punctuation
' '           Text
'&'           Operator
'&'           Operator
' '           Text
'('           Punctuation
'd'           Name
' '           Text
'<'           Operator
'='           Operator
' '           Text
"'"           Literal.String.Char
'f'           Literal.String.Char
"'"           Literal.String.Char
')'           Punctuation
')'           Punctuation
'\n'          Text

'      '      Text
'uu'          Name
' '           Text
'|'           Operator
'='           Operator
' '           Text
'('           Punctuation
'd'           Name
' '           Text
'-'           Operator
' '           Text
'('           Punctuation
"'"           Literal.String.Char
'a'           Literal.String.Char
"'"           Literal.String.Char
'-10'         Literal.Number.Integer
')'           Punctuation
')'           Punctuation
';'           Punctuation
'\n'          Text

'    '        Text
'else'        Keyword
' \n      '   Text
'return'      Name.Function
' '           Text
'('           Punctuation
'char'        Keyword.Type
' '           Text
'*'           Operator
')'           Punctuation
' '           Text
'0'           Literal.Number.Integer
';'           Punctuation
'\n'          Text

'    '        Text
'*'           Operator
'u'           Name
' '           Text
'='           Operator
' '           Text
'uu'          Name
';'           Punctuation
'\n'          Text

'  '          Text
'}'           Punctuation
'\n'          Text

'  '          Text
'return'      Keyword
' '           Text
'c'           Name
';'           Punctuation
'\n'          Text

'}'           Punctuation
'\n'          Text

'}'           Punctuation
'\n'          Text

'\n'          Text

'/* Primitive types */' Comment.Multiline
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jni'         Name
')'           Punctuation
' '           Text
'bool'        Keyword.Type
','           Punctuation
'               ' Text
'const'       Keyword
' '           Text
'bool'        Keyword.Type
' '           Text
'&'           Operator
'               ' Text
'"'           Literal.String
'jboolean'    Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jni'         Name
')'           Punctuation
' '           Text
'char'        Keyword.Type
','           Punctuation
'               ' Text
'const'       Keyword
' '           Text
'char'        Keyword.Type
' '           Text
'&'           Operator
'               ' Text
'"'           Literal.String
'jchar'       Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jni'         Name
')'           Punctuation
' '           Text
'signed'      Keyword.Type
' '           Text
'char'        Keyword.Type
','           Punctuation
'        '    Text
'const'       Keyword
' '           Text
'signed'      Keyword.Type
' '           Text
'char'        Keyword.Type
' '           Text
'&'           Operator
'        '    Text
'"'           Literal.String
'jbyte'       Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jni'         Name
')'           Punctuation
' '           Text
'unsigned'    Keyword.Type
' '           Text
'char'        Keyword.Type
','           Punctuation
'      '      Text
'const'       Keyword
' '           Text
'unsigned'    Keyword.Type
' '           Text
'char'        Keyword.Type
' '           Text
'&'           Operator
'      '      Text
'"'           Literal.String
'jshort'      Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jni'         Name
')'           Punctuation
' '           Text
'short'       Keyword.Type
','           Punctuation
'              ' Text
'const'       Keyword
' '           Text
'short'       Keyword.Type
' '           Text
'&'           Operator
'              ' Text
'"'           Literal.String
'jshort'      Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jni'         Name
')'           Punctuation
' '           Text
'unsigned'    Keyword.Type
' '           Text
'short'       Keyword.Type
','           Punctuation
'     '       Text
'const'       Keyword
' '           Text
'unsigned'    Keyword.Type
' '           Text
'short'       Keyword.Type
' '           Text
'&'           Operator
'     '       Text
'"'           Literal.String
'jint'        Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jni'         Name
')'           Punctuation
' '           Text
'int'         Keyword.Type
','           Punctuation
'                ' Text
'const'       Keyword
' '           Text
'int'         Keyword.Type
' '           Text
'&'           Operator
'                ' Text
'"'           Literal.String
'jint'        Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jni'         Name
')'           Punctuation
' '           Text
'unsigned'    Keyword.Type
' '           Text
'int'         Keyword.Type
','           Punctuation
'       '     Text
'const'       Keyword
' '           Text
'unsigned'    Keyword.Type
' '           Text
'int'         Keyword.Type
' '           Text
'&'           Operator
'       '     Text
'"'           Literal.String
'jlong'       Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jni'         Name
')'           Punctuation
' '           Text
'long'        Keyword.Type
','           Punctuation
'               ' Text
'const'       Keyword
' '           Text
'long'        Keyword.Type
' '           Text
'&'           Operator
'               ' Text
'"'           Literal.String
'jint'        Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jni'         Name
')'           Punctuation
' '           Text
'unsigned'    Keyword.Type
' '           Text
'long'        Keyword.Type
','           Punctuation
'      '      Text
'const'       Keyword
' '           Text
'unsigned'    Keyword.Type
' '           Text
'long'        Keyword.Type
' '           Text
'&'           Operator
'      '      Text
'"'           Literal.String
'jlong'       Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jni'         Name
')'           Punctuation
' '           Text
'long'        Keyword.Type
' '           Text
'long'        Keyword.Type
','           Punctuation
'          '  Text
'const'       Keyword
' '           Text
'long'        Keyword.Type
' '           Text
'long'        Keyword.Type
' '           Text
'&'           Operator
'          '  Text
'"'           Literal.String
'jlong'       Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jni'         Name
')'           Punctuation
' '           Text
'unsigned'    Keyword.Type
' '           Text
'long'        Keyword.Type
' '           Text
'long'        Keyword.Type
','           Punctuation
' '           Text
'const'       Keyword
' '           Text
'unsigned'    Keyword.Type
' '           Text
'long'        Keyword.Type
' '           Text
'long'        Keyword.Type
' '           Text
'&'           Operator
' '           Text
'"'           Literal.String
'jobject'     Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jni'         Name
')'           Punctuation
' '           Text
'float'       Keyword.Type
','           Punctuation
'              ' Text
'const'       Keyword
' '           Text
'float'       Keyword.Type
' '           Text
'&'           Operator
'              ' Text
'"'           Literal.String
'jfloat'      Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jni'         Name
')'           Punctuation
' '           Text
'double'      Keyword.Type
','           Punctuation
'             ' Text
'const'       Keyword
' '           Text
'double'      Keyword.Type
' '           Text
'&'           Operator
'             ' Text
'"'           Literal.String
'jdouble'     Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jni'         Name
')'           Punctuation
' '           Text
'void'        Keyword.Type
'                                           ' Text
'"'           Literal.String
'void'        Literal.String
'"'           Literal.String
'\n'          Text

'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jtype'       Name
')'           Punctuation
' '           Text
'bool'        Keyword.Type
','           Punctuation
'               ' Text
'const'       Keyword
' '           Text
'bool'        Keyword.Type
' '           Text
'&'           Operator
'               ' Text
'"'           Literal.String
'boolean'     Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jtype'       Name
')'           Punctuation
' '           Text
'char'        Keyword.Type
','           Punctuation
'               ' Text
'const'       Keyword
' '           Text
'char'        Keyword.Type
' '           Text
'&'           Operator
'               ' Text
'"'           Literal.String
'char'        Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jtype'       Name
')'           Punctuation
' '           Text
'signed'      Keyword.Type
' '           Text
'char'        Keyword.Type
','           Punctuation
'        '    Text
'const'       Keyword
' '           Text
'signed'      Keyword.Type
' '           Text
'char'        Keyword.Type
' '           Text
'&'           Operator
'        '    Text
'"'           Literal.String
'byte'        Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jtype'       Name
')'           Punctuation
' '           Text
'unsigned'    Keyword.Type
' '           Text
'char'        Keyword.Type
','           Punctuation
'      '      Text
'const'       Keyword
' '           Text
'unsigned'    Keyword.Type
' '           Text
'char'        Keyword.Type
' '           Text
'&'           Operator
'      '      Text
'"'           Literal.String
'short'       Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jtype'       Name
')'           Punctuation
' '           Text
'short'       Keyword.Type
','           Punctuation
'              ' Text
'const'       Keyword
' '           Text
'short'       Keyword.Type
' '           Text
'&'           Operator
'              ' Text
'"'           Literal.String
'short'       Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jtype'       Name
')'           Punctuation
' '           Text
'unsigned'    Keyword.Type
' '           Text
'short'       Keyword.Type
','           Punctuation
'     '       Text
'const'       Keyword
' '           Text
'unsigned'    Keyword.Type
' '           Text
'short'       Keyword.Type
' '           Text
'&'           Operator
'     '       Text
'"'           Literal.String
'int'         Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jtype'       Name
')'           Punctuation
' '           Text
'int'         Keyword.Type
','           Punctuation
'                ' Text
'const'       Keyword
' '           Text
'int'         Keyword.Type
' '           Text
'&'           Operator
'                ' Text
'"'           Literal.String
'int'         Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jtype'       Name
')'           Punctuation
' '           Text
'unsigned'    Keyword.Type
' '           Text
'int'         Keyword.Type
','           Punctuation
'       '     Text
'const'       Keyword
' '           Text
'unsigned'    Keyword.Type
' '           Text
'int'         Keyword.Type
' '           Text
'&'           Operator
'       '     Text
'"'           Literal.String
'long'        Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jtype'       Name
')'           Punctuation
' '           Text
'long'        Keyword.Type
','           Punctuation
'               ' Text
'const'       Keyword
' '           Text
'long'        Keyword.Type
' '           Text
'&'           Operator
'               ' Text
'"'           Literal.String
'int'         Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jtype'       Name
')'           Punctuation
' '           Text
'unsigned'    Keyword.Type
' '           Text
'long'        Keyword.Type
','           Punctuation
'      '      Text
'const'       Keyword
' '           Text
'unsigned'    Keyword.Type
' '           Text
'long'        Keyword.Type
' '           Text
'&'           Operator
'      '      Text
'"'           Literal.String
'long'        Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jtype'       Name
')'           Punctuation
' '           Text
'long'        Keyword.Type
' '           Text
'long'        Keyword.Type
','           Punctuation
'          '  Text
'const'       Keyword
' '           Text
'long'        Keyword.Type
' '           Text
'long'        Keyword.Type
' '           Text
'&'           Operator
'          '  Text
'"'           Literal.String
'long'        Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jtype'       Name
')'           Punctuation
' '           Text
'unsigned'    Keyword.Type
' '           Text
'long'        Keyword.Type
' '           Text
'long'        Keyword.Type
','           Punctuation
' '           Text
'const'       Keyword
' '           Text
'unsigned'    Keyword.Type
' '           Text
'long'        Keyword.Type
' '           Text
'long'        Keyword.Type
' '           Text
'&'           Operator
' '           Text
'"'           Literal.String
'java.math.BigInteger' Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jtype'       Name
')'           Punctuation
' '           Text
'float'       Keyword.Type
','           Punctuation
'              ' Text
'const'       Keyword
' '           Text
'float'       Keyword.Type
' '           Text
'&'           Operator
'              ' Text
'"'           Literal.String
'float'       Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jtype'       Name
')'           Punctuation
' '           Text
'double'      Keyword.Type
','           Punctuation
'             ' Text
'const'       Keyword
' '           Text
'double'      Keyword.Type
' '           Text
'&'           Operator
'             ' Text
'"'           Literal.String
'double'      Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jtype'       Name
')'           Punctuation
' '           Text
'void'        Keyword.Type
'                                           ' Text
'"'           Literal.String
'void'        Literal.String
'"'           Literal.String
'\n'          Text

'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jstype'      Name
')'           Punctuation
' '           Text
'bool'        Keyword.Type
','           Punctuation
'               ' Text
'const'       Keyword
' '           Text
'bool'        Keyword.Type
' '           Text
'&'           Operator
'               ' Text
'"'           Literal.String
'boolean'     Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jstype'      Name
')'           Punctuation
' '           Text
'char'        Keyword.Type
','           Punctuation
'               ' Text
'const'       Keyword
' '           Text
'char'        Keyword.Type
' '           Text
'&'           Operator
'               ' Text
'"'           Literal.String
'char'        Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jstype'      Name
')'           Punctuation
' '           Text
'signed'      Keyword.Type
' '           Text
'char'        Keyword.Type
','           Punctuation
'        '    Text
'const'       Keyword
' '           Text
'signed'      Keyword.Type
' '           Text
'char'        Keyword.Type
' '           Text
'&'           Operator
'        '    Text
'"'           Literal.String
'byte'        Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jstype'      Name
')'           Punctuation
' '           Text
'unsigned'    Keyword.Type
' '           Text
'char'        Keyword.Type
','           Punctuation
'      '      Text
'const'       Keyword
' '           Text
'unsigned'    Keyword.Type
' '           Text
'char'        Keyword.Type
' '           Text
'&'           Operator
'      '      Text
'"'           Literal.String
'short'       Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jstype'      Name
')'           Punctuation
' '           Text
'short'       Keyword.Type
','           Punctuation
'              ' Text
'const'       Keyword
' '           Text
'short'       Keyword.Type
' '           Text
'&'           Operator
'              ' Text
'"'           Literal.String
'short'       Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jstype'      Name
')'           Punctuation
' '           Text
'unsigned'    Keyword.Type
' '           Text
'short'       Keyword.Type
','           Punctuation
'     '       Text
'const'       Keyword
' '           Text
'unsigned'    Keyword.Type
' '           Text
'short'       Keyword.Type
' '           Text
'&'           Operator
'     '       Text
'"'           Literal.String
'int'         Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jstype'      Name
')'           Punctuation
' '           Text
'int'         Keyword.Type
','           Punctuation
'                ' Text
'const'       Keyword
' '           Text
'int'         Keyword.Type
' '           Text
'&'           Operator
'                ' Text
'"'           Literal.String
'int'         Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jstype'      Name
')'           Punctuation
' '           Text
'unsigned'    Keyword.Type
' '           Text
'int'         Keyword.Type
','           Punctuation
'       '     Text
'const'       Keyword
' '           Text
'unsigned'    Keyword.Type
' '           Text
'int'         Keyword.Type
' '           Text
'&'           Operator
'       '     Text
'"'           Literal.String
'long'        Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jstype'      Name
')'           Punctuation
' '           Text
'long'        Keyword.Type
','           Punctuation
'               ' Text
'const'       Keyword
' '           Text
'long'        Keyword.Type
' '           Text
'&'           Operator
'               ' Text
'"'           Literal.String
'int'         Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jstype'      Name
')'           Punctuation
' '           Text
'unsigned'    Keyword.Type
' '           Text
'long'        Keyword.Type
','           Punctuation
'      '      Text
'const'       Keyword
' '           Text
'unsigned'    Keyword.Type
' '           Text
'long'        Keyword.Type
' '           Text
'&'           Operator
'      '      Text
'"'           Literal.String
'long'        Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jstype'      Name
')'           Punctuation
' '           Text
'long'        Keyword.Type
' '           Text
'long'        Keyword.Type
','           Punctuation
'          '  Text
'const'       Keyword
' '           Text
'long'        Keyword.Type
' '           Text
'long'        Keyword.Type
' '           Text
'&'           Operator
'          '  Text
'"'           Literal.String
'long'        Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jstype'      Name
')'           Punctuation
' '           Text
'unsigned'    Keyword.Type
' '           Text
'long'        Keyword.Type
' '           Text
'long'        Keyword.Type
','           Punctuation
' '           Text
'const'       Keyword
' '           Text
'unsigned'    Keyword.Type
' '           Text
'long'        Keyword.Type
' '           Text
'long'        Keyword.Type
' '           Text
'&'           Operator
' '           Text
'"'           Literal.String
'java.math.BigInteger' Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jstype'      Name
')'           Punctuation
' '           Text
'float'       Keyword.Type
','           Punctuation
'              ' Text
'const'       Keyword
' '           Text
'float'       Keyword.Type
' '           Text
'&'           Operator
'              ' Text
'"'           Literal.String
'float'       Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jstype'      Name
')'           Punctuation
' '           Text
'double'      Keyword.Type
','           Punctuation
'             ' Text
'const'       Keyword
' '           Text
'double'      Keyword.Type
' '           Text
'&'           Operator
'             ' Text
'"'           Literal.String
'double'      Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jstype'      Name
')'           Punctuation
' '           Text
'void'        Keyword.Type
'                                           ' Text
'"'           Literal.String
'void'        Literal.String
'"'           Literal.String
'\n'          Text

'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jni'         Name
')'           Punctuation
' '           Text
'char'        Keyword.Type
' '           Text
'*'           Operator
','           Punctuation
' '           Text
'char'        Keyword.Type
' '           Text
'*'           Operator
'&'           Operator
','           Punctuation
' '           Text
'char'        Keyword.Type
'['           Punctuation
'ANY'         Name
']'           Punctuation
','           Punctuation
' '           Text
'char'        Keyword.Type
'['           Punctuation
']'           Punctuation
'               ' Text
'"'           Literal.String
'jstring'     Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jtype'       Name
')'           Punctuation
' '           Text
'char'        Keyword.Type
' '           Text
'*'           Operator
','           Punctuation
' '           Text
'char'        Keyword.Type
' '           Text
'*'           Operator
'&'           Operator
','           Punctuation
' '           Text
'char'        Keyword.Type
'['           Punctuation
'ANY'         Name
']'           Punctuation
','           Punctuation
' '           Text
'char'        Keyword.Type
'['           Punctuation
']'           Punctuation
'               ' Text
'"'           Literal.String
'String'      Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jstype'      Name
')'           Punctuation
' '           Text
'char'        Keyword.Type
' '           Text
'*'           Operator
','           Punctuation
' '           Text
'char'        Keyword.Type
' '           Text
'*'           Operator
'&'           Operator
','           Punctuation
' '           Text
'char'        Keyword.Type
'['           Punctuation
'ANY'         Name
']'           Punctuation
','           Punctuation
' '           Text
'char'        Keyword.Type
'['           Punctuation
']'           Punctuation
'               ' Text
'"'           Literal.String
'String'      Literal.String
'"'           Literal.String
'\n'          Text

'\n'          Text

'/* JNI types */' Comment.Multiline
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jni'         Name
')'           Punctuation
' '           Text
'jboolean'    Name
'      '      Text
'"'           Literal.String
'jboolean'    Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jni'         Name
')'           Punctuation
' '           Text
'jchar'       Name
'         '   Text
'"'           Literal.String
'jchar'       Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jni'         Name
')'           Punctuation
' '           Text
'jbyte'       Name
'         '   Text
'"'           Literal.String
'jbyte'       Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jni'         Name
')'           Punctuation
' '           Text
'jshort'      Name
'        '    Text
'"'           Literal.String
'jshort'      Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jni'         Name
')'           Punctuation
' '           Text
'jint'        Name
'          '  Text
'"'           Literal.String
'jint'        Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jni'         Name
')'           Punctuation
' '           Text
'jlong'       Name
'         '   Text
'"'           Literal.String
'jlong'       Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jni'         Name
')'           Punctuation
' '           Text
'jfloat'      Name
'        '    Text
'"'           Literal.String
'jfloat'      Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jni'         Name
')'           Punctuation
' '           Text
'jdouble'     Name
'       '     Text
'"'           Literal.String
'jdouble'     Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jni'         Name
')'           Punctuation
' '           Text
'jstring'     Name
'       '     Text
'"'           Literal.String
'jstring'     Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jni'         Name
')'           Punctuation
' '           Text
'jobject'     Name
'       '     Text
'"'           Literal.String
'jobject'     Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jni'         Name
')'           Punctuation
' '           Text
'jbooleanArray' Name
' '           Text
'"'           Literal.String
'jbooleanArray' Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jni'         Name
')'           Punctuation
' '           Text
'jcharArray'  Name
'    '        Text
'"'           Literal.String
'jcharArray'  Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jni'         Name
')'           Punctuation
' '           Text
'jbyteArray'  Name
'    '        Text
'"'           Literal.String
'jbyteArray'  Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jni'         Name
')'           Punctuation
' '           Text
'jshortArray' Name
'   '         Text
'"'           Literal.String
'jshortArray' Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jni'         Name
')'           Punctuation
' '           Text
'jintArray'   Name
'     '       Text
'"'           Literal.String
'jintArray'   Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jni'         Name
')'           Punctuation
' '           Text
'jlongArray'  Name
'    '        Text
'"'           Literal.String
'jlongArray'  Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jni'         Name
')'           Punctuation
' '           Text
'jfloatArray' Name
'   '         Text
'"'           Literal.String
'jfloatArray' Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jni'         Name
')'           Punctuation
' '           Text
'jdoubleArray' Name
'  '          Text
'"'           Literal.String
'jdoubleArray' Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jni'         Name
')'           Punctuation
' '           Text
'jobjectArray' Name
'  '          Text
'"'           Literal.String
'jobjectArray' Literal.String
'"'           Literal.String
'\n'          Text

'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jtype'       Name
')'           Punctuation
' '           Text
'jboolean'    Name
'      '      Text
'"'           Literal.String
'boolean'     Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jtype'       Name
')'           Punctuation
' '           Text
'jchar'       Name
'         '   Text
'"'           Literal.String
'char'        Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jtype'       Name
')'           Punctuation
' '           Text
'jbyte'       Name
'         '   Text
'"'           Literal.String
'byte'        Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jtype'       Name
')'           Punctuation
' '           Text
'jshort'      Name
'        '    Text
'"'           Literal.String
'short'       Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jtype'       Name
')'           Punctuation
' '           Text
'jint'        Name
'          '  Text
'"'           Literal.String
'int'         Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jtype'       Name
')'           Punctuation
' '           Text
'jlong'       Name
'         '   Text
'"'           Literal.String
'long'        Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jtype'       Name
')'           Punctuation
' '           Text
'jfloat'      Name
'        '    Text
'"'           Literal.String
'float'       Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jtype'       Name
')'           Punctuation
' '           Text
'jdouble'     Name
'       '     Text
'"'           Literal.String
'double'      Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jtype'       Name
')'           Punctuation
' '           Text
'jstring'     Name
'       '     Text
'"'           Literal.String
'String'      Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jtype'       Name
')'           Punctuation
' '           Text
'jobject'     Name
'       '     Text
'"'           Literal.String
'Object'      Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jtype'       Name
')'           Punctuation
' '           Text
'jbooleanArray' Name
' '           Text
'"'           Literal.String
'boolean[]'   Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jtype'       Name
')'           Punctuation
' '           Text
'jcharArray'  Name
'    '        Text
'"'           Literal.String
'char[]'      Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jtype'       Name
')'           Punctuation
' '           Text
'jbyteArray'  Name
'    '        Text
'"'           Literal.String
'byte[]'      Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jtype'       Name
')'           Punctuation
' '           Text
'jshortArray' Name
'   '         Text
'"'           Literal.String
'short[]'     Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jtype'       Name
')'           Punctuation
' '           Text
'jintArray'   Name
'     '       Text
'"'           Literal.String
'int[]'       Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jtype'       Name
')'           Punctuation
' '           Text
'jlongArray'  Name
'    '        Text
'"'           Literal.String
'long[]'      Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jtype'       Name
')'           Punctuation
' '           Text
'jfloatArray' Name
'   '         Text
'"'           Literal.String
'float[]'     Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jtype'       Name
')'           Punctuation
' '           Text
'jdoubleArray' Name
'  '          Text
'"'           Literal.String
'double[]'    Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jtype'       Name
')'           Punctuation
' '           Text
'jobjectArray' Name
'  '          Text
'"'           Literal.String
'Object[]'    Literal.String
'"'           Literal.String
'\n'          Text

'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jstype'      Name
')'           Punctuation
' '           Text
'jboolean'    Name
'      '      Text
'"'           Literal.String
'boolean'     Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jstype'      Name
')'           Punctuation
' '           Text
'jchar'       Name
'         '   Text
'"'           Literal.String
'char'        Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jstype'      Name
')'           Punctuation
' '           Text
'jbyte'       Name
'         '   Text
'"'           Literal.String
'byte'        Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jstype'      Name
')'           Punctuation
' '           Text
'jshort'      Name
'        '    Text
'"'           Literal.String
'short'       Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jstype'      Name
')'           Punctuation
' '           Text
'jint'        Name
'          '  Text
'"'           Literal.String
'int'         Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jstype'      Name
')'           Punctuation
' '           Text
'jlong'       Name
'         '   Text
'"'           Literal.String
'long'        Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jstype'      Name
')'           Punctuation
' '           Text
'jfloat'      Name
'        '    Text
'"'           Literal.String
'float'       Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jstype'      Name
')'           Punctuation
' '           Text
'jdouble'     Name
'       '     Text
'"'           Literal.String
'double'      Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jstype'      Name
')'           Punctuation
' '           Text
'jstring'     Name
'       '     Text
'"'           Literal.String
'String'      Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jstype'      Name
')'           Punctuation
' '           Text
'jobject'     Name
'       '     Text
'"'           Literal.String
'Object'      Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jstype'      Name
')'           Punctuation
' '           Text
'jbooleanArray' Name
' '           Text
'"'           Literal.String
'boolean[]'   Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jstype'      Name
')'           Punctuation
' '           Text
'jcharArray'  Name
'    '        Text
'"'           Literal.String
'char[]'      Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jstype'      Name
')'           Punctuation
' '           Text
'jbyteArray'  Name
'    '        Text
'"'           Literal.String
'byte[]'      Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jstype'      Name
')'           Punctuation
' '           Text
'jshortArray' Name
'   '         Text
'"'           Literal.String
'short[]'     Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jstype'      Name
')'           Punctuation
' '           Text
'jintArray'   Name
'     '       Text
'"'           Literal.String
'int[]'       Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jstype'      Name
')'           Punctuation
' '           Text
'jlongArray'  Name
'    '        Text
'"'           Literal.String
'long[]'      Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jstype'      Name
')'           Punctuation
' '           Text
'jfloatArray' Name
'   '         Text
'"'           Literal.String
'float[]'     Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jstype'      Name
')'           Punctuation
' '           Text
'jdoubleArray' Name
'  '          Text
'"'           Literal.String
'double[]'    Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jstype'      Name
')'           Punctuation
' '           Text
'jobjectArray' Name
'  '          Text
'"'           Literal.String
'Object[]'    Literal.String
'"'           Literal.String
'\n'          Text

'\n'          Text

'/* Non primitive types */' Comment.Multiline
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jni'         Name
')'           Punctuation
' '           Text
'SWIGTYPE'    Name
' '           Text
'"'           Literal.String
'jlong'       Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jtype'       Name
')'           Punctuation
' '           Text
'SWIGTYPE'    Name
' '           Text
'"'           Literal.String
'long'        Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jstype'      Name
')'           Punctuation
' '           Text
'SWIGTYPE'    Name
' '           Text
'"'           Literal.String
'$&javaclassname' Literal.String
'"'           Literal.String
'\n'          Text

'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jni'         Name
')'           Punctuation
' '           Text
'SWIGTYPE'    Name
' '           Text
'['           Punctuation
']'           Punctuation
' '           Text
'"'           Literal.String
'jlong'       Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jtype'       Name
')'           Punctuation
' '           Text
'SWIGTYPE'    Name
' '           Text
'['           Punctuation
']'           Punctuation
' '           Text
'"'           Literal.String
'long'        Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jstype'      Name
')'           Punctuation
' '           Text
'SWIGTYPE'    Name
' '           Text
'['           Punctuation
']'           Punctuation
' '           Text
'"'           Literal.String
'$javaclassname' Literal.String
'"'           Literal.String
'\n'          Text

'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jni'         Name
')'           Punctuation
' '           Text
'SWIGTYPE'    Name
' '           Text
'*'           Operator
' '           Text
'"'           Literal.String
'jlong'       Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jtype'       Name
')'           Punctuation
' '           Text
'SWIGTYPE'    Name
' '           Text
'*'           Operator
' '           Text
'"'           Literal.String
'long'        Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jstype'      Name
')'           Punctuation
' '           Text
'SWIGTYPE'    Name
' '           Text
'*'           Operator
' '           Text
'"'           Literal.String
'$javaclassname' Literal.String
'"'           Literal.String
'\n'          Text

'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jni'         Name
')'           Punctuation
' '           Text
'SWIGTYPE'    Name
' '           Text
'&'           Operator
' '           Text
'"'           Literal.String
'jlong'       Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jtype'       Name
')'           Punctuation
' '           Text
'SWIGTYPE'    Name
' '           Text
'&'           Operator
' '           Text
'"'           Literal.String
'long'        Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jstype'      Name
')'           Punctuation
' '           Text
'SWIGTYPE'    Name
' '           Text
'&'           Operator
' '           Text
'"'           Literal.String
'$javaclassname' Literal.String
'"'           Literal.String
'\n'          Text

'\n'          Text

'/* pointer to a class member */' Comment.Multiline
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jni'         Name
')'           Punctuation
' '           Text
'SWIGTYPE'    Name
' '           Text
'('           Punctuation
'CLASS'       Name
':'           Operator
':'           Operator
'*'           Operator
')'           Punctuation
' '           Text
'"'           Literal.String
'jstring'     Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jtype'       Name
')'           Punctuation
' '           Text
'SWIGTYPE'    Name
' '           Text
'('           Punctuation
'CLASS'       Name
':'           Operator
':'           Operator
'*'           Operator
')'           Punctuation
' '           Text
'"'           Literal.String
'String'      Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jstype'      Name
')'           Punctuation
' '           Text
'SWIGTYPE'    Name
' '           Text
'('           Punctuation
'CLASS'       Name
':'           Operator
':'           Operator
'*'           Operator
')'           Punctuation
' '           Text
'"'           Literal.String
'$javaclassname' Literal.String
'"'           Literal.String
'\n'          Text

'\n'          Text

'/* The following are the in, out, freearg, argout typemaps. These are the JNI code generating typemaps for converting from Java to C and visa versa. */' Comment.Multiline
'\n'          Text

'\n'          Text

'/* primitive types */' Comment.Multiline
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'in'          Name
')'           Punctuation
' '           Text
'bool'        Keyword.Type
'\n'          Text

'%'           Operator
'{'           Punctuation
' '           Text
'$1'          Name
' '           Text
'='           Operator
' '           Text
'$input'      Name
' '           Text
'?'           Operator
' '           Text
'true'        Name.Builtin
' '           Text
':'           Operator
' '           Text
'false'       Name.Builtin
';'           Punctuation
' '           Text
'%'           Operator
'}'           Punctuation
'\n'          Text

'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'directorout' Name
')'           Punctuation
' '           Text
'bool'        Keyword.Type
'\n'          Text

'%'           Operator
'{'           Punctuation
' '           Text
'$result'     Name
' '           Text
'='           Operator
' '           Text
'$input'      Name
' '           Text
'?'           Operator
' '           Text
'true'        Name.Builtin
' '           Text
':'           Operator
' '           Text
'false'       Name.Builtin
';'           Punctuation
' '           Text
'%'           Operator
'}'           Punctuation
'\n'          Text

'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'javadirectorin' Name
')'           Punctuation
' '           Text
'bool'        Keyword.Type
' '           Text
'"'           Literal.String
'$jniinput'   Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'javadirectorout' Name
')'           Punctuation
' '           Text
'bool'        Keyword.Type
' '           Text
'"'           Literal.String
'$javacall'   Literal.String
'"'           Literal.String
'\n'          Text

'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'in'          Name
')'           Punctuation
' '           Text
'char'        Keyword.Type
','           Punctuation
' \n             ' Text
'signed'      Keyword.Type
' '           Text
'char'        Keyword.Type
','           Punctuation
' \n             ' Text
'unsigned'    Keyword.Type
' '           Text
'char'        Keyword.Type
','           Punctuation
' \n             ' Text
'short'       Keyword.Type
','           Punctuation
' \n             ' Text
'unsigned'    Keyword.Type
' '           Text
'short'       Keyword.Type
','           Punctuation
' \n             ' Text
'int'         Keyword.Type
','           Punctuation
' \n             ' Text
'unsigned'    Keyword.Type
' '           Text
'int'         Keyword.Type
','           Punctuation
' \n             ' Text
'long'        Keyword.Type
','           Punctuation
' \n             ' Text
'unsigned'    Keyword.Type
' '           Text
'long'        Keyword.Type
','           Punctuation
' \n             ' Text
'long'        Keyword.Type
' '           Text
'long'        Keyword.Type
','           Punctuation
' \n             ' Text
'float'       Keyword.Type
','           Punctuation
' \n             ' Text
'double'      Keyword.Type
'\n'          Text

'%'           Operator
'{'           Punctuation
' '           Text
'$1'          Name
' '           Text
'='           Operator
' '           Text
'('           Punctuation
'$1_ltype'    Name
')'           Punctuation
'$input'      Name
';'           Punctuation
' '           Text
'%'           Operator
'}'           Punctuation
'\n'          Text

'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'directorout' Name
')'           Punctuation
' '           Text
'char'        Keyword.Type
','           Punctuation
' \n             ' Text
'signed'      Keyword.Type
' '           Text
'char'        Keyword.Type
','           Punctuation
' \n             ' Text
'unsigned'    Keyword.Type
' '           Text
'char'        Keyword.Type
','           Punctuation
' \n             ' Text
'short'       Keyword.Type
','           Punctuation
' \n             ' Text
'unsigned'    Keyword.Type
' '           Text
'short'       Keyword.Type
','           Punctuation
' \n             ' Text
'int'         Keyword.Type
','           Punctuation
' \n             ' Text
'unsigned'    Keyword.Type
' '           Text
'int'         Keyword.Type
','           Punctuation
' \n             ' Text
'long'        Keyword.Type
','           Punctuation
' \n             ' Text
'unsigned'    Keyword.Type
' '           Text
'long'        Keyword.Type
','           Punctuation
' \n             ' Text
'long'        Keyword.Type
' '           Text
'long'        Keyword.Type
','           Punctuation
' \n             ' Text
'float'       Keyword.Type
','           Punctuation
' \n             ' Text
'double'      Keyword.Type
'\n'          Text

'%'           Operator
'{'           Punctuation
' '           Text
'$result'     Name
' '           Text
'='           Operator
' '           Text
'('           Punctuation
'$1_ltype'    Name
')'           Punctuation
'$input'      Name
';'           Punctuation
' '           Text
'%'           Operator
'}'           Punctuation
'\n'          Text

'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'directorin'  Name
','           Punctuation
' '           Text
'descriptor'  Name
'='           Operator
'"'           Literal.String
'Z'           Literal.String
'"'           Literal.String
')'           Punctuation
' '           Text
'bool'        Keyword.Type
'             ' Text
'"'           Literal.String
'$input = (jboolean) $1;' Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'directorin'  Name
','           Punctuation
' '           Text
'descriptor'  Name
'='           Operator
'"'           Literal.String
'C'           Literal.String
'"'           Literal.String
')'           Punctuation
' '           Text
'char'        Keyword.Type
'             ' Text
'"'           Literal.String
'$input = (jint) $1;' Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'directorin'  Name
','           Punctuation
' '           Text
'descriptor'  Name
'='           Operator
'"'           Literal.String
'B'           Literal.String
'"'           Literal.String
')'           Punctuation
' '           Text
'signed'      Keyword.Type
' '           Text
'char'        Keyword.Type
'      '      Text
'"'           Literal.String
'$input = (jbyte) $1;' Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'directorin'  Name
','           Punctuation
' '           Text
'descriptor'  Name
'='           Operator
'"'           Literal.String
'S'           Literal.String
'"'           Literal.String
')'           Punctuation
' '           Text
'unsigned'    Keyword.Type
' '           Text
'char'        Keyword.Type
'    '        Text
'"'           Literal.String
'$input = (jshort) $1;' Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'directorin'  Name
','           Punctuation
' '           Text
'descriptor'  Name
'='           Operator
'"'           Literal.String
'S'           Literal.String
'"'           Literal.String
')'           Punctuation
' '           Text
'short'       Keyword.Type
'            ' Text
'"'           Literal.String
'$input = (jshort) $1;' Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'directorin'  Name
','           Punctuation
' '           Text
'descriptor'  Name
'='           Operator
'"'           Literal.String
'I'           Literal.String
'"'           Literal.String
')'           Punctuation
' '           Text
'unsigned'    Keyword.Type
' '           Text
'short'       Keyword.Type
'   '         Text
'"'           Literal.String
'$input = (jint) $1;' Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'directorin'  Name
','           Punctuation
' '           Text
'descriptor'  Name
'='           Operator
'"'           Literal.String
'I'           Literal.String
'"'           Literal.String
')'           Punctuation
' '           Text
'int'         Keyword.Type
'              ' Text
'"'           Literal.String
'$input = (jint) $1;' Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'directorin'  Name
','           Punctuation
' '           Text
'descriptor'  Name
'='           Operator
'"'           Literal.String
'J'           Literal.String
'"'           Literal.String
')'           Punctuation
' '           Text
'unsigned'    Keyword.Type
' '           Text
'int'         Keyword.Type
'     '       Text
'"'           Literal.String
'$input = (jlong) $1;' Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'directorin'  Name
','           Punctuation
' '           Text
'descriptor'  Name
'='           Operator
'"'           Literal.String
'I'           Literal.String
'"'           Literal.String
')'           Punctuation
' '           Text
'long'        Keyword.Type
'             ' Text
'"'           Literal.String
'$input = (jint) $1;' Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'directorin'  Name
','           Punctuation
' '           Text
'descriptor'  Name
'='           Operator
'"'           Literal.String
'J'           Literal.String
'"'           Literal.String
')'           Punctuation
' '           Text
'unsigned'    Keyword.Type
' '           Text
'long'        Keyword.Type
'    '        Text
'"'           Literal.String
'$input = (jlong) $1;' Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'directorin'  Name
','           Punctuation
' '           Text
'descriptor'  Name
'='           Operator
'"'           Literal.String
'J'           Literal.String
'"'           Literal.String
')'           Punctuation
' '           Text
'long'        Keyword.Type
' '           Text
'long'        Keyword.Type
'        '    Text
'"'           Literal.String
'$input = (jlong) $1;' Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'directorin'  Name
','           Punctuation
' '           Text
'descriptor'  Name
'='           Operator
'"'           Literal.String
'F'           Literal.String
'"'           Literal.String
')'           Punctuation
' '           Text
'float'       Keyword.Type
'            ' Text
'"'           Literal.String
'$input = (jfloat) $1;' Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'directorin'  Name
','           Punctuation
' '           Text
'descriptor'  Name
'='           Operator
'"'           Literal.String
'D'           Literal.String
'"'           Literal.String
')'           Punctuation
' '           Text
'double'      Keyword.Type
'           ' Text
'"'           Literal.String
'$input = (jdouble) $1;' Literal.String
'"'           Literal.String
'\n'          Text

'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'javadirectorin' Name
')'           Punctuation
' '           Text
'char'        Keyword.Type
','           Punctuation
' \n                         ' Text
'signed'      Keyword.Type
' '           Text
'char'        Keyword.Type
','           Punctuation
' \n                         ' Text
'unsigned'    Keyword.Type
' '           Text
'char'        Keyword.Type
','           Punctuation
' \n                         ' Text
'short'       Keyword.Type
','           Punctuation
' \n                         ' Text
'unsigned'    Keyword.Type
' '           Text
'short'       Keyword.Type
','           Punctuation
' \n                         ' Text
'int'         Keyword.Type
','           Punctuation
' \n                         ' Text
'unsigned'    Keyword.Type
' '           Text
'int'         Keyword.Type
','           Punctuation
' \n                         ' Text
'long'        Keyword.Type
','           Punctuation
' \n                         ' Text
'unsigned'    Keyword.Type
' '           Text
'long'        Keyword.Type
','           Punctuation
' \n                         ' Text
'long'        Keyword.Type
' '           Text
'long'        Keyword.Type
','           Punctuation
' \n                         ' Text
'float'       Keyword.Type
','           Punctuation
' \n                         ' Text
'double'      Keyword.Type
'\n'          Text

'  '          Text
'"'           Literal.String
'$jniinput'   Literal.String
'"'           Literal.String
'\n'          Text

'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'javadirectorout' Name
')'           Punctuation
' '           Text
'char'        Keyword.Type
','           Punctuation
' \n                          ' Text
'signed'      Keyword.Type
' '           Text
'char'        Keyword.Type
','           Punctuation
' \n                          ' Text
'unsigned'    Keyword.Type
' '           Text
'char'        Keyword.Type
','           Punctuation
' \n                          ' Text
'short'       Keyword.Type
','           Punctuation
' \n                          ' Text
'unsigned'    Keyword.Type
' '           Text
'short'       Keyword.Type
','           Punctuation
' \n                          ' Text
'int'         Keyword.Type
','           Punctuation
' \n                          ' Text
'unsigned'    Keyword.Type
' '           Text
'int'         Keyword.Type
','           Punctuation
' \n                          ' Text
'long'        Keyword.Type
','           Punctuation
' \n                          ' Text
'unsigned'    Keyword.Type
' '           Text
'long'        Keyword.Type
','           Punctuation
' \n                          ' Text
'long'        Keyword.Type
' '           Text
'long'        Keyword.Type
','           Punctuation
' \n                          ' Text
'float'       Keyword.Type
','           Punctuation
' \n                          ' Text
'double'      Keyword.Type
'\n'          Text

'  '          Text
'"'           Literal.String
'$javacall'   Literal.String
'"'           Literal.String
'\n'          Text

'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'out'         Name
')'           Punctuation
' '           Text
'bool'        Keyword.Type
'           ' Text
'%'           Operator
'{'           Punctuation
' '           Text
'$result'     Name
' '           Text
'='           Operator
' '           Text
'('           Punctuation
'jboolean'    Name
')'           Punctuation
'$1'          Name
';'           Punctuation
' '           Text
'%'           Operator
'}'           Punctuation
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'out'         Name
')'           Punctuation
' '           Text
'char'        Keyword.Type
'           ' Text
'%'           Operator
'{'           Punctuation
' '           Text
'$result'     Name
' '           Text
'='           Operator
' '           Text
'('           Punctuation
'jchar'       Name
')'           Punctuation
'$1'          Name
';'           Punctuation
' '           Text
'%'           Operator
'}'           Punctuation
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'out'         Name
')'           Punctuation
' '           Text
'signed'      Keyword.Type
' '           Text
'char'        Keyword.Type
'    '        Text
'%'           Operator
'{'           Punctuation
' '           Text
'$result'     Name
' '           Text
'='           Operator
' '           Text
'('           Punctuation
'jbyte'       Name
')'           Punctuation
'$1'          Name
';'           Punctuation
' '           Text
'%'           Operator
'}'           Punctuation
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'out'         Name
')'           Punctuation
' '           Text
'unsigned'    Keyword.Type
' '           Text
'char'        Keyword.Type
'  '          Text
'%'           Operator
'{'           Punctuation
' '           Text
'$result'     Name
' '           Text
'='           Operator
' '           Text
'('           Punctuation
'jshort'      Name
')'           Punctuation
'$1'          Name
';'           Punctuation
' '           Text
'%'           Operator
'}'           Punctuation
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'out'         Name
')'           Punctuation
' '           Text
'short'       Keyword.Type
'          '  Text
'%'           Operator
'{'           Punctuation
' '           Text
'$result'     Name
' '           Text
'='           Operator
' '           Text
'('           Punctuation
'jshort'      Name
')'           Punctuation
'$1'          Name
';'           Punctuation
' '           Text
'%'           Operator
'}'           Punctuation
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'out'         Name
')'           Punctuation
' '           Text
'unsigned'    Keyword.Type
' '           Text
'short'       Keyword.Type
' '           Text
'%'           Operator
'{'           Punctuation
' '           Text
'$result'     Name
' '           Text
'='           Operator
' '           Text
'('           Punctuation
'jint'        Name
')'           Punctuation
'$1'          Name
';'           Punctuation
' '           Text
'%'           Operator
'}'           Punctuation
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'out'         Name
')'           Punctuation
' '           Text
'int'         Keyword.Type
'            ' Text
'%'           Operator
'{'           Punctuation
' '           Text
'$result'     Name
' '           Text
'='           Operator
' '           Text
'('           Punctuation
'jint'        Name
')'           Punctuation
'$1'          Name
';'           Punctuation
' '           Text
'%'           Operator
'}'           Punctuation
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'out'         Name
')'           Punctuation
' '           Text
'unsigned'    Keyword.Type
' '           Text
'int'         Keyword.Type
'   '         Text
'%'           Operator
'{'           Punctuation
' '           Text
'$result'     Name
' '           Text
'='           Operator
' '           Text
'('           Punctuation
'jlong'       Name
')'           Punctuation
'$1'          Name
';'           Punctuation
' '           Text
'%'           Operator
'}'           Punctuation
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'out'         Name
')'           Punctuation
' '           Text
'long'        Keyword.Type
'           ' Text
'%'           Operator
'{'           Punctuation
' '           Text
'$result'     Name
' '           Text
'='           Operator
' '           Text
'('           Punctuation
'jint'        Name
')'           Punctuation
'$1'          Name
';'           Punctuation
' '           Text
'%'           Operator
'}'           Punctuation
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'out'         Name
')'           Punctuation
' '           Text
'unsigned'    Keyword.Type
' '           Text
'long'        Keyword.Type
'  '          Text
'%'           Operator
'{'           Punctuation
' '           Text
'$result'     Name
' '           Text
'='           Operator
' '           Text
'('           Punctuation
'jlong'       Name
')'           Punctuation
'$1'          Name
';'           Punctuation
' '           Text
'%'           Operator
'}'           Punctuation
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'out'         Name
')'           Punctuation
' '           Text
'long'        Keyword.Type
' '           Text
'long'        Keyword.Type
'      '      Text
'%'           Operator
'{'           Punctuation
' '           Text
'$result'     Name
' '           Text
'='           Operator
' '           Text
'('           Punctuation
'jlong'       Name
')'           Punctuation
'$1'          Name
';'           Punctuation
' '           Text
'%'           Operator
'}'           Punctuation
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'out'         Name
')'           Punctuation
' '           Text
'float'       Keyword.Type
'          '  Text
'%'           Operator
'{'           Punctuation
' '           Text
'$result'     Name
' '           Text
'='           Operator
' '           Text
'('           Punctuation
'jfloat'      Name
')'           Punctuation
'$1'          Name
';'           Punctuation
' '           Text
'%'           Operator
'}'           Punctuation
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'out'         Name
')'           Punctuation
' '           Text
'double'      Keyword.Type
'         '   Text
'%'           Operator
'{'           Punctuation
' '           Text
'$result'     Name
' '           Text
'='           Operator
' '           Text
'('           Punctuation
'jdouble'     Name
')'           Punctuation
'$1'          Name
';'           Punctuation
' '           Text
'%'           Operator
'}'           Punctuation
'\n'          Text

'\n'          Text

'/* unsigned long long */' Comment.Multiline
'\n'          Text

'/* Convert from BigInteger using the toByteArray member function */' Comment.Multiline
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'in'          Name
')'           Punctuation
' '           Text
'unsigned'    Keyword.Type
' '           Text
'long'        Keyword.Type
' '           Text
'long'        Keyword.Type
' '           Text
'{'           Punctuation
' \n  '       Text
'jclass'      Name
' '           Text
'clazz'       Name
';'           Punctuation
'\n'          Text

'  '          Text
'jmethodID'   Name
' '           Text
'mid'         Name
';'           Punctuation
'\n'          Text

'  '          Text
'jbyteArray'  Name
' '           Text
'ba'          Name
';'           Punctuation
'\n'          Text

'  '          Text
'jbyte'       Name
'*'           Operator
' '           Text
'bae'         Name
';'           Punctuation
'\n'          Text

'  '          Text
'jsize'       Name
' '           Text
'sz'          Name
';'           Punctuation
'\n'          Text

'  '          Text
'int'         Keyword.Type
' '           Text
'i'           Name
';'           Punctuation
'\n'          Text

'\n'          Text

'  '          Text
'if'          Keyword
' '           Text
'('           Punctuation
'!'           Operator
'$input'      Name
')'           Punctuation
' '           Text
'{'           Punctuation
'\n'          Text

'    '        Text
'SWIG_JavaThrowException' Name
'('           Punctuation
'jenv'        Name
','           Punctuation
' '           Text
'SWIG_JavaNullPointerException' Name
','           Punctuation
' '           Text
'"'           Literal.String
'BigInteger null' Literal.String
'"'           Literal.String
')'           Punctuation
';'           Punctuation
'\n'          Text

'    '        Text
'return'      Keyword
' '           Text
'$null'       Name
';'           Punctuation
'\n'          Text

'  '          Text
'}'           Punctuation
'\n'          Text

'  '          Text
'clazz'       Name
' '           Text
'='           Operator
' '           Text
'JCALL1'      Name
'('           Punctuation
'GetObjectClass' Name
','           Punctuation
' '           Text
'jenv'        Name
','           Punctuation
' '           Text
'$input'      Name
')'           Punctuation
';'           Punctuation
'\n'          Text

'  '          Text
'mid'         Name
' '           Text
'='           Operator
' '           Text
'JCALL3'      Name
'('           Punctuation
'GetMethodID' Name
','           Punctuation
' '           Text
'jenv'        Name
','           Punctuation
' '           Text
'clazz'       Name
','           Punctuation
' '           Text
'"'           Literal.String
'toByteArray' Literal.String
'"'           Literal.String
','           Punctuation
' '           Text
'"'           Literal.String
'()[B'        Literal.String
'"'           Literal.String
')'           Punctuation
';'           Punctuation
'\n'          Text

'  '          Text
'ba'          Name
' '           Text
'='           Operator
' '           Text
'('           Punctuation
'jbyteArray'  Name
')'           Punctuation
'JCALL2'      Name
'('           Punctuation
'CallObjectMethod' Name
','           Punctuation
' '           Text
'jenv'        Name
','           Punctuation
' '           Text
'$input'      Name
','           Punctuation
' '           Text
'mid'         Name
')'           Punctuation
';'           Punctuation
'\n'          Text

'  '          Text
'bae'         Name
' '           Text
'='           Operator
' '           Text
'JCALL2'      Name
'('           Punctuation
'GetByteArrayElements' Name
','           Punctuation
' '           Text
'jenv'        Name
','           Punctuation
' '           Text
'ba'          Name
','           Punctuation
' '           Text
'0'           Literal.Number.Integer
')'           Punctuation
';'           Punctuation
'\n'          Text

'  '          Text
'sz'          Name
' '           Text
'='           Operator
' '           Text
'JCALL1'      Name
'('           Punctuation
'GetArrayLength' Name
','           Punctuation
' '           Text
'jenv'        Name
','           Punctuation
' '           Text
'ba'          Name
')'           Punctuation
';'           Punctuation
'\n'          Text

'  '          Text
'$1'          Name
' '           Text
'='           Operator
' '           Text
'0'           Literal.Number.Integer
';'           Punctuation
'\n'          Text

'  '          Text
'for'         Keyword
'('           Punctuation
'i'           Name
'='           Operator
'0'           Literal.Number.Integer
';'           Punctuation
' '           Text
'i'           Name
'<'           Operator
'sz'          Name
';'           Punctuation
' '           Text
'i'           Name
'+'           Operator
'+'           Operator
')'           Punctuation
' '           Text
'{'           Punctuation
'\n'          Text

'    '        Text
'$1'          Name
' '           Text
'='           Operator
' '           Text
'('           Punctuation
'$1'          Name
' '           Text
'<'           Operator
'<'           Operator
' '           Text
'8'           Literal.Number.Integer
')'           Punctuation
' '           Text
'|'           Operator
' '           Text
'('           Punctuation
'$1_type'     Name
')'           Punctuation
'('           Punctuation
'unsigned'    Keyword.Type
' '           Text
'char'        Keyword.Type
')'           Punctuation
'bae'         Name
'['           Punctuation
'i'           Name
']'           Punctuation
';'           Punctuation
'\n'          Text

'  '          Text
'}'           Punctuation
'\n'          Text

'  '          Text
'JCALL3'      Name
'('           Punctuation
'ReleaseByteArrayElements' Name
','           Punctuation
' '           Text
'jenv'        Name
','           Punctuation
' '           Text
'ba'          Name
','           Punctuation
' '           Text
'bae'         Name
','           Punctuation
' '           Text
'0'           Literal.Number.Integer
')'           Punctuation
';'           Punctuation
'\n'          Text

'}'           Punctuation
'\n'          Text

'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'directorout' Name
')'           Punctuation
' '           Text
'unsigned'    Keyword.Type
' '           Text
'long'        Keyword.Type
' '           Text
'long'        Keyword.Type
' '           Text
'{'           Punctuation
' \n  '       Text
'jclass'      Name
' '           Text
'clazz'       Name
';'           Punctuation
'\n'          Text

'  '          Text
'jmethodID'   Name
' '           Text
'mid'         Name
';'           Punctuation
'\n'          Text

'  '          Text
'jbyteArray'  Name
' '           Text
'ba'          Name
';'           Punctuation
'\n'          Text

'  '          Text
'jbyte'       Name
'*'           Operator
' '           Text
'bae'         Name
';'           Punctuation
'\n'          Text

'  '          Text
'jsize'       Name
' '           Text
'sz'          Name
';'           Punctuation
'\n'          Text

'  '          Text
'int'         Keyword.Type
' '           Text
'i'           Name
';'           Punctuation
'\n'          Text

'\n'          Text

'  '          Text
'if'          Keyword
' '           Text
'('           Punctuation
'!'           Operator
'$input'      Name
')'           Punctuation
' '           Text
'{'           Punctuation
'\n'          Text

'    '        Text
'SWIG_JavaThrowException' Name
'('           Punctuation
'jenv'        Name
','           Punctuation
' '           Text
'SWIG_JavaNullPointerException' Name
','           Punctuation
' '           Text
'"'           Literal.String
'BigInteger null' Literal.String
'"'           Literal.String
')'           Punctuation
';'           Punctuation
'\n'          Text

'    '        Text
'return'      Keyword
' '           Text
'$null'       Name
';'           Punctuation
'\n'          Text

'  '          Text
'}'           Punctuation
'\n'          Text

'  '          Text
'clazz'       Name
' '           Text
'='           Operator
' '           Text
'JCALL1'      Name
'('           Punctuation
'GetObjectClass' Name
','           Punctuation
' '           Text
'jenv'        Name
','           Punctuation
' '           Text
'$input'      Name
')'           Punctuation
';'           Punctuation
'\n'          Text

'  '          Text
'mid'         Name
' '           Text
'='           Operator
' '           Text
'JCALL3'      Name
'('           Punctuation
'GetMethodID' Name
','           Punctuation
' '           Text
'jenv'        Name
','           Punctuation
' '           Text
'clazz'       Name
','           Punctuation
' '           Text
'"'           Literal.String
'toByteArray' Literal.String
'"'           Literal.String
','           Punctuation
' '           Text
'"'           Literal.String
'()[B'        Literal.String
'"'           Literal.String
')'           Punctuation
';'           Punctuation
'\n'          Text

'  '          Text
'ba'          Name
' '           Text
'='           Operator
' '           Text
'('           Punctuation
'jbyteArray'  Name
')'           Punctuation
'JCALL2'      Name
'('           Punctuation
'CallObjectMethod' Name
','           Punctuation
' '           Text
'jenv'        Name
','           Punctuation
' '           Text
'$input'      Name
','           Punctuation
' '           Text
'mid'         Name
')'           Punctuation
';'           Punctuation
'\n'          Text

'  '          Text
'bae'         Name
' '           Text
'='           Operator
' '           Text
'JCALL2'      Name
'('           Punctuation
'GetByteArrayElements' Name
','           Punctuation
' '           Text
'jenv'        Name
','           Punctuation
' '           Text
'ba'          Name
','           Punctuation
' '           Text
'0'           Literal.Number.Integer
')'           Punctuation
';'           Punctuation
'\n'          Text

'  '          Text
'sz'          Name
' '           Text
'='           Operator
' '           Text
'JCALL1'      Name
'('           Punctuation
'GetArrayLength' Name
','           Punctuation
' '           Text
'jenv'        Name
','           Punctuation
' '           Text
'ba'          Name
')'           Punctuation
';'           Punctuation
'\n'          Text

'  '          Text
'$result'     Name
' '           Text
'='           Operator
' '           Text
'0'           Literal.Number.Integer
';'           Punctuation
'\n'          Text

'  '          Text
'for'         Keyword
'('           Punctuation
'i'           Name
'='           Operator
'0'           Literal.Number.Integer
';'           Punctuation
' '           Text
'i'           Name
'<'           Operator
'sz'          Name
';'           Punctuation
' '           Text
'i'           Name
'+'           Operator
'+'           Operator
')'           Punctuation
' '           Text
'{'           Punctuation
'\n'          Text

'    '        Text
'$result'     Name
' '           Text
'='           Operator
' '           Text
'('           Punctuation
'$result'     Name
' '           Text
'<'           Operator
'<'           Operator
' '           Text
'8'           Literal.Number.Integer
')'           Punctuation
' '           Text
'|'           Operator
' '           Text
'('           Punctuation
'$1_type'     Name
')'           Punctuation
'('           Punctuation
'unsigned'    Keyword.Type
' '           Text
'char'        Keyword.Type
')'           Punctuation
'bae'         Name
'['           Punctuation
'i'           Name
']'           Punctuation
';'           Punctuation
'\n'          Text

'  '          Text
'}'           Punctuation
'\n'          Text

'  '          Text
'JCALL3'      Name
'('           Punctuation
'ReleaseByteArrayElements' Name
','           Punctuation
' '           Text
'jenv'        Name
','           Punctuation
' '           Text
'ba'          Name
','           Punctuation
' '           Text
'bae'         Name
','           Punctuation
' '           Text
'0'           Literal.Number.Integer
')'           Punctuation
';'           Punctuation
'\n'          Text

'}'           Punctuation
'\n'          Text

'\n'          Text

'\n'          Text

"/* Convert to BigInteger - byte array holds number in 2's complement big endian format */" Comment.Multiline
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'out'         Name
')'           Punctuation
' '           Text
'unsigned'    Keyword.Type
' '           Text
'long'        Keyword.Type
' '           Text
'long'        Keyword.Type
' '           Text
'{'           Punctuation
' \n  '       Text
'jbyteArray'  Name
' '           Text
'ba'          Name
' '           Text
'='           Operator
' '           Text
'JCALL1'      Name
'('           Punctuation
'NewByteArray' Name
','           Punctuation
' '           Text
'jenv'        Name
','           Punctuation
' '           Text
'9'           Literal.Number.Integer
')'           Punctuation
';'           Punctuation
'\n'          Text

'  '          Text
'jbyte'       Name
'*'           Operator
' '           Text
'bae'         Name
' '           Text
'='           Operator
' '           Text
'JCALL2'      Name
'('           Punctuation
'GetByteArrayElements' Name
','           Punctuation
' '           Text
'jenv'        Name
','           Punctuation
' '           Text
'ba'          Name
','           Punctuation
' '           Text
'0'           Literal.Number.Integer
')'           Punctuation
';'           Punctuation
'\n'          Text

'  '          Text
'jclass'      Name
' '           Text
'clazz'       Name
' '           Text
'='           Operator
' '           Text
'JCALL1'      Name
'('           Punctuation
'FindClass'   Name
','           Punctuation
' '           Text
'jenv'        Name
','           Punctuation
' '           Text
'"'           Literal.String
'java/math/BigInteger' Literal.String
'"'           Literal.String
')'           Punctuation
';'           Punctuation
'\n'          Text

'  '          Text
'jmethodID'   Name
' '           Text
'mid'         Name
' '           Text
'='           Operator
' '           Text
'JCALL3'      Name
'('           Punctuation
'GetMethodID' Name
','           Punctuation
' '           Text
'jenv'        Name
','           Punctuation
' '           Text
'clazz'       Name
','           Punctuation
' '           Text
'"'           Literal.String
'<init>'      Literal.String
'"'           Literal.String
','           Punctuation
' '           Text
'"'           Literal.String
'([B)V'       Literal.String
'"'           Literal.String
')'           Punctuation
';'           Punctuation
'\n'          Text

'  '          Text
'jobject'     Name
' '           Text
'bigint'      Name
';'           Punctuation
'\n'          Text

'  '          Text
'int'         Keyword.Type
' '           Text
'i'           Name
';'           Punctuation
'\n'          Text

'\n'          Text

'  '          Text
'bae'         Name
'['           Punctuation
'0'           Literal.Number.Integer
']'           Punctuation
' '           Text
'='           Operator
' '           Text
'0'           Literal.Number.Integer
';'           Punctuation
'\n'          Text

'  '          Text
'for'         Keyword
'('           Punctuation
'i'           Name
'='           Operator
'1'           Literal.Number.Integer
';'           Punctuation
' '           Text
'i'           Name
'<'           Operator
'9'           Literal.Number.Integer
';'           Punctuation
' '           Text
'i'           Name
'+'           Operator
'+'           Operator
' '           Text
')'           Punctuation
' '           Text
'{'           Punctuation
'\n'          Text

'    '        Text
'bae'         Name
'['           Punctuation
'i'           Name
']'           Punctuation
' '           Text
'='           Operator
' '           Text
'('           Punctuation
'jbyte'       Name
')'           Punctuation
'('           Punctuation
'$1'          Name
'>'           Operator
'>'           Operator
'8'           Literal.Number.Integer
'*'           Operator
'('           Punctuation
'8'           Literal.Number.Integer
'-'           Operator
'i'           Name
')'           Punctuation
')'           Punctuation
';'           Punctuation
'\n'          Text

'  '          Text
'}'           Punctuation
'\n'          Text

'\n'          Text

'  '          Text
'JCALL3'      Name
'('           Punctuation
'ReleaseByteArrayElements' Name
','           Punctuation
' '           Text
'jenv'        Name
','           Punctuation
' '           Text
'ba'          Name
','           Punctuation
' '           Text
'bae'         Name
','           Punctuation
' '           Text
'0'           Literal.Number.Integer
')'           Punctuation
';'           Punctuation
'\n'          Text

'  '          Text
'bigint'      Name
' '           Text
'='           Operator
' '           Text
'JCALL3'      Name
'('           Punctuation
'NewObject'   Name
','           Punctuation
' '           Text
'jenv'        Name
','           Punctuation
' '           Text
'clazz'       Name
','           Punctuation
' '           Text
'mid'         Name
','           Punctuation
' '           Text
'ba'          Name
')'           Punctuation
';'           Punctuation
'\n'          Text

'  '          Text
'$result'     Name
' '           Text
'='           Operator
' '           Text
'bigint'      Name
';'           Punctuation
'\n'          Text

'}'           Punctuation
'\n'          Text

'\n'          Text

'/* Convert to BigInteger (see out typemap) */' Comment.Multiline
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'directorin'  Name
','           Punctuation
' '           Text
'descriptor'  Name
'='           Operator
'"'           Literal.String
'Ljava/math/BigInteger;' Literal.String
'"'           Literal.String
')'           Punctuation
' '           Text
'unsigned'    Keyword.Type
' '           Text
'long'        Keyword.Type
' '           Text
'long'        Keyword.Type
','           Punctuation
' '           Text
'const'       Keyword
' '           Text
'unsigned'    Keyword.Type
' '           Text
'long'        Keyword.Type
' '           Text
'long'        Keyword.Type
' '           Text
'&'           Operator
' '           Text
'{'           Punctuation
'\n'          Text

'  '          Text
'jbyteArray'  Name
' '           Text
'ba'          Name
' '           Text
'='           Operator
' '           Text
'JCALL1'      Name
'('           Punctuation
'NewByteArray' Name
','           Punctuation
' '           Text
'jenv'        Name
','           Punctuation
' '           Text
'9'           Literal.Number.Integer
')'           Punctuation
';'           Punctuation
'\n'          Text

'  '          Text
'jbyte'       Name
'*'           Operator
' '           Text
'bae'         Name
' '           Text
'='           Operator
' '           Text
'JCALL2'      Name
'('           Punctuation
'GetByteArrayElements' Name
','           Punctuation
' '           Text
'jenv'        Name
','           Punctuation
' '           Text
'ba'          Name
','           Punctuation
' '           Text
'0'           Literal.Number.Integer
')'           Punctuation
';'           Punctuation
'\n'          Text

'  '          Text
'jclass'      Name
' '           Text
'clazz'       Name
' '           Text
'='           Operator
' '           Text
'JCALL1'      Name
'('           Punctuation
'FindClass'   Name
','           Punctuation
' '           Text
'jenv'        Name
','           Punctuation
' '           Text
'"'           Literal.String
'java/math/BigInteger' Literal.String
'"'           Literal.String
')'           Punctuation
';'           Punctuation
'\n'          Text

'  '          Text
'jmethodID'   Name
' '           Text
'mid'         Name
' '           Text
'='           Operator
' '           Text
'JCALL3'      Name
'('           Punctuation
'GetMethodID' Name
','           Punctuation
' '           Text
'jenv'        Name
','           Punctuation
' '           Text
'clazz'       Name
','           Punctuation
' '           Text
'"'           Literal.String
'<init>'      Literal.String
'"'           Literal.String
','           Punctuation
' '           Text
'"'           Literal.String
'([B)V'       Literal.String
'"'           Literal.String
')'           Punctuation
';'           Punctuation
'\n'          Text

'  '          Text
'jobject'     Name
' '           Text
'bigint'      Name
';'           Punctuation
'\n'          Text

'  '          Text
'int'         Keyword.Type
' '           Text
'swig_i'      Name
';'           Punctuation
'\n'          Text

'\n'          Text

'  '          Text
'bae'         Name
'['           Punctuation
'0'           Literal.Number.Integer
']'           Punctuation
' '           Text
'='           Operator
' '           Text
'0'           Literal.Number.Integer
';'           Punctuation
'\n'          Text

'  '          Text
'for'         Keyword
'('           Punctuation
'swig_i'      Name
'='           Operator
'1'           Literal.Number.Integer
';'           Punctuation
' '           Text
'swig_i'      Name
'<'           Operator
'9'           Literal.Number.Integer
';'           Punctuation
' '           Text
'swig_i'      Name
'+'           Operator
'+'           Operator
' '           Text
')'           Punctuation
' '           Text
'{'           Punctuation
'\n'          Text

'    '        Text
'bae'         Name
'['           Punctuation
'swig_i'      Name
']'           Punctuation
' '           Text
'='           Operator
' '           Text
'('           Punctuation
'jbyte'       Name
')'           Punctuation
'('           Punctuation
'$1'          Name
'>'           Operator
'>'           Operator
'8'           Literal.Number.Integer
'*'           Operator
'('           Punctuation
'8'           Literal.Number.Integer
'-'           Operator
'swig_i'      Name
')'           Punctuation
')'           Punctuation
';'           Punctuation
'\n'          Text

'  '          Text
'}'           Punctuation
'\n'          Text

'\n'          Text

'  '          Text
'JCALL3'      Name
'('           Punctuation
'ReleaseByteArrayElements' Name
','           Punctuation
' '           Text
'jenv'        Name
','           Punctuation
' '           Text
'ba'          Name
','           Punctuation
' '           Text
'bae'         Name
','           Punctuation
' '           Text
'0'           Literal.Number.Integer
')'           Punctuation
';'           Punctuation
'\n'          Text

'  '          Text
'bigint'      Name
' '           Text
'='           Operator
' '           Text
'JCALL3'      Name
'('           Punctuation
'NewObject'   Name
','           Punctuation
' '           Text
'jenv'        Name
','           Punctuation
' '           Text
'clazz'       Name
','           Punctuation
' '           Text
'mid'         Name
','           Punctuation
' '           Text
'ba'          Name
')'           Punctuation
';'           Punctuation
'\n'          Text

'  '          Text
'$input'      Name
' '           Text
'='           Operator
' '           Text
'bigint'      Name
';'           Punctuation
'\n'          Text

'}'           Punctuation
'\n'          Text

'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'javadirectorin' Name
')'           Punctuation
' '           Text
'unsigned'    Keyword.Type
' '           Text
'long'        Keyword.Type
' '           Text
'long'        Keyword.Type
' '           Text
'"'           Literal.String
'$jniinput'   Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'javadirectorout' Name
')'           Punctuation
' '           Text
'unsigned'    Keyword.Type
' '           Text
'long'        Keyword.Type
' '           Text
'long'        Keyword.Type
' '           Text
'"'           Literal.String
'$javacall'   Literal.String
'"'           Literal.String
'\n'          Text

'\n'          Text

'/* char * - treat as String */' Comment.Multiline
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'in'          Name
','           Punctuation
' '           Text
'noblock'     Name
'='           Operator
'1'           Literal.Number.Integer
')'           Punctuation
' '           Text
'char'        Keyword.Type
' '           Text
'*'           Operator
' '           Text
'{'           Punctuation
'\n'          Text

' '           Text
'$1'          Name
' '           Text
'='           Operator
' '           Text
'0'           Literal.Number.Integer
';'           Punctuation
'\n'          Text

'  '          Text
'if'          Keyword
' '           Text
'('           Punctuation
'$input'      Name
')'           Punctuation
' '           Text
'{'           Punctuation
'\n'          Text

'    '        Text
'$1'          Name
' '           Text
'='           Operator
' '           Text
'('           Punctuation
'$1_ltype'    Name
')'           Punctuation
'JCALL2'      Name
'('           Punctuation
'GetStringUTFChars' Name
','           Punctuation
' '           Text
'jenv'        Name
','           Punctuation
' '           Text
'$input'      Name
','           Punctuation
' '           Text
'0'           Literal.Number.Integer
')'           Punctuation
';'           Punctuation
'\n'          Text

'    '        Text
'if'          Keyword
' '           Text
'('           Punctuation
'!'           Operator
'$1'          Name
')'           Punctuation
' '           Text
'return'      Keyword
' '           Text
'$null'       Name
';'           Punctuation
'\n'          Text

'  '          Text
'}'           Punctuation
'\n'          Text

'}'           Punctuation
'\n'          Text

'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'directorout' Name
','           Punctuation
' '           Text
'noblock'     Name
'='           Operator
'1'           Literal.Number.Integer
','           Punctuation
' '           Text
'warning'     Name
'='           Operator
'SWIGWARN_TYPEMAP_DIRECTOROUT_PTR_MSG' Name
')'           Punctuation
' '           Text
'char'        Keyword.Type
' '           Text
'*'           Operator
' '           Text
'{'           Punctuation
'\n'          Text

'  '          Text
'$1'          Name
' '           Text
'='           Operator
' '           Text
'0'           Literal.Number.Integer
';'           Punctuation
'\n'          Text

'  '          Text
'if'          Keyword
' '           Text
'('           Punctuation
'$input'      Name
')'           Punctuation
' '           Text
'{'           Punctuation
'\n'          Text

'    '        Text
'$result'     Name
' '           Text
'='           Operator
' '           Text
'('           Punctuation
'$1_ltype'    Name
')'           Punctuation
'JCALL2'      Name
'('           Punctuation
'GetStringUTFChars' Name
','           Punctuation
' '           Text
'jenv'        Name
','           Punctuation
' '           Text
'$input'      Name
','           Punctuation
' '           Text
'0'           Literal.Number.Integer
')'           Punctuation
';'           Punctuation
'\n'          Text

'    '        Text
'if'          Keyword
' '           Text
'('           Punctuation
'!'           Operator
'$result'     Name
')'           Punctuation
' '           Text
'return'      Keyword
' '           Text
'$null'       Name
';'           Punctuation
'\n'          Text

'  '          Text
'}'           Punctuation
'\n'          Text

'}'           Punctuation
'\n'          Text

'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'directorin'  Name
','           Punctuation
' '           Text
'descriptor'  Name
'='           Operator
'"'           Literal.String
'Ljava/lang/String;' Literal.String
'"'           Literal.String
','           Punctuation
' '           Text
'noblock'     Name
'='           Operator
'1'           Literal.Number.Integer
')'           Punctuation
' '           Text
'char'        Keyword.Type
' '           Text
'*'           Operator
' '           Text
'{'           Punctuation
'\n'          Text

' '           Text
'$input'      Name
' '           Text
'='           Operator
' '           Text
'0'           Literal.Number.Integer
';'           Punctuation
'\n'          Text

'  '          Text
'if'          Keyword
' '           Text
'('           Punctuation
'$1'          Name
')'           Punctuation
' '           Text
'{'           Punctuation
'\n'          Text

'    '        Text
'$input'      Name
' '           Text
'='           Operator
' '           Text
'JCALL1'      Name
'('           Punctuation
'NewStringUTF' Name
','           Punctuation
' '           Text
'jenv'        Name
','           Punctuation
' '           Text
'('           Punctuation
'const'       Keyword
' '           Text
'char'        Keyword.Type
' '           Text
'*'           Operator
')'           Punctuation
'$1'          Name
')'           Punctuation
';'           Punctuation
'\n'          Text

'    '        Text
'if'          Keyword
' '           Text
'('           Punctuation
'!'           Operator
'$input'      Name
')'           Punctuation
' '           Text
'return'      Keyword
' '           Text
'$null'       Name
';'           Punctuation
'\n'          Text

'  '          Text
'}'           Punctuation
'\n'          Text

'}'           Punctuation
'\n'          Text

'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'freearg'     Name
','           Punctuation
' '           Text
'noblock'     Name
'='           Operator
'1'           Literal.Number.Integer
')'           Punctuation
' '           Text
'char'        Keyword.Type
' '           Text
'*'           Operator
' '           Text
'{'           Punctuation
' '           Text
'if'          Keyword
' '           Text
'('           Punctuation
'$1'          Name
')'           Punctuation
' '           Text
'JCALL2'      Name
'('           Punctuation
'ReleaseStringUTFChars' Name
','           Punctuation
' '           Text
'jenv'        Name
','           Punctuation
' '           Text
'$input'      Name
','           Punctuation
' '           Text
'('           Punctuation
'const'       Keyword
' '           Text
'char'        Keyword.Type
' '           Text
'*'           Operator
')'           Punctuation
'$1'          Name
')'           Punctuation
';'           Punctuation
' '           Text
'}'           Punctuation
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'out'         Name
','           Punctuation
' '           Text
'noblock'     Name
'='           Operator
'1'           Literal.Number.Integer
')'           Punctuation
' '           Text
'char'        Keyword.Type
' '           Text
'*'           Operator
' '           Text
'{'           Punctuation
' '           Text
'if'          Keyword
' '           Text
'('           Punctuation
'$1'          Name
')'           Punctuation
' '           Text
'$result'     Name
' '           Text
'='           Operator
' '           Text
'JCALL1'      Name
'('           Punctuation
'NewStringUTF' Name
','           Punctuation
' '           Text
'jenv'        Name
','           Punctuation
' '           Text
'('           Punctuation
'const'       Keyword
' '           Text
'char'        Keyword.Type
' '           Text
'*'           Operator
')'           Punctuation
'$1'          Name
')'           Punctuation
';'           Punctuation
' '           Text
'}'           Punctuation
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'javadirectorin' Name
')'           Punctuation
' '           Text
'char'        Keyword.Type
' '           Text
'*'           Operator
' '           Text
'"'           Literal.String
'$jniinput'   Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'javadirectorout' Name
')'           Punctuation
' '           Text
'char'        Keyword.Type
' '           Text
'*'           Operator
' '           Text
'"'           Literal.String
'$javacall'   Literal.String
'"'           Literal.String
'\n'          Text

'\n'          Text

'/* char *& - treat as String */' Comment.Multiline
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'in'          Name
','           Punctuation
' '           Text
'noblock'     Name
'='           Operator
'1'           Literal.Number.Integer
')'           Punctuation
' '           Text
'char'        Keyword.Type
' '           Text
'*'           Operator
'&'           Operator
' '           Text
'('           Punctuation
'$*1_ltype'   Name
' '           Text
'temp'        Name
' '           Text
'='           Operator
' '           Text
'0'           Literal.Number.Integer
')'           Punctuation
' '           Text
'{'           Punctuation
'\n'          Text

' '           Text
'$1'          Name
' '           Text
'='           Operator
' '           Text
'0'           Literal.Number.Integer
';'           Punctuation
'\n'          Text

'  '          Text
'if'          Keyword
' '           Text
'('           Punctuation
'$input'      Name
')'           Punctuation
' '           Text
'{'           Punctuation
'\n'          Text

'    '        Text
'temp'        Name
' '           Text
'='           Operator
' '           Text
'('           Punctuation
'$*1_ltype'   Name
')'           Punctuation
'JCALL2'      Name
'('           Punctuation
'GetStringUTFChars' Name
','           Punctuation
' '           Text
'jenv'        Name
','           Punctuation
' '           Text
'$input'      Name
','           Punctuation
' '           Text
'0'           Literal.Number.Integer
')'           Punctuation
';'           Punctuation
'\n'          Text

'    '        Text
'if'          Keyword
' '           Text
'('           Punctuation
'!'           Operator
'temp'        Name
')'           Punctuation
' '           Text
'return'      Keyword
' '           Text
'$null'       Name
';'           Punctuation
'\n'          Text

'  '          Text
'}'           Punctuation
'\n'          Text

'  '          Text
'$1'          Name
' '           Text
'='           Operator
' '           Text
'&'           Operator
'temp'        Name
';'           Punctuation
'\n'          Text

'}'           Punctuation
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'freearg'     Name
','           Punctuation
' '           Text
'noblock'     Name
'='           Operator
'1'           Literal.Number.Integer
')'           Punctuation
' '           Text
'char'        Keyword.Type
' '           Text
'*'           Operator
'&'           Operator
' '           Text
'{'           Punctuation
' '           Text
'if'          Keyword
' '           Text
'('           Punctuation
'$1'          Name
' '           Text
'&'           Operator
'&'           Operator
' '           Text
'*'           Operator
'$1'          Name
')'           Punctuation
' '           Text
'JCALL2'      Name
'('           Punctuation
'ReleaseStringUTFChars' Name
','           Punctuation
' '           Text
'jenv'        Name
','           Punctuation
' '           Text
'$input'      Name
','           Punctuation
' '           Text
'('           Punctuation
'const'       Keyword
' '           Text
'char'        Keyword.Type
' '           Text
'*'           Operator
')'           Punctuation
'*'           Operator
'$1'          Name
')'           Punctuation
';'           Punctuation
' '           Text
'}'           Punctuation
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'out'         Name
','           Punctuation
' '           Text
'noblock'     Name
'='           Operator
'1'           Literal.Number.Integer
')'           Punctuation
' '           Text
'char'        Keyword.Type
' '           Text
'*'           Operator
'&'           Operator
' '           Text
'{'           Punctuation
' '           Text
'if'          Keyword
' '           Text
'('           Punctuation
'*'           Operator
'$1'          Name
')'           Punctuation
' '           Text
'$result'     Name
' '           Text
'='           Operator
' '           Text
'JCALL1'      Name
'('           Punctuation
'NewStringUTF' Name
','           Punctuation
' '           Text
'jenv'        Name
','           Punctuation
' '           Text
'('           Punctuation
'const'       Keyword
' '           Text
'char'        Keyword.Type
' '           Text
'*'           Operator
')'           Punctuation
'*'           Operator
'$1'          Name
')'           Punctuation
';'           Punctuation
' '           Text
'}'           Punctuation
'\n'          Text

'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'out'         Name
')'           Punctuation
' '           Text
'void'        Keyword.Type
' '           Text
'"'           Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'javadirectorin' Name
')'           Punctuation
' '           Text
'void'        Keyword.Type
' '           Text
'"'           Literal.String
'$jniinput'   Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'javadirectorout' Name
')'           Punctuation
' '           Text
'void'        Keyword.Type
' '           Text
'"'           Literal.String
'$javacall'   Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'directorin'  Name
','           Punctuation
' '           Text
'descriptor'  Name
'='           Operator
'"'           Literal.String
'V'           Literal.String
'"'           Literal.String
')'           Punctuation
' '           Text
'void'        Keyword.Type
' '           Text
'"'           Literal.String
'"'           Literal.String
'\n'          Text

'\n'          Text

'/* primitive types by reference */' Comment.Multiline
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'in'          Name
')'           Punctuation
' '           Text
'const'       Keyword
' '           Text
'bool'        Keyword.Type
' '           Text
'&'           Operator
' '           Text
'('           Punctuation
'$*1_ltype'   Name
' '           Text
'temp'        Name
')'           Punctuation
'\n'          Text

'%'           Operator
'{'           Punctuation
' '           Text
'temp'        Name
' '           Text
'='           Operator
' '           Text
'$input'      Name
' '           Text
'?'           Operator
' '           Text
'true'        Name.Builtin
' '           Text
':'           Operator
' '           Text
'false'       Name.Builtin
';'           Punctuation
' \n   '      Text
'$1'          Name
' '           Text
'='           Operator
' '           Text
'&'           Operator
'temp'        Name
';'           Punctuation
' '           Text
'%'           Operator
'}'           Punctuation
'\n'          Text

'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'directorout' Name
','           Punctuation
'warning'     Name
'='           Operator
'SWIGWARN_TYPEMAP_THREAD_UNSAFE_MSG' Name
')'           Punctuation
' '           Text
'const'       Keyword
' '           Text
'bool'        Keyword.Type
' '           Text
'&'           Operator
'\n'          Text

'%'           Operator
'{'           Punctuation
' '           Text
'static'      Keyword
' '           Text
'$*1_ltype'   Name
' '           Text
'temp'        Name
';'           Punctuation
'\n'          Text

'   '         Text
'temp'        Name
' '           Text
'='           Operator
' '           Text
'$input'      Name
' '           Text
'?'           Operator
' '           Text
'true'        Name.Builtin
' '           Text
':'           Operator
' '           Text
'false'       Name.Builtin
';'           Punctuation
' \n   '      Text
'$result'     Name
' '           Text
'='           Operator
' '           Text
'&'           Operator
'temp'        Name
';'           Punctuation
' '           Text
'%'           Operator
'}'           Punctuation
'\n'          Text

'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'javadirectorin' Name
')'           Punctuation
' '           Text
'const'       Keyword
' '           Text
'bool'        Keyword.Type
' '           Text
'&'           Operator
' '           Text
'"'           Literal.String
'$jniinput'   Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'javadirectorout' Name
')'           Punctuation
' '           Text
'const'       Keyword
' '           Text
'bool'        Keyword.Type
' '           Text
'&'           Operator
' '           Text
'"'           Literal.String
'$javacall'   Literal.String
'"'           Literal.String
'\n'          Text

'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'in'          Name
')'           Punctuation
' '           Text
'const'       Keyword
' '           Text
'char'        Keyword.Type
' '           Text
'&'           Operator
' '           Text
'('           Punctuation
'$*1_ltype'   Name
' '           Text
'temp'        Name
')'           Punctuation
','           Punctuation
' \n             ' Text
'const'       Keyword
' '           Text
'signed'      Keyword.Type
' '           Text
'char'        Keyword.Type
' '           Text
'&'           Operator
' '           Text
'('           Punctuation
'$*1_ltype'   Name
' '           Text
'temp'        Name
')'           Punctuation
','           Punctuation
' \n             ' Text
'const'       Keyword
' '           Text
'unsigned'    Keyword.Type
' '           Text
'char'        Keyword.Type
' '           Text
'&'           Operator
' '           Text
'('           Punctuation
'$*1_ltype'   Name
' '           Text
'temp'        Name
')'           Punctuation
','           Punctuation
' \n             ' Text
'const'       Keyword
' '           Text
'short'       Keyword.Type
' '           Text
'&'           Operator
' '           Text
'('           Punctuation
'$*1_ltype'   Name
' '           Text
'temp'        Name
')'           Punctuation
','           Punctuation
' \n             ' Text
'const'       Keyword
' '           Text
'unsigned'    Keyword.Type
' '           Text
'short'       Keyword.Type
' '           Text
'&'           Operator
' '           Text
'('           Punctuation
'$*1_ltype'   Name
' '           Text
'temp'        Name
')'           Punctuation
','           Punctuation
' \n             ' Text
'const'       Keyword
' '           Text
'int'         Keyword.Type
' '           Text
'&'           Operator
' '           Text
'('           Punctuation
'$*1_ltype'   Name
' '           Text
'temp'        Name
')'           Punctuation
','           Punctuation
' \n             ' Text
'const'       Keyword
' '           Text
'unsigned'    Keyword.Type
' '           Text
'int'         Keyword.Type
' '           Text
'&'           Operator
' '           Text
'('           Punctuation
'$*1_ltype'   Name
' '           Text
'temp'        Name
')'           Punctuation
','           Punctuation
' \n             ' Text
'const'       Keyword
' '           Text
'long'        Keyword.Type
' '           Text
'&'           Operator
' '           Text
'('           Punctuation
'$*1_ltype'   Name
' '           Text
'temp'        Name
')'           Punctuation
','           Punctuation
' \n             ' Text
'const'       Keyword
' '           Text
'unsigned'    Keyword.Type
' '           Text
'long'        Keyword.Type
' '           Text
'&'           Operator
' '           Text
'('           Punctuation
'$*1_ltype'   Name
' '           Text
'temp'        Name
')'           Punctuation
','           Punctuation
' \n             ' Text
'const'       Keyword
' '           Text
'long'        Keyword.Type
' '           Text
'long'        Keyword.Type
' '           Text
'&'           Operator
' '           Text
'('           Punctuation
'$*1_ltype'   Name
' '           Text
'temp'        Name
')'           Punctuation
','           Punctuation
' \n             ' Text
'const'       Keyword
' '           Text
'float'       Keyword.Type
' '           Text
'&'           Operator
' '           Text
'('           Punctuation
'$*1_ltype'   Name
' '           Text
'temp'        Name
')'           Punctuation
','           Punctuation
' \n             ' Text
'const'       Keyword
' '           Text
'double'      Keyword.Type
' '           Text
'&'           Operator
' '           Text
'('           Punctuation
'$*1_ltype'   Name
' '           Text
'temp'        Name
')'           Punctuation
'\n'          Text

'%'           Operator
'{'           Punctuation
' '           Text
'temp'        Name
' '           Text
'='           Operator
' '           Text
'('           Punctuation
'$*1_ltype'   Name
')'           Punctuation
'$input'      Name
';'           Punctuation
' \n   '      Text
'$1'          Name
' '           Text
'='           Operator
' '           Text
'&'           Operator
'temp'        Name
';'           Punctuation
' '           Text
'%'           Operator
'}'           Punctuation
'\n'          Text

'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'directorout' Name
','           Punctuation
'warning'     Name
'='           Operator
'SWIGWARN_TYPEMAP_THREAD_UNSAFE_MSG' Name
')'           Punctuation
' '           Text
'const'       Keyword
' '           Text
'char'        Keyword.Type
' '           Text
'&'           Operator
','           Punctuation
'\n'          Text

'             ' Text
'const'       Keyword
' '           Text
'signed'      Keyword.Type
' '           Text
'char'        Keyword.Type
' '           Text
'&'           Operator
','           Punctuation
'\n'          Text

'             ' Text
'const'       Keyword
' '           Text
'unsigned'    Keyword.Type
' '           Text
'char'        Keyword.Type
' '           Text
'&'           Operator
','           Punctuation
'\n'          Text

'             ' Text
'const'       Keyword
' '           Text
'short'       Keyword.Type
' '           Text
'&'           Operator
','           Punctuation
'\n'          Text

'             ' Text
'const'       Keyword
' '           Text
'unsigned'    Keyword.Type
' '           Text
'short'       Keyword.Type
' '           Text
'&'           Operator
','           Punctuation
'\n'          Text

'             ' Text
'const'       Keyword
' '           Text
'int'         Keyword.Type
' '           Text
'&'           Operator
','           Punctuation
'\n'          Text

'             ' Text
'const'       Keyword
' '           Text
'unsigned'    Keyword.Type
' '           Text
'int'         Keyword.Type
' '           Text
'&'           Operator
','           Punctuation
'\n'          Text

'             ' Text
'const'       Keyword
' '           Text
'long'        Keyword.Type
' '           Text
'&'           Operator
','           Punctuation
'\n'          Text

'             ' Text
'const'       Keyword
' '           Text
'unsigned'    Keyword.Type
' '           Text
'long'        Keyword.Type
' '           Text
'&'           Operator
','           Punctuation
'\n'          Text

'             ' Text
'const'       Keyword
' '           Text
'long'        Keyword.Type
' '           Text
'long'        Keyword.Type
' '           Text
'&'           Operator
','           Punctuation
'\n'          Text

'             ' Text
'const'       Keyword
' '           Text
'float'       Keyword.Type
' '           Text
'&'           Operator
','           Punctuation
'\n'          Text

'             ' Text
'const'       Keyword
' '           Text
'double'      Keyword.Type
' '           Text
'&'           Operator
'\n'          Text

'%'           Operator
'{'           Punctuation
' '           Text
'static'      Keyword
' '           Text
'$*1_ltype'   Name
' '           Text
'temp'        Name
';'           Punctuation
'\n'          Text

'   '         Text
'temp'        Name
' '           Text
'='           Operator
' '           Text
'('           Punctuation
'$*1_ltype'   Name
')'           Punctuation
'$input'      Name
';'           Punctuation
' \n   '      Text
'$result'     Name
' '           Text
'='           Operator
' '           Text
'&'           Operator
'temp'        Name
';'           Punctuation
' '           Text
'%'           Operator
'}'           Punctuation
'\n'          Text

'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'directorin'  Name
','           Punctuation
' '           Text
'descriptor'  Name
'='           Operator
'"'           Literal.String
'Z'           Literal.String
'"'           Literal.String
')'           Punctuation
' '           Text
'const'       Keyword
' '           Text
'bool'        Keyword.Type
' '           Text
'&'           Operator
'           ' Text
'"'           Literal.String
'$input = (jboolean)$1;' Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'directorin'  Name
','           Punctuation
' '           Text
'descriptor'  Name
'='           Operator
'"'           Literal.String
'C'           Literal.String
'"'           Literal.String
')'           Punctuation
' '           Text
'const'       Keyword
' '           Text
'char'        Keyword.Type
' '           Text
'&'           Operator
'           ' Text
'"'           Literal.String
'$input = (jchar)$1;' Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'directorin'  Name
','           Punctuation
' '           Text
'descriptor'  Name
'='           Operator
'"'           Literal.String
'B'           Literal.String
'"'           Literal.String
')'           Punctuation
' '           Text
'const'       Keyword
' '           Text
'signed'      Keyword.Type
' '           Text
'char'        Keyword.Type
' '           Text
'&'           Operator
'    '        Text
'"'           Literal.String
'$input = (jbyte)$1;' Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'directorin'  Name
','           Punctuation
' '           Text
'descriptor'  Name
'='           Operator
'"'           Literal.String
'S'           Literal.String
'"'           Literal.String
')'           Punctuation
' '           Text
'const'       Keyword
' '           Text
'unsigned'    Keyword.Type
' '           Text
'char'        Keyword.Type
' '           Text
'&'           Operator
'  '          Text
'"'           Literal.String
'$input = (jshort)$1;' Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'directorin'  Name
','           Punctuation
' '           Text
'descriptor'  Name
'='           Operator
'"'           Literal.String
'S'           Literal.String
'"'           Literal.String
')'           Punctuation
' '           Text
'const'       Keyword
' '           Text
'short'       Keyword.Type
' '           Text
'&'           Operator
'          '  Text
'"'           Literal.String
'$input = (jshort)$1;' Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'directorin'  Name
','           Punctuation
' '           Text
'descriptor'  Name
'='           Operator
'"'           Literal.String
'I'           Literal.String
'"'           Literal.String
')'           Punctuation
' '           Text
'const'       Keyword
' '           Text
'unsigned'    Keyword.Type
' '           Text
'short'       Keyword.Type
' '           Text
'&'           Operator
' '           Text
'"'           Literal.String
'$input = (jint)$1;' Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'directorin'  Name
','           Punctuation
' '           Text
'descriptor'  Name
'='           Operator
'"'           Literal.String
'I'           Literal.String
'"'           Literal.String
')'           Punctuation
' '           Text
'const'       Keyword
' '           Text
'int'         Keyword.Type
' '           Text
'&'           Operator
'            ' Text
'"'           Literal.String
'$input = (jint)$1;' Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'directorin'  Name
','           Punctuation
' '           Text
'descriptor'  Name
'='           Operator
'"'           Literal.String
'J'           Literal.String
'"'           Literal.String
')'           Punctuation
' '           Text
'const'       Keyword
' '           Text
'unsigned'    Keyword.Type
' '           Text
'int'         Keyword.Type
' '           Text
'&'           Operator
'   '         Text
'"'           Literal.String
'$input = (jlong)$1;' Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'directorin'  Name
','           Punctuation
' '           Text
'descriptor'  Name
'='           Operator
'"'           Literal.String
'I'           Literal.String
'"'           Literal.String
')'           Punctuation
' '           Text
'const'       Keyword
' '           Text
'long'        Keyword.Type
' '           Text
'&'           Operator
'           ' Text
'"'           Literal.String
'$input = (jint)$1;' Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'directorin'  Name
','           Punctuation
' '           Text
'descriptor'  Name
'='           Operator
'"'           Literal.String
'J'           Literal.String
'"'           Literal.String
')'           Punctuation
' '           Text
'const'       Keyword
' '           Text
'unsigned'    Keyword.Type
' '           Text
'long'        Keyword.Type
' '           Text
'&'           Operator
'  '          Text
'"'           Literal.String
'$input = (jlong)$1;' Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'directorin'  Name
','           Punctuation
' '           Text
'descriptor'  Name
'='           Operator
'"'           Literal.String
'J'           Literal.String
'"'           Literal.String
')'           Punctuation
' '           Text
'const'       Keyword
' '           Text
'long'        Keyword.Type
' '           Text
'long'        Keyword.Type
' '           Text
'&'           Operator
'      '      Text
'"'           Literal.String
'$input = (jlong)$1;' Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'directorin'  Name
','           Punctuation
' '           Text
'descriptor'  Name
'='           Operator
'"'           Literal.String
'F'           Literal.String
'"'           Literal.String
')'           Punctuation
' '           Text
'const'       Keyword
' '           Text
'float'       Keyword.Type
' '           Text
'&'           Operator
'          '  Text
'"'           Literal.String
'$input = (jfloat)$1;' Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'directorin'  Name
','           Punctuation
' '           Text
'descriptor'  Name
'='           Operator
'"'           Literal.String
'D'           Literal.String
'"'           Literal.String
')'           Punctuation
' '           Text
'const'       Keyword
' '           Text
'double'      Keyword.Type
' '           Text
'&'           Operator
'         '   Text
'"'           Literal.String
'$input = (jdouble)$1;' Literal.String
'"'           Literal.String
'\n'          Text

'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'javadirectorin' Name
')'           Punctuation
' '           Text
'const'       Keyword
' '           Text
'char'        Keyword.Type
' '           Text
'&'           Operator
' '           Text
'('           Punctuation
'$*1_ltype'   Name
' '           Text
'temp'        Name
')'           Punctuation
','           Punctuation
' \n                         ' Text
'const'       Keyword
' '           Text
'signed'      Keyword.Type
' '           Text
'char'        Keyword.Type
' '           Text
'&'           Operator
' '           Text
'('           Punctuation
'$*1_ltype'   Name
' '           Text
'temp'        Name
')'           Punctuation
','           Punctuation
' \n                         ' Text
'const'       Keyword
' '           Text
'unsigned'    Keyword.Type
' '           Text
'char'        Keyword.Type
' '           Text
'&'           Operator
' '           Text
'('           Punctuation
'$*1_ltype'   Name
' '           Text
'temp'        Name
')'           Punctuation
','           Punctuation
' \n                         ' Text
'const'       Keyword
' '           Text
'short'       Keyword.Type
' '           Text
'&'           Operator
' '           Text
'('           Punctuation
'$*1_ltype'   Name
' '           Text
'temp'        Name
')'           Punctuation
','           Punctuation
' \n                         ' Text
'const'       Keyword
' '           Text
'unsigned'    Keyword.Type
' '           Text
'short'       Keyword.Type
' '           Text
'&'           Operator
' '           Text
'('           Punctuation
'$*1_ltype'   Name
' '           Text
'temp'        Name
')'           Punctuation
','           Punctuation
' \n                         ' Text
'const'       Keyword
' '           Text
'int'         Keyword.Type
' '           Text
'&'           Operator
' '           Text
'('           Punctuation
'$*1_ltype'   Name
' '           Text
'temp'        Name
')'           Punctuation
','           Punctuation
' \n                         ' Text
'const'       Keyword
' '           Text
'unsigned'    Keyword.Type
' '           Text
'int'         Keyword.Type
' '           Text
'&'           Operator
' '           Text
'('           Punctuation
'$*1_ltype'   Name
' '           Text
'temp'        Name
')'           Punctuation
','           Punctuation
' \n                         ' Text
'const'       Keyword
' '           Text
'long'        Keyword.Type
' '           Text
'&'           Operator
' '           Text
'('           Punctuation
'$*1_ltype'   Name
' '           Text
'temp'        Name
')'           Punctuation
','           Punctuation
' \n                         ' Text
'const'       Keyword
' '           Text
'unsigned'    Keyword.Type
' '           Text
'long'        Keyword.Type
' '           Text
'&'           Operator
' '           Text
'('           Punctuation
'$*1_ltype'   Name
' '           Text
'temp'        Name
')'           Punctuation
','           Punctuation
' \n                         ' Text
'const'       Keyword
' '           Text
'long'        Keyword.Type
' '           Text
'long'        Keyword.Type
' '           Text
'&'           Operator
' '           Text
'('           Punctuation
'$*1_ltype'   Name
' '           Text
'temp'        Name
')'           Punctuation
','           Punctuation
' \n                         ' Text
'const'       Keyword
' '           Text
'float'       Keyword.Type
' '           Text
'&'           Operator
' '           Text
'('           Punctuation
'$*1_ltype'   Name
' '           Text
'temp'        Name
')'           Punctuation
','           Punctuation
' \n                         ' Text
'const'       Keyword
' '           Text
'double'      Keyword.Type
' '           Text
'&'           Operator
' '           Text
'('           Punctuation
'$*1_ltype'   Name
' '           Text
'temp'        Name
')'           Punctuation
'\n'          Text

'  '          Text
'"'           Literal.String
'$jniinput'   Literal.String
'"'           Literal.String
'\n'          Text

'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'javadirectorout' Name
')'           Punctuation
' '           Text
'const'       Keyword
' '           Text
'char'        Keyword.Type
' '           Text
'&'           Operator
' '           Text
'('           Punctuation
'$*1_ltype'   Name
' '           Text
'temp'        Name
')'           Punctuation
','           Punctuation
' \n                          ' Text
'const'       Keyword
' '           Text
'signed'      Keyword.Type
' '           Text
'char'        Keyword.Type
' '           Text
'&'           Operator
' '           Text
'('           Punctuation
'$*1_ltype'   Name
' '           Text
'temp'        Name
')'           Punctuation
','           Punctuation
' \n                          ' Text
'const'       Keyword
' '           Text
'unsigned'    Keyword.Type
' '           Text
'char'        Keyword.Type
' '           Text
'&'           Operator
' '           Text
'('           Punctuation
'$*1_ltype'   Name
' '           Text
'temp'        Name
')'           Punctuation
','           Punctuation
' \n                          ' Text
'const'       Keyword
' '           Text
'short'       Keyword.Type
' '           Text
'&'           Operator
' '           Text
'('           Punctuation
'$*1_ltype'   Name
' '           Text
'temp'        Name
')'           Punctuation
','           Punctuation
' \n                          ' Text
'const'       Keyword
' '           Text
'unsigned'    Keyword.Type
' '           Text
'short'       Keyword.Type
' '           Text
'&'           Operator
' '           Text
'('           Punctuation
'$*1_ltype'   Name
' '           Text
'temp'        Name
')'           Punctuation
','           Punctuation
' \n                          ' Text
'const'       Keyword
' '           Text
'int'         Keyword.Type
' '           Text
'&'           Operator
' '           Text
'('           Punctuation
'$*1_ltype'   Name
' '           Text
'temp'        Name
')'           Punctuation
','           Punctuation
' \n                          ' Text
'const'       Keyword
' '           Text
'unsigned'    Keyword.Type
' '           Text
'int'         Keyword.Type
' '           Text
'&'           Operator
' '           Text
'('           Punctuation
'$*1_ltype'   Name
' '           Text
'temp'        Name
')'           Punctuation
','           Punctuation
' \n                          ' Text
'const'       Keyword
' '           Text
'long'        Keyword.Type
' '           Text
'&'           Operator
' '           Text
'('           Punctuation
'$*1_ltype'   Name
' '           Text
'temp'        Name
')'           Punctuation
','           Punctuation
' \n                          ' Text
'const'       Keyword
' '           Text
'unsigned'    Keyword.Type
' '           Text
'long'        Keyword.Type
' '           Text
'&'           Operator
' '           Text
'('           Punctuation
'$*1_ltype'   Name
' '           Text
'temp'        Name
')'           Punctuation
','           Punctuation
' \n                          ' Text
'const'       Keyword
' '           Text
'long'        Keyword.Type
' '           Text
'long'        Keyword.Type
' '           Text
'&'           Operator
' '           Text
'('           Punctuation
'$*1_ltype'   Name
' '           Text
'temp'        Name
')'           Punctuation
','           Punctuation
' \n                          ' Text
'const'       Keyword
' '           Text
'float'       Keyword.Type
' '           Text
'&'           Operator
' '           Text
'('           Punctuation
'$*1_ltype'   Name
' '           Text
'temp'        Name
')'           Punctuation
','           Punctuation
' \n                          ' Text
'const'       Keyword
' '           Text
'double'      Keyword.Type
' '           Text
'&'           Operator
' '           Text
'('           Punctuation
'$*1_ltype'   Name
' '           Text
'temp'        Name
')'           Punctuation
'\n'          Text

'  '          Text
'"'           Literal.String
'$javacall'   Literal.String
'"'           Literal.String
'\n'          Text

'\n'          Text

'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'out'         Name
')'           Punctuation
' '           Text
'const'       Keyword
' '           Text
'bool'        Keyword.Type
' '           Text
'&'           Operator
'           ' Text
'%'           Operator
'{'           Punctuation
' '           Text
'$result'     Name
' '           Text
'='           Operator
' '           Text
'('           Punctuation
'jboolean'    Name
')'           Punctuation
'*'           Operator
'$1'          Name
';'           Punctuation
' '           Text
'%'           Operator
'}'           Punctuation
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'out'         Name
')'           Punctuation
' '           Text
'const'       Keyword
' '           Text
'char'        Keyword.Type
' '           Text
'&'           Operator
'           ' Text
'%'           Operator
'{'           Punctuation
' '           Text
'$result'     Name
' '           Text
'='           Operator
' '           Text
'('           Punctuation
'jchar'       Name
')'           Punctuation
'*'           Operator
'$1'          Name
';'           Punctuation
' '           Text
'%'           Operator
'}'           Punctuation
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'out'         Name
')'           Punctuation
' '           Text
'const'       Keyword
' '           Text
'signed'      Keyword.Type
' '           Text
'char'        Keyword.Type
' '           Text
'&'           Operator
'    '        Text
'%'           Operator
'{'           Punctuation
' '           Text
'$result'     Name
' '           Text
'='           Operator
' '           Text
'('           Punctuation
'jbyte'       Name
')'           Punctuation
'*'           Operator
'$1'          Name
';'           Punctuation
' '           Text
'%'           Operator
'}'           Punctuation
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'out'         Name
')'           Punctuation
' '           Text
'const'       Keyword
' '           Text
'unsigned'    Keyword.Type
' '           Text
'char'        Keyword.Type
' '           Text
'&'           Operator
'  '          Text
'%'           Operator
'{'           Punctuation
' '           Text
'$result'     Name
' '           Text
'='           Operator
' '           Text
'('           Punctuation
'jshort'      Name
')'           Punctuation
'*'           Operator
'$1'          Name
';'           Punctuation
' '           Text
'%'           Operator
'}'           Punctuation
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'out'         Name
')'           Punctuation
' '           Text
'const'       Keyword
' '           Text
'short'       Keyword.Type
' '           Text
'&'           Operator
'          '  Text
'%'           Operator
'{'           Punctuation
' '           Text
'$result'     Name
' '           Text
'='           Operator
' '           Text
'('           Punctuation
'jshort'      Name
')'           Punctuation
'*'           Operator
'$1'          Name
';'           Punctuation
' '           Text
'%'           Operator
'}'           Punctuation
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'out'         Name
')'           Punctuation
' '           Text
'const'       Keyword
' '           Text
'unsigned'    Keyword.Type
' '           Text
'short'       Keyword.Type
' '           Text
'&'           Operator
' '           Text
'%'           Operator
'{'           Punctuation
' '           Text
'$result'     Name
' '           Text
'='           Operator
' '           Text
'('           Punctuation
'jint'        Name
')'           Punctuation
'*'           Operator
'$1'          Name
';'           Punctuation
' '           Text
'%'           Operator
'}'           Punctuation
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'out'         Name
')'           Punctuation
' '           Text
'const'       Keyword
' '           Text
'int'         Keyword.Type
' '           Text
'&'           Operator
'            ' Text
'%'           Operator
'{'           Punctuation
' '           Text
'$result'     Name
' '           Text
'='           Operator
' '           Text
'('           Punctuation
'jint'        Name
')'           Punctuation
'*'           Operator
'$1'          Name
';'           Punctuation
' '           Text
'%'           Operator
'}'           Punctuation
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'out'         Name
')'           Punctuation
' '           Text
'const'       Keyword
' '           Text
'unsigned'    Keyword.Type
' '           Text
'int'         Keyword.Type
' '           Text
'&'           Operator
'   '         Text
'%'           Operator
'{'           Punctuation
' '           Text
'$result'     Name
' '           Text
'='           Operator
' '           Text
'('           Punctuation
'jlong'       Name
')'           Punctuation
'*'           Operator
'$1'          Name
';'           Punctuation
' '           Text
'%'           Operator
'}'           Punctuation
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'out'         Name
')'           Punctuation
' '           Text
'const'       Keyword
' '           Text
'long'        Keyword.Type
' '           Text
'&'           Operator
'           ' Text
'%'           Operator
'{'           Punctuation
' '           Text
'$result'     Name
' '           Text
'='           Operator
' '           Text
'('           Punctuation
'jint'        Name
')'           Punctuation
'*'           Operator
'$1'          Name
';'           Punctuation
' '           Text
'%'           Operator
'}'           Punctuation
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'out'         Name
')'           Punctuation
' '           Text
'const'       Keyword
' '           Text
'unsigned'    Keyword.Type
' '           Text
'long'        Keyword.Type
' '           Text
'&'           Operator
'  '          Text
'%'           Operator
'{'           Punctuation
' '           Text
'$result'     Name
' '           Text
'='           Operator
' '           Text
'('           Punctuation
'jlong'       Name
')'           Punctuation
'*'           Operator
'$1'          Name
';'           Punctuation
' '           Text
'%'           Operator
'}'           Punctuation
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'out'         Name
')'           Punctuation
' '           Text
'const'       Keyword
' '           Text
'long'        Keyword.Type
' '           Text
'long'        Keyword.Type
' '           Text
'&'           Operator
'      '      Text
'%'           Operator
'{'           Punctuation
' '           Text
'$result'     Name
' '           Text
'='           Operator
' '           Text
'('           Punctuation
'jlong'       Name
')'           Punctuation
'*'           Operator
'$1'          Name
';'           Punctuation
' '           Text
'%'           Operator
'}'           Punctuation
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'out'         Name
')'           Punctuation
' '           Text
'const'       Keyword
' '           Text
'float'       Keyword.Type
' '           Text
'&'           Operator
'          '  Text
'%'           Operator
'{'           Punctuation
' '           Text
'$result'     Name
' '           Text
'='           Operator
' '           Text
'('           Punctuation
'jfloat'      Name
')'           Punctuation
'*'           Operator
'$1'          Name
';'           Punctuation
' '           Text
'%'           Operator
'}'           Punctuation
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'out'         Name
')'           Punctuation
' '           Text
'const'       Keyword
' '           Text
'double'      Keyword.Type
' '           Text
'&'           Operator
'         '   Text
'%'           Operator
'{'           Punctuation
' '           Text
'$result'     Name
' '           Text
'='           Operator
' '           Text
'('           Punctuation
'jdouble'     Name
')'           Punctuation
'*'           Operator
'$1'          Name
';'           Punctuation
' '           Text
'%'           Operator
'}'           Punctuation
'\n'          Text

'\n'          Text

'/* const unsigned long long & */' Comment.Multiline
'\n'          Text

'/* Similar to unsigned long long */' Comment.Multiline
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'in'          Name
')'           Punctuation
' '           Text
'const'       Keyword
' '           Text
'unsigned'    Keyword.Type
' '           Text
'long'        Keyword.Type
' '           Text
'long'        Keyword.Type
' '           Text
'&'           Operator
' '           Text
'('           Punctuation
'$*1_ltype'   Name
' '           Text
'temp'        Name
')'           Punctuation
' '           Text
'{'           Punctuation
' \n  '       Text
'jclass'      Name
' '           Text
'clazz'       Name
';'           Punctuation
'\n'          Text

'  '          Text
'jmethodID'   Name
' '           Text
'mid'         Name
';'           Punctuation
'\n'          Text

'  '          Text
'jbyteArray'  Name
' '           Text
'ba'          Name
';'           Punctuation
'\n'          Text

'  '          Text
'jbyte'       Name
'*'           Operator
' '           Text
'bae'         Name
';'           Punctuation
'\n'          Text

'  '          Text
'jsize'       Name
' '           Text
'sz'          Name
';'           Punctuation
'\n'          Text

'  '          Text
'int'         Keyword.Type
' '           Text
'i'           Name
';'           Punctuation
'\n'          Text

'\n'          Text

'  '          Text
'if'          Keyword
' '           Text
'('           Punctuation
'!'           Operator
'$input'      Name
')'           Punctuation
' '           Text
'{'           Punctuation
'\n'          Text

'    '        Text
'SWIG_JavaThrowException' Name
'('           Punctuation
'jenv'        Name
','           Punctuation
' '           Text
'SWIG_JavaNullPointerException' Name
','           Punctuation
' '           Text
'"'           Literal.String
'BigInteger null' Literal.String
'"'           Literal.String
')'           Punctuation
';'           Punctuation
'\n'          Text

'    '        Text
'return'      Keyword
' '           Text
'$null'       Name
';'           Punctuation
'\n'          Text

'  '          Text
'}'           Punctuation
'\n'          Text

'  '          Text
'clazz'       Name
' '           Text
'='           Operator
' '           Text
'JCALL1'      Name
'('           Punctuation
'GetObjectClass' Name
','           Punctuation
' '           Text
'jenv'        Name
','           Punctuation
' '           Text
'$input'      Name
')'           Punctuation
';'           Punctuation
'\n'          Text

'  '          Text
'mid'         Name
' '           Text
'='           Operator
' '           Text
'JCALL3'      Name
'('           Punctuation
'GetMethodID' Name
','           Punctuation
' '           Text
'jenv'        Name
','           Punctuation
' '           Text
'clazz'       Name
','           Punctuation
' '           Text
'"'           Literal.String
'toByteArray' Literal.String
'"'           Literal.String
','           Punctuation
' '           Text
'"'           Literal.String
'()[B'        Literal.String
'"'           Literal.String
')'           Punctuation
';'           Punctuation
'\n'          Text

'  '          Text
'ba'          Name
' '           Text
'='           Operator
' '           Text
'('           Punctuation
'jbyteArray'  Name
')'           Punctuation
'JCALL2'      Name
'('           Punctuation
'CallObjectMethod' Name
','           Punctuation
' '           Text
'jenv'        Name
','           Punctuation
' '           Text
'$input'      Name
','           Punctuation
' '           Text
'mid'         Name
')'           Punctuation
';'           Punctuation
'\n'          Text

'  '          Text
'bae'         Name
' '           Text
'='           Operator
' '           Text
'JCALL2'      Name
'('           Punctuation
'GetByteArrayElements' Name
','           Punctuation
' '           Text
'jenv'        Name
','           Punctuation
' '           Text
'ba'          Name
','           Punctuation
' '           Text
'0'           Literal.Number.Integer
')'           Punctuation
';'           Punctuation
'\n'          Text

'  '          Text
'sz'          Name
' '           Text
'='           Operator
' '           Text
'JCALL1'      Name
'('           Punctuation
'GetArrayLength' Name
','           Punctuation
' '           Text
'jenv'        Name
','           Punctuation
' '           Text
'ba'          Name
')'           Punctuation
';'           Punctuation
'\n'          Text

'  '          Text
'$1'          Name
' '           Text
'='           Operator
' '           Text
'&'           Operator
'temp'        Name
';'           Punctuation
'\n'          Text

'  '          Text
'temp'        Name
' '           Text
'='           Operator
' '           Text
'0'           Literal.Number.Integer
';'           Punctuation
'\n'          Text

'  '          Text
'for'         Keyword
'('           Punctuation
'i'           Name
'='           Operator
'0'           Literal.Number.Integer
';'           Punctuation
' '           Text
'i'           Name
'<'           Operator
'sz'          Name
';'           Punctuation
' '           Text
'i'           Name
'+'           Operator
'+'           Operator
')'           Punctuation
' '           Text
'{'           Punctuation
'\n'          Text

'    '        Text
'temp'        Name
' '           Text
'='           Operator
' '           Text
'('           Punctuation
'temp'        Name
' '           Text
'<'           Operator
'<'           Operator
' '           Text
'8'           Literal.Number.Integer
')'           Punctuation
' '           Text
'|'           Operator
' '           Text
'('           Punctuation
'$*1_ltype'   Name
')'           Punctuation
'('           Punctuation
'unsigned'    Keyword.Type
' '           Text
'char'        Keyword.Type
')'           Punctuation
'bae'         Name
'['           Punctuation
'i'           Name
']'           Punctuation
';'           Punctuation
'\n'          Text

'  '          Text
'}'           Punctuation
'\n'          Text

'  '          Text
'JCALL3'      Name
'('           Punctuation
'ReleaseByteArrayElements' Name
','           Punctuation
' '           Text
'jenv'        Name
','           Punctuation
' '           Text
'ba'          Name
','           Punctuation
' '           Text
'bae'         Name
','           Punctuation
' '           Text
'0'           Literal.Number.Integer
')'           Punctuation
';'           Punctuation
'\n'          Text

'}'           Punctuation
'\n'          Text

'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'directorout' Name
','           Punctuation
'warning'     Name
'='           Operator
'SWIGWARN_TYPEMAP_THREAD_UNSAFE_MSG' Name
')'           Punctuation
' '           Text
'const'       Keyword
' '           Text
'unsigned'    Keyword.Type
' '           Text
'long'        Keyword.Type
' '           Text
'long'        Keyword.Type
' '           Text
'&'           Operator
' '           Text
'{'           Punctuation
' \n  '       Text
'static'      Keyword
' '           Text
'$*1_ltype'   Name
' '           Text
'temp'        Name
';'           Punctuation
'\n'          Text

'  '          Text
'jclass'      Name
' '           Text
'clazz'       Name
';'           Punctuation
'\n'          Text

'  '          Text
'jmethodID'   Name
' '           Text
'mid'         Name
';'           Punctuation
'\n'          Text

'  '          Text
'jbyteArray'  Name
' '           Text
'ba'          Name
';'           Punctuation
'\n'          Text

'  '          Text
'jbyte'       Name
'*'           Operator
' '           Text
'bae'         Name
';'           Punctuation
'\n'          Text

'  '          Text
'jsize'       Name
' '           Text
'sz'          Name
';'           Punctuation
'\n'          Text

'  '          Text
'int'         Keyword.Type
' '           Text
'i'           Name
';'           Punctuation
'\n'          Text

'\n'          Text

'  '          Text
'if'          Keyword
' '           Text
'('           Punctuation
'!'           Operator
'$input'      Name
')'           Punctuation
' '           Text
'{'           Punctuation
'\n'          Text

'    '        Text
'SWIG_JavaThrowException' Name
'('           Punctuation
'jenv'        Name
','           Punctuation
' '           Text
'SWIG_JavaNullPointerException' Name
','           Punctuation
' '           Text
'"'           Literal.String
'BigInteger null' Literal.String
'"'           Literal.String
')'           Punctuation
';'           Punctuation
'\n'          Text

'    '        Text
'return'      Keyword
' '           Text
'$null'       Name
';'           Punctuation
'\n'          Text

'  '          Text
'}'           Punctuation
'\n'          Text

'  '          Text
'clazz'       Name
' '           Text
'='           Operator
' '           Text
'JCALL1'      Name
'('           Punctuation
'GetObjectClass' Name
','           Punctuation
' '           Text
'jenv'        Name
','           Punctuation
' '           Text
'$input'      Name
')'           Punctuation
';'           Punctuation
'\n'          Text

'  '          Text
'mid'         Name
' '           Text
'='           Operator
' '           Text
'JCALL3'      Name
'('           Punctuation
'GetMethodID' Name
','           Punctuation
' '           Text
'jenv'        Name
','           Punctuation
' '           Text
'clazz'       Name
','           Punctuation
' '           Text
'"'           Literal.String
'toByteArray' Literal.String
'"'           Literal.String
','           Punctuation
' '           Text
'"'           Literal.String
'()[B'        Literal.String
'"'           Literal.String
')'           Punctuation
';'           Punctuation
'\n'          Text

'  '          Text
'ba'          Name
' '           Text
'='           Operator
' '           Text
'('           Punctuation
'jbyteArray'  Name
')'           Punctuation
'JCALL2'      Name
'('           Punctuation
'CallObjectMethod' Name
','           Punctuation
' '           Text
'jenv'        Name
','           Punctuation
' '           Text
'$input'      Name
','           Punctuation
' '           Text
'mid'         Name
')'           Punctuation
';'           Punctuation
'\n'          Text

'  '          Text
'bae'         Name
' '           Text
'='           Operator
' '           Text
'JCALL2'      Name
'('           Punctuation
'GetByteArrayElements' Name
','           Punctuation
' '           Text
'jenv'        Name
','           Punctuation
' '           Text
'ba'          Name
','           Punctuation
' '           Text
'0'           Literal.Number.Integer
')'           Punctuation
';'           Punctuation
'\n'          Text

'  '          Text
'sz'          Name
' '           Text
'='           Operator
' '           Text
'JCALL1'      Name
'('           Punctuation
'GetArrayLength' Name
','           Punctuation
' '           Text
'jenv'        Name
','           Punctuation
' '           Text
'ba'          Name
')'           Punctuation
';'           Punctuation
'\n'          Text

'  '          Text
'$result'     Name
' '           Text
'='           Operator
' '           Text
'&'           Operator
'temp'        Name
';'           Punctuation
'\n'          Text

'  '          Text
'temp'        Name
' '           Text
'='           Operator
' '           Text
'0'           Literal.Number.Integer
';'           Punctuation
'\n'          Text

'  '          Text
'for'         Keyword
'('           Punctuation
'i'           Name
'='           Operator
'0'           Literal.Number.Integer
';'           Punctuation
' '           Text
'i'           Name
'<'           Operator
'sz'          Name
';'           Punctuation
' '           Text
'i'           Name
'+'           Operator
'+'           Operator
')'           Punctuation
' '           Text
'{'           Punctuation
'\n'          Text

'    '        Text
'temp'        Name
' '           Text
'='           Operator
' '           Text
'('           Punctuation
'temp'        Name
' '           Text
'<'           Operator
'<'           Operator
' '           Text
'8'           Literal.Number.Integer
')'           Punctuation
' '           Text
'|'           Operator
' '           Text
'('           Punctuation
'$*1_ltype'   Name
')'           Punctuation
'('           Punctuation
'unsigned'    Keyword.Type
' '           Text
'char'        Keyword.Type
')'           Punctuation
'bae'         Name
'['           Punctuation
'i'           Name
']'           Punctuation
';'           Punctuation
'\n'          Text

'  '          Text
'}'           Punctuation
'\n'          Text

'  '          Text
'JCALL3'      Name
'('           Punctuation
'ReleaseByteArrayElements' Name
','           Punctuation
' '           Text
'jenv'        Name
','           Punctuation
' '           Text
'ba'          Name
','           Punctuation
' '           Text
'bae'         Name
','           Punctuation
' '           Text
'0'           Literal.Number.Integer
')'           Punctuation
';'           Punctuation
'\n'          Text

'}'           Punctuation
'\n'          Text

'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'out'         Name
')'           Punctuation
' '           Text
'const'       Keyword
' '           Text
'unsigned'    Keyword.Type
' '           Text
'long'        Keyword.Type
' '           Text
'long'        Keyword.Type
' '           Text
'&'           Operator
' '           Text
'{'           Punctuation
' \n  '       Text
'jbyteArray'  Name
' '           Text
'ba'          Name
' '           Text
'='           Operator
' '           Text
'JCALL1'      Name
'('           Punctuation
'NewByteArray' Name
','           Punctuation
' '           Text
'jenv'        Name
','           Punctuation
' '           Text
'9'           Literal.Number.Integer
')'           Punctuation
';'           Punctuation
'\n'          Text

'  '          Text
'jbyte'       Name
'*'           Operator
' '           Text
'bae'         Name
' '           Text
'='           Operator
' '           Text
'JCALL2'      Name
'('           Punctuation
'GetByteArrayElements' Name
','           Punctuation
' '           Text
'jenv'        Name
','           Punctuation
' '           Text
'ba'          Name
','           Punctuation
' '           Text
'0'           Literal.Number.Integer
')'           Punctuation
';'           Punctuation
'\n'          Text

'  '          Text
'jclass'      Name
' '           Text
'clazz'       Name
' '           Text
'='           Operator
' '           Text
'JCALL1'      Name
'('           Punctuation
'FindClass'   Name
','           Punctuation
' '           Text
'jenv'        Name
','           Punctuation
' '           Text
'"'           Literal.String
'java/math/BigInteger' Literal.String
'"'           Literal.String
')'           Punctuation
';'           Punctuation
'\n'          Text

'  '          Text
'jmethodID'   Name
' '           Text
'mid'         Name
' '           Text
'='           Operator
' '           Text
'JCALL3'      Name
'('           Punctuation
'GetMethodID' Name
','           Punctuation
' '           Text
'jenv'        Name
','           Punctuation
' '           Text
'clazz'       Name
','           Punctuation
' '           Text
'"'           Literal.String
'<init>'      Literal.String
'"'           Literal.String
','           Punctuation
' '           Text
'"'           Literal.String
'([B)V'       Literal.String
'"'           Literal.String
')'           Punctuation
';'           Punctuation
'\n'          Text

'  '          Text
'jobject'     Name
' '           Text
'bigint'      Name
';'           Punctuation
'\n'          Text

'  '          Text
'int'         Keyword.Type
' '           Text
'i'           Name
';'           Punctuation
'\n'          Text

'\n'          Text

'  '          Text
'bae'         Name
'['           Punctuation
'0'           Literal.Number.Integer
']'           Punctuation
' '           Text
'='           Operator
' '           Text
'0'           Literal.Number.Integer
';'           Punctuation
'\n'          Text

'  '          Text
'for'         Keyword
'('           Punctuation
'i'           Name
'='           Operator
'1'           Literal.Number.Integer
';'           Punctuation
' '           Text
'i'           Name
'<'           Operator
'9'           Literal.Number.Integer
';'           Punctuation
' '           Text
'i'           Name
'+'           Operator
'+'           Operator
' '           Text
')'           Punctuation
' '           Text
'{'           Punctuation
'\n'          Text

'    '        Text
'bae'         Name
'['           Punctuation
'i'           Name
']'           Punctuation
' '           Text
'='           Operator
' '           Text
'('           Punctuation
'jbyte'       Name
')'           Punctuation
'('           Punctuation
'*'           Operator
'$1'          Name
'>'           Operator
'>'           Operator
'8'           Literal.Number.Integer
'*'           Operator
'('           Punctuation
'8'           Literal.Number.Integer
'-'           Operator
'i'           Name
')'           Punctuation
')'           Punctuation
';'           Punctuation
'\n'          Text

'  '          Text
'}'           Punctuation
'\n'          Text

'\n'          Text

'  '          Text
'JCALL3'      Name
'('           Punctuation
'ReleaseByteArrayElements' Name
','           Punctuation
' '           Text
'jenv'        Name
','           Punctuation
' '           Text
'ba'          Name
','           Punctuation
' '           Text
'bae'         Name
','           Punctuation
' '           Text
'0'           Literal.Number.Integer
')'           Punctuation
';'           Punctuation
'\n'          Text

'  '          Text
'bigint'      Name
' '           Text
'='           Operator
' '           Text
'JCALL3'      Name
'('           Punctuation
'NewObject'   Name
','           Punctuation
' '           Text
'jenv'        Name
','           Punctuation
' '           Text
'clazz'       Name
','           Punctuation
' '           Text
'mid'         Name
','           Punctuation
' '           Text
'ba'          Name
')'           Punctuation
';'           Punctuation
'\n'          Text

'  '          Text
'$result'     Name
' '           Text
'='           Operator
' '           Text
'bigint'      Name
';'           Punctuation
'\n'          Text

'}'           Punctuation
'\n'          Text

'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'javadirectorin' Name
')'           Punctuation
' '           Text
'const'       Keyword
' '           Text
'unsigned'    Keyword.Type
' '           Text
'long'        Keyword.Type
' '           Text
'long'        Keyword.Type
' '           Text
'&'           Operator
' '           Text
'"'           Literal.String
'$jniinput'   Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'javadirectorout' Name
')'           Punctuation
' '           Text
'const'       Keyword
' '           Text
'unsigned'    Keyword.Type
' '           Text
'long'        Keyword.Type
' '           Text
'long'        Keyword.Type
' '           Text
'&'           Operator
' '           Text
'"'           Literal.String
'$javacall'   Literal.String
'"'           Literal.String
'\n'          Text

'\n'          Text

'/* Default handling. Object passed by value. Convert to a pointer */' Comment.Multiline
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'in'          Name
')'           Punctuation
' '           Text
'SWIGTYPE'    Name
' '           Text
'('           Punctuation
'$&1_type'    Name
' '           Text
'argp'        Name
')'           Punctuation
'\n'          Text

'%'           Operator
'{'           Punctuation
' '           Text
'argp'        Name
' '           Text
'='           Operator
' '           Text
'*'           Operator
'('           Punctuation
'$&1_ltype'   Name
'*'           Operator
')'           Punctuation
'&'           Operator
'$input'      Name
';'           Punctuation
' \n   '      Text
'if'          Keyword
' '           Text
'('           Punctuation
'!'           Operator
'argp'        Name
')'           Punctuation
' '           Text
'{'           Punctuation
'\n'          Text

'     '       Text
'SWIG_JavaThrowException' Name
'('           Punctuation
'jenv'        Name
','           Punctuation
' '           Text
'SWIG_JavaNullPointerException' Name
','           Punctuation
' '           Text
'"'           Literal.String
'Attempt to dereference null $1_type' Literal.String
'"'           Literal.String
')'           Punctuation
';'           Punctuation
'\n'          Text

'     '       Text
'return'      Keyword
' '           Text
'$null'       Name
';'           Punctuation
'\n'          Text

'   '         Text
'}'           Punctuation
'\n'          Text

'   '         Text
'$1'          Name
' '           Text
'='           Operator
' '           Text
'*'           Operator
'argp'        Name
';'           Punctuation
' '           Text
'%'           Operator
'}'           Punctuation
'\n'          Text

'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'directorout' Name
')'           Punctuation
' '           Text
'SWIGTYPE'    Name
' '           Text
'('           Punctuation
'$&1_type'    Name
' '           Text
'argp'        Name
')'           Punctuation
'\n'          Text

'%'           Operator
'{'           Punctuation
' '           Text
'argp'        Name
' '           Text
'='           Operator
' '           Text
'*'           Operator
'('           Punctuation
'$&1_ltype'   Name
'*'           Operator
')'           Punctuation
'&'           Operator
'$input'      Name
';'           Punctuation
' \n   '      Text
'if'          Keyword
' '           Text
'('           Punctuation
'!'           Operator
'argp'        Name
')'           Punctuation
' '           Text
'{'           Punctuation
'\n'          Text

'     '       Text
'SWIG_JavaThrowException' Name
'('           Punctuation
'jenv'        Name
','           Punctuation
' '           Text
'SWIG_JavaNullPointerException' Name
','           Punctuation
' '           Text
'"'           Literal.String
'Unexpected null return for type $1_type' Literal.String
'"'           Literal.String
')'           Punctuation
';'           Punctuation
'\n'          Text

'     '       Text
'return'      Keyword
' '           Text
'$null'       Name
';'           Punctuation
'\n'          Text

'   '         Text
'}'           Punctuation
'\n'          Text

'   '         Text
'$result'     Name
' '           Text
'='           Operator
' '           Text
'*'           Operator
'argp'        Name
';'           Punctuation
' '           Text
'%'           Operator
'}'           Punctuation
'\n'          Text

'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'out'         Name
')'           Punctuation
' '           Text
'SWIGTYPE'    Name
' \n'         Text

'#'           Comment.Preproc
'ifdef __cplusplus' Comment.Preproc
'\n'          Comment.Preproc

'%'           Operator
'{'           Punctuation
' '           Text
'*'           Operator
'('           Punctuation
'$&1_ltype'   Name
'*'           Operator
')'           Punctuation
'&'           Operator
'$result'     Name
' '           Text
'='           Operator
' '           Text
'new'         Keyword
' '           Text
'$1_ltype'    Name
'('           Punctuation
'('           Punctuation
'const'       Keyword
' '           Text
'$1_ltype'    Name
' '           Text
'&'           Operator
')'           Punctuation
'$1'          Name
')'           Punctuation
';'           Punctuation
' '           Text
'%'           Operator
'}'           Punctuation
'\n'          Text

'#'           Comment.Preproc
'else'        Comment.Preproc
'\n'          Comment.Preproc

'{'           Punctuation
'\n'          Text

'  '          Text
'$&1_ltype'   Name
' '           Text
'$1ptr'       Name
' '           Text
'='           Operator
' '           Text
'('           Punctuation
'$&1_ltype'   Name
')'           Punctuation
' '           Text
'malloc'      Name
'('           Punctuation
'sizeof'      Keyword
'('           Punctuation
'$1_ltype'    Name
')'           Punctuation
')'           Punctuation
';'           Punctuation
'\n'          Text

'  '          Text
'memmove'     Name
'('           Punctuation
'$1ptr'       Name
','           Punctuation
' '           Text
'&'           Operator
'$1'          Name
','           Punctuation
' '           Text
'sizeof'      Keyword
'('           Punctuation
'$1_type'     Name
')'           Punctuation
')'           Punctuation
';'           Punctuation
'\n'          Text

'  '          Text
'*'           Operator
'('           Punctuation
'$&1_ltype'   Name
'*'           Operator
')'           Punctuation
'&'           Operator
'$result'     Name
' '           Text
'='           Operator
' '           Text
'$1ptr'       Name
';'           Punctuation
'\n'          Text

'}'           Punctuation
'\n'          Text

'#'           Comment.Preproc
'endif'       Comment.Preproc
'\n'          Comment.Preproc

'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'directorin'  Name
','           Punctuation
'descriptor'  Name
'='           Operator
'"'           Literal.String
'L$packagepath/$&javaclassname;' Literal.String
'"'           Literal.String
')'           Punctuation
' '           Text
'SWIGTYPE'    Name
' \n'         Text

'%'           Operator
'{'           Punctuation
' '           Text
'$input'      Name
' '           Text
'='           Operator
' '           Text
'0'           Literal.Number.Integer
';'           Punctuation
'\n'          Text

'   '         Text
'*'           Operator
'('           Punctuation
'('           Punctuation
'$&1_ltype'   Name
'*'           Operator
')'           Punctuation
'&'           Operator
'$input'      Name
')'           Punctuation
' '           Text
'='           Operator
' '           Text
'&'           Operator
'$1'          Name
';'           Punctuation
' '           Text
'%'           Operator
'}'           Punctuation
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'javadirectorin' Name
')'           Punctuation
' '           Text
'SWIGTYPE'    Name
' '           Text
'"'           Literal.String
'new $&javaclassname($jniinput, false)' Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'javadirectorout' Name
')'           Punctuation
' '           Text
'SWIGTYPE'    Name
' '           Text
'"'           Literal.String
'$&javaclassname.getCPtr($javacall)' Literal.String
'"'           Literal.String
'\n'          Text

'\n'          Text

'/* Generic pointers and references */' Comment.Multiline
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'in'          Name
')'           Punctuation
' '           Text
'SWIGTYPE'    Name
' '           Text
'*'           Operator
' '           Text
'%'           Operator
'{'           Punctuation
' '           Text
'$1'          Name
' '           Text
'='           Operator
' '           Text
'*'           Operator
'('           Punctuation
'$&1_ltype'   Name
')'           Punctuation
'&'           Operator
'$input'      Name
';'           Punctuation
' '           Text
'%'           Operator
'}'           Punctuation
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'in'          Name
','           Punctuation
' '           Text
'fragment'    Name
'='           Operator
'"'           Literal.String
'SWIG_UnPackData' Literal.String
'"'           Literal.String
')'           Punctuation
' '           Text
'SWIGTYPE'    Name
' '           Text
'('           Punctuation
'CLASS'       Name
':'           Operator
':'           Operator
'*'           Operator
')'           Punctuation
' '           Text
'{'           Punctuation
' \n  '       Text
'const'       Keyword
' '           Text
'char'        Keyword.Type
' '           Text
'*'           Operator
'temp'        Name
' '           Text
'='           Operator
' '           Text
'0'           Literal.Number.Integer
';'           Punctuation
'\n'          Text

'  '          Text
'if'          Keyword
' '           Text
'('           Punctuation
'$input'      Name
')'           Punctuation
' '           Text
'{'           Punctuation
'\n'          Text

'    '        Text
'temp'        Name
' '           Text
'='           Operator
' '           Text
'JCALL2'      Name
'('           Punctuation
'GetStringUTFChars' Name
','           Punctuation
' '           Text
'jenv'        Name
','           Punctuation
' '           Text
'$input'      Name
','           Punctuation
' '           Text
'0'           Literal.Number.Integer
')'           Punctuation
';'           Punctuation
'\n'          Text

'    '        Text
'if'          Keyword
' '           Text
'('           Punctuation
'!'           Operator
'temp'        Name
')'           Punctuation
' '           Text
'return'      Keyword
' '           Text
'$null'       Name
';'           Punctuation
'\n'          Text

'  '          Text
'}'           Punctuation
'\n'          Text

'  '          Text
'SWIG_UnpackData' Name
'('           Punctuation
'temp'        Name
','           Punctuation
' '           Text
'('           Punctuation
'void'        Keyword.Type
' '           Text
'*'           Operator
')'           Punctuation
'&'           Operator
'$1'          Name
','           Punctuation
' '           Text
'sizeof'      Keyword
'('           Punctuation
'$1'          Name
')'           Punctuation
')'           Punctuation
';'           Punctuation
'\n'          Text

'}'           Punctuation
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'in'          Name
')'           Punctuation
' '           Text
'SWIGTYPE'    Name
' '           Text
'&'           Operator
' '           Text
'%'           Operator
'{'           Punctuation
' '           Text
'$1'          Name
' '           Text
'='           Operator
' '           Text
'*'           Operator
'('           Punctuation
'$&1_ltype'   Name
')'           Punctuation
'&'           Operator
'$input'      Name
';'           Punctuation
'\n'          Text

'  '          Text
'if'          Keyword
' '           Text
'('           Punctuation
'!'           Operator
'$1'          Name
')'           Punctuation
' '           Text
'{'           Punctuation
'\n'          Text

'    '        Text
'SWIG_JavaThrowException' Name
'('           Punctuation
'jenv'        Name
','           Punctuation
' '           Text
'SWIG_JavaNullPointerException' Name
','           Punctuation
' '           Text
'"'           Literal.String
'$1_type reference is null' Literal.String
'"'           Literal.String
')'           Punctuation
';'           Punctuation
'\n'          Text

'    '        Text
'return'      Keyword
' '           Text
'$null'       Name
';'           Punctuation
'\n'          Text

'  '          Text
'}'           Punctuation
' '           Text
'%'           Operator
'}'           Punctuation
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'out'         Name
')'           Punctuation
' '           Text
'SWIGTYPE'    Name
' '           Text
'*'           Operator
'\n'          Text

'%'           Operator
'{'           Punctuation
' '           Text
'*'           Operator
'('           Punctuation
'$&1_ltype'   Name
')'           Punctuation
'&'           Operator
'$result'     Name
' '           Text
'='           Operator
' '           Text
'$1'          Name
';'           Punctuation
' '           Text
'%'           Operator
'}'           Punctuation
' \n'         Text

'%typemap'    Name.Function
'('           Punctuation
'out'         Name
','           Punctuation
' '           Text
'fragment'    Name
'='           Operator
'"'           Literal.String
'SWIG_PackData' Literal.String
'"'           Literal.String
','           Punctuation
' '           Text
'noblock'     Name
'='           Operator
'1'           Literal.Number.Integer
')'           Punctuation
' '           Text
'SWIGTYPE'    Name
' '           Text
'('           Punctuation
'CLASS'       Name
':'           Operator
':'           Operator
'*'           Operator
')'           Punctuation
' '           Text
'{'           Punctuation
'\n'          Text

'  '          Text
'char'        Keyword.Type
' '           Text
'buf'         Name
'['           Punctuation
'128'         Literal.Number.Integer
']'           Punctuation
';'           Punctuation
'\n'          Text

'  '          Text
'char'        Keyword.Type
' '           Text
'*'           Operator
'data'        Name
' '           Text
'='           Operator
' '           Text
'SWIG_PackData' Name
'('           Punctuation
'buf'         Name
','           Punctuation
' '           Text
'('           Punctuation
'void'        Keyword.Type
' '           Text
'*'           Operator
')'           Punctuation
'&'           Operator
'$1'          Name
','           Punctuation
' '           Text
'sizeof'      Keyword
'('           Punctuation
'$1'          Name
')'           Punctuation
')'           Punctuation
';'           Punctuation
'\n'          Text

'  '          Text
'*'           Operator
'data'        Name
' '           Text
'='           Operator
' '           Text
"'"           Literal.String.Char
'\\0'         Literal.String.Char
"'"           Literal.String.Char
';'           Punctuation
'\n'          Text

'  '          Text
'$result'     Name
' '           Text
'='           Operator
' '           Text
'JCALL1'      Name
'('           Punctuation
'NewStringUTF' Name
','           Punctuation
' '           Text
'jenv'        Name
','           Punctuation
' '           Text
'buf'         Name
')'           Punctuation
';'           Punctuation
'\n'          Text

'}'           Punctuation
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'out'         Name
')'           Punctuation
' '           Text
'SWIGTYPE'    Name
' '           Text
'&'           Operator
'\n'          Text

'%'           Operator
'{'           Punctuation
' '           Text
'*'           Operator
'('           Punctuation
'$&1_ltype'   Name
')'           Punctuation
'&'           Operator
'$result'     Name
' '           Text
'='           Operator
' '           Text
'$1'          Name
';'           Punctuation
' '           Text
'%'           Operator
'}'           Punctuation
' \n\n'       Text

'%typemap'    Name.Function
'('           Punctuation
'directorout' Name
','           Punctuation
' '           Text
'warning'     Name
'='           Operator
'SWIGWARN_TYPEMAP_DIRECTOROUT_PTR_MSG' Name
')'           Punctuation
' '           Text
'SWIGTYPE'    Name
' '           Text
'*'           Operator
'\n'          Text

'%'           Operator
'{'           Punctuation
' '           Text
'$result'     Name
' '           Text
'='           Operator
' '           Text
'*'           Operator
'('           Punctuation
'$&1_ltype'   Name
')'           Punctuation
'&'           Operator
'$input'      Name
';'           Punctuation
' '           Text
'%'           Operator
'}'           Punctuation
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'directorout' Name
','           Punctuation
' '           Text
'warning'     Name
'='           Operator
'SWIGWARN_TYPEMAP_DIRECTOROUT_PTR_MSG' Name
')'           Punctuation
' '           Text
'SWIGTYPE'    Name
' '           Text
'('           Punctuation
'CLASS'       Name
':'           Operator
':'           Operator
'*'           Operator
')'           Punctuation
'\n'          Text

'%'           Operator
'{'           Punctuation
' '           Text
'$result'     Name
' '           Text
'='           Operator
' '           Text
'*'           Operator
'('           Punctuation
'$&1_ltype'   Name
')'           Punctuation
'&'           Operator
'$input'      Name
';'           Punctuation
' '           Text
'%'           Operator
'}'           Punctuation
'\n'          Text

'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'directorin'  Name
','           Punctuation
'descriptor'  Name
'='           Operator
'"'           Literal.String
'L$packagepath/$javaclassname;' Literal.String
'"'           Literal.String
')'           Punctuation
' '           Text
'SWIGTYPE'    Name
' '           Text
'*'           Operator
'\n'          Text

'%'           Operator
'{'           Punctuation
' '           Text
'*'           Operator
'('           Punctuation
'('           Punctuation
'$&1_ltype'   Name
')'           Punctuation
'&'           Operator
'$input'      Name
')'           Punctuation
' '           Text
'='           Operator
' '           Text
'('           Punctuation
'$1_ltype'    Name
')'           Punctuation
' '           Text
'$1'          Name
';'           Punctuation
' '           Text
'%'           Operator
'}'           Punctuation
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'directorin'  Name
','           Punctuation
'descriptor'  Name
'='           Operator
'"'           Literal.String
'L$packagepath/$javaclassname;' Literal.String
'"'           Literal.String
')'           Punctuation
' '           Text
'SWIGTYPE'    Name
' '           Text
'('           Punctuation
'CLASS'       Name
':'           Operator
':'           Operator
'*'           Operator
')'           Punctuation
'\n'          Text

'%'           Operator
'{'           Punctuation
' '           Text
'*'           Operator
'('           Punctuation
'('           Punctuation
'$&1_ltype'   Name
')'           Punctuation
'&'           Operator
'$input'      Name
')'           Punctuation
' '           Text
'='           Operator
' '           Text
'('           Punctuation
'$1_ltype'    Name
')'           Punctuation
' '           Text
'$1'          Name
';'           Punctuation
' '           Text
'%'           Operator
'}'           Punctuation
'\n'          Text

'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'directorout' Name
','           Punctuation
' '           Text
'warning'     Name
'='           Operator
'SWIGWARN_TYPEMAP_DIRECTOROUT_PTR_MSG' Name
')'           Punctuation
' '           Text
'SWIGTYPE'    Name
' '           Text
'&'           Operator
'\n'          Text

'%'           Operator
'{'           Punctuation
' '           Text
'if'          Keyword
' '           Text
'('           Punctuation
'!'           Operator
'$input'      Name
')'           Punctuation
' '           Text
'{'           Punctuation
'\n'          Text

'     '       Text
'SWIG_JavaThrowException' Name
'('           Punctuation
'jenv'        Name
','           Punctuation
' '           Text
'SWIG_JavaNullPointerException' Name
','           Punctuation
' '           Text
'"'           Literal.String
'Unexpected null return for type $1_type' Literal.String
'"'           Literal.String
')'           Punctuation
';'           Punctuation
'\n'          Text

'     '       Text
'return'      Keyword
' '           Text
'$null'       Name
';'           Punctuation
'\n'          Text

'   '         Text
'}'           Punctuation
'\n'          Text

'   '         Text
'$result'     Name
' '           Text
'='           Operator
' '           Text
'*'           Operator
'('           Punctuation
'$&1_ltype'   Name
')'           Punctuation
'&'           Operator
'$input'      Name
';'           Punctuation
' '           Text
'%'           Operator
'}'           Punctuation
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'directorin'  Name
','           Punctuation
'descriptor'  Name
'='           Operator
'"'           Literal.String
'L$packagepath/$javaclassname;' Literal.String
'"'           Literal.String
')'           Punctuation
' '           Text
'SWIGTYPE'    Name
' '           Text
'&'           Operator
'\n'          Text

'%'           Operator
'{'           Punctuation
' '           Text
'*'           Operator
'('           Punctuation
'$&1_ltype'   Name
')'           Punctuation
'&'           Operator
'$input'      Name
' '           Text
'='           Operator
' '           Text
'('           Punctuation
'$1_ltype'    Name
')'           Punctuation
' '           Text
'&'           Operator
'$1'          Name
';'           Punctuation
' '           Text
'%'           Operator
'}'           Punctuation
'\n'          Text

'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'javadirectorin' Name
')'           Punctuation
' '           Text
'SWIGTYPE'    Name
' '           Text
'*'           Operator
','           Punctuation
' '           Text
'SWIGTYPE'    Name
' '           Text
'('           Punctuation
'CLASS'       Name
':'           Operator
':'           Operator
'*'           Operator
')'           Punctuation
' '           Text
'"'           Literal.String
'($jniinput == 0) ? null : new $javaclassname($jniinput, false)' Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'javadirectorin' Name
')'           Punctuation
' '           Text
'SWIGTYPE'    Name
' '           Text
'&'           Operator
' '           Text
'"'           Literal.String
'new $javaclassname($jniinput, false)' Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'javadirectorout' Name
')'           Punctuation
' '           Text
'SWIGTYPE'    Name
' '           Text
'*'           Operator
','           Punctuation
' '           Text
'SWIGTYPE'    Name
' '           Text
'('           Punctuation
'CLASS'       Name
':'           Operator
':'           Operator
'*'           Operator
')'           Punctuation
','           Punctuation
' '           Text
'SWIGTYPE'    Name
' '           Text
'&'           Operator
' '           Text
'"'           Literal.String
'$javaclassname.getCPtr($javacall)' Literal.String
'"'           Literal.String
'\n'          Text

'\n'          Text

'/* Default array handling */' Comment.Multiline
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'in'          Name
')'           Punctuation
' '           Text
'SWIGTYPE'    Name
' '           Text
'['           Punctuation
']'           Punctuation
' '           Text
'%'           Operator
'{'           Punctuation
' '           Text
'$1'          Name
' '           Text
'='           Operator
' '           Text
'*'           Operator
'('           Punctuation
'$&1_ltype'   Name
')'           Punctuation
'&'           Operator
'$input'      Name
';'           Punctuation
' '           Text
'%'           Operator
'}'           Punctuation
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'out'         Name
')'           Punctuation
' '           Text
'SWIGTYPE'    Name
' '           Text
'['           Punctuation
']'           Punctuation
' '           Text
'%'           Operator
'{'           Punctuation
' '           Text
'*'           Operator
'('           Punctuation
'$&1_ltype'   Name
')'           Punctuation
'&'           Operator
'$result'     Name
' '           Text
'='           Operator
' '           Text
'$1'          Name
';'           Punctuation
' '           Text
'%'           Operator
'}'           Punctuation
' \n'         Text

'%typemap'    Name.Function
'('           Punctuation
'freearg'     Name
')'           Punctuation
' '           Text
'SWIGTYPE'    Name
' '           Text
'['           Punctuation
'ANY'         Name
']'           Punctuation
','           Punctuation
' '           Text
'SWIGTYPE'    Name
' '           Text
'['           Punctuation
']'           Punctuation
' '           Text
'"'           Literal.String
'"'           Literal.String
'\n'          Text

'\n'          Text

'/* char arrays - treat as String */' Comment.Multiline
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'in'          Name
','           Punctuation
' '           Text
'noblock'     Name
'='           Operator
'1'           Literal.Number.Integer
')'           Punctuation
' '           Text
'char'        Keyword.Type
'['           Punctuation
'ANY'         Name
']'           Punctuation
','           Punctuation
' '           Text
'char'        Keyword.Type
'['           Punctuation
']'           Punctuation
' '           Text
'{'           Punctuation
'\n'          Text

'  '          Text
'$1'          Name
' '           Text
'='           Operator
' '           Text
'0'           Literal.Number.Integer
';'           Punctuation
'\n'          Text

'  '          Text
'if'          Keyword
' '           Text
'('           Punctuation
'$input'      Name
')'           Punctuation
' '           Text
'{'           Punctuation
'\n'          Text

'    '        Text
'$1'          Name
' '           Text
'='           Operator
' '           Text
'('           Punctuation
'$1_ltype'    Name
')'           Punctuation
'JCALL2'      Name
'('           Punctuation
'GetStringUTFChars' Name
','           Punctuation
' '           Text
'jenv'        Name
','           Punctuation
' '           Text
'$input'      Name
','           Punctuation
' '           Text
'0'           Literal.Number.Integer
')'           Punctuation
';'           Punctuation
'\n'          Text

'    '        Text
'if'          Keyword
' '           Text
'('           Punctuation
'!'           Operator
'$1'          Name
')'           Punctuation
' '           Text
'return'      Keyword
' '           Text
'$null'       Name
';'           Punctuation
'\n'          Text

'  '          Text
'}'           Punctuation
'\n'          Text

'}'           Punctuation
'\n'          Text

'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'directorout' Name
','           Punctuation
' '           Text
'noblock'     Name
'='           Operator
'1'           Literal.Number.Integer
')'           Punctuation
' '           Text
'char'        Keyword.Type
'['           Punctuation
'ANY'         Name
']'           Punctuation
','           Punctuation
' '           Text
'char'        Keyword.Type
'['           Punctuation
']'           Punctuation
' '           Text
'{'           Punctuation
'\n'          Text

'  '          Text
'$1'          Name
' '           Text
'='           Operator
' '           Text
'0'           Literal.Number.Integer
';'           Punctuation
'\n'          Text

'  '          Text
'if'          Keyword
' '           Text
'('           Punctuation
'$input'      Name
')'           Punctuation
' '           Text
'{'           Punctuation
'\n'          Text

'    '        Text
'$result'     Name
' '           Text
'='           Operator
' '           Text
'('           Punctuation
'$1_ltype'    Name
')'           Punctuation
'JCALL2'      Name
'('           Punctuation
'GetStringUTFChars' Name
','           Punctuation
' '           Text
'jenv'        Name
','           Punctuation
' '           Text
'$input'      Name
','           Punctuation
' '           Text
'0'           Literal.Number.Integer
')'           Punctuation
';'           Punctuation
'\n'          Text

'    '        Text
'if'          Keyword
' '           Text
'('           Punctuation
'!'           Operator
'$result'     Name
')'           Punctuation
' '           Text
'return'      Keyword
' '           Text
'$null'       Name
';'           Punctuation
'\n'          Text

'  '          Text
'}'           Punctuation
'\n'          Text

'}'           Punctuation
'\n'          Text

'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'directorin'  Name
','           Punctuation
' '           Text
'descriptor'  Name
'='           Operator
'"'           Literal.String
'Ljava/lang/String;' Literal.String
'"'           Literal.String
','           Punctuation
' '           Text
'noblock'     Name
'='           Operator
'1'           Literal.Number.Integer
')'           Punctuation
' '           Text
'char'        Keyword.Type
'['           Punctuation
'ANY'         Name
']'           Punctuation
','           Punctuation
' '           Text
'char'        Keyword.Type
'['           Punctuation
']'           Punctuation
' '           Text
'{'           Punctuation
'\n'          Text

'  '          Text
'$input'      Name
' '           Text
'='           Operator
' '           Text
'0'           Literal.Number.Integer
';'           Punctuation
'\n'          Text

'  '          Text
'if'          Keyword
' '           Text
'('           Punctuation
'$1'          Name
')'           Punctuation
' '           Text
'{'           Punctuation
'\n'          Text

'    '        Text
'$input'      Name
' '           Text
'='           Operator
' '           Text
'JCALL1'      Name
'('           Punctuation
'NewStringUTF' Name
','           Punctuation
' '           Text
'jenv'        Name
','           Punctuation
' '           Text
'('           Punctuation
'const'       Keyword
' '           Text
'char'        Keyword.Type
' '           Text
'*'           Operator
')'           Punctuation
'$1'          Name
')'           Punctuation
';'           Punctuation
'\n'          Text

'    '        Text
'if'          Keyword
' '           Text
'('           Punctuation
'!'           Operator
'$input'      Name
')'           Punctuation
' '           Text
'return'      Keyword
' '           Text
'$null'       Name
';'           Punctuation
'\n'          Text

'  '          Text
'}'           Punctuation
'\n'          Text

'}'           Punctuation
'\n'          Text

'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'argout'      Name
')'           Punctuation
' '           Text
'char'        Keyword.Type
'['           Punctuation
'ANY'         Name
']'           Punctuation
','           Punctuation
' '           Text
'char'        Keyword.Type
'['           Punctuation
']'           Punctuation
' '           Text
'"'           Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'freearg'     Name
','           Punctuation
' '           Text
'noblock'     Name
'='           Operator
'1'           Literal.Number.Integer
')'           Punctuation
' '           Text
'char'        Keyword.Type
'['           Punctuation
'ANY'         Name
']'           Punctuation
','           Punctuation
' '           Text
'char'        Keyword.Type
'['           Punctuation
']'           Punctuation
' '           Text
'{'           Punctuation
' '           Text
'if'          Keyword
' '           Text
'('           Punctuation
'$1'          Name
')'           Punctuation
' '           Text
'JCALL2'      Name
'('           Punctuation
'ReleaseStringUTFChars' Name
','           Punctuation
' '           Text
'jenv'        Name
','           Punctuation
' '           Text
'$input'      Name
','           Punctuation
' '           Text
'('           Punctuation
'const'       Keyword
' '           Text
'char'        Keyword.Type
' '           Text
'*'           Operator
')'           Punctuation
'$1'          Name
')'           Punctuation
';'           Punctuation
' '           Text
'}'           Punctuation
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'out'         Name
','           Punctuation
' '           Text
'noblock'     Name
'='           Operator
'1'           Literal.Number.Integer
')'           Punctuation
' '           Text
'char'        Keyword.Type
'['           Punctuation
'ANY'         Name
']'           Punctuation
','           Punctuation
' '           Text
'char'        Keyword.Type
'['           Punctuation
']'           Punctuation
' '           Text
'{'           Punctuation
' '           Text
'if'          Keyword
' '           Text
'('           Punctuation
'$1'          Name
')'           Punctuation
' '           Text
'$result'     Name
' '           Text
'='           Operator
' '           Text
'JCALL1'      Name
'('           Punctuation
'NewStringUTF' Name
','           Punctuation
' '           Text
'jenv'        Name
','           Punctuation
' '           Text
'('           Punctuation
'const'       Keyword
' '           Text
'char'        Keyword.Type
' '           Text
'*'           Operator
')'           Punctuation
'$1'          Name
')'           Punctuation
';'           Punctuation
' '           Text
'}'           Punctuation
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'javadirectorin' Name
')'           Punctuation
' '           Text
'char'        Keyword.Type
'['           Punctuation
'ANY'         Name
']'           Punctuation
','           Punctuation
' '           Text
'char'        Keyword.Type
'['           Punctuation
']'           Punctuation
' '           Text
'"'           Literal.String
'$jniinput'   Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'javadirectorout' Name
')'           Punctuation
' '           Text
'char'        Keyword.Type
'['           Punctuation
'ANY'         Name
']'           Punctuation
','           Punctuation
' '           Text
'char'        Keyword.Type
'['           Punctuation
']'           Punctuation
' '           Text
'"'           Literal.String
'$javacall'   Literal.String
'"'           Literal.String
'\n'          Text

'\n'          Text

'/* JNI types */' Comment.Multiline
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'in'          Name
')'           Punctuation
' '           Text
'jboolean'    Name
','           Punctuation
'\n'          Text

'             ' Text
'jchar'       Name
','           Punctuation
'\n'          Text

'             ' Text
'jbyte'       Name
','           Punctuation
'\n'          Text

'             ' Text
'jshort'      Name
','           Punctuation
'\n'          Text

'             ' Text
'jint'        Name
','           Punctuation
'\n'          Text

'             ' Text
'jlong'       Name
','           Punctuation
'\n'          Text

'             ' Text
'jfloat'      Name
','           Punctuation
'\n'          Text

'             ' Text
'jdouble'     Name
','           Punctuation
'\n'          Text

'             ' Text
'jstring'     Name
','           Punctuation
'\n'          Text

'             ' Text
'jobject'     Name
','           Punctuation
'\n'          Text

'             ' Text
'jbooleanArray' Name
','           Punctuation
'\n'          Text

'             ' Text
'jcharArray'  Name
','           Punctuation
'\n'          Text

'             ' Text
'jbyteArray'  Name
','           Punctuation
'\n'          Text

'             ' Text
'jshortArray' Name
','           Punctuation
'\n'          Text

'             ' Text
'jintArray'   Name
','           Punctuation
'\n'          Text

'             ' Text
'jlongArray'  Name
','           Punctuation
'\n'          Text

'             ' Text
'jfloatArray' Name
','           Punctuation
'\n'          Text

'             ' Text
'jdoubleArray' Name
','           Punctuation
'\n'          Text

'             ' Text
'jobjectArray' Name
'\n'          Text

'%'           Operator
'{'           Punctuation
' '           Text
'$1'          Name
' '           Text
'='           Operator
' '           Text
'$input'      Name
';'           Punctuation
' '           Text
'%'           Operator
'}'           Punctuation
'\n'          Text

'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'directorout' Name
')'           Punctuation
' '           Text
'jboolean'    Name
','           Punctuation
'\n'          Text

'             ' Text
'jchar'       Name
','           Punctuation
'\n'          Text

'             ' Text
'jbyte'       Name
','           Punctuation
'\n'          Text

'             ' Text
'jshort'      Name
','           Punctuation
'\n'          Text

'             ' Text
'jint'        Name
','           Punctuation
'\n'          Text

'             ' Text
'jlong'       Name
','           Punctuation
'\n'          Text

'             ' Text
'jfloat'      Name
','           Punctuation
'\n'          Text

'             ' Text
'jdouble'     Name
','           Punctuation
'\n'          Text

'             ' Text
'jstring'     Name
','           Punctuation
'\n'          Text

'             ' Text
'jobject'     Name
','           Punctuation
'\n'          Text

'             ' Text
'jbooleanArray' Name
','           Punctuation
'\n'          Text

'             ' Text
'jcharArray'  Name
','           Punctuation
'\n'          Text

'             ' Text
'jbyteArray'  Name
','           Punctuation
'\n'          Text

'             ' Text
'jshortArray' Name
','           Punctuation
'\n'          Text

'             ' Text
'jintArray'   Name
','           Punctuation
'\n'          Text

'             ' Text
'jlongArray'  Name
','           Punctuation
'\n'          Text

'             ' Text
'jfloatArray' Name
','           Punctuation
'\n'          Text

'             ' Text
'jdoubleArray' Name
','           Punctuation
'\n'          Text

'             ' Text
'jobjectArray' Name
'\n'          Text

'%'           Operator
'{'           Punctuation
' '           Text
'$result'     Name
' '           Text
'='           Operator
' '           Text
'$input'      Name
';'           Punctuation
' '           Text
'%'           Operator
'}'           Punctuation
'\n'          Text

'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'out'         Name
')'           Punctuation
' '           Text
'jboolean'    Name
','           Punctuation
'\n'          Text

'              ' Text
'jchar'       Name
','           Punctuation
'\n'          Text

'              ' Text
'jbyte'       Name
','           Punctuation
'\n'          Text

'              ' Text
'jshort'      Name
','           Punctuation
'\n'          Text

'              ' Text
'jint'        Name
','           Punctuation
'\n'          Text

'              ' Text
'jlong'       Name
','           Punctuation
'\n'          Text

'              ' Text
'jfloat'      Name
','           Punctuation
'\n'          Text

'              ' Text
'jdouble'     Name
','           Punctuation
'\n'          Text

'              ' Text
'jstring'     Name
','           Punctuation
'\n'          Text

'              ' Text
'jobject'     Name
','           Punctuation
'\n'          Text

'              ' Text
'jbooleanArray' Name
','           Punctuation
'\n'          Text

'              ' Text
'jcharArray'  Name
','           Punctuation
'\n'          Text

'              ' Text
'jbyteArray'  Name
','           Punctuation
'\n'          Text

'              ' Text
'jshortArray' Name
','           Punctuation
'\n'          Text

'              ' Text
'jintArray'   Name
','           Punctuation
'\n'          Text

'              ' Text
'jlongArray'  Name
','           Punctuation
'\n'          Text

'              ' Text
'jfloatArray' Name
','           Punctuation
'\n'          Text

'              ' Text
'jdoubleArray' Name
','           Punctuation
'\n'          Text

'              ' Text
'jobjectArray' Name
'\n'          Text

'%'           Operator
'{'           Punctuation
' '           Text
'$result'     Name
' '           Text
'='           Operator
' '           Text
'$1'          Name
';'           Punctuation
' '           Text
'%'           Operator
'}'           Punctuation
'\n'          Text

'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'directorin'  Name
','           Punctuation
'descriptor'  Name
'='           Operator
'"'           Literal.String
'Z'           Literal.String
'"'           Literal.String
')'           Punctuation
'  '          Text
'jboolean'    Name
'       '     Text
'"'           Literal.String
'$input = $1;' Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'directorin'  Name
','           Punctuation
'descriptor'  Name
'='           Operator
'"'           Literal.String
'C'           Literal.String
'"'           Literal.String
')'           Punctuation
'  '          Text
'jchar'       Name
'          '  Text
'"'           Literal.String
'$input = $1;' Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'directorin'  Name
','           Punctuation
'descriptor'  Name
'='           Operator
'"'           Literal.String
'B'           Literal.String
'"'           Literal.String
')'           Punctuation
'  '          Text
'jbyte'       Name
'          '  Text
'"'           Literal.String
'$input = $1;' Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'directorin'  Name
','           Punctuation
'descriptor'  Name
'='           Operator
'"'           Literal.String
'S'           Literal.String
'"'           Literal.String
')'           Punctuation
'  '          Text
'jshort'      Name
'         '   Text
'"'           Literal.String
'$input = $1;' Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'directorin'  Name
','           Punctuation
'descriptor'  Name
'='           Operator
'"'           Literal.String
'I'           Literal.String
'"'           Literal.String
')'           Punctuation
'  '          Text
'jint'        Name
'           ' Text
'"'           Literal.String
'$input = $1;' Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'directorin'  Name
','           Punctuation
'descriptor'  Name
'='           Operator
'"'           Literal.String
'J'           Literal.String
'"'           Literal.String
')'           Punctuation
'  '          Text
'jlong'       Name
'          '  Text
'"'           Literal.String
'$input = $1;' Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'directorin'  Name
','           Punctuation
'descriptor'  Name
'='           Operator
'"'           Literal.String
'F'           Literal.String
'"'           Literal.String
')'           Punctuation
'  '          Text
'jfloat'      Name
'         '   Text
'"'           Literal.String
'$input = $1;' Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'directorin'  Name
','           Punctuation
'descriptor'  Name
'='           Operator
'"'           Literal.String
'D'           Literal.String
'"'           Literal.String
')'           Punctuation
'  '          Text
'jdouble'     Name
'        '    Text
'"'           Literal.String
'$input = $1;' Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'directorin'  Name
','           Punctuation
'descriptor'  Name
'='           Operator
'"'           Literal.String
'Ljava/lang/String;' Literal.String
'"'           Literal.String
')'           Punctuation
'            ' Text
'jstring'     Name
'        '    Text
'"'           Literal.String
'$input = $1;' Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'directorin'  Name
','           Punctuation
'descriptor'  Name
'='           Operator
'"'           Literal.String
'Ljava/lang/Object;' Literal.String
'"'           Literal.String
','           Punctuation
'nouse'       Name
'='           Operator
'"'           Literal.String
'1'           Literal.String
'"'           Literal.String
')'           Punctuation
'  '          Text
'jobject'     Name
'        '    Text
'"'           Literal.String
'$input = $1;' Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'directorin'  Name
','           Punctuation
'descriptor'  Name
'='           Operator
'"'           Literal.String
'[Z'          Literal.String
'"'           Literal.String
')'           Punctuation
'  '          Text
'jbooleanArray' Name
' '           Text
'"'           Literal.String
'$input = $1;' Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'directorin'  Name
','           Punctuation
'descriptor'  Name
'='           Operator
'"'           Literal.String
'[C'          Literal.String
'"'           Literal.String
')'           Punctuation
'  '          Text
'jcharArray'  Name
'    '        Text
'"'           Literal.String
'$input = $1;' Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'directorin'  Name
','           Punctuation
'descriptor'  Name
'='           Operator
'"'           Literal.String
'[B'          Literal.String
'"'           Literal.String
')'           Punctuation
'  '          Text
'jbyteArray'  Name
'    '        Text
'"'           Literal.String
'$input = $1;' Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'directorin'  Name
','           Punctuation
'descriptor'  Name
'='           Operator
'"'           Literal.String
'[S'          Literal.String
'"'           Literal.String
')'           Punctuation
'  '          Text
'jshortArray' Name
'   '         Text
'"'           Literal.String
'$input = $1;' Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'directorin'  Name
','           Punctuation
'descriptor'  Name
'='           Operator
'"'           Literal.String
'[I'          Literal.String
'"'           Literal.String
')'           Punctuation
'  '          Text
'jintArray'   Name
'     '       Text
'"'           Literal.String
'$input = $1;' Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'directorin'  Name
','           Punctuation
'descriptor'  Name
'='           Operator
'"'           Literal.String
'[J'          Literal.String
'"'           Literal.String
')'           Punctuation
'  '          Text
'jlongArray'  Name
'    '        Text
'"'           Literal.String
'$input = $1;' Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'directorin'  Name
','           Punctuation
'descriptor'  Name
'='           Operator
'"'           Literal.String
'[F'          Literal.String
'"'           Literal.String
')'           Punctuation
'  '          Text
'jfloatArray' Name
'   '         Text
'"'           Literal.String
'$input = $1;' Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'directorin'  Name
','           Punctuation
'descriptor'  Name
'='           Operator
'"'           Literal.String
'[D'          Literal.String
'"'           Literal.String
')'           Punctuation
'  '          Text
'jdoubleArray' Name
'  '          Text
'"'           Literal.String
'$input = $1;' Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'directorin'  Name
','           Punctuation
'descriptor'  Name
'='           Operator
'"'           Literal.String
'[Ljava/lang/Object;' Literal.String
'"'           Literal.String
','           Punctuation
'nouse'       Name
'='           Operator
'"'           Literal.String
'1'           Literal.String
'"'           Literal.String
')'           Punctuation
' '           Text
'jobjectArray' Name
'   '         Text
'"'           Literal.String
'$input = $1;' Literal.String
'"'           Literal.String
'\n'          Text

'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'javadirectorin' Name
')'           Punctuation
' '           Text
'jboolean'    Name
','           Punctuation
'\n'          Text

'                         ' Text
'jchar'       Name
','           Punctuation
'\n'          Text

'                         ' Text
'jbyte'       Name
','           Punctuation
'\n'          Text

'                         ' Text
'jshort'      Name
','           Punctuation
'\n'          Text

'                         ' Text
'jint'        Name
','           Punctuation
'\n'          Text

'                         ' Text
'jlong'       Name
','           Punctuation
'\n'          Text

'                         ' Text
'jfloat'      Name
','           Punctuation
'\n'          Text

'                         ' Text
'jdouble'     Name
','           Punctuation
'\n'          Text

'                         ' Text
'jstring'     Name
','           Punctuation
'\n'          Text

'                         ' Text
'jobject'     Name
','           Punctuation
'\n'          Text

'                         ' Text
'jbooleanArray' Name
','           Punctuation
'\n'          Text

'                         ' Text
'jcharArray'  Name
','           Punctuation
'\n'          Text

'                         ' Text
'jbyteArray'  Name
','           Punctuation
'\n'          Text

'                         ' Text
'jshortArray' Name
','           Punctuation
'\n'          Text

'                         ' Text
'jintArray'   Name
','           Punctuation
'\n'          Text

'                         ' Text
'jlongArray'  Name
','           Punctuation
'\n'          Text

'                         ' Text
'jfloatArray' Name
','           Punctuation
'\n'          Text

'                         ' Text
'jdoubleArray' Name
','           Punctuation
'\n'          Text

'                         ' Text
'jobjectArray' Name
'\n'          Text

'  '          Text
'"'           Literal.String
'$jniinput'   Literal.String
'"'           Literal.String
'\n'          Text

'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'javadirectorout' Name
')'           Punctuation
' '           Text
'jboolean'    Name
','           Punctuation
'\n'          Text

'                          ' Text
'jchar'       Name
','           Punctuation
'\n'          Text

'                          ' Text
'jbyte'       Name
','           Punctuation
'\n'          Text

'                          ' Text
'jshort'      Name
','           Punctuation
'\n'          Text

'                          ' Text
'jint'        Name
','           Punctuation
'\n'          Text

'                          ' Text
'jlong'       Name
','           Punctuation
'\n'          Text

'                          ' Text
'jfloat'      Name
','           Punctuation
'\n'          Text

'                          ' Text
'jdouble'     Name
','           Punctuation
'\n'          Text

'                          ' Text
'jstring'     Name
','           Punctuation
'\n'          Text

'                          ' Text
'jobject'     Name
','           Punctuation
'\n'          Text

'                          ' Text
'jbooleanArray' Name
','           Punctuation
'\n'          Text

'                          ' Text
'jcharArray'  Name
','           Punctuation
'\n'          Text

'                          ' Text
'jbyteArray'  Name
','           Punctuation
'\n'          Text

'                          ' Text
'jshortArray' Name
','           Punctuation
'\n'          Text

'                          ' Text
'jintArray'   Name
','           Punctuation
'\n'          Text

'                          ' Text
'jlongArray'  Name
','           Punctuation
'\n'          Text

'                          ' Text
'jfloatArray' Name
','           Punctuation
'\n'          Text

'                          ' Text
'jdoubleArray' Name
','           Punctuation
'\n'          Text

'                          ' Text
'jobjectArray' Name
'\n'          Text

'  '          Text
'"'           Literal.String
'$javacall'   Literal.String
'"'           Literal.String
'\n'          Text

'\n'          Text

'/* Typecheck typemaps - The purpose of these is merely to issue a warning for overloaded C++ functions \n * that cannot be overloaded in Java as more than one C++ type maps to a single Java type */' Comment.Multiline
'\n'          Text

'\n'          Text

'%typecheck'  Name.Function
'('           Punctuation
'SWIG_TYPECHECK_BOOL' Name
')'           Punctuation
' '           Text
'/* Java boolean */' Comment.Multiline
'\n'          Text

'    '        Text
'jboolean'    Name
','           Punctuation
'\n'          Text

'    '        Text
'bool'        Keyword.Type
','           Punctuation
'\n'          Text

'    '        Text
'const'       Keyword
' '           Text
'bool'        Keyword.Type
' '           Text
'&'           Operator
'\n'          Text

'    '        Text
'"'           Literal.String
'"'           Literal.String
'\n'          Text

'\n'          Text

'%typecheck'  Name.Function
'('           Punctuation
'SWIG_TYPECHECK_CHAR' Name
')'           Punctuation
' '           Text
'/* Java char */' Comment.Multiline
'\n'          Text

'    '        Text
'jchar'       Name
','           Punctuation
'\n'          Text

'    '        Text
'char'        Keyword.Type
','           Punctuation
' \n    '     Text
'const'       Keyword
' '           Text
'char'        Keyword.Type
' '           Text
'&'           Operator
'\n'          Text

'    '        Text
'"'           Literal.String
'"'           Literal.String
'\n'          Text

'\n'          Text

'%typecheck'  Name.Function
'('           Punctuation
'SWIG_TYPECHECK_INT8' Name
')'           Punctuation
' '           Text
'/* Java byte */' Comment.Multiline
'\n'          Text

'    '        Text
'jbyte'       Name
','           Punctuation
'\n'          Text

'    '        Text
'signed'      Keyword.Type
' '           Text
'char'        Keyword.Type
','           Punctuation
'\n'          Text

'    '        Text
'const'       Keyword
' '           Text
'signed'      Keyword.Type
' '           Text
'char'        Keyword.Type
' '           Text
'&'           Operator
'\n'          Text

'    '        Text
'"'           Literal.String
'"'           Literal.String
'\n'          Text

'\n'          Text

'%typecheck'  Name.Function
'('           Punctuation
'SWIG_TYPECHECK_INT16' Name
')'           Punctuation
' '           Text
'/* Java short */' Comment.Multiline
'\n'          Text

'    '        Text
'jshort'      Name
','           Punctuation
'\n'          Text

'    '        Text
'unsigned'    Keyword.Type
' '           Text
'char'        Keyword.Type
','           Punctuation
' \n    '     Text
'short'       Keyword.Type
','           Punctuation
' \n    '     Text
'const'       Keyword
' '           Text
'unsigned'    Keyword.Type
' '           Text
'char'        Keyword.Type
' '           Text
'&'           Operator
','           Punctuation
' \n    '     Text
'const'       Keyword
' '           Text
'short'       Keyword.Type
' '           Text
'&'           Operator
'\n'          Text

'    '        Text
'"'           Literal.String
'"'           Literal.String
'\n'          Text

'\n'          Text

'%typecheck'  Name.Function
'('           Punctuation
'SWIG_TYPECHECK_INT32' Name
')'           Punctuation
' '           Text
'/* Java int */' Comment.Multiline
'\n'          Text

'    '        Text
'jint'        Name
','           Punctuation
'\n'          Text

'    '        Text
'unsigned'    Keyword.Type
' '           Text
'short'       Keyword.Type
','           Punctuation
' \n    '     Text
'int'         Keyword.Type
','           Punctuation
' \n    '     Text
'long'        Keyword.Type
','           Punctuation
' \n    '     Text
'const'       Keyword
' '           Text
'unsigned'    Keyword.Type
' '           Text
'short'       Keyword.Type
' '           Text
'&'           Operator
','           Punctuation
' \n    '     Text
'const'       Keyword
' '           Text
'int'         Keyword.Type
' '           Text
'&'           Operator
','           Punctuation
' \n    '     Text
'const'       Keyword
' '           Text
'long'        Keyword.Type
' '           Text
'&'           Operator
'\n'          Text

'    '        Text
'"'           Literal.String
'"'           Literal.String
'\n'          Text

'\n'          Text

'%typecheck'  Name.Function
'('           Punctuation
'SWIG_TYPECHECK_INT64' Name
')'           Punctuation
' '           Text
'/* Java long */' Comment.Multiline
'\n'          Text

'    '        Text
'jlong'       Name
','           Punctuation
'\n'          Text

'    '        Text
'unsigned'    Keyword.Type
' '           Text
'int'         Keyword.Type
','           Punctuation
' \n    '     Text
'unsigned'    Keyword.Type
' '           Text
'long'        Keyword.Type
','           Punctuation
' \n    '     Text
'long'        Keyword.Type
' '           Text
'long'        Keyword.Type
','           Punctuation
' \n    '     Text
'const'       Keyword
' '           Text
'unsigned'    Keyword.Type
' '           Text
'int'         Keyword.Type
' '           Text
'&'           Operator
','           Punctuation
' \n    '     Text
'const'       Keyword
' '           Text
'unsigned'    Keyword.Type
' '           Text
'long'        Keyword.Type
' '           Text
'&'           Operator
','           Punctuation
' \n    '     Text
'const'       Keyword
' '           Text
'long'        Keyword.Type
' '           Text
'long'        Keyword.Type
' '           Text
'&'           Operator
'\n'          Text

'    '        Text
'"'           Literal.String
'"'           Literal.String
'\n'          Text

'\n'          Text

'%typecheck'  Name.Function
'('           Punctuation
'SWIG_TYPECHECK_INT128' Name
')'           Punctuation
' '           Text
'/* Java BigInteger */' Comment.Multiline
'\n'          Text

'    '        Text
'unsigned'    Keyword.Type
' '           Text
'long'        Keyword.Type
' '           Text
'long'        Keyword.Type
','           Punctuation
'\n'          Text

'    '        Text
'const'       Keyword
' '           Text
'unsigned'    Keyword.Type
' '           Text
'long'        Keyword.Type
' '           Text
'long'        Keyword.Type
' '           Text
'&'           Operator
'\n'          Text

'    '        Text
'"'           Literal.String
'"'           Literal.String
'\n'          Text

'\n'          Text

'%typecheck'  Name.Function
'('           Punctuation
'SWIG_TYPECHECK_FLOAT' Name
')'           Punctuation
' '           Text
'/* Java float */' Comment.Multiline
'\n'          Text

'    '        Text
'jfloat'      Name
','           Punctuation
'\n'          Text

'    '        Text
'float'       Keyword.Type
','           Punctuation
'\n'          Text

'    '        Text
'const'       Keyword
' '           Text
'float'       Keyword.Type
' '           Text
'&'           Operator
'\n'          Text

'    '        Text
'"'           Literal.String
'"'           Literal.String
'\n'          Text

'\n'          Text

'%typecheck'  Name.Function
'('           Punctuation
'SWIG_TYPECHECK_DOUBLE' Name
')'           Punctuation
' '           Text
'/* Java double */' Comment.Multiline
'\n'          Text

'    '        Text
'jdouble'     Name
','           Punctuation
'\n'          Text

'    '        Text
'double'      Keyword.Type
','           Punctuation
'\n'          Text

'    '        Text
'const'       Keyword
' '           Text
'double'      Keyword.Type
' '           Text
'&'           Operator
'\n'          Text

'    '        Text
'"'           Literal.String
'"'           Literal.String
'\n'          Text

'\n'          Text

'%typecheck'  Name.Function
'('           Punctuation
'SWIG_TYPECHECK_STRING' Name
')'           Punctuation
' '           Text
'/* Java String */' Comment.Multiline
'\n'          Text

'    '        Text
'jstring'     Name
','           Punctuation
'\n'          Text

'    '        Text
'char'        Keyword.Type
' '           Text
'*'           Operator
','           Punctuation
'\n'          Text

'    '        Text
'char'        Keyword.Type
' '           Text
'*'           Operator
'&'           Operator
','           Punctuation
'\n'          Text

'    '        Text
'char'        Keyword.Type
'['           Punctuation
'ANY'         Name
']'           Punctuation
','           Punctuation
'\n'          Text

'    '        Text
'char'        Keyword.Type
' '           Text
'['           Punctuation
']'           Punctuation
'\n'          Text

'    '        Text
'"'           Literal.String
'"'           Literal.String
'\n'          Text

'\n'          Text

'%typecheck'  Name.Function
'('           Punctuation
'SWIG_TYPECHECK_BOOL_ARRAY' Name
')'           Punctuation
' '           Text
'/* Java boolean[] */' Comment.Multiline
'\n'          Text

'    '        Text
'jbooleanArray' Name
'\n'          Text

'    '        Text
'"'           Literal.String
'"'           Literal.String
'\n'          Text

'\n'          Text

'%typecheck'  Name.Function
'('           Punctuation
'SWIG_TYPECHECK_CHAR_ARRAY' Name
')'           Punctuation
' '           Text
'/* Java char[] */' Comment.Multiline
'\n'          Text

'    '        Text
'jcharArray'  Name
'\n'          Text

'    '        Text
'"'           Literal.String
'"'           Literal.String
'\n'          Text

'\n'          Text

'%typecheck'  Name.Function
'('           Punctuation
'SWIG_TYPECHECK_INT8_ARRAY' Name
')'           Punctuation
' '           Text
'/* Java byte[] */' Comment.Multiline
'\n'          Text

'    '        Text
'jbyteArray'  Name
'\n'          Text

'    '        Text
'"'           Literal.String
'"'           Literal.String
'\n'          Text

'\n'          Text

'%typecheck'  Name.Function
'('           Punctuation
'SWIG_TYPECHECK_INT16_ARRAY' Name
')'           Punctuation
' '           Text
'/* Java short[] */' Comment.Multiline
'\n'          Text

'    '        Text
'jshortArray' Name
'\n'          Text

'    '        Text
'"'           Literal.String
'"'           Literal.String
'\n'          Text

'\n'          Text

'%typecheck'  Name.Function
'('           Punctuation
'SWIG_TYPECHECK_INT32_ARRAY' Name
')'           Punctuation
' '           Text
'/* Java int[] */' Comment.Multiline
'\n'          Text

'    '        Text
'jintArray'   Name
'\n'          Text

'    '        Text
'"'           Literal.String
'"'           Literal.String
'\n'          Text

'\n'          Text

'%typecheck'  Name.Function
'('           Punctuation
'SWIG_TYPECHECK_INT64_ARRAY' Name
')'           Punctuation
' '           Text
'/* Java long[] */' Comment.Multiline
'\n'          Text

'    '        Text
'jlongArray'  Name
'\n'          Text

'    '        Text
'"'           Literal.String
'"'           Literal.String
'\n'          Text

'\n'          Text

'%typecheck'  Name.Function
'('           Punctuation
'SWIG_TYPECHECK_FLOAT_ARRAY' Name
')'           Punctuation
' '           Text
'/* Java float[] */' Comment.Multiline
'\n'          Text

'    '        Text
'jfloatArray' Name
'\n'          Text

'    '        Text
'"'           Literal.String
'"'           Literal.String
'\n'          Text

'\n'          Text

'%typecheck'  Name.Function
'('           Punctuation
'SWIG_TYPECHECK_DOUBLE_ARRAY' Name
')'           Punctuation
' '           Text
'/* Java double[] */' Comment.Multiline
'\n'          Text

'    '        Text
'jdoubleArray' Name
'\n'          Text

'    '        Text
'"'           Literal.String
'"'           Literal.String
'\n'          Text

'\n'          Text

'%typecheck'  Name.Function
'('           Punctuation
'SWIG_TYPECHECK_OBJECT_ARRAY' Name
')'           Punctuation
' '           Text
'/* Java jobject[] */' Comment.Multiline
'\n'          Text

'    '        Text
'jobjectArray' Name
'\n'          Text

'    '        Text
'"'           Literal.String
'"'           Literal.String
'\n'          Text

'\n'          Text

'%typecheck'  Name.Function
'('           Punctuation
'SWIG_TYPECHECK_POINTER' Name
')'           Punctuation
' '           Text
'/* Default */' Comment.Multiline
'\n'          Text

'    '        Text
'SWIGTYPE'    Name
','           Punctuation
' \n    '     Text
'SWIGTYPE'    Name
' '           Text
'*'           Operator
','           Punctuation
' \n    '     Text
'SWIGTYPE'    Name
' '           Text
'&'           Operator
','           Punctuation
' \n    '     Text
'SWIGTYPE'    Name
' '           Text
'*'           Operator
'const'       Keyword
'&'           Operator
','           Punctuation
' \n    '     Text
'SWIGTYPE'    Name
' '           Text
'['           Punctuation
']'           Punctuation
','           Punctuation
'\n'          Text

'    '        Text
'SWIGTYPE'    Name
' '           Text
'('           Punctuation
'CLASS'       Name
':'           Operator
':'           Operator
'*'           Operator
')'           Punctuation
'\n'          Text

'    '        Text
'"'           Literal.String
'"'           Literal.String
'\n'          Text

'\n'          Text

'\n'          Text

'/* Exception handling */' Comment.Multiline
'\n'          Text

'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'throws'      Keyword
')'           Punctuation
' '           Text
'int'         Keyword.Type
','           Punctuation
' \n                 ' Text
'long'        Keyword.Type
','           Punctuation
' \n                 ' Text
'short'       Keyword.Type
','           Punctuation
' \n                 ' Text
'unsigned'    Keyword.Type
' '           Text
'int'         Keyword.Type
','           Punctuation
' \n                 ' Text
'unsigned'    Keyword.Type
' '           Text
'long'        Keyword.Type
','           Punctuation
' \n                 ' Text
'unsigned'    Keyword.Type
' '           Text
'short'       Keyword.Type
'\n'          Text

'%'           Operator
'{'           Punctuation
' '           Text
'char'        Keyword.Type
' '           Text
'error_msg'   Name
'['           Punctuation
'256'         Literal.Number.Integer
']'           Punctuation
';'           Punctuation
'\n'          Text

'   '         Text
'sprintf'     Name
'('           Punctuation
'error_msg'   Name
','           Punctuation
' '           Text
'"'           Literal.String
'C++ $1_type exception thrown, value: %d' Literal.String
'"'           Literal.String
','           Punctuation
' '           Text
'$1'          Name
')'           Punctuation
';'           Punctuation
'\n'          Text

'   '         Text
'SWIG_JavaThrowException' Name
'('           Punctuation
'jenv'        Name
','           Punctuation
' '           Text
'SWIG_JavaRuntimeException' Name
','           Punctuation
' '           Text
'error_msg'   Name
')'           Punctuation
';'           Punctuation
'\n'          Text

'   '         Text
'return'      Keyword
' '           Text
'$null'       Name
';'           Punctuation
' '           Text
'%'           Operator
'}'           Punctuation
'\n'          Text

'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'throws'      Keyword
')'           Punctuation
' '           Text
'SWIGTYPE'    Name
','           Punctuation
' '           Text
'SWIGTYPE'    Name
' '           Text
'&'           Operator
','           Punctuation
' '           Text
'SWIGTYPE'    Name
' '           Text
'*'           Operator
','           Punctuation
' '           Text
'SWIGTYPE'    Name
' '           Text
'['           Punctuation
']'           Punctuation
','           Punctuation
' '           Text
'SWIGTYPE'    Name
' '           Text
'['           Punctuation
'ANY'         Name
']'           Punctuation
'\n'          Text

'%'           Operator
'{'           Punctuation
' '           Text
'('           Punctuation
'void'        Keyword.Type
')'           Punctuation
'$1'          Name
';'           Punctuation
'\n'          Text

'   '         Text
'SWIG_JavaThrowException' Name
'('           Punctuation
'jenv'        Name
','           Punctuation
' '           Text
'SWIG_JavaRuntimeException' Name
','           Punctuation
' '           Text
'"'           Literal.String
'C++ $1_type exception thrown' Literal.String
'"'           Literal.String
')'           Punctuation
';'           Punctuation
'\n'          Text

'   '         Text
'return'      Keyword
' '           Text
'$null'       Name
';'           Punctuation
' '           Text
'%'           Operator
'}'           Punctuation
'\n'          Text

'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'throws'      Keyword
')'           Punctuation
' '           Text
'char'        Keyword.Type
' '           Text
'*'           Operator
'\n'          Text

'%'           Operator
'{'           Punctuation
' '           Text
'SWIG_JavaThrowException' Name
'('           Punctuation
'jenv'        Name
','           Punctuation
' '           Text
'SWIG_JavaRuntimeException' Name
','           Punctuation
' '           Text
'$1'          Name
')'           Punctuation
';'           Punctuation
'\n'          Text

'   '         Text
'return'      Keyword
' '           Text
'$null'       Name
';'           Punctuation
' '           Text
'%'           Operator
'}'           Punctuation
'\n'          Text

'\n'          Text

'\n'          Text

'/* Typemaps for code generation in proxy classes and Java type wrapper classes */' Comment.Multiline
'\n'          Text

'\n'          Text

'/* The javain typemap is used for converting function parameter types from the type \n * used in the proxy, module or type wrapper class to the type used in the JNI class. */' Comment.Multiline
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'javain'      Name
')'           Punctuation
' '           Text
'bool'        Keyword.Type
','           Punctuation
'               ' Text
'const'       Keyword
' '           Text
'bool'        Keyword.Type
' '           Text
'&'           Operator
','           Punctuation
'\n'          Text

'                 ' Text
'char'        Keyword.Type
','           Punctuation
'               ' Text
'const'       Keyword
' '           Text
'char'        Keyword.Type
' '           Text
'&'           Operator
','           Punctuation
'\n'          Text

'                 ' Text
'signed'      Keyword.Type
' '           Text
'char'        Keyword.Type
','           Punctuation
'        '    Text
'const'       Keyword
' '           Text
'signed'      Keyword.Type
' '           Text
'char'        Keyword.Type
' '           Text
'&'           Operator
','           Punctuation
'\n'          Text

'                 ' Text
'unsigned'    Keyword.Type
' '           Text
'char'        Keyword.Type
','           Punctuation
'      '      Text
'const'       Keyword
' '           Text
'unsigned'    Keyword.Type
' '           Text
'char'        Keyword.Type
' '           Text
'&'           Operator
','           Punctuation
'\n'          Text

'                 ' Text
'short'       Keyword.Type
','           Punctuation
'              ' Text
'const'       Keyword
' '           Text
'short'       Keyword.Type
' '           Text
'&'           Operator
','           Punctuation
'\n'          Text

'                 ' Text
'unsigned'    Keyword.Type
' '           Text
'short'       Keyword.Type
','           Punctuation
'     '       Text
'const'       Keyword
' '           Text
'unsigned'    Keyword.Type
' '           Text
'short'       Keyword.Type
' '           Text
'&'           Operator
','           Punctuation
'\n'          Text

'                 ' Text
'int'         Keyword.Type
','           Punctuation
'                ' Text
'const'       Keyword
' '           Text
'int'         Keyword.Type
' '           Text
'&'           Operator
','           Punctuation
'\n'          Text

'                 ' Text
'unsigned'    Keyword.Type
' '           Text
'int'         Keyword.Type
','           Punctuation
'       '     Text
'const'       Keyword
' '           Text
'unsigned'    Keyword.Type
' '           Text
'int'         Keyword.Type
' '           Text
'&'           Operator
','           Punctuation
'\n'          Text

'                 ' Text
'long'        Keyword.Type
','           Punctuation
'               ' Text
'const'       Keyword
' '           Text
'long'        Keyword.Type
' '           Text
'&'           Operator
','           Punctuation
'\n'          Text

'                 ' Text
'unsigned'    Keyword.Type
' '           Text
'long'        Keyword.Type
','           Punctuation
'      '      Text
'const'       Keyword
' '           Text
'unsigned'    Keyword.Type
' '           Text
'long'        Keyword.Type
' '           Text
'&'           Operator
','           Punctuation
'\n'          Text

'                 ' Text
'long'        Keyword.Type
' '           Text
'long'        Keyword.Type
','           Punctuation
'          '  Text
'const'       Keyword
' '           Text
'long'        Keyword.Type
' '           Text
'long'        Keyword.Type
' '           Text
'&'           Operator
','           Punctuation
'\n'          Text

'                 ' Text
'unsigned'    Keyword.Type
' '           Text
'long'        Keyword.Type
' '           Text
'long'        Keyword.Type
','           Punctuation
' '           Text
'const'       Keyword
' '           Text
'unsigned'    Keyword.Type
' '           Text
'long'        Keyword.Type
' '           Text
'long'        Keyword.Type
' '           Text
'&'           Operator
','           Punctuation
'\n'          Text

'                 ' Text
'float'       Keyword.Type
','           Punctuation
'              ' Text
'const'       Keyword
' '           Text
'float'       Keyword.Type
' '           Text
'&'           Operator
','           Punctuation
'\n'          Text

'                 ' Text
'double'      Keyword.Type
','           Punctuation
'             ' Text
'const'       Keyword
' '           Text
'double'      Keyword.Type
' '           Text
'&'           Operator
'\n'          Text

'    '        Text
'"'           Literal.String
'$javainput'  Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'javain'      Name
')'           Punctuation
' '           Text
'char'        Keyword.Type
' '           Text
'*'           Operator
','           Punctuation
' '           Text
'char'        Keyword.Type
' '           Text
'*'           Operator
'&'           Operator
','           Punctuation
' '           Text
'char'        Keyword.Type
'['           Punctuation
'ANY'         Name
']'           Punctuation
','           Punctuation
' '           Text
'char'        Keyword.Type
'['           Punctuation
']'           Punctuation
' '           Text
'"'           Literal.String
'$javainput'  Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'javain'      Name
')'           Punctuation
' '           Text
'jboolean'    Name
','           Punctuation
'\n'          Text

'                 ' Text
'jchar'       Name
','           Punctuation
'\n'          Text

'                 ' Text
'jbyte'       Name
','           Punctuation
'\n'          Text

'                 ' Text
'jshort'      Name
','           Punctuation
'\n'          Text

'                 ' Text
'jint'        Name
','           Punctuation
'\n'          Text

'                 ' Text
'jlong'       Name
','           Punctuation
'\n'          Text

'                 ' Text
'jfloat'      Name
','           Punctuation
'\n'          Text

'                 ' Text
'jdouble'     Name
','           Punctuation
'\n'          Text

'                 ' Text
'jstring'     Name
','           Punctuation
'\n'          Text

'                 ' Text
'jobject'     Name
','           Punctuation
'\n'          Text

'                 ' Text
'jbooleanArray' Name
','           Punctuation
'\n'          Text

'                 ' Text
'jcharArray'  Name
','           Punctuation
'\n'          Text

'                 ' Text
'jbyteArray'  Name
','           Punctuation
'\n'          Text

'                 ' Text
'jshortArray' Name
','           Punctuation
'\n'          Text

'                 ' Text
'jintArray'   Name
','           Punctuation
'\n'          Text

'                 ' Text
'jlongArray'  Name
','           Punctuation
'\n'          Text

'                 ' Text
'jfloatArray' Name
','           Punctuation
'\n'          Text

'                 ' Text
'jdoubleArray' Name
','           Punctuation
'\n'          Text

'                 ' Text
'jobjectArray' Name
'\n'          Text

'    '        Text
'"'           Literal.String
'$javainput'  Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'javain'      Name
')'           Punctuation
' '           Text
'SWIGTYPE'    Name
' '           Text
'"'           Literal.String
'$&javaclassname.getCPtr($javainput)' Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'javain'      Name
')'           Punctuation
' '           Text
'SWIGTYPE'    Name
' '           Text
'*'           Operator
','           Punctuation
' '           Text
'SWIGTYPE'    Name
' '           Text
'&'           Operator
','           Punctuation
' '           Text
'SWIGTYPE'    Name
' '           Text
'['           Punctuation
']'           Punctuation
' '           Text
'"'           Literal.String
'$javaclassname.getCPtr($javainput)' Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'javain'      Name
')'           Punctuation
' '           Text
'SWIGTYPE'    Name
' '           Text
'('           Punctuation
'CLASS'       Name
':'           Operator
':'           Operator
'*'           Operator
')'           Punctuation
' '           Text
'"'           Literal.String
'$javaclassname.getCMemberPtr($javainput)' Literal.String
'"'           Literal.String
'\n'          Text

'\n'          Text

'/* The javaout typemap is used for converting function return types from the return type\n * used in the JNI class to the type returned by the proxy, module or type wrapper class. */' Comment.Multiline
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'javaout'     Name
')'           Punctuation
' '           Text
'bool'        Keyword.Type
','           Punctuation
'               ' Text
'const'       Keyword
' '           Text
'bool'        Keyword.Type
' '           Text
'&'           Operator
','           Punctuation
'\n'          Text

'                  ' Text
'char'        Keyword.Type
','           Punctuation
'               ' Text
'const'       Keyword
' '           Text
'char'        Keyword.Type
' '           Text
'&'           Operator
','           Punctuation
'\n'          Text

'                  ' Text
'signed'      Keyword.Type
' '           Text
'char'        Keyword.Type
','           Punctuation
'        '    Text
'const'       Keyword
' '           Text
'signed'      Keyword.Type
' '           Text
'char'        Keyword.Type
' '           Text
'&'           Operator
','           Punctuation
'\n'          Text

'                  ' Text
'unsigned'    Keyword.Type
' '           Text
'char'        Keyword.Type
','           Punctuation
'      '      Text
'const'       Keyword
' '           Text
'unsigned'    Keyword.Type
' '           Text
'char'        Keyword.Type
' '           Text
'&'           Operator
','           Punctuation
'\n'          Text

'                  ' Text
'short'       Keyword.Type
','           Punctuation
'              ' Text
'const'       Keyword
' '           Text
'short'       Keyword.Type
' '           Text
'&'           Operator
','           Punctuation
'\n'          Text

'                  ' Text
'unsigned'    Keyword.Type
' '           Text
'short'       Keyword.Type
','           Punctuation
'     '       Text
'const'       Keyword
' '           Text
'unsigned'    Keyword.Type
' '           Text
'short'       Keyword.Type
' '           Text
'&'           Operator
','           Punctuation
'\n'          Text

'                  ' Text
'int'         Keyword.Type
','           Punctuation
'                ' Text
'const'       Keyword
' '           Text
'int'         Keyword.Type
' '           Text
'&'           Operator
','           Punctuation
'\n'          Text

'                  ' Text
'unsigned'    Keyword.Type
' '           Text
'int'         Keyword.Type
','           Punctuation
'       '     Text
'const'       Keyword
' '           Text
'unsigned'    Keyword.Type
' '           Text
'int'         Keyword.Type
' '           Text
'&'           Operator
','           Punctuation
'\n'          Text

'                  ' Text
'long'        Keyword.Type
','           Punctuation
'               ' Text
'const'       Keyword
' '           Text
'long'        Keyword.Type
' '           Text
'&'           Operator
','           Punctuation
'\n'          Text

'                  ' Text
'unsigned'    Keyword.Type
' '           Text
'long'        Keyword.Type
','           Punctuation
'      '      Text
'const'       Keyword
' '           Text
'unsigned'    Keyword.Type
' '           Text
'long'        Keyword.Type
' '           Text
'&'           Operator
','           Punctuation
'\n'          Text

'                  ' Text
'long'        Keyword.Type
' '           Text
'long'        Keyword.Type
','           Punctuation
'          '  Text
'const'       Keyword
' '           Text
'long'        Keyword.Type
' '           Text
'long'        Keyword.Type
' '           Text
'&'           Operator
','           Punctuation
'\n'          Text

'                  ' Text
'unsigned'    Keyword.Type
' '           Text
'long'        Keyword.Type
' '           Text
'long'        Keyword.Type
','           Punctuation
' '           Text
'const'       Keyword
' '           Text
'unsigned'    Keyword.Type
' '           Text
'long'        Keyword.Type
' '           Text
'long'        Keyword.Type
' '           Text
'&'           Operator
','           Punctuation
'\n'          Text

'                  ' Text
'float'       Keyword.Type
','           Punctuation
'              ' Text
'const'       Keyword
' '           Text
'float'       Keyword.Type
' '           Text
'&'           Operator
','           Punctuation
'\n'          Text

'                  ' Text
'double'      Keyword.Type
','           Punctuation
'             ' Text
'const'       Keyword
' '           Text
'double'      Keyword.Type
' '           Text
'&'           Operator
' '           Text
'{'           Punctuation
'\n'          Text

'    '        Text
'return'      Keyword
' '           Text
'$jnicall'    Name
';'           Punctuation
'\n'          Text

'  '          Text
'}'           Punctuation
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'javaout'     Name
')'           Punctuation
' '           Text
'char'        Keyword.Type
' '           Text
'*'           Operator
','           Punctuation
' '           Text
'char'        Keyword.Type
' '           Text
'*'           Operator
'&'           Operator
','           Punctuation
' '           Text
'char'        Keyword.Type
'['           Punctuation
'ANY'         Name
']'           Punctuation
','           Punctuation
' '           Text
'char'        Keyword.Type
'['           Punctuation
']'           Punctuation
' '           Text
'{'           Punctuation
'\n'          Text

'    '        Text
'return'      Keyword
' '           Text
'$jnicall'    Name
';'           Punctuation
'\n'          Text

'  '          Text
'}'           Punctuation
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'javaout'     Name
')'           Punctuation
' '           Text
'jboolean'    Name
','           Punctuation
'\n'          Text

'                  ' Text
'jchar'       Name
','           Punctuation
'\n'          Text

'                  ' Text
'jbyte'       Name
','           Punctuation
'\n'          Text

'                  ' Text
'jshort'      Name
','           Punctuation
'\n'          Text

'                  ' Text
'jint'        Name
','           Punctuation
'\n'          Text

'                  ' Text
'jlong'       Name
','           Punctuation
'\n'          Text

'                  ' Text
'jfloat'      Name
','           Punctuation
'\n'          Text

'                  ' Text
'jdouble'     Name
','           Punctuation
'\n'          Text

'                  ' Text
'jstring'     Name
','           Punctuation
'\n'          Text

'                  ' Text
'jobject'     Name
','           Punctuation
'\n'          Text

'                  ' Text
'jbooleanArray' Name
','           Punctuation
'\n'          Text

'                  ' Text
'jcharArray'  Name
','           Punctuation
'\n'          Text

'                  ' Text
'jbyteArray'  Name
','           Punctuation
'\n'          Text

'                  ' Text
'jshortArray' Name
','           Punctuation
'\n'          Text

'                  ' Text
'jintArray'   Name
','           Punctuation
'\n'          Text

'                  ' Text
'jlongArray'  Name
','           Punctuation
'\n'          Text

'                  ' Text
'jfloatArray' Name
','           Punctuation
'\n'          Text

'                  ' Text
'jdoubleArray' Name
','           Punctuation
'\n'          Text

'                  ' Text
'jobjectArray' Name
' '           Text
'{'           Punctuation
'\n'          Text

'    '        Text
'return'      Keyword
' '           Text
'$jnicall'    Name
';'           Punctuation
'\n'          Text

'  '          Text
'}'           Punctuation
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'javaout'     Name
')'           Punctuation
' '           Text
'void'        Keyword.Type
' '           Text
'{'           Punctuation
'\n'          Text

'    '        Text
'$jnicall'    Name
';'           Punctuation
'\n'          Text

'  '          Text
'}'           Punctuation
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'javaout'     Name
')'           Punctuation
' '           Text
'SWIGTYPE'    Name
' '           Text
'{'           Punctuation
'\n'          Text

'    '        Text
'return'      Keyword
' '           Text
'new'         Keyword
' '           Text
'$&javaclassname' Name
'('           Punctuation
'$jnicall'    Name
','           Punctuation
' '           Text
'true'        Name.Builtin
')'           Punctuation
';'           Punctuation
'\n'          Text

'  '          Text
'}'           Punctuation
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'javaout'     Name
')'           Punctuation
' '           Text
'SWIGTYPE'    Name
' '           Text
'&'           Operator
' '           Text
'{'           Punctuation
'\n'          Text

'    '        Text
'return'      Keyword
' '           Text
'new'         Keyword
' '           Text
'$javaclassname' Name
'('           Punctuation
'$jnicall'    Name
','           Punctuation
' '           Text
'$owner'      Name
')'           Punctuation
';'           Punctuation
'\n'          Text

'  '          Text
'}'           Punctuation
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'javaout'     Name
')'           Punctuation
' '           Text
'SWIGTYPE'    Name
' '           Text
'*'           Operator
','           Punctuation
' '           Text
'SWIGTYPE'    Name
' '           Text
'['           Punctuation
']'           Punctuation
' '           Text
'{'           Punctuation
'\n'          Text

'    '        Text
'long'        Keyword.Type
' '           Text
'cPtr'        Name
' '           Text
'='           Operator
' '           Text
'$jnicall'    Name
';'           Punctuation
'\n'          Text

'    '        Text
'return'      Keyword
' '           Text
'('           Punctuation
'cPtr'        Name
' '           Text
'='           Operator
'='           Operator
' '           Text
'0'           Literal.Number.Integer
')'           Punctuation
' '           Text
'?'           Operator
' '           Text
'null'        Name.Label
' '           Text
':'           Punctuation
' '           Text
'new'         Keyword
' '           Text
'$javaclassname' Name
'('           Punctuation
'cPtr'        Name
','           Punctuation
' '           Text
'$owner'      Name
')'           Punctuation
';'           Punctuation
'\n'          Text

'  '          Text
'}'           Punctuation
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'javaout'     Name
')'           Punctuation
' '           Text
'SWIGTYPE'    Name
' '           Text
'('           Punctuation
'CLASS'       Name
':'           Operator
':'           Operator
'*'           Operator
')'           Punctuation
' '           Text
'{'           Punctuation
'\n'          Text

'    '        Text
'String'      Name
' '           Text
'cMemberPtr'  Name
' '           Text
'='           Operator
' '           Text
'$jnicall'    Name
';'           Punctuation
'\n'          Text

'    '        Text
'return'      Keyword
' '           Text
'('           Punctuation
'cMemberPtr'  Name
' '           Text
'='           Operator
'='           Operator
' '           Text
'null'        Name
')'           Punctuation
' '           Text
'?'           Operator
' '           Text
'null'        Name.Label
' '           Text
':'           Punctuation
' '           Text
'new'         Keyword
' '           Text
'$javaclassname' Name
'('           Punctuation
'cMemberPtr'  Name
','           Punctuation
' '           Text
'$owner'      Name
')'           Punctuation
';'           Punctuation
'\n'          Text

'  '          Text
'}'           Punctuation
'\n'          Text

'\n'          Text

'/* Pointer reference typemaps */' Comment.Multiline
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jni'         Name
')'           Punctuation
' '           Text
'SWIGTYPE'    Name
' '           Text
'*'           Operator
'const'       Keyword
'&'           Operator
' '           Text
'"'           Literal.String
'jlong'       Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jtype'       Name
')'           Punctuation
' '           Text
'SWIGTYPE'    Name
' '           Text
'*'           Operator
'const'       Keyword
'&'           Operator
' '           Text
'"'           Literal.String
'long'        Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jstype'      Name
')'           Punctuation
' '           Text
'SWIGTYPE'    Name
' '           Text
'*'           Operator
'const'       Keyword
'&'           Operator
' '           Text
'"'           Literal.String
'$*javaclassname' Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'javain'      Name
')'           Punctuation
' '           Text
'SWIGTYPE'    Name
' '           Text
'*'           Operator
'const'       Keyword
'&'           Operator
' '           Text
'"'           Literal.String
'$*javaclassname.getCPtr($javainput)' Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'javaout'     Name
')'           Punctuation
' '           Text
'SWIGTYPE'    Name
' '           Text
'*'           Operator
'const'       Keyword
'&'           Operator
' '           Text
'{'           Punctuation
'\n'          Text

'    '        Text
'long'        Keyword.Type
' '           Text
'cPtr'        Name
' '           Text
'='           Operator
' '           Text
'$jnicall'    Name
';'           Punctuation
'\n'          Text

'    '        Text
'return'      Keyword
' '           Text
'('           Punctuation
'cPtr'        Name
' '           Text
'='           Operator
'='           Operator
' '           Text
'0'           Literal.Number.Integer
')'           Punctuation
' '           Text
'?'           Operator
' '           Text
'null'        Name.Label
' '           Text
':'           Punctuation
' '           Text
'new'         Keyword
' '           Text
'$*javaclassname' Name
'('           Punctuation
'cPtr'        Name
','           Punctuation
' '           Text
'$owner'      Name
')'           Punctuation
';'           Punctuation
'\n'          Text

'  '          Text
'}'           Punctuation
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'in'          Name
')'           Punctuation
' '           Text
'SWIGTYPE'    Name
' '           Text
'*'           Operator
'const'       Keyword
'&'           Operator
' '           Text
'('           Punctuation
'$*1_ltype'   Name
' '           Text
'temp'        Name
' '           Text
'='           Operator
' '           Text
'0'           Literal.Number.Integer
')'           Punctuation
'\n'          Text

'%'           Operator
'{'           Punctuation
' '           Text
'temp'        Name
' '           Text
'='           Operator
' '           Text
'*'           Operator
'('           Punctuation
'$1_ltype'    Name
')'           Punctuation
'&'           Operator
'$input'      Name
';'           Punctuation
'\n'          Text

'   '         Text
'$1'          Name
' '           Text
'='           Operator
' '           Text
'('           Punctuation
'$1_ltype'    Name
')'           Punctuation
'&'           Operator
'temp'        Name
';'           Punctuation
' '           Text
'%'           Operator
'}'           Punctuation
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'out'         Name
')'           Punctuation
' '           Text
'SWIGTYPE'    Name
' '           Text
'*'           Operator
'const'       Keyword
'&'           Operator
'\n'          Text

'%'           Operator
'{'           Punctuation
' '           Text
'*'           Operator
'('           Punctuation
'$1_ltype'    Name
')'           Punctuation
'&'           Operator
'$result'     Name
' '           Text
'='           Operator
' '           Text
'*'           Operator
'$1'          Name
';'           Punctuation
' '           Text
'%'           Operator
'}'           Punctuation
' \n\n'       Text

'/* Typemaps used for the generation of proxy and type wrapper class code */' Comment.Multiline
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'javabase'    Name
')'           Punctuation
'             ' Text
'SWIGTYPE'    Name
','           Punctuation
' '           Text
'SWIGTYPE'    Name
' '           Text
'*'           Operator
','           Punctuation
' '           Text
'SWIGTYPE'    Name
' '           Text
'&'           Operator
','           Punctuation
' '           Text
'SWIGTYPE'    Name
' '           Text
'['           Punctuation
']'           Punctuation
','           Punctuation
' '           Text
'SWIGTYPE'    Name
' '           Text
'('           Punctuation
'CLASS'       Name
':'           Operator
':'           Operator
'*'           Operator
')'           Punctuation
' '           Text
'"'           Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'javaclassmodifiers' Name
')'           Punctuation
'   '         Text
'SWIGTYPE'    Name
','           Punctuation
' '           Text
'SWIGTYPE'    Name
' '           Text
'*'           Operator
','           Punctuation
' '           Text
'SWIGTYPE'    Name
' '           Text
'&'           Operator
','           Punctuation
' '           Text
'SWIGTYPE'    Name
' '           Text
'['           Punctuation
']'           Punctuation
','           Punctuation
' '           Text
'SWIGTYPE'    Name
' '           Text
'('           Punctuation
'CLASS'       Name
':'           Operator
':'           Operator
'*'           Operator
')'           Punctuation
' '           Text
'"'           Literal.String
'public class' Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'javacode'    Name
')'           Punctuation
'             ' Text
'SWIGTYPE'    Name
','           Punctuation
' '           Text
'SWIGTYPE'    Name
' '           Text
'*'           Operator
','           Punctuation
' '           Text
'SWIGTYPE'    Name
' '           Text
'&'           Operator
','           Punctuation
' '           Text
'SWIGTYPE'    Name
' '           Text
'['           Punctuation
']'           Punctuation
','           Punctuation
' '           Text
'SWIGTYPE'    Name
' '           Text
'('           Punctuation
'CLASS'       Name
':'           Operator
':'           Operator
'*'           Operator
')'           Punctuation
' '           Text
'"'           Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'javaimports' Name
')'           Punctuation
'          '  Text
'SWIGTYPE'    Name
','           Punctuation
' '           Text
'SWIGTYPE'    Name
' '           Text
'*'           Operator
','           Punctuation
' '           Text
'SWIGTYPE'    Name
' '           Text
'&'           Operator
','           Punctuation
' '           Text
'SWIGTYPE'    Name
' '           Text
'['           Punctuation
']'           Punctuation
','           Punctuation
' '           Text
'SWIGTYPE'    Name
' '           Text
'('           Punctuation
'CLASS'       Name
':'           Operator
':'           Operator
'*'           Operator
')'           Punctuation
' '           Text
'"'           Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'javainterfaces' Name
')'           Punctuation
'       '     Text
'SWIGTYPE'    Name
','           Punctuation
' '           Text
'SWIGTYPE'    Name
' '           Text
'*'           Operator
','           Punctuation
' '           Text
'SWIGTYPE'    Name
' '           Text
'&'           Operator
','           Punctuation
' '           Text
'SWIGTYPE'    Name
' '           Text
'['           Punctuation
']'           Punctuation
','           Punctuation
' '           Text
'SWIGTYPE'    Name
' '           Text
'('           Punctuation
'CLASS'       Name
':'           Operator
':'           Operator
'*'           Operator
')'           Punctuation
' '           Text
'"'           Literal.String
'"'           Literal.String
'\n'          Text

'\n'          Text

'/* javabody typemaps */' Comment.Multiline
'\n'          Text

'\n'          Text

'%define'     Name.Function
' '           Text
'SWIG_JAVABODY_METHODS' Name
'('           Punctuation
'PTRCTOR_VISIBILITY' Name
','           Punctuation
' '           Text
'CPTR_VISIBILITY' Name
','           Punctuation
' '           Text
'TYPE'        Name
'.'           Punctuation
'.'           Punctuation
'.'           Punctuation
')'           Punctuation
' '           Text
'SWIG_JAVABODY_PROXY' Name
'('           Punctuation
'PTRCTOR_VISIBILITY' Name
','           Punctuation
' '           Text
'CPTR_VISIBILITY' Name
','           Punctuation
' '           Text
'TYPE'        Name
')'           Punctuation
' '           Text
'%enddef'     Name.Function
' '           Text
'// legacy name\n' Comment.Single

'\n'          Text

'%define'     Name.Function
' '           Text
'SWIG_JAVABODY_PROXY' Name
'('           Punctuation
'PTRCTOR_VISIBILITY' Name
','           Punctuation
' '           Text
'CPTR_VISIBILITY' Name
','           Punctuation
' '           Text
'TYPE'        Name
'.'           Punctuation
'.'           Punctuation
'.'           Punctuation
')'           Punctuation
'\n'          Text

'// Base proxy classes\n' Comment.Single

'%typemap'    Name.Function
'('           Punctuation
'javabody'    Name
')'           Punctuation
' '           Text
'TYPE'        Name
' '           Text
'%'           Operator
'{'           Punctuation
'\n'          Text

'  '          Text
'private'     Keyword
' '           Text
'long'        Keyword.Type
' '           Text
'swigCPtr'    Name
';'           Punctuation
'\n'          Text

'  '          Text
'protected'   Keyword
' '           Text
'boolean'     Name
' '           Text
'swigCMemOwn' Name
';'           Punctuation
'\n'          Text

'\n'          Text

'  '          Text
'PTRCTOR_VISIBILITY' Name
' '           Text
'$javaclassname' Name.Function
'('           Punctuation
'long'        Keyword.Type
' '           Text
'cPtr'        Name
','           Punctuation
' '           Text
'boolean'     Name
' '           Text
'cMemoryOwn'  Name
')'           Punctuation
' '           Text
'{'           Punctuation
'\n'          Text

'    '        Text
'swigCMemOwn' Name
' '           Text
'='           Operator
' '           Text
'cMemoryOwn'  Name
';'           Punctuation
'\n'          Text

'    '        Text
'swigCPtr'    Name
' '           Text
'='           Operator
' '           Text
'cPtr'        Name
';'           Punctuation
'\n'          Text

'  '          Text
'}'           Punctuation
'\n'          Text

'\n'          Text

'  '          Text
'CPTR_VISIBILITY' Name
' '           Text
'static'      Keyword
' '           Text
'long'        Keyword.Type
' '           Text
'getCPtr'     Name
'('           Punctuation
'$javaclassname' Name
' '           Text
'obj'         Name
')'           Punctuation
' '           Text
'{'           Punctuation
'\n'          Text

'    '        Text
'return'      Keyword
' '           Text
'('           Punctuation
'obj'         Name
' '           Text
'='           Operator
'='           Operator
' '           Text
'null'        Name
')'           Punctuation
' '           Text
'?'           Operator
' '           Text
'0'           Literal.Number.Integer
' '           Text
':'           Operator
' '           Text
'obj'         Name
'.'           Punctuation
'swigCPtr'    Name
';'           Punctuation
'\n'          Text

'  '          Text
'}'           Punctuation
'\n'          Text

'%'           Operator
'}'           Punctuation
'\n'          Text

'\n'          Text

'// Derived proxy classes\n' Comment.Single

'%typemap'    Name.Function
'('           Punctuation
'javabody_derived' Name
')'           Punctuation
' '           Text
'TYPE'        Name
' '           Text
'%'           Operator
'{'           Punctuation
'\n'          Text

'  '          Text
'private'     Keyword
' '           Text
'long'        Keyword.Type
' '           Text
'swigCPtr'    Name
';'           Punctuation
'\n'          Text

'\n'          Text

'  '          Text
'PTRCTOR_VISIBILITY' Name
' '           Text
'$javaclassname' Name.Function
'('           Punctuation
'long'        Keyword.Type
' '           Text
'cPtr'        Name
','           Punctuation
' '           Text
'boolean'     Name
' '           Text
'cMemoryOwn'  Name
')'           Punctuation
' '           Text
'{'           Punctuation
'\n'          Text

'    '        Text
'super'       Name
'('           Punctuation
'$imclassname' Name
'.'           Punctuation
'$javaclazznameSWIGUpcast' Name
'('           Punctuation
'cPtr'        Name
')'           Punctuation
','           Punctuation
' '           Text
'cMemoryOwn'  Name
')'           Punctuation
';'           Punctuation
'\n'          Text

'    '        Text
'swigCPtr'    Name
' '           Text
'='           Operator
' '           Text
'cPtr'        Name
';'           Punctuation
'\n'          Text

'  '          Text
'}'           Punctuation
'\n'          Text

'\n'          Text

'  '          Text
'CPTR_VISIBILITY' Name
' '           Text
'static'      Keyword
' '           Text
'long'        Keyword.Type
' '           Text
'getCPtr'     Name
'('           Punctuation
'$javaclassname' Name
' '           Text
'obj'         Name
')'           Punctuation
' '           Text
'{'           Punctuation
'\n'          Text

'    '        Text
'return'      Keyword
' '           Text
'('           Punctuation
'obj'         Name
' '           Text
'='           Operator
'='           Operator
' '           Text
'null'        Name
')'           Punctuation
' '           Text
'?'           Operator
' '           Text
'0'           Literal.Number.Integer
' '           Text
':'           Operator
' '           Text
'obj'         Name
'.'           Punctuation
'swigCPtr'    Name
';'           Punctuation
'\n'          Text

'  '          Text
'}'           Punctuation
'\n'          Text

'%'           Operator
'}'           Punctuation
'\n'          Text

'%enddef'     Name.Function
'\n'          Text

'\n'          Text

'%define'     Name.Function
' '           Text
'SWIG_JAVABODY_TYPEWRAPPER' Name
'('           Punctuation
'PTRCTOR_VISIBILITY' Name
','           Punctuation
' '           Text
'DEFAULTCTOR_VISIBILITY' Name
','           Punctuation
' '           Text
'CPTR_VISIBILITY' Name
','           Punctuation
' '           Text
'TYPE'        Name
'.'           Punctuation
'.'           Punctuation
'.'           Punctuation
')'           Punctuation
'\n'          Text

'// Typewrapper classes\n' Comment.Single

'%typemap'    Name.Function
'('           Punctuation
'javabody'    Name
')'           Punctuation
' '           Text
'TYPE'        Name
' '           Text
'*'           Operator
','           Punctuation
' '           Text
'TYPE'        Name
' '           Text
'&'           Operator
','           Punctuation
' '           Text
'TYPE'        Name
' '           Text
'['           Punctuation
']'           Punctuation
' '           Text
'%'           Operator
'{'           Punctuation
'\n'          Text

'  '          Text
'private'     Keyword
' '           Text
'long'        Keyword.Type
' '           Text
'swigCPtr'    Name
';'           Punctuation
'\n'          Text

'\n'          Text

'  '          Text
'PTRCTOR_VISIBILITY' Name
' '           Text
'$javaclassname' Name.Function
'('           Punctuation
'long'        Keyword.Type
' '           Text
'cPtr'        Name
','           Punctuation
' '           Text
'boolean'     Name
' '           Text
'futureUse'   Name
')'           Punctuation
' '           Text
'{'           Punctuation
'\n'          Text

'    '        Text
'swigCPtr'    Name
' '           Text
'='           Operator
' '           Text
'cPtr'        Name
';'           Punctuation
'\n'          Text

'  '          Text
'}'           Punctuation
'\n'          Text

'\n'          Text

'  '          Text
'DEFAULTCTOR_VISIBILITY' Name
' '           Text
'$javaclassname' Name.Function
'('           Punctuation
')'           Punctuation
' '           Text
'{'           Punctuation
'\n'          Text

'    '        Text
'swigCPtr'    Name
' '           Text
'='           Operator
' '           Text
'0'           Literal.Number.Integer
';'           Punctuation
'\n'          Text

'  '          Text
'}'           Punctuation
'\n'          Text

'\n'          Text

'  '          Text
'CPTR_VISIBILITY' Name
' '           Text
'static'      Keyword
' '           Text
'long'        Keyword.Type
' '           Text
'getCPtr'     Name
'('           Punctuation
'$javaclassname' Name
' '           Text
'obj'         Name
')'           Punctuation
' '           Text
'{'           Punctuation
'\n'          Text

'    '        Text
'return'      Keyword
' '           Text
'('           Punctuation
'obj'         Name
' '           Text
'='           Operator
'='           Operator
' '           Text
'null'        Name
')'           Punctuation
' '           Text
'?'           Operator
' '           Text
'0'           Literal.Number.Integer
' '           Text
':'           Operator
' '           Text
'obj'         Name
'.'           Punctuation
'swigCPtr'    Name
';'           Punctuation
'\n'          Text

'  '          Text
'}'           Punctuation
'\n'          Text

'%'           Operator
'}'           Punctuation
'\n'          Text

'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'javabody'    Name
')'           Punctuation
' '           Text
'TYPE'        Name
' '           Text
'('           Punctuation
'CLASS'       Name
':'           Operator
':'           Operator
'*'           Operator
')'           Punctuation
' '           Text
'%'           Operator
'{'           Punctuation
'\n'          Text

'  '          Text
'private'     Keyword
' '           Text
'String'      Name
' '           Text
'swigCMemberPtr' Name
';'           Punctuation
'\n'          Text

'\n'          Text

'  '          Text
'PTRCTOR_VISIBILITY' Name
' '           Text
'$javaclassname' Name.Function
'('           Punctuation
'String'      Name
' '           Text
'cMemberPtr'  Name
','           Punctuation
' '           Text
'boolean'     Name
' '           Text
'futureUse'   Name
')'           Punctuation
' '           Text
'{'           Punctuation
'\n'          Text

'    '        Text
'swigCMemberPtr' Name
' '           Text
'='           Operator
' '           Text
'cMemberPtr'  Name
';'           Punctuation
'\n'          Text

'  '          Text
'}'           Punctuation
'\n'          Text

'\n'          Text

'  '          Text
'DEFAULTCTOR_VISIBILITY' Name
' '           Text
'$javaclassname' Name.Function
'('           Punctuation
')'           Punctuation
' '           Text
'{'           Punctuation
'\n'          Text

'    '        Text
'swigCMemberPtr' Name
' '           Text
'='           Operator
' '           Text
'null'        Name
';'           Punctuation
'\n'          Text

'  '          Text
'}'           Punctuation
'\n'          Text

'\n'          Text

'  '          Text
'CPTR_VISIBILITY' Name
' '           Text
'static'      Keyword
' '           Text
'String'      Name
' '           Text
'getCMemberPtr' Name
'('           Punctuation
'$javaclassname' Name
' '           Text
'obj'         Name
')'           Punctuation
' '           Text
'{'           Punctuation
'\n'          Text

'    '        Text
'return'      Keyword
' '           Text
'obj'         Name
'.'           Punctuation
'swigCMemberPtr' Name
';'           Punctuation
'\n'          Text

'  '          Text
'}'           Punctuation
'\n'          Text

'%'           Operator
'}'           Punctuation
'\n'          Text

'%enddef'     Name.Function
'\n'          Text

'\n'          Text

'/* Set the default javabody typemaps to use protected visibility.\n   Use the macros to change to public if using multiple modules. */' Comment.Multiline
'\n'          Text

'SWIG_JAVABODY_PROXY' Name
'('           Punctuation
'protected'   Keyword
','           Punctuation
' '           Text
'protected'   Keyword
','           Punctuation
' '           Text
'SWIGTYPE'    Name
')'           Punctuation
'\n'          Text

'SWIG_JAVABODY_TYPEWRAPPER' Name
'('           Punctuation
'protected'   Keyword
','           Punctuation
' '           Text
'protected'   Keyword
','           Punctuation
' '           Text
'protected'   Keyword
','           Punctuation
' '           Text
'SWIGTYPE'    Name
')'           Punctuation
'\n'          Text

'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'javafinalize' Name
')'           Punctuation
' '           Text
'SWIGTYPE'    Name
' '           Text
'%'           Operator
'{'           Punctuation
'\n'          Text

'  '          Text
'protected'   Keyword
' '           Text
'void'        Keyword.Type
' '           Text
'finalize'    Name
'('           Punctuation
')'           Punctuation
' '           Text
'{'           Punctuation
'\n'          Text

'    '        Text
'delete'      Keyword
'('           Punctuation
')'           Punctuation
';'           Punctuation
'\n'          Text

'  '          Text
'}'           Punctuation
'\n'          Text

'%'           Operator
'}'           Punctuation
'\n'          Text

'\n'          Text

"/*\n * Java constructor typemaps:\n *\n * The javaconstruct typemap is inserted when a proxy class's constructor is generated.\n * This typemap allows control over what code is executed in the constructor as\n * well as specifying who owns the underlying C/C++ object. Normally, Java has\n * ownership and the underlying C/C++ object is deallocated when the Java object\n * is finalized (swigCMemOwn is true.) If swigCMemOwn is false, C/C++ is\n * ultimately responsible for deallocating the underlying object's memory.\n *\n * The SWIG_PROXY_CONSTRUCTOR macro defines the javaconstruct typemap for a proxy\n * class for a particular TYPENAME. OWNERSHIP is passed as the value of\n * swigCMemOwn to the pointer constructor method.  WEAKREF determines which kind\n * of Java object reference will be used by the C++ director class (WeakGlobalRef\n * vs. GlobalRef.)\n *\n * The SWIG_DIRECTOR_OWNED macro sets the ownership of director-based proxy\n * classes and the weak reference flag to false, meaning that the underlying C++\n * object will be reclaimed by C++.\n */" Comment.Multiline
'\n'          Text

'\n'          Text

'%define'     Name.Function
' '           Text
'SWIG_PROXY_CONSTRUCTOR' Name
'('           Punctuation
'OWNERSHIP'   Name
','           Punctuation
' '           Text
'WEAKREF'     Name
','           Punctuation
' '           Text
'TYPENAME'    Name
'.'           Punctuation
'.'           Punctuation
'.'           Punctuation
')'           Punctuation
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'javaconstruct' Name
','           Punctuation
'directorconnect' Name
'='           Operator
'"'           Literal.String
'\\n'         Literal.String.Escape
'    $imclassname.$javaclazznamedirector_connect(this, swigCPtr, swigCMemOwn, WEAKREF);' Literal.String
'"'           Literal.String
')'           Punctuation
' '           Text
'TYPENAME'    Name
' '           Text
'{'           Punctuation
'\n'          Text

'    '        Text
'this'        Keyword
'('           Punctuation
'$imcall'     Name
','           Punctuation
' '           Text
'OWNERSHIP'   Name
')'           Punctuation
';'           Punctuation
'$directorconnect' Name
'\n'          Text

'  '          Text
'}'           Punctuation
'\n'          Text

'%enddef'     Name.Function
'\n'          Text

'\n'          Text

'%define'     Name.Function
' '           Text
'SWIG_DIRECTOR_OWNED' Name
'('           Punctuation
'TYPENAME'    Name
'.'           Punctuation
'.'           Punctuation
'.'           Punctuation
')'           Punctuation
'\n'          Text

'SWIG_PROXY_CONSTRUCTOR' Name
'('           Punctuation
'true'        Name.Builtin
','           Punctuation
' '           Text
'false'       Name.Builtin
','           Punctuation
' '           Text
'TYPENAME'    Name
')'           Punctuation
'\n'          Text

'%enddef'     Name.Function
'\n'          Text

'\n'          Text

'// Set the default for SWIGTYPE: Java owns the C/C++ object.\n' Comment.Single

'SWIG_PROXY_CONSTRUCTOR' Name
'('           Punctuation
'true'        Name.Builtin
','           Punctuation
' '           Text
'true'        Name.Builtin
','           Punctuation
' '           Text
'SWIGTYPE'    Name
')'           Punctuation
'\n'          Text

'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'javadestruct' Name
','           Punctuation
' '           Text
'methodname'  Name
'='           Operator
'"'           Literal.String
'delete'      Literal.String
'"'           Literal.String
','           Punctuation
' '           Text
'methodmodifiers' Name
'='           Operator
'"'           Literal.String
'public synchronized' Literal.String
'"'           Literal.String
')'           Punctuation
' '           Text
'SWIGTYPE'    Name
' '           Text
'{'           Punctuation
'\n'          Text

'    '        Text
'if'          Keyword
' '           Text
'('           Punctuation
'swigCPtr'    Name
' '           Text
'!'           Operator
'='           Operator
' '           Text
'0'           Literal.Number.Integer
')'           Punctuation
' '           Text
'{'           Punctuation
'\n'          Text

'      '      Text
'if'          Keyword
' '           Text
'('           Punctuation
'swigCMemOwn' Name
')'           Punctuation
' '           Text
'{'           Punctuation
'\n'          Text

'        '    Text
'swigCMemOwn' Name
' '           Text
'='           Operator
' '           Text
'false'       Name.Builtin
';'           Punctuation
'\n'          Text

'        '    Text
'$jnicall'    Name
';'           Punctuation
'\n'          Text

'      '      Text
'}'           Punctuation
'\n'          Text

'      '      Text
'swigCPtr'    Name
' '           Text
'='           Operator
' '           Text
'0'           Literal.Number.Integer
';'           Punctuation
'\n'          Text

'    '        Text
'}'           Punctuation
'\n'          Text

'  '          Text
'}'           Punctuation
'\n'          Text

'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'javadestruct_derived' Name
','           Punctuation
' '           Text
'methodname'  Name
'='           Operator
'"'           Literal.String
'delete'      Literal.String
'"'           Literal.String
','           Punctuation
' '           Text
'methodmodifiers' Name
'='           Operator
'"'           Literal.String
'public synchronized' Literal.String
'"'           Literal.String
')'           Punctuation
' '           Text
'SWIGTYPE'    Name
' '           Text
'{'           Punctuation
'\n'          Text

'    '        Text
'if'          Keyword
' '           Text
'('           Punctuation
'swigCPtr'    Name
' '           Text
'!'           Operator
'='           Operator
' '           Text
'0'           Literal.Number.Integer
')'           Punctuation
' '           Text
'{'           Punctuation
'\n'          Text

'      '      Text
'if'          Keyword
' '           Text
'('           Punctuation
'swigCMemOwn' Name
')'           Punctuation
' '           Text
'{'           Punctuation
'\n'          Text

'        '    Text
'swigCMemOwn' Name
' '           Text
'='           Operator
' '           Text
'false'       Name.Builtin
';'           Punctuation
'\n'          Text

'        '    Text
'$jnicall'    Name
';'           Punctuation
'\n'          Text

'      '      Text
'}'           Punctuation
'\n'          Text

'      '      Text
'swigCPtr'    Name
' '           Text
'='           Operator
' '           Text
'0'           Literal.Number.Integer
';'           Punctuation
'\n'          Text

'    '        Text
'}'           Punctuation
'\n'          Text

'    '        Text
'super'       Name
'.'           Punctuation
'delete'      Keyword
'('           Punctuation
')'           Punctuation
';'           Punctuation
'\n'          Text

'  '          Text
'}'           Punctuation
'\n'          Text

'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'directordisconnect' Name
','           Punctuation
' '           Text
'methodname'  Name
'='           Operator
'"'           Literal.String
'swigDirectorDisconnect' Literal.String
'"'           Literal.String
')'           Punctuation
' '           Text
'SWIGTYPE'    Name
' '           Text
'%'           Operator
'{'           Punctuation
'\n'          Text

'  '          Text
'protected'   Keyword
' '           Text
'void'        Keyword.Type
' '           Text
'$methodname' Name
'('           Punctuation
')'           Punctuation
' '           Text
'{'           Punctuation
'\n'          Text

'    '        Text
'swigCMemOwn' Name
' '           Text
'='           Operator
' '           Text
'false'       Name.Builtin
';'           Punctuation
'\n'          Text

'    '        Text
'$jnicall'    Name
';'           Punctuation
'\n'          Text

'  '          Text
'}'           Punctuation
'\n'          Text

'%'           Operator
'}'           Punctuation
'\n'          Text

'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'directorowner_release' Name
','           Punctuation
' '           Text
'methodname'  Name
'='           Operator
'"'           Literal.String
'swigReleaseOwnership' Literal.String
'"'           Literal.String
')'           Punctuation
' '           Text
'SWIGTYPE'    Name
' '           Text
'%'           Operator
'{'           Punctuation
'\n'          Text

'  '          Text
'public'      Keyword
' '           Text
'void'        Keyword.Type
' '           Text
'$methodname' Name
'('           Punctuation
')'           Punctuation
' '           Text
'{'           Punctuation
'\n'          Text

'    '        Text
'swigCMemOwn' Name
' '           Text
'='           Operator
' '           Text
'false'       Name.Builtin
';'           Punctuation
'\n'          Text

'    '        Text
'$jnicall'    Name
';'           Punctuation
'\n'          Text

'  '          Text
'}'           Punctuation
'\n'          Text

'%'           Operator
'}'           Punctuation
'\n'          Text

'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'directorowner_take' Name
','           Punctuation
' '           Text
'methodname'  Name
'='           Operator
'"'           Literal.String
'swigTakeOwnership' Literal.String
'"'           Literal.String
')'           Punctuation
' '           Text
'SWIGTYPE'    Name
' '           Text
'%'           Operator
'{'           Punctuation
'\n'          Text

'  '          Text
'public'      Keyword
' '           Text
'void'        Keyword.Type
' '           Text
'$methodname' Name
'('           Punctuation
')'           Punctuation
' '           Text
'{'           Punctuation
'\n'          Text

'    '        Text
'swigCMemOwn' Name
' '           Text
'='           Operator
' '           Text
'true'        Name.Builtin
';'           Punctuation
'\n'          Text

'    '        Text
'$jnicall'    Name
';'           Punctuation
'\n'          Text

'  '          Text
'}'           Punctuation
'\n'          Text

'%'           Operator
'}'           Punctuation
'\n'          Text

'\n'          Text

'/* Java specific directives */' Comment.Multiline
'\n'          Text

'#'           Comment.Preproc
'define %javaconst(flag)            %feature("java:const","flag")' Comment.Preproc
'\n'          Comment.Preproc

'#'           Comment.Preproc
'define %javaconstvalue(value)      %feature("java:constvalue",value)' Comment.Preproc
'\n'          Comment.Preproc

'#'           Comment.Preproc
'define %javaenum(wrapapproach)     %feature("java:enum","wrapapproach")' Comment.Preproc
'\n'          Comment.Preproc

'#'           Comment.Preproc
'define %javamethodmodifiers        %feature("java:methodmodifiers")' Comment.Preproc
'\n'          Comment.Preproc

'#'           Comment.Preproc
'define %javaexception(exceptionclasses) %feature("except",throws=exceptionclasses)' Comment.Preproc
'\n'          Comment.Preproc

'#'           Comment.Preproc
'define %nojavaexception            %feature("except","0",throws="")' Comment.Preproc
'\n'          Comment.Preproc

'#'           Comment.Preproc
'define %clearjavaexception         %feature("except","",throws="")' Comment.Preproc
'\n'          Comment.Preproc

'\n'          Text

'%pragma'     Name.Function
'('           Punctuation
'java'        Name
')'           Punctuation
' '           Text
'jniclassclassmodifiers' Name
'='           Operator
'"'           Literal.String
'public class' Literal.String
'"'           Literal.String
'\n'          Text

'%pragma'     Name.Function
'('           Punctuation
'java'        Name
')'           Punctuation
' '           Text
'moduleclassmodifiers' Name
'='           Operator
'"'           Literal.String
'public class' Literal.String
'"'           Literal.String
'\n'          Text

'\n'          Text

'/* Some ANSI C typemaps */' Comment.Multiline
'\n'          Text

'\n'          Text

'%apply'      Name.Function
' '           Text
'unsigned'    Keyword.Type
' '           Text
'long'        Keyword.Type
' '           Text
'{'           Punctuation
' '           Text
'size_t'      Keyword.Type
' '           Text
'}'           Punctuation
';'           Punctuation
'\n'          Text

'%apply'      Name.Function
' '           Text
'const'       Keyword
' '           Text
'unsigned'    Keyword.Type
' '           Text
'long'        Keyword.Type
' '           Text
'&'           Operator
' '           Text
'{'           Punctuation
' '           Text
'const'       Keyword
' '           Text
'size_t'      Keyword.Type
' '           Text
'&'           Operator
' '           Text
'}'           Punctuation
';'           Punctuation
'\n'          Text

'\n'          Text

'/* Array reference typemaps */' Comment.Multiline
'\n'          Text

'%apply'      Name.Function
' '           Text
'SWIGTYPE'    Name
' '           Text
'&'           Operator
' '           Text
'{'           Punctuation
' '           Text
'SWIGTYPE'    Name
' '           Text
'('           Punctuation
'('           Punctuation
'&'           Operator
')'           Punctuation
'['           Punctuation
'ANY'         Name
']'           Punctuation
')'           Punctuation
' '           Text
'}'           Punctuation
'\n'          Text

'\n'          Text

'/* const pointers */' Comment.Multiline
'\n'          Text

'%apply'      Name.Function
' '           Text
'SWIGTYPE'    Name
' '           Text
'*'           Operator
' '           Text
'{'           Punctuation
' '           Text
'SWIGTYPE'    Name
' '           Text
'*'           Operator
'const'       Keyword
' '           Text
'}'           Punctuation
'\n'          Text

'\n'          Text

'/* String & length */' Comment.Multiline
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jni'         Name
')'           Punctuation
'     '       Text
'('           Punctuation
'char'        Keyword.Type
' '           Text
'*'           Operator
'STRING'      Name
','           Punctuation
' '           Text
'size_t'      Keyword.Type
' '           Text
'LENGTH'      Name
')'           Punctuation
' '           Text
'"'           Literal.String
'jbyteArray'  Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jtype'       Name
')'           Punctuation
'   '         Text
'('           Punctuation
'char'        Keyword.Type
' '           Text
'*'           Operator
'STRING'      Name
','           Punctuation
' '           Text
'size_t'      Keyword.Type
' '           Text
'LENGTH'      Name
')'           Punctuation
' '           Text
'"'           Literal.String
'byte[]'      Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'jstype'      Name
')'           Punctuation
'  '          Text
'('           Punctuation
'char'        Keyword.Type
' '           Text
'*'           Operator
'STRING'      Name
','           Punctuation
' '           Text
'size_t'      Keyword.Type
' '           Text
'LENGTH'      Name
')'           Punctuation
' '           Text
'"'           Literal.String
'byte[]'      Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'javain'      Name
')'           Punctuation
'  '          Text
'('           Punctuation
'char'        Keyword.Type
' '           Text
'*'           Operator
'STRING'      Name
','           Punctuation
' '           Text
'size_t'      Keyword.Type
' '           Text
'LENGTH'      Name
')'           Punctuation
' '           Text
'"'           Literal.String
'$javainput'  Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'freearg'     Name
')'           Punctuation
' '           Text
'('           Punctuation
'char'        Keyword.Type
' '           Text
'*'           Operator
'STRING'      Name
','           Punctuation
' '           Text
'size_t'      Keyword.Type
' '           Text
'LENGTH'      Name
')'           Punctuation
' '           Text
'"'           Literal.String
'"'           Literal.String
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'in'          Name
')'           Punctuation
'      '      Text
'('           Punctuation
'char'        Keyword.Type
' '           Text
'*'           Operator
'STRING'      Name
','           Punctuation
' '           Text
'size_t'      Keyword.Type
' '           Text
'LENGTH'      Name
')'           Punctuation
' '           Text
'{'           Punctuation
'\n'          Text

'  '          Text
'if'          Keyword
' '           Text
'('           Punctuation
'$input'      Name
')'           Punctuation
' '           Text
'{'           Punctuation
'\n'          Text

'    '        Text
'$1'          Name
' '           Text
'='           Operator
' '           Text
'('           Punctuation
'char'        Keyword.Type
' '           Text
'*'           Operator
')'           Punctuation
' '           Text
'JCALL2'      Name
'('           Punctuation
'GetByteArrayElements' Name
','           Punctuation
' '           Text
'jenv'        Name
','           Punctuation
' '           Text
'$input'      Name
','           Punctuation
' '           Text
'0'           Literal.Number.Integer
')'           Punctuation
';'           Punctuation
'\n'          Text

'    '        Text
'$2'          Name
' '           Text
'='           Operator
' '           Text
'('           Punctuation
'size_t'      Keyword.Type
')'           Punctuation
' '           Text
'JCALL1'      Name
'('           Punctuation
'GetArrayLength' Name
','           Punctuation
' '           Text
'jenv'        Name
','           Punctuation
' '           Text
'$input'      Name
')'           Punctuation
';'           Punctuation
'\n'          Text

'  '          Text
'}'           Punctuation
' '           Text
'else'        Keyword
' '           Text
'{'           Punctuation
'\n'          Text

'    '        Text
'$1'          Name
' '           Text
'='           Operator
' '           Text
'0'           Literal.Number.Integer
';'           Punctuation
'\n'          Text

'    '        Text
'$2'          Name
' '           Text
'='           Operator
' '           Text
'0'           Literal.Number.Integer
';'           Punctuation
'\n'          Text

'  '          Text
'}'           Punctuation
'\n'          Text

'}'           Punctuation
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'argout'      Name
')'           Punctuation
'  '          Text
'('           Punctuation
'char'        Keyword.Type
' '           Text
'*'           Operator
'STRING'      Name
','           Punctuation
' '           Text
'size_t'      Keyword.Type
' '           Text
'LENGTH'      Name
')'           Punctuation
' '           Text
'{'           Punctuation
'\n'          Text

'  '          Text
'if'          Keyword
' '           Text
'('           Punctuation
'$input'      Name
')'           Punctuation
' '           Text
'JCALL3'      Name
'('           Punctuation
'ReleaseByteArrayElements' Name
','           Punctuation
' '           Text
'jenv'        Name
','           Punctuation
' '           Text
'$input'      Name
','           Punctuation
' '           Text
'('           Punctuation
'jbyte'       Name
' '           Text
'*'           Operator
')'           Punctuation
'$1'          Name
','           Punctuation
' '           Text
'0'           Literal.Number.Integer
')'           Punctuation
';'           Punctuation
'\n'          Text

'}'           Punctuation
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'directorin'  Name
','           Punctuation
' '           Text
'descriptor'  Name
'='           Operator
'"'           Literal.String
'[B'          Literal.String
'"'           Literal.String
')'           Punctuation
' '           Text
'('           Punctuation
'char'        Keyword.Type
' '           Text
'*'           Operator
'STRING'      Name
','           Punctuation
' '           Text
'size_t'      Keyword.Type
' '           Text
'LENGTH'      Name
')'           Punctuation
' '           Text
'{'           Punctuation
'\n'          Text

'  '          Text
'jbyteArray'  Name
' '           Text
'jb'          Name
' '           Text
'='           Operator
' '           Text
'('           Punctuation
'jenv'        Name
')'           Punctuation
'-'           Operator
'>'           Operator
'NewByteArray' Name
'('           Punctuation
'$2'          Name
')'           Punctuation
';'           Punctuation
'\n'          Text

'  '          Text
'('           Punctuation
'jenv'        Name
')'           Punctuation
'-'           Operator
'>'           Operator
'SetByteArrayRegion' Name
'('           Punctuation
'jb'          Name
','           Punctuation
' '           Text
'0'           Literal.Number.Integer
','           Punctuation
' '           Text
'$2'          Name
','           Punctuation
' '           Text
'('           Punctuation
'jbyte'       Name
' '           Text
'*'           Operator
')'           Punctuation
'$1'          Name
')'           Punctuation
';'           Punctuation
'\n'          Text

'  '          Text
'$input'      Name
' '           Text
'='           Operator
' '           Text
'jb'          Name
';'           Punctuation
'\n'          Text

'}'           Punctuation
'\n'          Text

'%typemap'    Name.Function
'('           Punctuation
'directorargout' Name
')'           Punctuation
' '           Text
'('           Punctuation
'char'        Keyword.Type
' '           Text
'*'           Operator
'STRING'      Name
','           Punctuation
' '           Text
'size_t'      Keyword.Type
' '           Text
'LENGTH'      Name
')'           Punctuation
'\n'          Text

'%'           Operator
'{'           Punctuation
'('           Punctuation
'jenv'        Name
')'           Punctuation
'-'           Operator
'>'           Operator
'GetByteArrayRegion' Name
'('           Punctuation
'$input'      Name
','           Punctuation
' '           Text
'0'           Literal.Number.Integer
','           Punctuation
' '           Text
'$2'          Name
','           Punctuation
' '           Text
'('           Punctuation
'jbyte'       Name
' '           Text
'*'           Operator
')'           Punctuation
'$1'          Name
')'           Punctuation
';'           Punctuation
' '           Text
'%'           Operator
'}'           Punctuation
'\n'          Text

'%apply'      Name.Function
' '           Text
'('           Punctuation
'char'        Keyword.Type
' '           Text
'*'           Operator
'STRING'      Name
','           Punctuation
' '           Text
'size_t'      Keyword.Type
' '           Text
'LENGTH'      Name
')'           Punctuation
' '           Text
'{'           Punctuation
' '           Text
'('           Punctuation
'char'        Keyword.Type
' '           Text
'*'           Operator
'STRING'      Name
','           Punctuation
' '           Text
'int'         Keyword.Type
' '           Text
'LENGTH'      Name
')'           Punctuation
' '           Text
'}'           Punctuation
'\n'          Text

'\n'          Text

'/* java keywords */' Comment.Multiline
'\n'          Text

'%include'    Name.Function
' '           Text
'<'           Operator
'javakw'      Name
'.'           Punctuation
'swg'         Name
'>'           Operator
'\n'          Text

'\n'          Text

'// Default enum handling\n' Comment.Single

'%include'    Name.Function
' '           Text
'<'           Operator
'enumtypesafe' Name
'.'           Punctuation
'swg'         Name
'>'           Operator
'\n'          Text
