|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jikesrvm.jni.JNIFunctions
public class JNIFunctions
This class implements the 232 JNI functions.
All methods here will be specially compiled with the necessary prolog to
perform the transition from native code (Linux/AIX/OSX convention) to RVM.
For this reason, no Java methods (including the JNI methods here) can call
any methods in this class from within Java. These JNI methods are to
be invoked from native C or C++. They're all declared private to enforce
this discipline.
The first argument for all the functions is the JNIEnvironment object
of the thread.
The second argument is a JREF index for either the RVMClass object
or the object instance itself. To get the actual object, we use
the access method in JNIEnvironment and cast the reference as
needed.
NOTE:
PopLocalFrame(org.jikesrvm.jni.JNIEnvironment, int)
method.
Field Summary | |
---|---|
static int |
FUNCTIONCOUNT
|
static boolean |
traceJNI
|
Constructor Summary | |
---|---|
JNIFunctions()
|
Method Summary | |
---|---|
private static int |
AllocObject(JNIEnvironment env,
int classJREF)
AllocObject: allocate the space for an object without running any constructor the header is filled and the fields are initialized to null |
private static boolean |
CallBooleanMethod(JNIEnvironment env,
int objJREF,
int methodID)
CallBooleanMethod: invoke a virtual method that returns a boolean value arguments passed using the vararg ... style NOTE: the vararg's are not visible in the method signature here; they are saved in the caller frame and the glue frame |
private static boolean |
CallBooleanMethodA(JNIEnvironment env,
int objJREF,
int methodID,
Address argAddress)
CallBooleanMethodA: invoke a virtual method that returns a boolean value |
private static boolean |
CallBooleanMethodV(JNIEnvironment env,
int objJREF,
int methodID,
Address argAddress)
CallBooleanMethodV: invoke a virtual method that returns a boolean value |
private static byte |
CallByteMethod(JNIEnvironment env,
int objJREF,
int methodID)
CallByteMethod: invoke a virtual method that returns a byte value arguments passed using the vararg ... style NOTE: the vararg's are not visible in the method signature here; they are saved in the caller frame and the glue frame |
private static byte |
CallByteMethodA(JNIEnvironment env,
int objJREF,
int methodID,
Address argAddress)
CallByteMethodA: invoke a virtual method that returns a byte value |
private static byte |
CallByteMethodV(JNIEnvironment env,
int objJREF,
int methodID,
Address argAddress)
CallByteMethodV: invoke a virtual method that returns a byte value |
private static char |
CallCharMethod(JNIEnvironment env,
int objJREF,
int methodID)
CallCharMethod: invoke a virtual method that returns a char value arguments passed using the vararg ... style NOTE: the vararg's are not visible in the method signature here; they are saved in the caller frame and the glue frame |
private static char |
CallCharMethodA(JNIEnvironment env,
int objJREF,
int methodID,
Address argAddress)
CallCharMethodA: invoke a virtual method that returns a char value |
private static char |
CallCharMethodV(JNIEnvironment env,
int objJREF,
int methodID,
Address argAddress)
CallCharMethodV: invoke a virtual method that returns a char value |
private static double |
CallDoubleMethod(JNIEnvironment env,
int objJREF,
int methodID)
CallDoubleMethod: invoke a virtual method that returns a double value arguments passed using the vararg ... style NOTE: the vararg's are not visible in the method signature here; they are saved in the caller frame and the glue frame |
private static double |
CallDoubleMethodA(JNIEnvironment env,
int objJREF,
int methodID,
Address argAddress)
CallDoubleMethodA: invoke a virtual method that returns a double value |
private static double |
CallDoubleMethodV(JNIEnvironment env,
int objJREF,
int methodID,
Address argAddress)
CallDoubleMethodV: invoke a virtual method that returns a double value |
private static float |
CallFloatMethod(JNIEnvironment env,
int objJREF,
int methodID)
CallFloatMethod: invoke a virtual method that returns a float value arguments passed using the vararg ... style NOTE: the vararg's are not visible in the method signature here; they are saved in the caller frame and the glue frame |
private static float |
CallFloatMethodA(JNIEnvironment env,
int objJREF,
int methodID,
Address argAddress)
CallFloatMethodA: invoke a virtual method that returns a float value |
private static float |
CallFloatMethodV(JNIEnvironment env,
int objJREF,
int methodID,
Address argAddress)
CallFloatMethodV: invoke a virtual method that returns a float value |
private static int |
CallIntMethod(JNIEnvironment env,
int objJREF,
int methodID)
CallIntMethod: invoke a virtual method that returns a int value arguments passed using the vararg ... style NOTE: the vararg's are not visible in the method signature here; they are saved in the caller frame and the glue frame |
private static int |
CallIntMethodA(JNIEnvironment env,
int objJREF,
int methodID,
Address argAddress)
CallIntMethodA: invoke a virtual method that returns an integer value |
private static int |
CallIntMethodV(JNIEnvironment env,
int objJREF,
int methodID,
Address argAddress)
CallIntMethodV: invoke a virtual method that returns an int value |
private static long |
CallLongMethod(JNIEnvironment env,
int objJREF,
int methodID)
CallLongMethod: invoke a virtual method that returns a long value arguments passed using the vararg ... style NOTE: the vararg's are not visible in the method signature here; they are saved in the caller frame and the glue frame |
private static long |
CallLongMethodA(JNIEnvironment env,
int objJREF,
int methodID,
Address argAddress)
CallLongMethodA: invoke a virtual method that returns a long value |
private static long |
CallLongMethodV(JNIEnvironment env,
int objJREF,
int methodID,
Address argAddress)
CallLongMethodV: invoke a virtual method that returns a long value |
private static boolean |
CallNonvirtualBooleanMethod(JNIEnvironment env,
int objJREF,
int classJREF,
int methodID)
CallNonvirtualBooleanMethod: invoke a virtual method that returns a boolean value arguments passed using the vararg ... style NOTE: the vararg's are not visible in the method signature here; they are saved in the caller frame and the glue frame |
private static boolean |
CallNonvirtualBooleanMethodA(JNIEnvironment env,
int objJREF,
int classJREF,
int methodID,
Address argAddress)
CallNonvirtualBooleanMethodA: invoke a virtual method that returns a boolean value |
private static boolean |
CallNonvirtualBooleanMethodV(JNIEnvironment env,
int objJREF,
int classJREF,
int methodID,
Address argAddress)
CallNonvirtualBooleanMethodV: invoke a virtual method that returns a boolean value |
private static byte |
CallNonvirtualByteMethod(JNIEnvironment env,
int objJREF,
int classJREF,
int methodID)
CallNonvirtualByteMethod: invoke a virtual method that returns a byte value arguments passed using the vararg ... style NOTE: the vararg's are not visible in the method signature here; they are saved in the caller frame and the glue frame |
private static byte |
CallNonvirtualByteMethodA(JNIEnvironment env,
int objJREF,
int classJREF,
int methodID,
Address argAddress)
CallNonvirtualByteMethodA: invoke a virtual method that returns a byte value |
private static byte |
CallNonvirtualByteMethodV(JNIEnvironment env,
int objJREF,
int classJREF,
int methodID,
Address argAddress)
CallNonvirtualByteMethodV: invoke a virtual method that returns a byte value |
private static char |
CallNonvirtualCharMethod(JNIEnvironment env,
int objJREF,
int classJREF,
int methodID)
CallNonvirtualCharMethod: invoke a virtual method that returns a char value arguments passed using the vararg ... style NOTE: the vararg's are not visible in the method signature here; they are saved in the caller frame and the glue frame |
private static char |
CallNonvirtualCharMethodA(JNIEnvironment env,
int objJREF,
int classJREF,
int methodID,
Address argAddress)
CallNonvirtualCharMethodA: invoke a virtual method that returns a char value |
private static char |
CallNonvirtualCharMethodV(JNIEnvironment env,
int objJREF,
int classJREF,
int methodID,
Address argAddress)
CallNonvirtualCharMethodV: invoke a virtual method that returns a char value |
private static double |
CallNonvirtualDoubleMethod(JNIEnvironment env,
int objJREF,
int classJREF,
int methodID)
CallNonvirtualDoubleMethod: invoke a virtual method that returns a double value arguments passed using the vararg ... style NOTE: the vararg's are not visible in the method signature here; they are saved in the caller frame and the glue frame |
private static double |
CallNonvirtualDoubleMethodA(JNIEnvironment env,
int objJREF,
int classJREF,
int methodID,
Address argAddress)
CallNonvirtualDoubleMethodA: invoke a virtual method that returns a double value |
private static double |
CallNonvirtualDoubleMethodV(JNIEnvironment env,
int objJREF,
int classJREF,
int methodID,
Address argAddress)
CallNonvirtualDoubleMethodV: invoke a virtual method that returns a double value |
private static float |
CallNonvirtualFloatMethod(JNIEnvironment env,
int objJREF,
int classJREF,
int methodID)
CallNonvirtualFloatMethod: invoke a virtual method that returns a float value arguments passed using the vararg ... style NOTE: the vararg's are not visible in the method signature here; they are saved in the caller frame and the glue frame |
private static float |
CallNonvirtualFloatMethodA(JNIEnvironment env,
int objJREF,
int classJREF,
int methodID,
Address argAddress)
CallNonvirtualFloatMethodA: invoke a virtual method that returns a float value |
private static float |
CallNonvirtualFloatMethodV(JNIEnvironment env,
int objJREF,
int classJREF,
int methodID,
Address argAddress)
CallNonvirtualFloatMethodV: invoke a virtual method that returns a float value |
private static int |
CallNonvirtualIntMethod(JNIEnvironment env,
int objJREF,
int classJREF,
int methodID)
CallNonvirtualIntMethod: invoke a virtual method that returns a int value arguments passed using the vararg ... style NOTE: the vararg's are not visible in the method signature here; they are saved in the caller frame and the glue frame |
private static int |
CallNonvirtualIntMethodA(JNIEnvironment env,
int objJREF,
int classJREF,
int methodID,
Address argAddress)
CallNonvirtualIntMethodA: invoke a virtual method that returns an integer value |
private static int |
CallNonvirtualIntMethodV(JNIEnvironment env,
int objJREF,
int classJREF,
int methodID,
Address argAddress)
CallNonvirtualIntMethodV: invoke a virtual method that returns an int value |
private static long |
CallNonvirtualLongMethod(JNIEnvironment env,
int objJREF,
int classJREF,
int methodID)
CallNonvirtualLongMethod: invoke a virtual method that returns a long value arguments passed using the vararg ... style NOTE: the vararg's are not visible in the method signature here; they are saved in the caller frame and the glue frame |
private static long |
CallNonvirtualLongMethodA(JNIEnvironment env,
int objJREF,
int classJREF,
int methodID,
Address argAddress)
CallNonvirtualLongMethodA: invoke a virtual method that returns a long value |
private static long |
CallNonvirtualLongMethodV(JNIEnvironment env,
int objJREF,
int classJREF,
int methodID,
Address argAddress)
CallNonvirtualLongMethodV: invoke a virtual method that returns a long value |
private static int |
CallNonvirtualObjectMethod(JNIEnvironment env,
int objJREF,
int classJREF,
int methodID)
CallNonvirtualObjectMethod: invoke a virtual method that returns an object arguments passed using the vararg ... style NOTE: the vararg's are not visible in the method signature here; they are saved in the caller frame and the glue frame |
private static int |
CallNonvirtualObjectMethodA(JNIEnvironment env,
int objJREF,
int classJREF,
int methodID,
Address argAddress)
CallNonvirtualNonvirtualObjectMethodA: invoke a virtual method that returns an object value |
private static int |
CallNonvirtualObjectMethodV(JNIEnvironment env,
int objJREF,
int classJREF,
int methodID,
Address argAddress)
CallNonvirtualObjectMethodV: invoke a virtual method that returns an object |
private static short |
CallNonvirtualShortMethod(JNIEnvironment env,
int objJREF,
int classJREF,
int methodID)
CallNonvirtualShortMethod: invoke a virtual method that returns a short value arguments passed using the vararg ... style NOTE: the vararg's are not visible in the method signature here; they are saved in the caller frame and the glue frame |
private static short |
CallNonvirtualShortMethodA(JNIEnvironment env,
int objJREF,
int classJREF,
int methodID,
Address argAddress)
CallNonvirtualShortMethodA: invoke a virtual method that returns a short value |
private static short |
CallNonvirtualShortMethodV(JNIEnvironment env,
int objJREF,
int classJREF,
int methodID,
Address argAddress)
CallNonvirtualShortMethodV: invoke a virtual method that returns a short value |
private static void |
CallNonvirtualVoidMethod(JNIEnvironment env,
int objJREF,
int classJREF,
int methodID)
CallNonvirtualVoidMethod: invoke a virtual method that returns a void value arguments passed using the vararg ... style NOTE: the vararg's are not visible in the method signature here; they are saved in the caller frame and the glue frame |
private static void |
CallNonvirtualVoidMethodA(JNIEnvironment env,
int objJREF,
int classJREF,
int methodID,
Address argAddress)
CallNonvirtualVoidMethodA: invoke a virtual method that returns void |
private static void |
CallNonvirtualVoidMethodV(JNIEnvironment env,
int objJREF,
int classJREF,
int methodID,
Address argAddress)
CallNonvirtualVoidMethodV: invoke a virtual method that returns void |
private static int |
CallObjectMethod(JNIEnvironment env,
int objJREF,
int methodID)
CallObjectMethod: invoke a virtual method that returns an object arguments passed using the vararg ... style NOTE: the vararg's are not visible in the method signature here; they are saved in the caller frame and the glue frame |
private static int |
CallObjectMethodA(JNIEnvironment env,
int objJREF,
int methodID,
Address argAddress)
CallObjectMethodA: invoke a virtual method that returns an object value |
private static int |
CallObjectMethodV(JNIEnvironment env,
int objJREF,
int methodID,
Address argAddress)
CallObjectMethodV: invoke a virtual method that returns an object |
private static short |
CallShortMethod(JNIEnvironment env,
int objJREF,
int methodID)
CallShortMethod: invoke a virtual method that returns a short value arguments passed using the vararg ... style NOTE: the vararg's are not visible in the method signature here; they are saved in the caller frame and the glue frame |
private static short |
CallShortMethodA(JNIEnvironment env,
int objJREF,
int methodID,
Address argAddress)
CallShortMethodA: invoke a virtual method that returns a short value |
private static short |
CallShortMethodV(JNIEnvironment env,
int objJREF,
int methodID,
Address argAddress)
CallShortMethodV: invoke a virtual method that returns a short value |
private static boolean |
CallStaticBooleanMethod(JNIEnvironment env,
int classJREF,
int methodID)
CallStaticBooleanMethod: invoke a static method that returns a boolean value arguments passed using the vararg ... style NOTE: the vararg's are not visible in the method signature here; they are saved in the caller frame and the glue frame |
private static boolean |
CallStaticBooleanMethodA(JNIEnvironment env,
int classJREF,
int methodID,
Address argAddress)
CallStaticBooleanMethodA: invoke a static method that returns a boolean value |
private static boolean |
CallStaticBooleanMethodV(JNIEnvironment env,
int classJREF,
int methodID,
Address argAddress)
CallStaticBooleanMethodV: invoke a static method that returns a boolean value |
private static byte |
CallStaticByteMethod(JNIEnvironment env,
int classJREF,
int methodID)
CallStaticByteMethod: invoke a static method that returns a byte value arguments passed using the vararg ... style NOTE: the vararg's are not visible in the method signature here; they are saved in the caller frame and the glue frame |
private static byte |
CallStaticByteMethodA(JNIEnvironment env,
int classJREF,
int methodID,
Address argAddress)
CallStaticByteMethodA: invoke a static method that returns a byte value |
private static byte |
CallStaticByteMethodV(JNIEnvironment env,
int classJREF,
int methodID,
Address argAddress)
CallStaticByteMethodV: invoke a static method that returns a byte value |
private static char |
CallStaticCharMethod(JNIEnvironment env,
int classJREF,
int methodID)
CallStaticCharMethod: invoke a static method that returns a char value arguments passed using the vararg ... style NOTE: the vararg's are not visible in the method signature here; they are saved in the caller frame and the glue frame |
private static char |
CallStaticCharMethodA(JNIEnvironment env,
int classJREF,
int methodID,
Address argAddress)
CallStaticCharMethodA: invoke a static method that returns a char value |
private static char |
CallStaticCharMethodV(JNIEnvironment env,
int classJREF,
int methodID,
Address argAddress)
CallStaticCharMethodV: invoke a static method that returns a char value |
private static double |
CallStaticDoubleMethod(JNIEnvironment env,
int classJREF,
int methodID)
CallStaticDoubleMethod: invoke a static method that returns a double value arguments passed using the vararg ... style NOTE: the vararg's are not visible in the method signature here; they are saved in the caller frame and the glue frame |
private static double |
CallStaticDoubleMethodA(JNIEnvironment env,
int classJREF,
int methodID,
Address argAddress)
CallStaticDoubleMethodA: invoke a static method that returns a double value |
private static double |
CallStaticDoubleMethodV(JNIEnvironment env,
int classJREF,
int methodID,
Address argAddress)
CallStaticDoubleMethodV: invoke a static method that returns a double value |
private static float |
CallStaticFloatMethod(JNIEnvironment env,
int classJREF,
int methodID)
CallStaticFloagMethod: invoke a static method that returns a float value arguments passed using the vararg ... style NOTE: the vararg's are not visible in the method signature here; they are saved in the caller frame and the glue frame |
private static float |
CallStaticFloatMethodA(JNIEnvironment env,
int classJREF,
int methodID,
Address argAddress)
CallStaticFloatMethodA: invoke a static method that returns a float value |
private static float |
CallStaticFloatMethodV(JNIEnvironment env,
int classJREF,
int methodID,
Address argAddress)
CallStaticFloatMethodV: invoke a static method that returns a float value |
private static int |
CallStaticIntMethod(JNIEnvironment env,
int classJREF,
int methodID)
CallStaticIntMethod: invoke a static method that returns an integer value arguments passed using the vararg ... style NOTE: the vararg's are not visible in the method signature here; they are saved in the caller frame and the glue frame |
private static int |
CallStaticIntMethodA(JNIEnvironment env,
int classJREF,
int methodID,
Address argAddress)
CallStaticIntMethodA: invoke a static method that returns an integer value |
private static int |
CallStaticIntMethodV(JNIEnvironment env,
int classJREF,
int methodID,
Address argAddress)
CallStaticIntMethodV: invoke a static method that returns an integer value |
private static long |
CallStaticLongMethod(JNIEnvironment env,
int classJREF,
int methodID)
CallStaticLongMethod: invoke a static method that returns a long value arguments passed using the vararg ... style NOTE: the vararg's are not visible in the method signature here; they are saved in the caller frame and the glue frame |
private static long |
CallStaticLongMethodA(JNIEnvironment env,
int classJREF,
int methodID,
Address argAddress)
CallStaticLongMethodA: invoke a static method that returns a long value |
private static long |
CallStaticLongMethodV(JNIEnvironment env,
int classJREF,
int methodID,
Address argAddress)
CallStaticLongMethodV: invoke a static method that returns a long value |
private static int |
CallStaticObjectMethod(JNIEnvironment env,
int classJREF,
int methodID)
CallStaticObjectMethod: invoke a static method that returns an object value arguments passed using the vararg ... style NOTE: the vararg's are not visible in the method signature here; they are saved in the caller frame and the glue frame |
private static int |
CallStaticObjectMethodA(JNIEnvironment env,
int classJREF,
int methodID,
Address argAddress)
CallStaticObjectMethodA: invoke a static method that returns an object |
private static int |
CallStaticObjectMethodV(JNIEnvironment env,
int classJREF,
int methodID,
Address argAddress)
CallStaticObjectMethodV: invoke a static method that returns an object |
private static short |
CallStaticShortMethod(JNIEnvironment env,
int classJREF,
int methodID)
CallStaticShortMethod: invoke a static method that returns a short value arguments passed using the vararg ... style NOTE: the vararg's are not visible in the method signature here; they are saved in the caller frame and the glue frame |
private static short |
CallStaticShortMethodA(JNIEnvironment env,
int classJREF,
int methodID,
Address argAddress)
CallStaticShortMethodA: invoke a static method that returns a short value |
private static short |
CallStaticShortMethodV(JNIEnvironment env,
int classJREF,
int methodID,
Address argAddress)
CallStaticShortMethodV: invoke a static method that returns a short value |
private static void |
CallStaticVoidMethod(JNIEnvironment env,
int classJREF,
int methodID)
CallStaticVoidMethod: invoke a static method that returns void arguments passed using the vararg ... style NOTE: the vararg's are not visible in the method signature here; they are saved in the caller frame and the glue frame |
private static void |
CallStaticVoidMethodA(JNIEnvironment env,
int classJREF,
int methodID,
Address argAddress)
CallStaticVoidMethodA: invoke a static method that returns void |
private static void |
CallStaticVoidMethodV(JNIEnvironment env,
int classJREF,
int methodID,
Address argAddress)
CallStaticVoidMethodA: invoke a static method that returns void |
private static void |
CallVoidMethod(JNIEnvironment env,
int objJREF,
int methodID)
CallVoidMethod: invoke a virtual method that returns a void value arguments passed using the vararg ... style NOTE: the vararg's are not visible in the method signature here; they are saved in the caller frame and the glue frame |
private static void |
CallVoidMethodA(JNIEnvironment env,
int objJREF,
int methodID,
Address argAddress)
CallVoidMethodA: invoke a virtual method that returns void |
private static void |
CallVoidMethodV(JNIEnvironment env,
int objJREF,
int methodID,
Address argAddress)
CallVoidMethodV: invoke a virtual method that returns void |
private static int |
DefineClass(JNIEnvironment env,
Address classNameAddress,
int classLoader,
Address data,
int dataLen)
DefineClass: Loads a class from a buffer of raw class data. |
private static void |
DeleteGlobalRef(JNIEnvironment env,
int refJREF)
|
private static void |
DeleteLocalRef(JNIEnvironment env,
int objJREF)
|
private static void |
DeleteWeakGlobalRef(JNIEnvironment env,
int refJREF)
|
private static int |
EnsureLocalCapacity(JNIEnvironment env,
int capacity)
EnsureLocalCapacity |
private static int |
ExceptionCheck(JNIEnvironment env)
|
private static void |
ExceptionClear(JNIEnvironment env)
ExceptionClear |
private static void |
ExceptionDescribe(JNIEnvironment env)
ExceptionDescribe: print the exception description and the stack trace back, then clear the exception |
private static int |
ExceptionOccurred(JNIEnvironment env)
ExceptionOccurred |
private static void |
FatalError(JNIEnvironment env,
Address messageAddress)
FatalError: print a message and terminate the VM |
private static int |
FindClass(JNIEnvironment env,
Address classNameAddress)
FindClass: given a class name, find its RVMClass, or 0 if not found |
private static int |
FromReflectedField(JNIEnvironment env,
int fieldJREF)
FromReflectedField |
private static int |
FromReflectedMethod(JNIEnvironment env,
int methodJREF)
FromReflectedMethod |
private static int |
GetArrayLength(JNIEnvironment env,
int arrayJREF)
GetArrayLength: return array length |
private static Address |
GetBooleanArrayElements(JNIEnvironment env,
int arrayJREF,
Address isCopyAddress)
GetBooleanArrayElements: get all the elements of a boolean array |
private static void |
GetBooleanArrayRegion(JNIEnvironment env,
int arrayJREF,
int startIndex,
int length,
Address bufAddress)
GetBooleanArrayRegion: copy a region of the array into the native buffer |
private static int |
GetBooleanField(JNIEnvironment env,
int objJREF,
int fieldID)
GetBooleanField: read an instance field of type boolean |
private static Address |
GetByteArrayElements(JNIEnvironment env,
int arrayJREF,
Address isCopyAddress)
GetByteArrayElements: get all the elements of a byte array |
private static void |
GetByteArrayRegion(JNIEnvironment env,
int arrayJREF,
int startIndex,
int length,
Address bufAddress)
GetByteArrayRegion: copy a region of the array into the native buffer |
private static int |
GetByteField(JNIEnvironment env,
int objJREF,
int fieldID)
GetByteField: read an instance field of type byte |
private static Address |
GetCharArrayElements(JNIEnvironment env,
int arrayJREF,
Address isCopyAddress)
GetCharArrayElements: get all the elements of a char array |
private static void |
GetCharArrayRegion(JNIEnvironment env,
int arrayJREF,
int startIndex,
int length,
Address bufAddress)
GetCharArrayRegion: copy a region of the array into the native buffer |
private static int |
GetCharField(JNIEnvironment env,
int objJREF,
int fieldID)
GetCharField: read an instance field of type character |
private static Address |
GetDirectBufferAddress(JNIEnvironment env,
int bufJREF)
|
private static long |
GetDirectBufferCapacity(JNIEnvironment env,
int bufJREF)
|
private static Address |
GetDoubleArrayElements(JNIEnvironment env,
int arrayJREF,
Address isCopyAddress)
GetDoubleArrayElements: get all the elements of a double array |
private static void |
GetDoubleArrayRegion(JNIEnvironment env,
int arrayJREF,
int startIndex,
int length,
Address bufAddress)
GetDoubleArrayRegion: copy a region of the array into the native buffer |
private static double |
GetDoubleField(JNIEnvironment env,
int objJREF,
int fieldID)
GetDoubleField: read an instance field of type double |
private static int |
GetFieldID(JNIEnvironment env,
int classJREF,
Address fieldNameAddress,
Address descriptorAddress)
GetFieldID: return a field id, which can be cached in native code and reused |
private static Address |
GetFloatArrayElements(JNIEnvironment env,
int arrayJREF,
Address isCopyAddress)
GetFloatArrayElements: get all the elements of a float array |
private static void |
GetFloatArrayRegion(JNIEnvironment env,
int arrayJREF,
int startIndex,
int length,
Address bufAddress)
GetFloatArrayRegion: copy a region of the array into the native buffer |
private static float |
GetFloatField(JNIEnvironment env,
int objJREF,
int fieldID)
GetFloatField: read an instance field of type float |
private static Address |
GetIntArrayElements(JNIEnvironment env,
int arrayJREF,
Address isCopyAddress)
GetIntArrayElements: get all the elements of an integer array |
private static void |
GetIntArrayRegion(JNIEnvironment env,
int arrayJREF,
int startIndex,
int length,
Address bufAddress)
GetIntArrayRegion: copy a region of the array into the native buffer |
private static int |
GetIntField(JNIEnvironment env,
int objJREF,
int fieldID)
GetIntField: read an instance field of type integer |
private static int |
GetJavaVM(JNIEnvironment env,
Address StarStarJavaVM)
|
private static Address |
GetLongArrayElements(JNIEnvironment env,
int arrayJREF,
Address isCopyAddress)
GetLongArrayElements: get all the elements of a long array |
private static void |
GetLongArrayRegion(JNIEnvironment env,
int arrayJREF,
int startIndex,
int length,
Address bufAddress)
GetLongArrayRegion: copy a region of the array into the native buffer |
private static long |
GetLongField(JNIEnvironment env,
int objJREF,
int fieldID)
GetLongField: read an instance field of type long |
private static int |
GetMethodID(JNIEnvironment env,
int classJREF,
Address methodNameAddress,
Address methodSigAddress)
GetMethodID: get the virtual method ID given the name and the signature |
private static int |
GetObjectArrayElement(JNIEnvironment env,
int arrayJREF,
int index)
GetObjectArrayElement: retrieve an object from an object array |
private static int |
GetObjectClass(JNIEnvironment env,
int objJREF)
GetObjectClass |
private static int |
GetObjectField(JNIEnvironment env,
int objJREF,
int fieldID)
GetObjectField: read a instance field of type Object |
private static Address |
GetPrimitiveArrayCritical(JNIEnvironment env,
int arrayJREF,
Address isCopyAddress)
GetPrimitiveArrayCritical: return a direct pointer to the primitive array and disable GC so that the array will not be moved. |
private static Address |
GetShortArrayElements(JNIEnvironment env,
int arrayJREF,
Address isCopyAddress)
GetShortArrayElements: get all the elements of a short array |
private static void |
GetShortArrayRegion(JNIEnvironment env,
int arrayJREF,
int startIndex,
int length,
Address bufAddress)
GetShortArrayRegion: copy a region of the array into the native buffer |
private static int |
GetShortField(JNIEnvironment env,
int objJREF,
int fieldID)
GetShortField: read an instance field of type short |
private static int |
GetStaticBooleanField(JNIEnvironment env,
int classJREF,
int fieldID)
GetStaticBooleanField: read a static field of type boolean |
private static int |
GetStaticByteField(JNIEnvironment env,
int classJREF,
int fieldID)
GetStaticByteField: read a static field of type byte |
private static int |
GetStaticCharField(JNIEnvironment env,
int classJREF,
int fieldID)
GetStaticCharField: read a static field of type character |
private static double |
GetStaticDoubleField(JNIEnvironment env,
int classJREF,
int fieldID)
GetStaticDoubleField: read a static field of type double |
private static int |
GetStaticFieldID(JNIEnvironment env,
int classJREF,
Address fieldNameAddress,
Address descriptorAddress)
GetStaticFieldID: return a field id which can be cached in native code and reused |
private static float |
GetStaticFloatField(JNIEnvironment env,
int classJREF,
int fieldID)
GetStaticFloatField: read a static field of type float |
private static int |
GetStaticIntField(JNIEnvironment env,
int classJREF,
int fieldID)
GetStaticIntField: read a static field of type integer |
private static long |
GetStaticLongField(JNIEnvironment env,
int classJREF,
int fieldID)
GetStaticLongField: read a static field of type long |
private static int |
GetStaticMethodID(JNIEnvironment env,
int classJREF,
Address methodNameAddress,
Address methodSigAddress)
GetStaticMethodID: return the method ID for invocation later |
private static int |
GetStaticObjectField(JNIEnvironment env,
int classJREF,
int fieldID)
GetStaticObjectField: read a static field of type Object |
private static int |
GetStaticShortField(JNIEnvironment env,
int classJREF,
int fieldID)
GetStaticShortField: read a static field of type short |
private static Address |
GetStringChars(JNIEnvironment env,
int strJREF,
Address isCopyAddress)
GetStringChars: return address of buffer containing contents of a String |
private static Address |
GetStringCritical(JNIEnvironment env,
int strJREF,
Address isCopyAddress)
GetStringCritical: Like GetStringChars and ReleaseStringChars, but in some VM environments the VM may be able to avoid making a copy. |
private static int |
GetStringLength(JNIEnvironment env,
int objJREF)
GetStringLength: return the length of a String |
private static void |
GetStringRegion(JNIEnvironment env,
int strJREF,
int start,
int len,
Address buf)
GetStringRegion: Copy a region of Unicode characters from a string to the given buffer. |
private static Address |
GetStringUTFChars(JNIEnvironment env,
int strJREF,
Address isCopyAddress)
GetStringUTFChars: return address of buffer containing contents of a String |
private static int |
GetStringUTFLength(JNIEnvironment env,
int objJREF)
GetStringUTFLength: return number of bytes to represent a String in UTF8 format |
private static void |
GetStringUTFRegion(JNIEnvironment env,
int strJREF,
int start,
int len,
Address buf)
GetStringUTFRegion: Copy a region of Unicode characters from a string to the given buffer, as UTF8 characters. |
private static int |
GetSuperclass(JNIEnvironment env,
int classJREF)
GetSuperclass: find the superclass given a class |
private static int |
GetVersion(JNIEnvironment env)
GetVersion: the version of the JNI |
private static boolean |
IsAssignableFrom(JNIEnvironment env,
int firstClassJREF,
int secondClassJREF)
IsAssignableFrom: determine if an an object of class or interface cls1 can be cast to the class or interface cls2 |
private static int |
IsInstanceOf(JNIEnvironment env,
int objJREF,
int classJREF)
IsInstanceOf: determine if an object is an instance of the class |
private static boolean |
IsSameObject(JNIEnvironment env,
int obj1JREF,
int obj2JREF)
IsSameObject: determine if two references point to the same object |
private static int |
MonitorEnter(JNIEnvironment env,
int objJREF)
MonitorEnter |
private static int |
MonitorExit(JNIEnvironment env,
int objJREF)
MonitorExit |
private static int |
NewBooleanArray(JNIEnvironment env,
int length)
NewBooleanArray: create a new boolean array |
private static int |
NewByteArray(JNIEnvironment env,
int length)
NewByteArray: create a new byte array |
private static int |
NewCharArray(JNIEnvironment env,
int length)
NewCharArray: create a new char array |
private static int |
NewDirectByteBuffer(JNIEnvironment env,
Address address,
long capacity)
These functions are in JNI 1.4 |
private static int |
NewDoubleArray(JNIEnvironment env,
int length)
NewDoubleArray: create a new double array |
private static int |
NewFloatArray(JNIEnvironment env,
int length)
NewFloatArray: create a new float array |
private static int |
NewGlobalRef(JNIEnvironment env,
int objectJREF)
|
private static int |
NewIntArray(JNIEnvironment env,
int length)
NewIntArray: create a new integer array |
private static int |
NewLocalRef(JNIEnvironment env,
int oldJREF)
NewLocalRef |
private static int |
NewLongArray(JNIEnvironment env,
int length)
NewLongArray: create a new long array |
private static int |
NewObject(JNIEnvironment env,
int classJREF,
int methodID)
NewObject: create a new object instance NOTE: the vararg's are not visible in the method signature here; they are saved in the caller frame and the glue frame |
private static int |
NewObjectA(JNIEnvironment env,
int classJREF,
int methodID,
Address argAddress)
NewObjectA: create a new object instance |
private static int |
NewObjectArray(JNIEnvironment env,
int length,
int classJREF,
int initElementJREF)
NewObjectArray: create a new Object array |
private static int |
NewObjectV(JNIEnvironment env,
int classJREF,
int methodID,
Address argAddress)
NewObjectV: create a new object instance |
private static int |
NewShortArray(JNIEnvironment env,
int length)
NewShortArray: create a new short array |
private static int |
NewString(JNIEnvironment env,
Address uchars,
int len)
NewString: create a String Object from C array of unicode chars |
private static int |
NewStringUTF(JNIEnvironment env,
Address utf8bytes)
NewStringUTF: create a String Object from C array of utf8 bytes |
private static int |
NewWeakGlobalRef(JNIEnvironment env,
int objectJREF)
|
private static int |
PopLocalFrame(JNIEnvironment env,
int resultJREF)
Push a local frame for local references. |
private static int |
PushLocalFrame(JNIEnvironment env,
int capacity)
Push a local frame for local references. |
private static int |
RegisterNatives(JNIEnvironment env,
int classJREF,
Address methodsAddress,
int nmethods)
RegisterNatives: registers implementation of native methods |
private static void |
ReleaseBooleanArrayElements(JNIEnvironment env,
int arrayJREF,
Address copyBufferAddress,
int releaseMode)
ReleaseBooleanArrayElements: free the native copy of the array, update changes to Java array as indicated |
private static void |
ReleaseByteArrayElements(JNIEnvironment env,
int arrayJREF,
Address copyBufferAddress,
int releaseMode)
ReleaseByteArrayElements: free the native copy of the array, update changes to Java array as indicated |
private static void |
ReleaseCharArrayElements(JNIEnvironment env,
int arrayJREF,
Address copyBufferAddress,
int releaseMode)
ReleaseCharArrayElements: free the native copy of the array, update changes to Java array as indicated |
private static void |
ReleaseDoubleArrayElements(JNIEnvironment env,
int arrayJREF,
Address copyBufferAddress,
int releaseMode)
ReleaseDoubleArrayElements: free the native copy of the array, update changes to Java array as indicated |
private static void |
ReleaseFloatArrayElements(JNIEnvironment env,
int arrayJREF,
Address copyBufferAddress,
int releaseMode)
ReleaseFloatArrayElements: free the native copy of the array, update changes to Java array as indicated |
private static void |
ReleaseIntArrayElements(JNIEnvironment env,
int arrayJREF,
Address copyBufferAddress,
int releaseMode)
ReleaseIntArrayElements: free the native copy of the array, update changes to Java array as indicated |
private static void |
ReleaseLongArrayElements(JNIEnvironment env,
int arrayJREF,
Address copyBufferAddress,
int releaseMode)
ReleaseLongArrayElements: free the native copy of the array, update changes to Java array as indicated |
private static void |
ReleasePrimitiveArrayCritical(JNIEnvironment env,
int arrayJREF,
Address arrayCopyAddress,
int mode)
ReleasePrimitiveArrayCritical: this function is intended to be paired with the GetPrimitiveArrayCritical function. |
private static void |
ReleaseShortArrayElements(JNIEnvironment env,
int arrayJREF,
Address copyBufferAddress,
int releaseMode)
ReleaseShortArrayElements: free the native copy of the array, update changes to Java array as indicated |
private static void |
ReleaseStringChars(JNIEnvironment env,
int objJREF,
Address bufAddress)
ReleaseStringChars: release buffer obtained via GetStringChars |
private static void |
ReleaseStringCritical(JNIEnvironment env,
int strJREF,
Address carray)
ReleaseStringCritical: this function is intended to be paired with the GetStringCritical function. |
private static void |
ReleaseStringUTFChars(JNIEnvironment env,
int objJREF,
Address bufAddress)
ReleaseStringUTFChars: release buffer obtained via GetStringUTFChars |
private static int |
reserved0(JNIEnvironment env)
Empty Slots |
private static int |
reserved1(JNIEnvironment env)
|
private static int |
reserved2(JNIEnvironment env)
|
private static int |
reserved3(JNIEnvironment env)
|
private static void |
SetBooleanArrayRegion(JNIEnvironment env,
int arrayJREF,
int startIndex,
int length,
Address bufAddress)
SetBooleanArrayRegion: copy a region of the native buffer into the array (1 byte element) |
private static void |
SetBooleanField(JNIEnvironment env,
int objJREF,
int fieldID,
boolean value)
SetBooleanField: set an instance field of type boolean |
private static void |
SetByteArrayRegion(JNIEnvironment env,
int arrayJREF,
int startIndex,
int length,
Address bufAddress)
SetByteArrayRegion: copy a region of the native buffer into the array (1 byte element) |
private static void |
SetByteField(JNIEnvironment env,
int objJREF,
int fieldID,
byte value)
SetByteField: set an instance field of type byte |
private static void |
SetCharArrayRegion(JNIEnvironment env,
int arrayJREF,
int startIndex,
int length,
Address bufAddress)
SetCharArrayRegion: copy a region of the native buffer into the array (2 byte element) |
private static void |
SetCharField(JNIEnvironment env,
int objJREF,
int fieldID,
char value)
SetCharField: set an instance field of type char |
private static void |
SetDoubleArrayRegion(JNIEnvironment env,
int arrayJREF,
int startIndex,
int length,
Address bufAddress)
SetDoubleArrayRegion: copy a region of the native buffer into the array |
private static void |
SetDoubleField(JNIEnvironment env,
int objJREF,
int fieldID,
double value)
SetDoubleField: set an instance field of type double |
private static void |
SetFloatArrayRegion(JNIEnvironment env,
int arrayJREF,
int startIndex,
int length,
Address bufAddress)
SetFloatArrayRegion: copy a region of the native buffer into the array |
private static void |
SetFloatField(JNIEnvironment env,
int objJREF,
int fieldID,
float value)
SetFloatField: set an instance field of type float |
private static void |
SetIntArrayRegion(JNIEnvironment env,
int arrayJREF,
int startIndex,
int length,
Address bufAddress)
SetIntArrayRegion: copy a region of the native buffer into the array |
private static void |
SetIntField(JNIEnvironment env,
int objJREF,
int fieldID,
int value)
SetIntField: set an instance field of type integer |
private static void |
SetLongArrayRegion(JNIEnvironment env,
int arrayJREF,
int startIndex,
int length,
Address bufAddress)
SetLongArrayRegion: copy a region of the native buffer into the array |
private static void |
SetLongField(JNIEnvironment env,
int objJREF,
int fieldID,
long value)
SetLongField: set an instance field of type long |
private static void |
SetObjectArrayElement(JNIEnvironment env,
int arrayJREF,
int index,
int objectJREF)
SetObjectArrayElement: store an object into an object array |
private static void |
SetObjectField(JNIEnvironment env,
int objJREF,
int fieldID,
int valueJREF)
SetObjectField: set a instance field of type Object |
private static void |
SetShortArrayRegion(JNIEnvironment env,
int arrayJREF,
int startIndex,
int length,
Address bufAddress)
SetShortArrayRegion: copy a region of the native buffer into the array (2 byte element) |
private static void |
SetShortField(JNIEnvironment env,
int objJREF,
int fieldID,
short value)
SetShortField: set an instance field of type short |
private static void |
SetStaticBooleanField(JNIEnvironment env,
int classJREF,
int fieldID,
boolean fieldValue)
SetStaticBooleanField: set a static field of type boolean |
private static void |
SetStaticByteField(JNIEnvironment env,
int classJREF,
int fieldID,
byte fieldValue)
SetStaticByteField: set a static field of type byte |
private static void |
SetStaticCharField(JNIEnvironment env,
int classJREF,
int fieldID,
char fieldValue)
SetStaticCharField: set a static field of type char |
private static void |
SetStaticDoubleField(JNIEnvironment env,
int classJREF,
int fieldID,
double fieldValue)
SetStaticDoubleField: set a static field of type float |
private static void |
SetStaticFloatField(JNIEnvironment env,
int classJREF,
int fieldID,
float fieldValue)
SetStaticFloatField: set a static field of type float |
private static void |
SetStaticIntField(JNIEnvironment env,
int classJREF,
int fieldID,
int fieldValue)
SetStaticIntField: set a static field of type integer |
private static void |
SetStaticLongField(JNIEnvironment env,
int classJREF,
int fieldID,
long fieldValue)
SetStaticLongField: set a static field of type long |
private static void |
SetStaticObjectField(JNIEnvironment env,
int classJREF,
int fieldID,
int objectJREF)
SetStaticObjectField: set a static field of type Object |
private static void |
SetStaticShortField(JNIEnvironment env,
int classJREF,
int fieldID,
short fieldValue)
SetStaticShortField: set a static field of type short |
private static int |
Throw(JNIEnvironment env,
int exceptionJREF)
Throw: register a Throwable object as a pending exception, to be
delivered on return to the Java caller |
private static int |
ThrowNew(JNIEnvironment env,
int throwableClassJREF,
Address exceptionNameAddress)
ThrowNew |
private static int |
ToReflectedField(JNIEnvironment env,
int clsJREF,
int fieldID,
boolean isStatic)
ToReflectedField |
private static int |
ToReflectedMethod(JNIEnvironment env,
int clsJREF,
int methodID,
boolean isStatic)
ToReflectedMethod |
private static int |
UnregisterNatives(JNIEnvironment env,
int classJREF)
UnregisterNatives: unregisters native methods |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final boolean traceJNI
public static final int FUNCTIONCOUNT
Constructor Detail |
---|
public JNIFunctions()
Method Detail |
---|
private static int GetVersion(JNIEnvironment env)
env
- A JREF index for the JNI environment object
private static int DefineClass(JNIEnvironment env, Address classNameAddress, int classLoader, Address data, int dataLen)
env
- A JREF index for the JNI environment objectclassNameAddress
- a raw address to a null-terminated string in C for the class nameclassLoader
- a JREF index for the class loader assigned to the defined classdata
- buffer containing the .class filedataLen
- buffer length
ClassFormatError
- if the class data does not specify a valid class
ClassCircularityError
- (not implemented)
OutOfMemoryError
- (not implemented)private static int FindClass(JNIEnvironment env, Address classNameAddress)
env
- A JREF index for the JNI environment objectclassNameAddress
- a raw address to a null-terminated string in C for the class name
ClassFormatError
- (not implemented)
ClassCircularityError
- (not implemented)
NoClassDefFoundError
- if the class cannot be found
OutOfMemoryError
- (not implemented)
ExceptionInInitializerError
- (not implemented)private static int GetSuperclass(JNIEnvironment env, int classJREF)
env
- A JREF index for the JNI environment objectclassJREF
- a JREF index for the class object
private static boolean IsAssignableFrom(JNIEnvironment env, int firstClassJREF, int secondClassJREF)
env
- A JREF index for the JNI environment objectfirstClassJREF
- a JREF index for the first class objectsecondClassJREF
- a JREF index for the second class object
private static int Throw(JNIEnvironment env, int exceptionJREF)
Throwable
object as a pending exception, to be
delivered on return to the Java caller
env
- A JREF index for the JNI environment objectexceptionJREF
- A JREF index for the Throwable
object to be
thrown
private static int ThrowNew(JNIEnvironment env, int throwableClassJREF, Address exceptionNameAddress)
env
- A JREF index for the JNI environment objectthrowableClassJREF
- a JREF index for the class object of the exceptionexceptionNameAddress
- an address of the string in C
private static int ExceptionOccurred(JNIEnvironment env)
env
- A JREF index for the JNI environment object
private static void ExceptionDescribe(JNIEnvironment env)
env
- A JREF index for the JNI environment objectprivate static void ExceptionClear(JNIEnvironment env)
env
- A JREF index for the JNI environment objectprivate static void FatalError(JNIEnvironment env, Address messageAddress)
env
- A JREF index for the JNI environment objectmessageAddress
- an address of the string in Cprivate static int NewGlobalRef(JNIEnvironment env, int objectJREF)
private static void DeleteGlobalRef(JNIEnvironment env, int refJREF)
private static void DeleteLocalRef(JNIEnvironment env, int objJREF)
private static boolean IsSameObject(JNIEnvironment env, int obj1JREF, int obj2JREF)
env
- A JREF index for the JNI environment objectobj1JREF
- A JREF index for the first objectobj2JREF
- A JREF index for the second object
true
if it's the same object, false otherwiseprivate static int AllocObject(JNIEnvironment env, int classJREF) throws InstantiationException, OutOfMemoryError
env
- A JREF index for the JNI environment objectclassJREF
- a JREF index for the class object
InstantiationException
- if the class is abstract or is an interface
OutOfMemoryError
- if no more memory to allocateprivate static int NewObject(JNIEnvironment env, int classJREF, int methodID) throws Exception
env
- A JREF index for the JNI environment objectclassJREF
- a JREF index for the class objectmethodID
- id of a MethodReference
InstantiationException
- if the class is abstract or is an interface
OutOfMemoryError
- if no more memory to allocate
Exception
private static int NewObjectV(JNIEnvironment env, int classJREF, int methodID, Address argAddress) throws Exception
env
- A JREF index for the JNI environment objectclassJREF
- a JREF index for the class objectmethodID
- id of a MethodReferenceargAddress
- a raw address to a variable argument list, each element is 1-word or
2-words of the appropriate type for the constructor invocation
InstantiationException
- if the class is abstract or is an interface
OutOfMemoryError
- if no more memory to allocate
Exception
private static int NewObjectA(JNIEnvironment env, int classJREF, int methodID, Address argAddress) throws Exception
env
- A JREF index for the JNI environment objectclassJREF
- a JREF index for the class objectmethodID
- id of a MethodReferenceargAddress
- a raw address to an array of unions in C, each element is 2-word and
hold an argument of the appropriate type for the constructor invocation
InstantiationException
- if the class is abstract or is an interface
OutOfMemoryError
- if no more memory to allocate
Exception
private static int GetObjectClass(JNIEnvironment env, int objJREF)
env
- A JREF index for the JNI environment objectobjJREF
- a JREF index for the object to check
private static int IsInstanceOf(JNIEnvironment env, int objJREF, int classJREF)
env
- A JREF index for the JNI environment objectobjJREF
- a JREF index for the object to checkclassJREF
- a JREF index for the class to check
private static int GetMethodID(JNIEnvironment env, int classJREF, Address methodNameAddress, Address methodSigAddress)
env
- A JREF index for the JNI environment objectclassJREF
- a JREF index for the class objectmethodNameAddress
- a raw address to a null-terminated string in C for the method namemethodSigAddress
- a raw address to a null-terminated string in C for the method signature
NoSuchMethodError
- if the method cannot be found
ExceptionInInitializerError
- if the class or interface static initializer fails
OutOfMemoryError
- if the system runs out of memoryprivate static int CallObjectMethod(JNIEnvironment env, int objJREF, int methodID) throws Exception
env
- A JREF index for the JNI environment objectobjJREF
- a JREF index for the object instancemethodID
- id of a MethodReference
Exception
private static int CallObjectMethodV(JNIEnvironment env, int objJREF, int methodID, Address argAddress) throws Exception
env
- A JREF index for the JNI environment objectobjJREF
- a JREF index for the object instancemethodID
- id of a MethodReferenceargAddress
- a raw address to a variable argument list, each element is
1-word or 2-words of the appropriate type for the method invocation
Exception
private static int CallObjectMethodA(JNIEnvironment env, int objJREF, int methodID, Address argAddress) throws Exception
env
- A JREF index for the JNI environment objectobjJREF
- a JREF index for the object instancemethodID
- id of a MethodReferenceargAddress
- a raw address to an array of unions in C, each element is 2-word
and hold an argument of the appropriate type for the method invocation
Exception
private static boolean CallBooleanMethod(JNIEnvironment env, int objJREF, int methodID) throws Exception
env
- A JREF index for the JNI environment objectobjJREF
- a JREF index for the object instancemethodID
- id of a MethodReference
Exception
private static boolean CallBooleanMethodV(JNIEnvironment env, int objJREF, int methodID, Address argAddress) throws Exception
env
- A JREF index for the JNI environment objectobjJREF
- a JREF index for the object instancemethodID
- id of a MethodReferenceargAddress
- a raw address to a variable argument list, each element is
1-word or 2-words of the appropriate type for the method invocation
Exception
private static boolean CallBooleanMethodA(JNIEnvironment env, int objJREF, int methodID, Address argAddress) throws Exception
env
- A JREF index for the JNI environment objectobjJREF
- a JREF index for the object instancemethodID
- id of a MethodReferenceargAddress
- a raw address to an array of unions in C, each element is 2-word
and hold an argument of the appropriate type for the method invocation
Exception
private static byte CallByteMethod(JNIEnvironment env, int objJREF, int methodID) throws Exception
env
- A JREF index for the JNI environment objectobjJREF
- a JREF index for the object instancemethodID
- id of a MethodReference
Exception
private static byte CallByteMethodV(JNIEnvironment env, int objJREF, int methodID, Address argAddress) throws Exception
env
- A JREF index for the JNI environment objectobjJREF
- a JREF index for the object instancemethodID
- id of a MethodReferenceargAddress
- a raw address to a variable argument list, each element is
1-word or 2-words of the appropriate type for the method invocation
Exception
private static byte CallByteMethodA(JNIEnvironment env, int objJREF, int methodID, Address argAddress) throws Exception
env
- A JREF index for the JNI environment objectobjJREF
- a JREF index for the object instancemethodID
- id of a MethodReferenceargAddress
- a raw address to an array of unions in C, each element is 2-word
and hold an argument of the appropriate type for the method invocation
Exception
private static char CallCharMethod(JNIEnvironment env, int objJREF, int methodID) throws Exception
env
- A JREF index for the JNI environment objectobjJREF
- a JREF index for the object instancemethodID
- id of a MethodReference
Exception
private static char CallCharMethodV(JNIEnvironment env, int objJREF, int methodID, Address argAddress) throws Exception
env
- A JREF index for the JNI environment objectobjJREF
- a JREF index for the object instancemethodID
- id of a MethodReferenceargAddress
- a raw address to a variable argument list, each element is
1-word or 2-words of the appropriate type for the method invocation
Exception
private static char CallCharMethodA(JNIEnvironment env, int objJREF, int methodID, Address argAddress) throws Exception
env
- A JREF index for the JNI environment objectobjJREF
- a JREF index for the object instancemethodID
- id of a MethodReferenceargAddress
- a raw address to an array of unions in C, each element is 2-word
and hold an argument of the appropriate type for the method invocation
Exception
private static short CallShortMethod(JNIEnvironment env, int objJREF, int methodID) throws Exception
env
- A JREF index for the JNI environment objectobjJREF
- a JREF index for the object instancemethodID
- id of a MethodReference
Exception
private static short CallShortMethodV(JNIEnvironment env, int objJREF, int methodID, Address argAddress) throws Exception
env
- A JREF index for the JNI environment objectobjJREF
- a JREF index for the object instancemethodID
- id of a MethodReferenceargAddress
- a raw address to a variable argument list, each element is
1-word or 2-words of the appropriate type for the method invocation
Exception
private static short CallShortMethodA(JNIEnvironment env, int objJREF, int methodID, Address argAddress) throws Exception
env
- A JREF index for the JNI environment objectobjJREF
- a JREF index for the object instancemethodID
- id of a MethodReferenceargAddress
- a raw address to an array of unions in C, each element is 2-word
and hold an argument of the appropriate type for the method invocation
Exception
private static int CallIntMethod(JNIEnvironment env, int objJREF, int methodID) throws Exception
env
- A JREF index for the JNI environment objectobjJREF
- a JREF index for the object instancemethodID
- id of a MethodReference
Exception
private static int CallIntMethodV(JNIEnvironment env, int objJREF, int methodID, Address argAddress) throws Exception
env
- A JREF index for the JNI environment objectobjJREF
- a JREF index for the object instancemethodID
- id of a MethodReferenceargAddress
- a raw address to a variable argument list, each element is
1-word or 2-words of the appropriate type for the method invocation
Exception
private static int CallIntMethodA(JNIEnvironment env, int objJREF, int methodID, Address argAddress) throws Exception
env
- A JREF index for the JNI environment objectobjJREF
- a JREF index for the object instancemethodID
- id of a MethodReferenceargAddress
- a raw address to an array of unions in C, each element is 2-word
and hold an argument of the appropriate type for the method invocation
Exception
private static long CallLongMethod(JNIEnvironment env, int objJREF, int methodID) throws Exception
env
- A JREF index for the JNI environment objectobjJREF
- a JREF index for the object instancemethodID
- id of a MethodReference
Exception
private static long CallLongMethodV(JNIEnvironment env, int objJREF, int methodID, Address argAddress) throws Exception
env
- A JREF index for the JNI environment objectobjJREF
- a JREF index for the object instancemethodID
- id of a MethodReferenceargAddress
- a raw address to a variable argument list, each element is
1-word or 2-words of the appropriate type for the method invocation
Exception
private static long CallLongMethodA(JNIEnvironment env, int objJREF, int methodID, Address argAddress) throws Exception
env
- A JREF index for the JNI environment objectobjJREF
- a JREF index for the object instancemethodID
- id of a MethodReferenceargAddress
- a raw address to an array of unions in C, each element is 2-word
and hold an argument of the appropriate type for the method invocation
Exception
private static float CallFloatMethod(JNIEnvironment env, int objJREF, int methodID) throws Exception
env
- A JREF index for the JNI environment objectobjJREF
- a JREF index for the object instancemethodID
- id of a MethodReference
Exception
private static float CallFloatMethodV(JNIEnvironment env, int objJREF, int methodID, Address argAddress) throws Exception
env
- A JREF index for the JNI environment objectobjJREF
- a JREF index for the object instancemethodID
- id of a MethodReferenceargAddress
- a raw address to a variable argument list, each element is
1-word or 2-words of the appropriate type for the method invocation
Exception
private static float CallFloatMethodA(JNIEnvironment env, int objJREF, int methodID, Address argAddress) throws Exception
env
- A JREF index for the JNI environment objectobjJREF
- a JREF index for the object instancemethodID
- id of a MethodReferenceargAddress
- a raw address to an array of unions in C, each element is 2-word
and hold an argument of the appropriate type for the method invocation
Exception
private static double CallDoubleMethod(JNIEnvironment env, int objJREF, int methodID) throws Exception
env
- A JREF index for the JNI environment objectobjJREF
- a JREF index for the object instancemethodID
- id of a MethodReference
Exception
private static double CallDoubleMethodV(JNIEnvironment env, int objJREF, int methodID, Address argAddress) throws Exception
env
- A JREF index for the JNI environment objectobjJREF
- a JREF index for the object instancemethodID
- id of a MethodReferenceargAddress
- a raw address to a variable argument list, each element is
1-word or 2-words of the appropriate type for the method invocation
Exception
private static double CallDoubleMethodA(JNIEnvironment env, int objJREF, int methodID, Address argAddress) throws Exception
env
- A JREF index for the JNI environment objectobjJREF
- a JREF index for the object instancemethodID
- id of a MethodReferenceargAddress
- a raw address to an array of unions in C, each element is 2-word
and hold an argument of the appropriate type for the method invocation
Exception
private static void CallVoidMethod(JNIEnvironment env, int objJREF, int methodID) throws Exception
env
- A JREF index for the JNI environment objectobjJREF
- a JREF index for the object instancemethodID
- id of a MethodReference
Exception
private static void CallVoidMethodV(JNIEnvironment env, int objJREF, int methodID, Address argAddress) throws Exception
env
- A JREF index for the JNI environment objectobjJREF
- a JREF index for the object instancemethodID
- id of a MethodReferenceargAddress
- a raw address to a variable argument list, each element is
1-word or 2-words of the appropriate type for the method invocation
Exception
private static void CallVoidMethodA(JNIEnvironment env, int objJREF, int methodID, Address argAddress) throws Exception
env
- A JREF index for the JNI environment objectobjJREF
- a JREF index for the object instancemethodID
- id of a MethodReferenceargAddress
- a raw address to an array of unions in C, each element is 2-word
and hold an argument of the appropriate type for the method invocation
Exception
private static int CallNonvirtualObjectMethod(JNIEnvironment env, int objJREF, int classJREF, int methodID) throws Exception
env
- A JREF index for the JNI environment objectobjJREF
- a JREF index for the object instanceclassJREF
- a JREF index for the class object that declares this methodmethodID
- id of a MethodReference
Exception
private static int CallNonvirtualObjectMethodV(JNIEnvironment env, int objJREF, int classJREF, int methodID, Address argAddress) throws Exception
env
- A JREF index for the JNI environment objectobjJREF
- a JREF index for the object instanceclassJREF
- a JREF index for the class object that declares this methodmethodID
- id of a MethodReferenceargAddress
- a raw address to a variable argument list, each element is
1-word or 2-words of the appropriate type for the method invocation
Exception
private static int CallNonvirtualObjectMethodA(JNIEnvironment env, int objJREF, int classJREF, int methodID, Address argAddress) throws Exception
env
- A JREF index for the JNI environment objectobjJREF
- a JREF index for the object instanceclassJREF
- a JREF index for the class object that declares this methodmethodID
- id of a MethodReferenceargAddress
- a raw address to an array of unions in C, each element is 2-word
and hold an argument of the appropriate type for the method invocation
Exception
private static boolean CallNonvirtualBooleanMethod(JNIEnvironment env, int objJREF, int classJREF, int methodID) throws Exception
env
- A JREF index for the JNI environment objectobjJREF
- a JREF index for the object instanceclassJREF
- a JREF index for the class object that declares this methodmethodID
- id of a MethodReference
Exception
private static boolean CallNonvirtualBooleanMethodV(JNIEnvironment env, int objJREF, int classJREF, int methodID, Address argAddress) throws Exception
env
- A JREF index for the JNI environment objectobjJREF
- a JREF index for the object instanceclassJREF
- a JREF index for the class object that declares this methodmethodID
- id of a MethodReferenceargAddress
- a raw address to a variable argument list, each element is
1-word or 2-words of the appropriate type for the method invocation
Exception
private static boolean CallNonvirtualBooleanMethodA(JNIEnvironment env, int objJREF, int classJREF, int methodID, Address argAddress) throws Exception
env
- A JREF index for the JNI environment objectobjJREF
- a JREF index for the object instanceclassJREF
- a JREF index for the class object that declares this methodmethodID
- id of a MethodReferenceargAddress
- a raw address to an array of unions in C, each element is 2-word
and hold an argument of the appropriate type for the method invocation
Exception
private static byte CallNonvirtualByteMethod(JNIEnvironment env, int objJREF, int classJREF, int methodID) throws Exception
env
- A JREF index for the JNI environment objectobjJREF
- a JREF index for the object instanceclassJREF
- a JREF index for the class object that declares this methodmethodID
- id of a MethodReference
Exception
private static byte CallNonvirtualByteMethodV(JNIEnvironment env, int objJREF, int classJREF, int methodID, Address argAddress) throws Exception
env
- A JREF index for the JNI environment objectobjJREF
- a JREF index for the object instancemethodID
- id of a MethodReferenceclassJREF
- a JREF index for the class object that declares this methodargAddress
- a raw address to a variable argument list, each element is
1-word or 2-words of the appropriate type for the method invocation
Exception
private static byte CallNonvirtualByteMethodA(JNIEnvironment env, int objJREF, int classJREF, int methodID, Address argAddress) throws Exception
env
- A JREF index for the JNI environment objectobjJREF
- a JREF index for the object instancemethodID
- id of a MethodReferenceclassJREF
- a JREF index for the class object that declares this methodargAddress
- a raw address to an array of unions in C, each element is 2-word
and hold an argument of the appropriate type for the method invocation
Exception
private static char CallNonvirtualCharMethod(JNIEnvironment env, int objJREF, int classJREF, int methodID) throws Exception
env
- A JREF index for the JNI environment objectobjJREF
- a JREF index for the object instanceclassJREF
- a JREF index for the class object that declares this methodmethodID
- id of a MethodReference
Exception
private static char CallNonvirtualCharMethodV(JNIEnvironment env, int objJREF, int classJREF, int methodID, Address argAddress) throws Exception
env
- A JREF index for the JNI environment objectobjJREF
- a JREF index for the object instanceclassJREF
- a JREF index for the class object that declares this methodmethodID
- id of a MethodReferenceargAddress
- a raw address to a variable argument list, each element is
1-word or 2-words of the appropriate type for the method invocation
Exception
private static char CallNonvirtualCharMethodA(JNIEnvironment env, int objJREF, int classJREF, int methodID, Address argAddress) throws Exception
env
- A JREF index for the JNI environment objectobjJREF
- a JREF index for the object instanceclassJREF
- a JREF index for the class object that declares this methodmethodID
- id of a MethodReferenceargAddress
- a raw address to an array of unions in C, each element is 2-word
and hold an argument of the appropriate type for the method invocation
Exception
private static short CallNonvirtualShortMethod(JNIEnvironment env, int objJREF, int classJREF, int methodID) throws Exception
env
- A JREF index for the JNI environment objectobjJREF
- a JREF index for the object instanceclassJREF
- a JREF index for the class object that declares this methodmethodID
- id of a MethodReference
Exception
private static short CallNonvirtualShortMethodV(JNIEnvironment env, int objJREF, int classJREF, int methodID, Address argAddress) throws Exception
env
- A JREF index for the JNI environment objectobjJREF
- a JREF index for the object instanceclassJREF
- a JREF index for the class object that declares this methodmethodID
- id of a MethodReferenceargAddress
- a raw address to a variable argument list, each element is
1-word or 2-words of the appropriate type for the method invocation
Exception
private static short CallNonvirtualShortMethodA(JNIEnvironment env, int objJREF, int classJREF, int methodID, Address argAddress) throws Exception
env
- A JREF index for the JNI environment objectobjJREF
- a JREF index for the object instanceclassJREF
- a JREF index for the class object that declares this methodmethodID
- id of a MethodReferenceargAddress
- a raw address to an array of unions in C, each element is 2-word
and hold an argument of the appropriate type for the method invocation
Exception
private static int CallNonvirtualIntMethod(JNIEnvironment env, int objJREF, int classJREF, int methodID) throws Exception
env
- A JREF index for the JNI environment objectobjJREF
- a JREF index for the object instanceclassJREF
- a JREF index for the class object that declares this methodmethodID
- id of a MethodReference
Exception
private static int CallNonvirtualIntMethodV(JNIEnvironment env, int objJREF, int classJREF, int methodID, Address argAddress) throws Exception
env
- A JREF index for the JNI environment objectobjJREF
- a JREF index for the object instanceclassJREF
- a JREF index for the class object that declares this methodmethodID
- id of a MethodReferenceargAddress
- a raw address to a variable argument list, each element is
1-word or 2-words of the appropriate type for the method invocation
Exception
private static int CallNonvirtualIntMethodA(JNIEnvironment env, int objJREF, int classJREF, int methodID, Address argAddress) throws Exception
env
- A JREF index for the JNI environment objectobjJREF
- a JREF index for the object instanceclassJREF
- a JREF index for the class object that declares this methodmethodID
- id of a MethodReferenceargAddress
- a raw address to an array of unions in C, each element is 2-word
and hold an argument of the appropriate type for the method invocation
Exception
private static long CallNonvirtualLongMethod(JNIEnvironment env, int objJREF, int classJREF, int methodID) throws Exception
env
- A JREF index for the JNI environment objectobjJREF
- a JREF index for the object instanceclassJREF
- a JREF index for the class object that declares this methodmethodID
- id of a MethodReference
Exception
private static long CallNonvirtualLongMethodV(JNIEnvironment env, int objJREF, int classJREF, int methodID, Address argAddress) throws Exception
env
- A JREF index for the JNI environment objectobjJREF
- a JREF index for the object instanceclassJREF
- a JREF index for the class object that declares this methodmethodID
- id of a MethodReferenceargAddress
- a raw address to a variable argument list, each element is
1-word or 2-words of the appropriate type for the method invocation
Exception
private static long CallNonvirtualLongMethodA(JNIEnvironment env, int objJREF, int classJREF, int methodID, Address argAddress) throws Exception
env
- A JREF index for the JNI environment objectobjJREF
- a JREF index for the object instanceclassJREF
- a JREF index for the class object that declares this methodmethodID
- id of a MethodReferenceargAddress
- a raw address to an array of unions in C, each element is 2-word
and hold an argument of the appropriate type for the method invocation
Exception
private static float CallNonvirtualFloatMethod(JNIEnvironment env, int objJREF, int classJREF, int methodID) throws Exception
env
- A JREF index for the JNI environment objectobjJREF
- a JREF index for the object instanceclassJREF
- a JREF index for the class object that declares this methodmethodID
- id of a MethodReference
Exception
private static float CallNonvirtualFloatMethodV(JNIEnvironment env, int objJREF, int classJREF, int methodID, Address argAddress) throws Exception
env
- A JREF index for the JNI environment objectobjJREF
- a JREF index for the object instanceclassJREF
- a JREF index for the class object that declares this methodmethodID
- id of a MethodReferenceargAddress
- a raw address to a variable argument list, each element is
1-word or 2-words of the appropriate type for the method invocation
Exception
private static float CallNonvirtualFloatMethodA(JNIEnvironment env, int objJREF, int classJREF, int methodID, Address argAddress) throws Exception
env
- A JREF index for the JNI environment objectobjJREF
- a JREF index for the object instanceclassJREF
- a JREF index for the class object that declares this methodmethodID
- id of a MethodReferenceargAddress
- a raw address to an array of unions in C, each element is 2-word
and hold an argument of the appropriate type for the method invocation
Exception
private static double CallNonvirtualDoubleMethod(JNIEnvironment env, int objJREF, int classJREF, int methodID) throws Exception
env
- A JREF index for the JNI environment objectobjJREF
- a JREF index for the object instanceclassJREF
- a JREF index for the class object that declares this methodmethodID
- id of a MethodReference
Exception
private static double CallNonvirtualDoubleMethodV(JNIEnvironment env, int objJREF, int classJREF, int methodID, Address argAddress) throws Exception
env
- A JREF index for the JNI environment objectobjJREF
- a JREF index for the object instanceclassJREF
- a JREF index for the class object that declares this methodmethodID
- id of a MethodReferenceargAddress
- a raw address to a variable argument list, each element is
1-word or 2-words of the appropriate type for the method invocation
Exception
private static double CallNonvirtualDoubleMethodA(JNIEnvironment env, int objJREF, int classJREF, int methodID, Address argAddress) throws Exception
env
- A JREF index for the JNI environment objectobjJREF
- a JREF index for the object instanceclassJREF
- a JREF index for the class object that declares this methodmethodID
- id of a MethodReferenceargAddress
- a raw address to an array of unions in C, each element is 2-word
and hold an argument of the appropriate type for the method invocation
Exception
private static void CallNonvirtualVoidMethod(JNIEnvironment env, int objJREF, int classJREF, int methodID) throws Exception
env
- A JREF index for the JNI environment objectobjJREF
- a JREF index for the object instanceclassJREF
- a JREF index for the class object that declares this methodmethodID
- id of a MethodReference
Exception
private static void CallNonvirtualVoidMethodV(JNIEnvironment env, int objJREF, int classJREF, int methodID, Address argAddress) throws Exception
env
- A JREF index for the JNI environment objectobjJREF
- a JREF index for the object instanceclassJREF
- a JREF index for the class object that declares this methodmethodID
- id of a MethodReferenceargAddress
- a raw address to a variable argument list, each element is
1-word or 2-words of the appropriate type for the method invocation
Exception
private static void CallNonvirtualVoidMethodA(JNIEnvironment env, int objJREF, int classJREF, int methodID, Address argAddress) throws Exception
env
- A JREF index for the JNI environment objectobjJREF
- a JREF index for the object instanceclassJREF
- a JREF index for the class object that declares this methodmethodID
- id of a MethodReferenceargAddress
- a raw address to an array of unions in C, each element is 2-word
and hold an argument of the appropriate type for the method invocation
Exception
private static int GetFieldID(JNIEnvironment env, int classJREF, Address fieldNameAddress, Address descriptorAddress)
env
- A JREF index for the JNI environment objectclassJREF
- a JREF index for the RVMClass objectfieldNameAddress
- a raw address to a null-terminated string in C for the field namedescriptorAddress
- a raw address to a null-terminated string in C for the descriptor
NoSuchFieldError
- if the specified field cannot be found
ExceptionInInitializerError
- if the class initializer fails
OutOfMemoryError
- if the system runs out of memoryprivate static int GetObjectField(JNIEnvironment env, int objJREF, int fieldID)
env
- A JREF index for the JNI environment objectobjJREF
- a JREF index for the target objectfieldID
- the id for the RVMField that describes this field
private static int GetBooleanField(JNIEnvironment env, int objJREF, int fieldID)
env
- A JREF index for the JNI environment objectobjJREF
- a JREF index for the target objectfieldID
- the id for the RVMField that describes this field
private static int GetByteField(JNIEnvironment env, int objJREF, int fieldID)
env
- A JREF index for the JNI environment objectobjJREF
- a JREF index for the target objectfieldID
- the id for the RVMField that describes this field
private static int GetCharField(JNIEnvironment env, int objJREF, int fieldID)
env
- A JREF index for the JNI environment objectobjJREF
- a JREF index for the target objectfieldID
- the id for the RVMField that describes this field
private static int GetShortField(JNIEnvironment env, int objJREF, int fieldID)
env
- A JREF index for the JNI environment objectobjJREF
- a JREF index for the target objectfieldID
- the id for the RVMField that describes this field
private static int GetIntField(JNIEnvironment env, int objJREF, int fieldID)
env
- A JREF index for the JNI environment objectobjJREF
- a JREF index for the target objectfieldID
- the id for the RVMField that describes this field
private static long GetLongField(JNIEnvironment env, int objJREF, int fieldID)
env
- A JREF index for the JNI environment objectobjJREF
- a JREF index for the target objectfieldID
- the id for the RVMField that describes this field
private static float GetFloatField(JNIEnvironment env, int objJREF, int fieldID)
env
- A JREF index for the JNI environment objectobjJREF
- a JREF index for the target objectfieldID
- the id for the RVMField that describes this field
private static double GetDoubleField(JNIEnvironment env, int objJREF, int fieldID)
env
- A JREF index for the JNI environment objectobjJREF
- a JREF index for the target objectfieldID
- the id for the RVMField that describes this field
private static void SetObjectField(JNIEnvironment env, int objJREF, int fieldID, int valueJREF)
env
- A JREF index for the JNI environment objectobjJREF
- a JREF index for the target objectfieldID
- the id for the RVMField that describes this fieldvalueJREF
- a JREF index for the value to assignprivate static void SetBooleanField(JNIEnvironment env, int objJREF, int fieldID, boolean value)
env
- A JREF index for the JNI environment objectobjJREF
- a JREF index for the target objectfieldID
- the id for the RVMField that describes this fieldvalue
- boolean value to assignprivate static void SetByteField(JNIEnvironment env, int objJREF, int fieldID, byte value)
env
- A JREF index for the JNI environment objectobjJREF
- a JREF index for the target objectfieldID
- the id for the RVMField that describes this fieldvalue
- byte value to assignprivate static void SetCharField(JNIEnvironment env, int objJREF, int fieldID, char value)
env
- A JREF index for the JNI environment objectobjJREF
- a JREF index for the target objectfieldID
- the id for the RVMField that describes this fieldvalue
- char value to assignprivate static void SetShortField(JNIEnvironment env, int objJREF, int fieldID, short value)
env
- A JREF index for the JNI environment objectobjJREF
- a JREF index for the target objectfieldID
- the id for the RVMField that describes this fieldvalue
- short value to assignprivate static void SetIntField(JNIEnvironment env, int objJREF, int fieldID, int value)
env
- A JREF index for the JNI environment objectobjJREF
- a JREF index for the target objectfieldID
- the id for the RVMField that describes this fieldvalue
- integer value to assignprivate static void SetLongField(JNIEnvironment env, int objJREF, int fieldID, long value)
env
- A JREF index for the JNI environment objectobjJREF
- a JREF index for the target objectfieldID
- the id for the RVMField that describes this fieldvalue
- long value to assignprivate static void SetFloatField(JNIEnvironment env, int objJREF, int fieldID, float value)
env
- A JREF index for the JNI environment objectobjJREF
- a JREF index for the target objectfieldID
- the id for the RVMField that describes this fieldvalue
- float value to assignprivate static void SetDoubleField(JNIEnvironment env, int objJREF, int fieldID, double value)
env
- A JREF index for the JNI environment objectobjJREF
- a JREF index for the target objectfieldID
- the id for the RVMField that describes this fieldvalue
- double value to assignprivate static int GetStaticMethodID(JNIEnvironment env, int classJREF, Address methodNameAddress, Address methodSigAddress)
env
- A JREF index for the JNI environment objectclassJREF
- a JREF index for the class objectmethodNameAddress
- a raw address to a null-terminated string in C for the method namemethodSigAddress
- a raw address to a null-terminated string in C for NoSuchMethodError
- if the method is not found
ExceptionInInitializerError
- if the initializer fails
OutOfMemoryError
- if the system runs out of memoryprivate static int CallStaticObjectMethod(JNIEnvironment env, int classJREF, int methodID) throws Exception
env
- A JREF index for the JNI environment objectclassJREF
- a JREF index for the class objectmethodID
- id of a MethodReference
Exception
private static int CallStaticObjectMethodV(JNIEnvironment env, int classJREF, int methodID, Address argAddress) throws Exception
env
- A JREF index for the JNI environment objectclassJREF
- a JREF index for the class objectmethodID
- id of a MethodReferenceargAddress
- a raw address to a variable argument list, each element is 1-word or 2-words
of the appropriate type for the method invocation
Exception
private static int CallStaticObjectMethodA(JNIEnvironment env, int classJREF, int methodID, Address argAddress) throws Exception
env
- A JREF index for the JNI environment objectclassJREF
- a JREF index for the class objectmethodID
- id of a MethodReferenceargAddress
- a raw address to an array of unions in C, each element is 2-word and hold an argument
of the appropriate type for the method invocation
Exception
private static boolean CallStaticBooleanMethod(JNIEnvironment env, int classJREF, int methodID) throws Exception
env
- A JREF index for the JNI environment objectclassJREF
- a JREF index for the class objectmethodID
- id of a MethodReference
Exception
private static boolean CallStaticBooleanMethodV(JNIEnvironment env, int classJREF, int methodID, Address argAddress) throws Exception
env
- A JREF index for the JNI environment objectclassJREF
- a JREF index for the class objectmethodID
- id of a MethodReferenceargAddress
- a raw address to a variable argument list, each element is 1-word or 2-words
of the appropriate type for the method invocation
Exception
private static boolean CallStaticBooleanMethodA(JNIEnvironment env, int classJREF, int methodID, Address argAddress) throws Exception
env
- A JREF index for the JNI environment objectclassJREF
- a JREF index for the class objectmethodID
- id of a MethodReferenceargAddress
- a raw address to an array of unions in C, each element is 2-word and hold an argument
of the appropriate type for the method invocation
Exception
private static byte CallStaticByteMethod(JNIEnvironment env, int classJREF, int methodID) throws Exception
env
- A JREF index for the JNI environment objectclassJREF
- a JREF index for the class objectmethodID
- id of a MethodReference
Exception
private static byte CallStaticByteMethodV(JNIEnvironment env, int classJREF, int methodID, Address argAddress) throws Exception
env
- A JREF index for the JNI environment objectclassJREF
- a JREF index for the class objectmethodID
- id of a MethodReferenceargAddress
- a raw address to a variable argument list, each element is 1-word or 2-words
of the appropriate type for the method invocation
Exception
private static byte CallStaticByteMethodA(JNIEnvironment env, int classJREF, int methodID, Address argAddress) throws Exception
env
- A JREF index for the JNI environment objectclassJREF
- a JREF index for the class objectmethodID
- id of a MethodReferenceargAddress
- a raw address to an array of unions in C, each element is 2-word and hold an argument
of the appropriate type for the method invocation
Exception
private static char CallStaticCharMethod(JNIEnvironment env, int classJREF, int methodID) throws Exception
env
- A JREF index for the JNI environment objectclassJREF
- a JREF index for the class objectmethodID
- id of a MethodReference
Exception
private static char CallStaticCharMethodV(JNIEnvironment env, int classJREF, int methodID, Address argAddress) throws Exception
env
- A JREF index for the JNI environment objectclassJREF
- a JREF index for the class objectmethodID
- id of a MethodReferenceargAddress
- a raw address to a variable argument list, each element is 1-word or 2-words
of the appropriate type for the method invocation
Exception
private static char CallStaticCharMethodA(JNIEnvironment env, int classJREF, int methodID, Address argAddress) throws Exception
env
- A JREF index for the JNI environment objectclassJREF
- a JREF index for the class objectmethodID
- id of a MethodReferenceargAddress
- a raw address to an array of unions in C, each element is 2-word and hold an argument
of the appropriate type for the method invocation
Exception
private static short CallStaticShortMethod(JNIEnvironment env, int classJREF, int methodID) throws Exception
env
- A JREF index for the JNI environment objectclassJREF
- a JREF index for the class objectmethodID
- id of a MethodReference
Exception
private static short CallStaticShortMethodV(JNIEnvironment env, int classJREF, int methodID, Address argAddress) throws Exception
env
- A JREF index for the JNI environment objectclassJREF
- a JREF index for the class objectmethodID
- id of a MethodReferenceargAddress
- a raw address to a variable argument list, each element is 1-word or 2-words
of the appropriate type for the method invocation
Exception
private static short CallStaticShortMethodA(JNIEnvironment env, int classJREF, int methodID, Address argAddress) throws Exception
env
- A JREF index for the JNI environment objectclassJREF
- a JREF index for the class objectmethodID
- id of a MethodReferenceargAddress
- a raw address to an array of unions in C, each element is 2-word and hold an argument
of the appropriate type for the method invocation
Exception
private static int CallStaticIntMethod(JNIEnvironment env, int classJREF, int methodID) throws Exception
env
- A JREF index for the JNI environment objectclassJREF
- a JREF index for the class objectmethodID
- id of a MethodReference
Exception
private static int CallStaticIntMethodV(JNIEnvironment env, int classJREF, int methodID, Address argAddress) throws Exception
env
- A JREF index for the JNI environment objectclassJREF
- a JREF index for the class objectmethodID
- id of a MethodReferenceargAddress
- a raw address to a variable argument list, each element is 1-word or 2-words
of the appropriate type for the method invocation
Exception
private static int CallStaticIntMethodA(JNIEnvironment env, int classJREF, int methodID, Address argAddress) throws Exception
env
- A JREF index for the JNI environment objectclassJREF
- a JREF index for the class objectmethodID
- id of a MethodReferenceargAddress
- a raw address to an array of unions in C, each element is 2-word and hold an argument
of the appropriate type for the method invocation
Exception
private static long CallStaticLongMethod(JNIEnvironment env, int classJREF, int methodID) throws Exception
env
- A JREF index for the JNI environment objectclassJREF
- a JREF index for the class objectmethodID
- id of a MethodReference
Exception
private static long CallStaticLongMethodV(JNIEnvironment env, int classJREF, int methodID, Address argAddress) throws Exception
env
- A JREF index for the JNI environment objectclassJREF
- a JREF index for the class objectmethodID
- id of a MethodReferenceargAddress
- a raw address to a variable argument list, each element is 1-word or 2-words
of the appropriate type for the method invocation
Exception
private static long CallStaticLongMethodA(JNIEnvironment env, int classJREF, int methodID, Address argAddress) throws Exception
env
- A JREF index for the JNI environment objectclassJREF
- a JREF index for the class objectmethodID
- id of a MethodReferenceargAddress
- a raw address to an array of unions in C, each element is 2-word and hold an argument
of the appropriate type for the method invocation
Exception
private static float CallStaticFloatMethod(JNIEnvironment env, int classJREF, int methodID) throws Exception
env
- A JREF index for the JNI environment objectclassJREF
- a JREF index for the class objectmethodID
- id of a MethodReference
Exception
private static float CallStaticFloatMethodV(JNIEnvironment env, int classJREF, int methodID, Address argAddress) throws Exception
env
- A JREF index for the JNI environment objectclassJREF
- a JREF index for the class objectmethodID
- id of a MethodReferenceargAddress
- a raw address to a variable argument list, each element is 1-word or 2-words
of the appropriate type for the method invocation
Exception
private static float CallStaticFloatMethodA(JNIEnvironment env, int classJREF, int methodID, Address argAddress) throws Exception
env
- A JREF index for the JNI environment objectclassJREF
- a JREF index for the class objectmethodID
- id of a MethodReferenceargAddress
- a raw address to an array of unions in C, each element is 2-word and hold an argument
of the appropriate type for the method invocation
Exception
private static double CallStaticDoubleMethod(JNIEnvironment env, int classJREF, int methodID) throws Exception
env
- A JREF index for the JNI environment objectclassJREF
- a JREF index for the class objectmethodID
- an id of a MethodReference
Exception
private static double CallStaticDoubleMethodV(JNIEnvironment env, int classJREF, int methodID, Address argAddress) throws Exception
env
- A JREF index for the JNI environment objectclassJREF
- a JREF index for the class objectmethodID
- an id of a MethodReferenceargAddress
- a raw address to a variable argument list, each element is 1-word or 2-words
of the appropriate type for the method invocation
Exception
private static double CallStaticDoubleMethodA(JNIEnvironment env, int classJREF, int methodID, Address argAddress) throws Exception
env
- A JREF index for the JNI environment objectclassJREF
- a JREF index for the class objectmethodID
- id of a MethodReferenceargAddress
- a raw address to an array of unions in C, each element is 2-word and hold an argument
of the appropriate type for the method invocation
Exception
private static void CallStaticVoidMethod(JNIEnvironment env, int classJREF, int methodID) throws Exception
env
- A JREF index for the JNI environment objectclassJREF
- a JREF index for the class objectmethodID
- id of a MethodReference
Exception
private static void CallStaticVoidMethodV(JNIEnvironment env, int classJREF, int methodID, Address argAddress) throws Exception
env
- A JREF index for the JNI environment objectclassJREF
- a JREF index for the class objectmethodID
- id of a MethodReferenceargAddress
- a raw address to an array of unions in C, each element is 2-word and hold an argument
of the appropriate type for the method invocation
Exception
private static void CallStaticVoidMethodA(JNIEnvironment env, int classJREF, int methodID, Address argAddress) throws Exception
env
- A JREF index for the JNI environment objectclassJREF
- a JREF index for the class objectmethodID
- id of a MethodReferenceargAddress
- a raw address to an array of unions in C, each element is 2-word and hold an argument
of the appropriate type for the method invocation
Exception
private static int GetStaticFieldID(JNIEnvironment env, int classJREF, Address fieldNameAddress, Address descriptorAddress)
env
- A JREF index for the JNI environment objectclassJREF
- a JREF index for the RVMClass objectfieldNameAddress
- a raw address to a null-terminated string in C for the field namedescriptorAddress
- a raw address to a null-terminated string in C for the descriptor
NoSuchFieldError
- if the specified field cannot be found
ExceptionInInitializerError
- if the class initializer fails
OutOfMemoryError
- if the system runs out of memoryprivate static int GetStaticObjectField(JNIEnvironment env, int classJREF, int fieldID)
env
- A JREF index for the JNI environment objectclassJREF
- a JREF index for the RVMClass objectfieldID
- the id for the RVMField that describes this field
private static int GetStaticBooleanField(JNIEnvironment env, int classJREF, int fieldID)
env
- A JREF index for the JNI environment objectclassJREF
- a JREF index for the RVMClass objectfieldID
- the id for the RVMField that describes this field
private static int GetStaticByteField(JNIEnvironment env, int classJREF, int fieldID)
env
- A JREF index for the JNI environment objectclassJREF
- a JREF index for the RVMClass objectfieldID
- the id for the RVMField that describes this field
private static int GetStaticCharField(JNIEnvironment env, int classJREF, int fieldID)
env
- A JREF index for the JNI environment objectclassJREF
- a JREF index for the RVMClass objectfieldID
- the id for the RVMField that describes this field
private static int GetStaticShortField(JNIEnvironment env, int classJREF, int fieldID)
env
- A JREF index for the JNI environment objectclassJREF
- a JREF index for the RVMClass objectfieldID
- the id for the RVMField that describes this field
private static int GetStaticIntField(JNIEnvironment env, int classJREF, int fieldID)
env
- A JREF index for the JNI environment objectclassJREF
- a JREF index for the RVMClass objectfieldID
- the id for the RVMField that describes this field
private static long GetStaticLongField(JNIEnvironment env, int classJREF, int fieldID)
env
- A JREF index for the JNI environment objectclassJREF
- a JREF index for the RVMClass objectfieldID
- the id for the RVMField that describes this field
private static float GetStaticFloatField(JNIEnvironment env, int classJREF, int fieldID)
env
- A JREF index for the JNI environment objectclassJREF
- a JREF index for the RVMClass objectfieldID
- the id for the RVMField that describes this field
private static double GetStaticDoubleField(JNIEnvironment env, int classJREF, int fieldID)
env
- A JREF index for the JNI environment objectclassJREF
- a JREF index for the RVMClass objectfieldID
- the id for the RVMField that describes this field
private static void SetStaticObjectField(JNIEnvironment env, int classJREF, int fieldID, int objectJREF)
env
- A JREF index for the JNI environment objectclassJREF
- A JREF index for the RVMClass
objectfieldID
- The id for the RVMField
that describes this
fieldobjectJREF
- A JREF index of the value to assignprivate static void SetStaticBooleanField(JNIEnvironment env, int classJREF, int fieldID, boolean fieldValue)
env
- A JREF index for the JNI environment objectclassJREF
- A JREF index for the RVMClass objectfieldID
- the id for the RVMField that describes this fieldfieldValue
- The value to assignprivate static void SetStaticByteField(JNIEnvironment env, int classJREF, int fieldID, byte fieldValue)
env
- A JREF index for the JNI environment objectclassJREF
- a JREF index for the RVMClass objectfieldID
- the id for the RVMField that describes this fieldfieldValue
- the value to assignprivate static void SetStaticCharField(JNIEnvironment env, int classJREF, int fieldID, char fieldValue)
env
- A JREF index for the JNI environment objectclassJREF
- a JREF index for the RVMClass objectfieldID
- the id for the RVMField that describes this fieldfieldValue
- The value to assignprivate static void SetStaticShortField(JNIEnvironment env, int classJREF, int fieldID, short fieldValue)
env
- A JREF index for the JNI environment objectclassJREF
- a JREF index for the RVMClass objectfieldID
- the id for the RVMField that describes this fieldfieldValue
- The value to assignprivate static void SetStaticIntField(JNIEnvironment env, int classJREF, int fieldID, int fieldValue)
env
- A JREF index for the JNI environment objectclassJREF
- a JREF index for the RVMClass objectfieldID
- the id for the RVMField that describes this fieldfieldValue
- The value to assignprivate static void SetStaticLongField(JNIEnvironment env, int classJREF, int fieldID, long fieldValue)
env
- A JREF index for the JNI environment objectclassJREF
- a JREF index for the RVMClass objectfieldID
- the id for the RVMField that describes this fieldfieldValue
- The value to assignprivate static void SetStaticFloatField(JNIEnvironment env, int classJREF, int fieldID, float fieldValue)
env
- A JREF index for the JNI environment objectclassJREF
- a JREF index for the RVMClass objectfieldID
- the id for the RVMField that describes this fieldfieldValue
- The value to assignprivate static void SetStaticDoubleField(JNIEnvironment env, int classJREF, int fieldID, double fieldValue)
env
- A JREF index for the JNI environment objectclassJREF
- a JREF index for the RVMClass objectfieldID
- the id for the RVMField that describes this fieldfieldValue
- The value to assignprivate static int NewString(JNIEnvironment env, Address uchars, int len)
env
- A JREF index for the JNI environment objectuchars
- address of C array of 16 bit unicode characterslen
- the number of chars in the C array
OutOfMemoryError
private static int GetStringLength(JNIEnvironment env, int objJREF)
env
- A JREF index for the JNI environment objectobjJREF
- a JREF index for the String object
private static Address GetStringChars(JNIEnvironment env, int strJREF, Address isCopyAddress)
env
- A JREF index for the JNI environment objectstrJREF
- a JREF index for the String objectisCopyAddress
- address of isCopy jboolean (an int)
OutOfMemoryError
- if the system runs out of memoryprivate static void ReleaseStringChars(JNIEnvironment env, int objJREF, Address bufAddress)
env
- A JREF index for the JNI environment objectobjJREF
- a JREF index for the String objectbufAddress
- address of buffer to releaseprivate static int NewStringUTF(JNIEnvironment env, Address utf8bytes)
env
- A JREF index for the JNI environment objectutf8bytes
- address of C array of 8 bit utf8 bytes
OutOfMemoryError
- if the system runs out of memoryprivate static int GetStringUTFLength(JNIEnvironment env, int objJREF)
env
- A JREF index for the JNI environment objectobjJREF
- a JREF index for the String object
private static Address GetStringUTFChars(JNIEnvironment env, int strJREF, Address isCopyAddress)
env
- A JREF index for the JNI environment objectstrJREF
- a JREF index for the String objectisCopyAddress
- address of isCopy jboolean (an int)
OutOfMemoryError
- if the system runs out of memoryprivate static void ReleaseStringUTFChars(JNIEnvironment env, int objJREF, Address bufAddress)
env
- A JREF index for the JNI environment objectobjJREF
- a JREF index for the String objectbufAddress
- address of buffer to releaseprivate static int GetArrayLength(JNIEnvironment env, int arrayJREF)
env
- A JREF index for the JNI environment objectarrayJREF
- a JREF index for the source array
private static int NewObjectArray(JNIEnvironment env, int length, int classJREF, int initElementJREF)
env
- A JREF index for the JNI environment objectlength
- the size of the new arrayclassJREF
- a JREF index for the class of the elementinitElementJREF
- a JREF index for the value to initialize the array elements
OutOfMemoryError
- if the system runs out of memoryprivate static int GetObjectArrayElement(JNIEnvironment env, int arrayJREF, int index)
env
- A JREF index for the JNI environment objectarrayJREF
- a JREF index for the source arrayindex
- the index for the targeted element
ArrayIndexOutOfBoundsException
- if the index is out of rangeprivate static void SetObjectArrayElement(JNIEnvironment env, int arrayJREF, int index, int objectJREF)
env
- A JREF index for the JNI environment objectarrayJREF
- a JREF index for the source arrayindex
- the index for the targeted elementobjectJREF
- a JREF index for the object to store into the array
ArrayStoreException
- if the element types do not match
ArrayIndexOutOfBoundsException if the index is out of rangeprivate static int NewBooleanArray(JNIEnvironment env, int length)
env
- A JREF index for the JNI environment objectlength
- the size of the new array
OutOfMemoryError
- if the system runs out of memoryprivate static int NewByteArray(JNIEnvironment env, int length)
env
- A JREF index for the JNI environment objectlength
- the size of the new array
OutOfMemoryError
- if the system runs out of memoryprivate static int NewCharArray(JNIEnvironment env, int length)
env
- A JREF index for the JNI environment objectlength
- the size of the new array
OutOfMemoryError
- if the system runs out of memoryprivate static int NewShortArray(JNIEnvironment env, int length)
env
- A JREF index for the JNI environment objectlength
- the size of the new array
OutOfMemoryError
- if the system runs out of memoryprivate static int NewIntArray(JNIEnvironment env, int length)
env
- A JREF index for the JNI environment objectlength
- the size of the new array
OutOfMemoryError
- if the system runs out of memoryprivate static int NewLongArray(JNIEnvironment env, int length)
env
- A JREF index for the JNI environment objectlength
- the size of the new array
OutOfMemoryError
- if the system runs out of memoryprivate static int NewFloatArray(JNIEnvironment env, int length)
env
- A JREF index for the JNI environment objectlength
- the size of the new array
OutOfMemoryError
- if the system runs out of memoryprivate static int NewDoubleArray(JNIEnvironment env, int length)
env
- A JREF index for the JNI environment objectlength
- the size of the new array
OutOfMemoryError
- if the system runs out of memoryprivate static Address GetBooleanArrayElements(JNIEnvironment env, int arrayJREF, Address isCopyAddress)
env
- A JREF index for the JNI environment objectarrayJREF
- a JREF index for the source arrayisCopyAddress
- address of a flag to indicate whether the returned array is a copy or a direct pointer
OutOfMemoryError
- if the system runs out of memoryprivate static Address GetByteArrayElements(JNIEnvironment env, int arrayJREF, Address isCopyAddress)
env
- A JREF index for the JNI environment objectarrayJREF
- a JREF index for the source arrayisCopyAddress
- address of a flag to indicate whether the returned array is a copy or a direct pointer
OutOfMemoryError
- if the system runs out of memoryprivate static Address GetCharArrayElements(JNIEnvironment env, int arrayJREF, Address isCopyAddress)
env
- A JREF index for the JNI environment objectarrayJREF
- a JREF index for the source arrayisCopyAddress
- address of a flag to indicate whether the returned array is a copy or a direct pointer
OutOfMemoryError
- if the system runs out of memoryprivate static Address GetShortArrayElements(JNIEnvironment env, int arrayJREF, Address isCopyAddress)
env
- A JREF index for the JNI environment objectarrayJREF
- a JREF index for the source arrayisCopyAddress
- address of a flag to indicate whether the returned array is a copy or a direct pointer
OutOfMemoryError
- if the system runs out of memoryprivate static Address GetIntArrayElements(JNIEnvironment env, int arrayJREF, Address isCopyAddress)
env
- A JREF index for the JNI environment objectarrayJREF
- a JREF index for the source arrayisCopyAddress
- address of a flag to indicate whether the returned array is a copy or a direct pointer
OutOfMemoryError
- if the system runs out of memoryprivate static Address GetLongArrayElements(JNIEnvironment env, int arrayJREF, Address isCopyAddress)
env
- A JREF index for the JNI environment objectarrayJREF
- a JREF index for the source arrayisCopyAddress
- address of a flag to indicate whether the returned array is a copy or a direct pointer
OutOfMemoryError
- if the system runs out of memoryprivate static Address GetFloatArrayElements(JNIEnvironment env, int arrayJREF, Address isCopyAddress)
env
- A JREF index for the JNI environment objectarrayJREF
- a JREF index for the source arrayisCopyAddress
- address of a flag to indicate whether the returned array is a copy or a direct pointer
OutOfMemoryError
- if the system runs out of memoryprivate static Address GetDoubleArrayElements(JNIEnvironment env, int arrayJREF, Address isCopyAddress)
env
- A JREF index for the JNI environment objectarrayJREF
- a JREF index for the source arrayisCopyAddress
- address of a flag to indicate whether the returned array is a copy or a direct pointer
OutOfMemoryError
- if the system runs out of memoryprivate static void ReleaseBooleanArrayElements(JNIEnvironment env, int arrayJREF, Address copyBufferAddress, int releaseMode)
env
- A JREF index for the JNI environment objectarrayJREF
- a JREF index for the source arraycopyBufferAddress
- the address of the copy of the arrayreleaseMode
- one of 3 codes to indicate whether to copy back or free the array:
releaseMode 0: copy back and free the buffer
releaseMode 1: JNI_COMMIT, copy back but do not free the buffer
releaseMode 2: JNI_ABORT, free the buffer with copying backprivate static void ReleaseByteArrayElements(JNIEnvironment env, int arrayJREF, Address copyBufferAddress, int releaseMode)
env
- A JREF index for the JNI environment objectarrayJREF
- a JREF index for the source arraycopyBufferAddress
- the address of the copy of the arrayreleaseMode
- one of 3 codes to indicate whether to copy back or free the array:
releaseMode 0: copy back and free the buffer
releaseMode 1: JNI_COMMIT, copy back but do not free the buffer
releaseMode 2: JNI_ABORT, free the buffer with copying backprivate static void ReleaseCharArrayElements(JNIEnvironment env, int arrayJREF, Address copyBufferAddress, int releaseMode)
env
- A JREF index for the JNI environment objectarrayJREF
- a JREF index for the source arraycopyBufferAddress
- the address of the copy of the arrayreleaseMode
- one of 3 codes to indicate whether to copy back or free the array:
releaseMode 0: copy back and free the buffer
releaseMode 1: JNI_COMMIT, copy back but do not free the buffer
releaseMode 2: JNI_ABORT, free the buffer with copying backprivate static void ReleaseShortArrayElements(JNIEnvironment env, int arrayJREF, Address copyBufferAddress, int releaseMode)
env
- A JREF index for the JNI environment objectarrayJREF
- a JREF index for the source arraycopyBufferAddress
- the address of the copy of the arrayreleaseMode
- one of 3 codes to indicate whether to copy back or free the array:
releaseMode 0: copy back and free the buffer
releaseMode 1: JNI_COMMIT, copy back but do not free the buffer
releaseMode 2: JNI_ABORT, free the buffer with copying backprivate static void ReleaseIntArrayElements(JNIEnvironment env, int arrayJREF, Address copyBufferAddress, int releaseMode)
env
- A JREF index for the JNI environment objectarrayJREF
- a JREF index for the source arraycopyBufferAddress
- the address of the copy of the arrayreleaseMode
- one of 3 codes to indicate whether to copy back or free the array:
releaseMode 0: copy back and free the buffer
releaseMode 1: JNI_COMMIT, copy back but do not free the buffer
releaseMode 2: JNI_ABORT, free the buffer with copying backprivate static void ReleaseLongArrayElements(JNIEnvironment env, int arrayJREF, Address copyBufferAddress, int releaseMode)
env
- A JREF index for the JNI environment objectarrayJREF
- a JREF index for the source arraycopyBufferAddress
- the address of the copy of the arrayreleaseMode
- one of 3 codes to indicate whether to copy back or free the array:
releaseMode 0: copy back and free the buffer
releaseMode 1: JNI_COMMIT, copy back but do not free the buffer
releaseMode 2: JNI_ABORT, free the buffer with copying backprivate static void ReleaseFloatArrayElements(JNIEnvironment env, int arrayJREF, Address copyBufferAddress, int releaseMode)
env
- A JREF index for the JNI environment objectarrayJREF
- a JREF index for the source arraycopyBufferAddress
- the address of the copy of the arrayreleaseMode
- one of 3 codes to indicate whether to copy back or free the array:
releaseMode 0: copy back and free the buffer
releaseMode 1: JNI_COMMIT, copy back but do not free the buffer
releaseMode 2: JNI_ABORT, free the buffer with copying backprivate static void ReleaseDoubleArrayElements(JNIEnvironment env, int arrayJREF, Address copyBufferAddress, int releaseMode)
env
- A JREF index for the JNI environment objectarrayJREF
- a JREF index for the source arraycopyBufferAddress
- the address of the copy of the arrayreleaseMode
- one of 3 codes to indicate whether to copy back or free the array:
releaseMode 0: copy back and free the buffer
releaseMode 1: JNI_COMMIT, copy back but do not free the buffer
releaseMode 2: JNI_ABORT, free the buffer with copying backprivate static void GetBooleanArrayRegion(JNIEnvironment env, int arrayJREF, int startIndex, int length, Address bufAddress)
env
- A JREF index for the JNI environment objectarrayJREF
- a JREF index for the source arraystartIndex
- the starting index to copylength
- the number of elements to copybufAddress
- the destination address in native to copy to
ArrayIndexOutOfBoundsException
- if one of the indices in the region is not validprivate static void GetByteArrayRegion(JNIEnvironment env, int arrayJREF, int startIndex, int length, Address bufAddress)
env
- A JREF index for the JNI environment objectarrayJREF
- a JREF index for the source arraystartIndex
- the starting index to copylength
- the number of elements to copybufAddress
- the destination address in native to copy to
ArrayIndexOutOfBoundsException
- if one of the indices in the region is not validprivate static void GetCharArrayRegion(JNIEnvironment env, int arrayJREF, int startIndex, int length, Address bufAddress)
env
- A JREF index for the JNI environment objectarrayJREF
- a JREF index for the source arraystartIndex
- the starting index to copylength
- the number of elements to copybufAddress
- the destination address in native to copy to
ArrayIndexOutOfBoundsException
- if one of the indices in the region is not validprivate static void GetShortArrayRegion(JNIEnvironment env, int arrayJREF, int startIndex, int length, Address bufAddress)
env
- A JREF index for the JNI environment objectarrayJREF
- a JREF index for the source arraystartIndex
- the starting index to copylength
- the number of elements to copybufAddress
- the destination address in native to copy to
ArrayIndexOutOfBoundsException
- if one of the indices in the region is not validprivate static void GetIntArrayRegion(JNIEnvironment env, int arrayJREF, int startIndex, int length, Address bufAddress)
env
- A JREF index for the JNI environment objectarrayJREF
- a JREF index for the source arraystartIndex
- the starting index to copylength
- the number of elements to copybufAddress
- the destination address in native to copy to
ArrayIndexOutOfBoundsException
- if one of the indices in the region is not validprivate static void GetLongArrayRegion(JNIEnvironment env, int arrayJREF, int startIndex, int length, Address bufAddress)
env
- A JREF index for the JNI environment objectarrayJREF
- a JREF index for the source arraystartIndex
- the starting index to copylength
- the number of elements to copybufAddress
- the destination address in native to copy to
ArrayIndexOutOfBoundsException
- if one of the indices in the region is not validprivate static void GetFloatArrayRegion(JNIEnvironment env, int arrayJREF, int startIndex, int length, Address bufAddress)
env
- A JREF index for the JNI environment objectarrayJREF
- a JREF index for the source arraystartIndex
- the starting index to copylength
- the number of elements to copybufAddress
- the destination address in native to copy to
ArrayIndexOutOfBoundsException
- if one of the indices in the region is not validprivate static void GetDoubleArrayRegion(JNIEnvironment env, int arrayJREF, int startIndex, int length, Address bufAddress)
env
- A JREF index for the JNI environment objectarrayJREF
- a JREF index for the source arraystartIndex
- the starting index to copylength
- the number of elements to copybufAddress
- the destination address in native to copy to
ArrayIndexOutOfBoundsException
- if one of the indices in the region is not validprivate static void SetBooleanArrayRegion(JNIEnvironment env, int arrayJREF, int startIndex, int length, Address bufAddress)
env
- A JREF index for the JNI environment objectarrayJREF
- a JREF index for the destination arraystartIndex
- the starting index to copylength
- the number of elements to copybufAddress
- the source address in native to copy from
ArrayIndexOutOfBoundsException
- if one of the indices in the region is not validprivate static void SetByteArrayRegion(JNIEnvironment env, int arrayJREF, int startIndex, int length, Address bufAddress)
env
- A JREF index for the JNI environment objectarrayJREF
- a JREF index for the destination arraystartIndex
- the starting index to copylength
- the number of elements to copybufAddress
- the source address in native to copy from
ArrayIndexOutOfBoundsException
- if one of the indices in the region is not validprivate static void SetCharArrayRegion(JNIEnvironment env, int arrayJREF, int startIndex, int length, Address bufAddress)
env
- A JREF index for the JNI environment objectarrayJREF
- a JREF index for the destination arraystartIndex
- the starting index to copylength
- the number of elements to copybufAddress
- the source address in native to copy from
ArrayIndexOutOfBoundsException
- if one of the indices in the region is not validprivate static void SetShortArrayRegion(JNIEnvironment env, int arrayJREF, int startIndex, int length, Address bufAddress)
env
- A JREF index for the JNI environment objectarrayJREF
- a JREF index for the destination arraystartIndex
- the starting index to copylength
- the number of elements to copybufAddress
- the source address in native to copy from
ArrayIndexOutOfBoundsException
- if one of the indices in the region is not validprivate static void SetIntArrayRegion(JNIEnvironment env, int arrayJREF, int startIndex, int length, Address bufAddress)
env
- A JREF index for the JNI environment objectarrayJREF
- a JREF index for the destination arraystartIndex
- the starting index to copylength
- the number of elements to copybufAddress
- the source address in native to copy from
ArrayIndexOutOfBoundsException
- if one of the indices in the region is not validprivate static void SetLongArrayRegion(JNIEnvironment env, int arrayJREF, int startIndex, int length, Address bufAddress)
env
- A JREF index for the JNI environment objectarrayJREF
- a JREF index for the destination arraystartIndex
- the starting index to copylength
- the number of elements to copybufAddress
- the source address in native to copy from
ArrayIndexOutOfBoundsException
- if one of the indices in the region is not validprivate static void SetFloatArrayRegion(JNIEnvironment env, int arrayJREF, int startIndex, int length, Address bufAddress)
env
- A JREF index for the JNI environment objectarrayJREF
- a JREF index for the destination arraystartIndex
- the starting index to copylength
- the number of elements to copybufAddress
- the source address in native to copy from
ArrayIndexOutOfBoundsException
- if one of the indices in the region is not validprivate static void SetDoubleArrayRegion(JNIEnvironment env, int arrayJREF, int startIndex, int length, Address bufAddress)
env
- A JREF index for the JNI environment objectarrayJREF
- a JREF index for the destination arraystartIndex
- the starting index to copylength
- the number of elements to copybufAddress
- the source address in native to copy from
ArrayIndexOutOfBoundsException
- if one of the indices in the region is not validprivate static int RegisterNatives(JNIEnvironment env, int classJREF, Address methodsAddress, int nmethods)
env
- A JREF index for the JNI environment objectclassJREF
- a JREF index for the class to register native methods inmethodsAddress
- the address of an array of native methods to be registerednmethods
- the number of native methods in the array
NoSuchMethodError
- if a specified method cannot be found or is not nativeprivate static int UnregisterNatives(JNIEnvironment env, int classJREF)
env
- A JREF index for the JNI environment objectclassJREF
- a JREF index for the class to register native methods in
private static int MonitorEnter(JNIEnvironment env, int objJREF)
env
- A JREF index for the JNI environment objectobjJREF
- a JREF index for the object to lock
private static int MonitorExit(JNIEnvironment env, int objJREF)
env
- A JREF index for the JNI environment objectobjJREF
- a JREF index for the object to unlock
private static int GetJavaVM(JNIEnvironment env, Address StarStarJavaVM)
private static int FromReflectedMethod(JNIEnvironment env, int methodJREF)
env
- A JREF index for the JNI environment objectmethodJREF
- a JREF index for the java.lang.reflect.Method or
java.lang.reflect.Constructor object.
private static int FromReflectedField(JNIEnvironment env, int fieldJREF)
env
- A JREF index for the JNI environment objectfieldJREF
- a JREF index for a java.lang.reflect.Field methodID
private static int ToReflectedMethod(JNIEnvironment env, int clsJREF, int methodID, boolean isStatic)
env
- A JREF index for the JNI environment objectclsJREF
- The JREF index of the class from which methodID was
derived.methodID
- a jmethodID to turn into a reflected methodisStatic
- argument that is not specified in Sun's JNI 1.2 spec,
but IS present in the 1.4.2 JDK's implementation! Our
implementation will just ignore it, in any case. This is a
good example of why the same entity
shouldn't get to write both the spec and the reference
implementation.
private static int ToReflectedField(JNIEnvironment env, int clsJREF, int fieldID, boolean isStatic)
env
- A JREF index for the JNI environment objectclsJREF
- The JREF index of the class from which fieldID was
derived.fieldID
- a jfieldIDisStatic
- argument that is not specified in Sun's JNI 1.2 spec,
but IS present in the 1.4.2 JDK's implementation! Our
implementation will just ignore it, in any case. This is a
good example of why the same entity
shouldn't get to write both the spec and the reference
implementation.
private static int PushLocalFrame(JNIEnvironment env, int capacity)
private static int PopLocalFrame(JNIEnvironment env, int resultJREF)
private static int NewLocalRef(JNIEnvironment env, int oldJREF)
env
- A JREF index for the JNI environment objectoldJREF
- JREF index of an existing reference.
private static int EnsureLocalCapacity(JNIEnvironment env, int capacity)
env
- A JREF index for the JNI environment objectcapacity
- how many more local references do we want to ensure can
be created?
private static void GetStringRegion(JNIEnvironment env, int strJREF, int start, int len, Address buf)
env
- A JREF index for the JNI environment objectstrJREF
- a JREF index for the String objectstart
- index to start reading characters from the stringlen
- how many characters to readbuf
- the buffer to copy the region into
StringIndexOutOfBoundsException
- if asked for an out-of-range
region of the string.private static void GetStringUTFRegion(JNIEnvironment env, int strJREF, int start, int len, Address buf)
env
- A JREF index for the JNI environment objectstrJREF
- a JREF index for the String objectstart
- index to start reading characters from the stringlen
- how many characters to read from the stringbuf
- the buffer to copy the region into -- assume it's big enough
StringIndexOutOfBoundsException
- if asked for an out-of-range
region of the string.private static Address GetPrimitiveArrayCritical(JNIEnvironment env, int arrayJREF, Address isCopyAddress)
env
- A JREF index for the JNI environment objectarrayJREF
- a JREF index for the primitive array in JavaisCopyAddress
- address of isCopy jboolean (an int)
OutOfMemoryError
- is specified but will not be thrown in this implementation
since no copy will be madeprivate static void ReleasePrimitiveArrayCritical(JNIEnvironment env, int arrayJREF, Address arrayCopyAddress, int mode)
env
- A JREF index for the JNI environment objectarrayJREF
- a JREF index for the primitive array in JavaarrayCopyAddress
- mode
- a flag indicating whether to update the Java array with the
copy and whether to free the copy. For this implementation,
no copy was made so this flag has no effect.private static Address GetStringCritical(JNIEnvironment env, int strJREF, Address isCopyAddress)
env
- A JREF index for the JNI environment objectstrJREF
- a JREF index for the string in JavaisCopyAddress
- address of isCopy jboolean (an int)
private static void ReleaseStringCritical(JNIEnvironment env, int strJREF, Address carray)
env
- A JREF index for the JNI environment objectstrJREF
- a JREF index for the string in Java (ignored)carray
- the pointer returned by GetStringCritical (ignored)private static int NewWeakGlobalRef(JNIEnvironment env, int objectJREF)
private static void DeleteWeakGlobalRef(JNIEnvironment env, int refJREF)
private static int ExceptionCheck(JNIEnvironment env)
private static int NewDirectByteBuffer(JNIEnvironment env, Address address, long capacity)
private static Address GetDirectBufferAddress(JNIEnvironment env, int bufJREF)
private static long GetDirectBufferCapacity(JNIEnvironment env, int bufJREF)
private static int reserved0(JNIEnvironment env)
private static int reserved1(JNIEnvironment env)
private static int reserved2(JNIEnvironment env)
private static int reserved3(JNIEnvironment env)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |