• Home
  • Raw
  • Download

Lines Matching refs:env

181 static jclass CacheClass(JNIEnv* env, const char* jni_class_name) {  in CacheClass()  argument
182 ScopedLocalRef<jclass> c(env, env->FindClass(jni_class_name)); in CacheClass()
186 return reinterpret_cast<jclass>(env->NewGlobalRef(c.get())); in CacheClass()
189 static jfieldID CacheField(JNIEnv* env, jclass c, bool is_static, in CacheField() argument
193 ScopedObjectAccess soa(env); in CacheField()
203 ScopedObjectAccess soa(env); in CacheField()
215 static jmethodID CacheMethod(JNIEnv* env, jclass c, bool is_static, in CacheMethod() argument
219 ScopedObjectAccess soa(env); in CacheMethod()
229 ScopedObjectAccess soa(env); in CacheMethod()
241 static jmethodID CacheMethod(JNIEnv* env, const char* klass, bool is_static, in CacheMethod() argument
243 ScopedLocalRef<jclass> java_class(env, env->FindClass(klass)); in CacheMethod()
244 return CacheMethod(env, java_class.get(), is_static, name, signature); in CacheMethod()
247 static jmethodID CachePrimitiveBoxingMethod(JNIEnv* env, char prim_name, const char* boxed_name) { in CachePrimitiveBoxingMethod() argument
248 ScopedLocalRef<jclass> boxed_class(env, env->FindClass(boxed_name)); in CachePrimitiveBoxingMethod()
249 return CacheMethod(env, boxed_class.get(), true, "valueOf", in CachePrimitiveBoxingMethod()
339 void WellKnownClasses::Init(JNIEnv* env) { in Init() argument
344 CacheClass(env, "dalvik/annotation/optimization/CriticalNative"); in Init()
345 …dalvik_annotation_optimization_FastNative = CacheClass(env, "dalvik/annotation/optimization/FastNa… in Init()
347 CacheClass(env, "dalvik/annotation/optimization/NeverCompile"); in Init()
348 dalvik_system_BaseDexClassLoader = CacheClass(env, "dalvik/system/BaseDexClassLoader"); in Init()
349 dalvik_system_DelegateLastClassLoader = CacheClass(env, "dalvik/system/DelegateLastClassLoader"); in Init()
350 dalvik_system_DexClassLoader = CacheClass(env, "dalvik/system/DexClassLoader"); in Init()
351 dalvik_system_DexFile = CacheClass(env, "dalvik/system/DexFile"); in Init()
352 dalvik_system_DexPathList = CacheClass(env, "dalvik/system/DexPathList"); in Init()
353 dalvik_system_DexPathList__Element = CacheClass(env, "dalvik/system/DexPathList$Element"); in Init()
354 dalvik_system_EmulatedStackFrame = CacheClass(env, "dalvik/system/EmulatedStackFrame"); in Init()
355 dalvik_system_InMemoryDexClassLoader = CacheClass(env, "dalvik/system/InMemoryDexClassLoader"); in Init()
356 dalvik_system_PathClassLoader = CacheClass(env, "dalvik/system/PathClassLoader"); in Init()
357 dalvik_system_VMRuntime = CacheClass(env, "dalvik/system/VMRuntime"); in Init()
359 java_lang_annotation_Annotation__array = CacheClass(env, "[Ljava/lang/annotation/Annotation;"); in Init()
360 java_lang_BootClassLoader = CacheClass(env, "java/lang/BootClassLoader"); in Init()
361 java_lang_ClassLoader = CacheClass(env, "java/lang/ClassLoader"); in Init()
362 java_lang_ClassNotFoundException = CacheClass(env, "java/lang/ClassNotFoundException"); in Init()
363 java_lang_Daemons = CacheClass(env, "java/lang/Daemons"); in Init()
364 java_lang_Object = CacheClass(env, "java/lang/Object"); in Init()
365 java_lang_OutOfMemoryError = CacheClass(env, "java/lang/OutOfMemoryError"); in Init()
366 java_lang_Error = CacheClass(env, "java/lang/Error"); in Init()
367 java_lang_IllegalAccessError = CacheClass(env, "java/lang/IllegalAccessError"); in Init()
368 java_lang_NoClassDefFoundError = CacheClass(env, "java/lang/NoClassDefFoundError"); in Init()
369 …java_lang_reflect_InvocationTargetException = CacheClass(env, "java/lang/reflect/InvocationTargetE… in Init()
370 java_lang_reflect_Parameter = CacheClass(env, "java/lang/reflect/Parameter"); in Init()
371 java_lang_reflect_Parameter__array = CacheClass(env, "[Ljava/lang/reflect/Parameter;"); in Init()
372 java_lang_reflect_Proxy = CacheClass(env, "java/lang/reflect/Proxy"); in Init()
373 java_lang_RuntimeException = CacheClass(env, "java/lang/RuntimeException"); in Init()
374 java_lang_StackOverflowError = CacheClass(env, "java/lang/StackOverflowError"); in Init()
375 java_lang_String = CacheClass(env, "java/lang/String"); in Init()
376 java_lang_StringFactory = CacheClass(env, "java/lang/StringFactory"); in Init()
377 java_lang_System = CacheClass(env, "java/lang/System"); in Init()
378 java_lang_Thread = CacheClass(env, "java/lang/Thread"); in Init()
379 java_lang_ThreadGroup = CacheClass(env, "java/lang/ThreadGroup"); in Init()
380 java_lang_Throwable = CacheClass(env, "java/lang/Throwable"); in Init()
381 java_lang_Void = CacheClass(env, "java/lang/Void"); in Init()
382 java_nio_Buffer = CacheClass(env, "java/nio/Buffer"); in Init()
383 java_nio_ByteBuffer = CacheClass(env, "java/nio/ByteBuffer"); in Init()
384 java_nio_DirectByteBuffer = CacheClass(env, "java/nio/DirectByteBuffer"); in Init()
385 java_util_Collections = CacheClass(env, "java/util/Collections"); in Init()
386 java_util_function_Consumer = CacheClass(env, "java/util/function/Consumer"); in Init()
387 libcore_reflect_AnnotationFactory = CacheClass(env, "libcore/reflect/AnnotationFactory"); in Init()
388 libcore_reflect_AnnotationMember = CacheClass(env, "libcore/reflect/AnnotationMember"); in Init()
389 libcore_util_EmptyArray = CacheClass(env, "libcore/util/EmptyArray"); in Init()
390 org_apache_harmony_dalvik_ddmc_Chunk = CacheClass(env, "org/apache/harmony/dalvik/ddmc/Chunk"); in Init()
391 …org_apache_harmony_dalvik_ddmc_DdmServer = CacheClass(env, "org/apache/harmony/dalvik/ddmc/DdmServ… in Init()
393 InitFieldsAndMethodsOnly(env); in Init()
396 void WellKnownClasses::InitFieldsAndMethodsOnly(JNIEnv* env) { in InitFieldsAndMethodsOnly() argument
400 …dalvik_system_BaseDexClassLoader_getLdLibraryPath = CacheMethod(env, dalvik_system_BaseDexClassLoa… in InitFieldsAndMethodsOnly()
401 …dalvik_system_VMRuntime_runFinalization = CacheMethod(env, dalvik_system_VMRuntime, true, "runFina… in InitFieldsAndMethodsOnly()
402 …dalvik_system_VMRuntime_hiddenApiUsed = CacheMethod(env, dalvik_system_VMRuntime, true, "hiddenApi… in InitFieldsAndMethodsOnly()
404 …java_lang_ClassNotFoundException_init = CacheMethod(env, java_lang_ClassNotFoundException, false, … in InitFieldsAndMethodsOnly()
405 …java_lang_ClassLoader_loadClass = CacheMethod(env, java_lang_ClassLoader, false, "loadClass", "(Lj… in InitFieldsAndMethodsOnly()
407 java_lang_Daemons_start = CacheMethod(env, java_lang_Daemons, true, "start", "()V"); in InitFieldsAndMethodsOnly()
408 java_lang_Daemons_stop = CacheMethod(env, java_lang_Daemons, true, "stop", "()V"); in InitFieldsAndMethodsOnly()
409 …java_lang_Daemons_waitForDaemonStart = CacheMethod(env, java_lang_Daemons, true, "waitForDaemonSta… in InitFieldsAndMethodsOnly()
410 …java_lang_invoke_MethodHandle_asType = CacheMethod(env, "java/lang/invoke/MethodHandle", false, "a… in InitFieldsAndMethodsOnly()
411 …java_lang_invoke_MethodHandle_invokeExact = CacheMethod(env, "java/lang/invoke/MethodHandle", fals… in InitFieldsAndMethodsOnly()
412 …java_lang_invoke_MethodHandles_lookup = CacheMethod(env, "java/lang/invoke/MethodHandles", true, "… in InitFieldsAndMethodsOnly()
413 …java_lang_invoke_MethodHandles_Lookup_findConstructor = CacheMethod(env, "java/lang/invoke/MethodH… in InitFieldsAndMethodsOnly()
415 …java_lang_ref_FinalizerReference_add = CacheMethod(env, "java/lang/ref/FinalizerReference", true, … in InitFieldsAndMethodsOnly()
416 …java_lang_ref_ReferenceQueue_add = CacheMethod(env, "java/lang/ref/ReferenceQueue", true, "add", "… in InitFieldsAndMethodsOnly()
418 …java_lang_reflect_InvocationTargetException_init = CacheMethod(env, java_lang_reflect_InvocationTa… in InitFieldsAndMethodsOnly()
419 …java_lang_reflect_Parameter_init = CacheMethod(env, java_lang_reflect_Parameter, false, "<init>", … in InitFieldsAndMethodsOnly()
420 java_lang_String_charAt = CacheMethod(env, java_lang_String, false, "charAt", "(I)C"); in InitFieldsAndMethodsOnly()
421 …java_lang_Thread_dispatchUncaughtException = CacheMethod(env, java_lang_Thread, false, "dispatchUn… in InitFieldsAndMethodsOnly()
422 …java_lang_Thread_init = CacheMethod(env, java_lang_Thread, false, "<init>", "(Ljava/lang/ThreadGro… in InitFieldsAndMethodsOnly()
423 java_lang_Thread_run = CacheMethod(env, java_lang_Thread, false, "run", "()V"); in InitFieldsAndMethodsOnly()
424 …java_lang_ThreadGroup_add = CacheMethod(env, java_lang_ThreadGroup, false, "add", "(Ljava/lang/Thr… in InitFieldsAndMethodsOnly()
425 …java_lang_ThreadGroup_removeThread = CacheMethod(env, java_lang_ThreadGroup, false, "threadTermina… in InitFieldsAndMethodsOnly()
426 java_nio_Buffer_isDirect = CacheMethod(env, java_nio_Buffer, false, "isDirect", "()Z"); in InitFieldsAndMethodsOnly()
427 …java_nio_DirectByteBuffer_init = CacheMethod(env, java_nio_DirectByteBuffer, false, "<init>", "(JI… in InitFieldsAndMethodsOnly()
428 …java_util_function_Consumer_accept = CacheMethod(env, java_util_function_Consumer, false, "accept"… in InitFieldsAndMethodsOnly()
429 …libcore_reflect_AnnotationFactory_createAnnotation = CacheMethod(env, libcore_reflect_AnnotationFa… in InitFieldsAndMethodsOnly()
430 …libcore_reflect_AnnotationMember_init = CacheMethod(env, libcore_reflect_AnnotationMember, false, … in InitFieldsAndMethodsOnly()
431 …org_apache_harmony_dalvik_ddmc_DdmServer_broadcast = CacheMethod(env, org_apache_harmony_dalvik_dd… in InitFieldsAndMethodsOnly()
432 …org_apache_harmony_dalvik_ddmc_DdmServer_dispatch = CacheMethod(env, org_apache_harmony_dalvik_ddm… in InitFieldsAndMethodsOnly()
434 …dalvik_system_BaseDexClassLoader_pathList = CacheField(env, dalvik_system_BaseDexClassLoader, fals… in InitFieldsAndMethodsOnly()
435 …dalvik_system_BaseDexClassLoader_sharedLibraryLoaders = CacheField(env, dalvik_system_BaseDexClass… in InitFieldsAndMethodsOnly()
436 …dalvik_system_BaseDexClassLoader_sharedLibraryLoadersAfter = CacheField(env, dalvik_system_BaseDex… in InitFieldsAndMethodsOnly()
437 …dalvik_system_DexFile_cookie = CacheField(env, dalvik_system_DexFile, false, "mCookie", "Ljava/lan… in InitFieldsAndMethodsOnly()
438 …dalvik_system_DexFile_fileName = CacheField(env, dalvik_system_DexFile, false, "mFileName", "Ljava… in InitFieldsAndMethodsOnly()
439 …dalvik_system_DexPathList_dexElements = CacheField(env, dalvik_system_DexPathList, false, "dexElem… in InitFieldsAndMethodsOnly()
440 …dalvik_system_DexPathList__Element_dexFile = CacheField(env, dalvik_system_DexPathList__Element, f… in InitFieldsAndMethodsOnly()
441 …dalvik_system_VMRuntime_nonSdkApiUsageConsumer = CacheField(env, dalvik_system_VMRuntime, true, "n… in InitFieldsAndMethodsOnly()
443 ScopedLocalRef<jclass> java_io_FileDescriptor(env, env->FindClass("java/io/FileDescriptor")); in InitFieldsAndMethodsOnly()
444 …java_io_FileDescriptor_descriptor = CacheField(env, java_io_FileDescriptor.get(), false, "descript… in InitFieldsAndMethodsOnly()
447 CacheField(env, java_lang_ClassLoader, false, "parent", "Ljava/lang/ClassLoader;"); in InitFieldsAndMethodsOnly()
449 CacheField(env, java_lang_Thread, false, "parkBlocker", "Ljava/lang/Object;"); in InitFieldsAndMethodsOnly()
450 java_lang_Thread_daemon = CacheField(env, java_lang_Thread, false, "daemon", "Z"); in InitFieldsAndMethodsOnly()
452 CacheField(env, java_lang_Thread, false, "group", "Ljava/lang/ThreadGroup;"); in InitFieldsAndMethodsOnly()
453 java_lang_Thread_lock = CacheField(env, java_lang_Thread, false, "lock", "Ljava/lang/Object;"); in InitFieldsAndMethodsOnly()
454 java_lang_Thread_name = CacheField(env, java_lang_Thread, false, "name", "Ljava/lang/String;"); in InitFieldsAndMethodsOnly()
455 java_lang_Thread_priority = CacheField(env, java_lang_Thread, false, "priority", "I"); in InitFieldsAndMethodsOnly()
456 java_lang_Thread_nativePeer = CacheField(env, java_lang_Thread, false, "nativePeer", "J"); in InitFieldsAndMethodsOnly()
457 java_lang_Thread_systemDaemon = CacheField(env, java_lang_Thread, false, "systemDaemon", "Z"); in InitFieldsAndMethodsOnly()
459 CacheField(env, java_lang_Thread, false, "unparkedBeforeStart", "Z"); in InitFieldsAndMethodsOnly()
461 CacheField(env, java_lang_ThreadGroup, false, "groups", "[Ljava/lang/ThreadGroup;"); in InitFieldsAndMethodsOnly()
462 java_lang_ThreadGroup_ngroups = CacheField(env, java_lang_ThreadGroup, false, "ngroups", "I"); in InitFieldsAndMethodsOnly()
464 CacheField(env, java_lang_ThreadGroup, true, "mainThreadGroup", "Ljava/lang/ThreadGroup;"); in InitFieldsAndMethodsOnly()
466 CacheField(env, java_lang_ThreadGroup, false, "name", "Ljava/lang/String;"); in InitFieldsAndMethodsOnly()
468 CacheField(env, java_lang_ThreadGroup, false, "parent", "Ljava/lang/ThreadGroup;"); in InitFieldsAndMethodsOnly()
470 CacheField(env, java_lang_ThreadGroup, true, "systemThreadGroup", "Ljava/lang/ThreadGroup;"); in InitFieldsAndMethodsOnly()
472 CacheField(env, java_lang_Throwable, false, "cause", "Ljava/lang/Throwable;"); in InitFieldsAndMethodsOnly()
474 CacheField(env, java_lang_Throwable, false, "detailMessage", "Ljava/lang/String;"); in InitFieldsAndMethodsOnly()
476 CacheField(env, java_lang_Throwable, false, "stackTrace", "[Ljava/lang/StackTraceElement;"); in InitFieldsAndMethodsOnly()
478 CacheField(env, java_lang_Throwable, false, "backtrace", "Ljava/lang/Object;"); in InitFieldsAndMethodsOnly()
480 CacheField(env, java_lang_Throwable, false, "suppressedExceptions", "Ljava/util/List;"); in InitFieldsAndMethodsOnly()
482 java_nio_Buffer_address = CacheField(env, java_nio_Buffer, false, "address", "J"); in InitFieldsAndMethodsOnly()
483 java_nio_Buffer_capacity = CacheField(env, java_nio_Buffer, false, "capacity", "I"); in InitFieldsAndMethodsOnly()
485 CacheField(env, java_nio_Buffer, false, "_elementSizeShift", "I"); in InitFieldsAndMethodsOnly()
486 java_nio_Buffer_limit = CacheField(env, java_nio_Buffer, false, "limit", "I"); in InitFieldsAndMethodsOnly()
487 java_nio_Buffer_position = CacheField(env, java_nio_Buffer, false, "position", "I"); in InitFieldsAndMethodsOnly()
489 java_nio_ByteBuffer_address = CacheField(env, java_nio_ByteBuffer, false, "address", "J"); in InitFieldsAndMethodsOnly()
490 java_nio_ByteBuffer_hb = CacheField(env, java_nio_ByteBuffer, false, "hb", "[B"); in InitFieldsAndMethodsOnly()
491 java_nio_ByteBuffer_isReadOnly = CacheField(env, java_nio_ByteBuffer, false, "isReadOnly", "Z"); in InitFieldsAndMethodsOnly()
492 java_nio_ByteBuffer_limit = CacheField(env, java_nio_ByteBuffer, false, "limit", "I"); in InitFieldsAndMethodsOnly()
493 java_nio_ByteBuffer_offset = CacheField(env, java_nio_ByteBuffer, false, "offset", "I"); in InitFieldsAndMethodsOnly()
495 CacheField(env, java_util_Collections, true, "EMPTY_LIST", "Ljava/util/List;"); in InitFieldsAndMethodsOnly()
497 env, libcore_util_EmptyArray, true, "STACK_TRACE_ELEMENT", "[Ljava/lang/StackTraceElement;"); in InitFieldsAndMethodsOnly()
499 CacheField(env, org_apache_harmony_dalvik_ddmc_Chunk, false, "data", "[B"); in InitFieldsAndMethodsOnly()
501 CacheField(env, org_apache_harmony_dalvik_ddmc_Chunk, false, "length", "I"); in InitFieldsAndMethodsOnly()
503 CacheField(env, org_apache_harmony_dalvik_ddmc_Chunk, false, "offset", "I"); in InitFieldsAndMethodsOnly()
505 CacheField(env, org_apache_harmony_dalvik_ddmc_Chunk, false, "type", "I"); in InitFieldsAndMethodsOnly()
507 java_lang_Boolean_valueOf = CachePrimitiveBoxingMethod(env, 'Z', "java/lang/Boolean"); in InitFieldsAndMethodsOnly()
508 java_lang_Byte_valueOf = CachePrimitiveBoxingMethod(env, 'B', "java/lang/Byte"); in InitFieldsAndMethodsOnly()
509 java_lang_Character_valueOf = CachePrimitiveBoxingMethod(env, 'C', "java/lang/Character"); in InitFieldsAndMethodsOnly()
510 java_lang_Double_valueOf = CachePrimitiveBoxingMethod(env, 'D', "java/lang/Double"); in InitFieldsAndMethodsOnly()
511 java_lang_Float_valueOf = CachePrimitiveBoxingMethod(env, 'F', "java/lang/Float"); in InitFieldsAndMethodsOnly()
512 java_lang_Integer_valueOf = CachePrimitiveBoxingMethod(env, 'I', "java/lang/Integer"); in InitFieldsAndMethodsOnly()
513 java_lang_Long_valueOf = CachePrimitiveBoxingMethod(env, 'J', "java/lang/Long"); in InitFieldsAndMethodsOnly()
514 java_lang_Short_valueOf = CachePrimitiveBoxingMethod(env, 'S', "java/lang/Short"); in InitFieldsAndMethodsOnly()
517 CacheMethod(env, "java/lang/Double", /*is_static=*/ true, "doubleToRawLongBits", "(D)J"); in InitFieldsAndMethodsOnly()
519 CacheMethod(env, "java/lang/Float", /*is_static=*/ true, "floatToRawIntBits", "(F)I"); in InitFieldsAndMethodsOnly()
522 void WellKnownClasses::LateInit(JNIEnv* env) { in LateInit() argument
526 ScopedLocalRef<jclass> java_lang_Runtime(env, env->FindClass("java/lang/Runtime")); in LateInit()
528 CacheMethod(env, java_lang_Runtime.get(), true, "nativeLoad", in LateInit()
532 CacheMethod(env, java_lang_reflect_Proxy, false, "<init>", in LateInit()
540 CacheMethod(env, java_lang_reflect_Proxy, true, "invoke", in LateInit()
545 void WellKnownClasses::HandleJniIdTypeChange(JNIEnv* env) { in HandleJniIdTypeChange() argument
546 WellKnownClasses::InitFieldsAndMethodsOnly(env); in HandleJniIdTypeChange()
547 WellKnownClasses::LateInit(env); in HandleJniIdTypeChange()