I think I managed to fit most of the question in to the title on this one!

I'm pulling back an Object from Java in my native C++ code:

```
jobject valueObject = env->CallObjectMethod(hashMapObject, hashMapGetMID, keyObject);

```

It's possible for me to check wether the return object is one of the native types using something like:

```
jclass boolClass = env->FindClass("java/lang/Boolean");
if(env->IsInstanceOf(valueObject, boolClass) == JNI_TRUE) { }

```

So, I now have a jobject which I know is a Boolean (note the upper case B) - The question is, what is the most efficient way (considering I already have the jobject in my native code) to convert this to a `bool`. Typecasting doesn't work which makes sense.

Although the above example is a Boolean I also want to convert Character->char, Short->short, Integer->int, Float->float, Double->double.

*(Once i've implemented it I will post an answer to this which does Boolean.booleanValue())*