DmitrySkiba/itoa-jnipp — Issue #14: Quick calls
Author: DmitrySkiba
Created: 2012-01-22 07:54:15+00:00
State: open
Labels: important

Sometimes overhead of declaring JNIpp class (via JB_ macros) is just too much.

There should some 'quick' way of doing calling methods or manipulating variables.

Something like this:

java::PString var = java::CallMethod("System","String getenv(String)", java::PString::New("MY_VAR");
int ival = java::GetField("MyClass", "int mVar", myObject);

Note that functions return generic object that has different conversion operators. However, only proper conversion will succeed, all others will throw. E.g. the following will compile but will throw:

java::PObject obj = java::GetField("MyClass", "int mVar", myObject);