title: exposing enum native type to java through jni?
body: <p>I have c++ class with member that is from enum type. I want to expose objects from this class in java using jni. I've done it successfully for all members from the class, but i have problem with the enum type member. I have defined enum in java in this way</p>
  
  <pre><code> public enum Call {
      UNDEFINED(-1), INCOMING(1), OUTGOING(2), MISSED(4);
       private int type;
       private Call(int type) {
         this.type = type;
       }
       public int type() {
          return this.type; 
       }   
  }
  </code></pre>
  
  <p>In c++ in this way</p>
  
  <pre><code>enum Call {
      UNDEFINED = -1,
      INCOMING = 1,
      OUTGOING = 2,
      MISSED = 4
  };
  </code></pre>
  
  <p>The original class in c++ is </p>
  
  <pre><code>class LogData{
       int _id;
       Call _calltype;
       long _datetime;
       int _duration;
  }
  </code></pre>
  
  <p>In java</p>
  
  <pre><code>public class LogDataJava{
    int _id; 
    Call _callType;
    long _dateTime;
    int _duration;
  }
  </code></pre>
  
  <p>Any suggestions how to make mapping in jni level for the enum type?</p>