title: How to get the value of an enum being passed to the JNI
body: <p>I have a Java application and JNI (dll). I want to know how to get the value of the enum (int) that is being passed as a parameter to the JNI.</p>
  
  <p>Here's the enum (Java):</p>
  
  <pre><code>public enum envelopeType
  {
      NOT_SPECIFIED(-1),
      NONE(0),
      IMAGE(1),
      BITMAP(2);
  
      private int value;
  
      private envelopeType(int value)
      {
          this.value = value;
      }   
  }
  </code></pre>
  
  <p>Here's the JNI code (C++):</p>
  
  <pre><code>JNIEXPORT jint JNICALL Java_Loader_Convert
    (JNIEnv *env, jobject obj, jobject EnvelopeType)
  </code></pre>
  
  <p>since the enum is being passed as an object, how could I get the value of that?</p>