Access to a field
Hi there!
I have the following situation:
class A {
String aField;
...
*String getAField(){*
return aField;
}
}
class B{
A bField;
...
*A getBField(){*
return bField;
}
}
class C{
native byte[] nativeMethod(B object);
static {
System.loadLibrary("nativelib");
}
public static void main(String args[]) {
B bObject = new B();
byte[] byteArray = nativeMethod(bObject);
...
}
}
The native method will be:
JNIEXPORT jbyteArray JNICALL Java_C_nativeMethod (JNIEnv * env, jobject jobj, jobject bObject)
But, how can I access to aField (A class field) within this c (or C++) function?
Can somebody help me?
Thank you, in advance.