318 319 /* 320 * Returns the class in which the code invoking the native method 321 * belongs. 322 * 323 * Note that in JDK 1.1, native methods did not create a frame. 324 * In 1.2, they do. Therefore native methods like Class.forName 325 * can no longer look at the current frame for the caller class. 326 */ 327 JNIEXPORT jclass JNICALL 328 JVM_GetCallerClass(JNIEnv *env, int n); 329 330 /* 331 * Find primitive classes 332 * utf: class name 333 */ 334 JNIEXPORT jclass JNICALL 335 JVM_FindPrimitiveClass(JNIEnv *env, const char *utf); 336 337 /* 338 * Find a class from a given class loader. Throw ClassNotFoundException 339 * or NoClassDefFoundError depending on the value of the last 340 * argument. 341 */ 342 JNIEXPORT jclass JNICALL 343 JVM_FindClassFromClassLoader(JNIEnv *env, const char *name, jboolean init, 344 jobject loader, jboolean throwError); 345 346 /* 347 * Find a class from a boot class loader. Returns NULL if class not found. 348 */ 349 JNIEXPORT jclass JNICALL 350 JVM_FindClassFromBootLoader(JNIEnv *env, const char *name); 351 352 /* 353 * Find a class from a given class loader. Throws ClassNotFoundException. 354 * name: name of class 355 * init: whether initialization is done 356 * loader: class loader to look up the class. This may not be the same as the caller's 357 * class loader. 358 * caller: initiating class. The initiating class may be null when a security 359 * manager is not installed. 360 */ 361 JNIEXPORT jclass JNICALL 362 JVM_FindClassFromCaller(JNIEnv *env, const char *name, jboolean init, 363 jobject loader, jclass caller); 364 365 /* 366 * Find a class from a given class. | 318 319 /* 320 * Returns the class in which the code invoking the native method 321 * belongs. 322 * 323 * Note that in JDK 1.1, native methods did not create a frame. 324 * In 1.2, they do. Therefore native methods like Class.forName 325 * can no longer look at the current frame for the caller class. 326 */ 327 JNIEXPORT jclass JNICALL 328 JVM_GetCallerClass(JNIEnv *env, int n); 329 330 /* 331 * Find primitive classes 332 * utf: class name 333 */ 334 JNIEXPORT jclass JNICALL 335 JVM_FindPrimitiveClass(JNIEnv *env, const char *utf); 336 337 /* 338 * Find a class from a boot class loader. Returns NULL if class not found. 339 */ 340 JNIEXPORT jclass JNICALL 341 JVM_FindClassFromBootLoader(JNIEnv *env, const char *name); 342 343 /* 344 * Find a class from a given class loader. Throws ClassNotFoundException. 345 * name: name of class 346 * init: whether initialization is done 347 * loader: class loader to look up the class. This may not be the same as the caller's 348 * class loader. 349 * caller: initiating class. The initiating class may be null when a security 350 * manager is not installed. 351 */ 352 JNIEXPORT jclass JNICALL 353 JVM_FindClassFromCaller(JNIEnv *env, const char *name, jboolean init, 354 jobject loader, jclass caller); 355 356 /* 357 * Find a class from a given class. |