jdk/src/share/javavm/export/jvm.h
changeset 16906 44dfee24cb71
parent 15670 eca7bd7651cf
child 18139 9fb8a2d427b5
equal deleted inserted replaced
16905:0419f45c7761 16906:44dfee24cb71
   348 JVM_NewMultiArray(JNIEnv *env, jclass eltClass, jintArray dim);
   348 JVM_NewMultiArray(JNIEnv *env, jclass eltClass, jintArray dim);
   349 
   349 
   350 /*
   350 /*
   351  * java.lang.Class and java.lang.ClassLoader
   351  * java.lang.Class and java.lang.ClassLoader
   352  */
   352  */
   353 /*
   353 
   354  * Returns the class in which the code invoking the native method
   354 #define JVM_DEPTH -1
   355  * belongs.
   355 
   356  *
   356 /*
   357  * Note that in JDK 1.1, native methods did not create a frame.
   357  * Returns the immediate caller class of the native method invoking
   358  * In 1.2, they do. Therefore native methods like Class.forName
   358  * JVM_GetCallerClass.  The Method.invoke and other frames due to
   359  * can no longer look at the current frame for the caller class.
   359  * reflection machinery are skipped.
       
   360  *
       
   361  * The depth parameter must be -1 (JVM_DEPTH). The caller is expected
       
   362  * to be marked with sun.reflect.CallerSensitive.  The JVM will throw
       
   363  * an error if it is not marked propertly.
   360  */
   364  */
   361 JNIEXPORT jclass JNICALL
   365 JNIEXPORT jclass JNICALL
   362 JVM_GetCallerClass(JNIEnv *env, int n);
   366 JVM_GetCallerClass(JNIEnv *env, int depth);
       
   367 
   363 
   368 
   364 /*
   369 /*
   365  * Find primitive classes
   370  * Find primitive classes
   366  * utf: class name
   371  * utf: class name
   367  */
   372  */