Lines Matching refs:loader

18  * Class loading, including bootstrap class loader, linking, and
51 the loader attempting to access the partially-linked class.
93 assumptions about where the class loader will go to look for classes.
103 loader, but isn't required to. UserLoader might provide a replacement
128 We can verify that it's either (loader==null && dexFile==a_boot_dex)
129 or (loader==UserLoader && dexFile==AppClass.dexFile). Classes from
133 a user-defined class loader that replaces system classes. It should
134 also ensure that you can write such a loader and have it work in the
174 const char* descriptor, Object* loader);
175 static ClassObject* findClassNoInit(const char* descriptor, Object* loader,\
178 const DexClassDef* pClassDef, Object* loader);
405 * Initialize the bootstrap class loader.
497 * Bootstrap class loader
715 * Drop an end marker here so DEX loader can walk unfinished
827 * or synthesizing a class loader to manage it, we just make it available
937 Object* loader;
955 * Determine if "loader" appears in clazz' initiating loader list.
958 * it's also used when updating a class' initiating loader list.
964 bool dvmLoaderInInitiatingList(const ClassObject* clazz, const Object* loader)
967 * The bootstrap class loader can't be just an initiating loader for
968 * anything (it's always the defining loader if the class is visible
971 if (loader == NULL)
983 if (loaderList->initiatingLoaders[i] == loader) {
985 // loader, clazz->descriptor);
993 * Add "loader" to clazz's initiating loader set, unless it's the defining
994 * class loader.
1002 void dvmAddInitiatingLoader(ClassObject* clazz, Object* loader)
1004 if (loader != clazz->classLoader) {
1005 assert(loader != NULL);
1007 LOGVV("Adding %p to '%s' init list", loader, clazz->descriptor);
1015 //if (dvmLoaderInInitiatingList(clazz, loader)) {
1016 // ALOGW("WOW: simultaneous add of initiating class loader");
1047 loader;
1057 * Entries in the class hash table are stored as { descriptor, d-loader }
1059 * and the hashed defining class loader matches the requested class
1060 * loader, we're good. If only the descriptor matches, we check to see if the
1061 * loader is in the hashed class' initiating loader list. If so, we
1075 (clazz->classLoader == pCrit->loader ||
1076 (pCrit->loader != NULL &&
1077 dvmLoaderInInitiatingList(clazz, pCrit->loader)) ));
1080 // pCrit->descriptor, pCrit->loader,
1104 * and an initiating class loader that matches "loader".
1107 * on *defining* class loader, not *initiating* class loader. This isn't
1121 ClassObject* dvmLookupClass(const char* descriptor, Object* loader,
1129 crit.loader = loader;
1133 dvmThreadSelf()->threadId, descriptor, loader);
1161 * descriptor and the defining class loader.
1257 ClassObject* dvmFindClass(const char* descriptor, Object* loader)
1261 clazz = dvmFindClassNoInit(descriptor, loader);
1286 Object* loader)
1289 //assert(loader != NULL);
1291 LOGVV("FindClassNoInit '%s' %p", descriptor, loader);
1297 return dvmFindArrayClass(descriptor, loader);
1302 if (loader != NULL) {
1303 return findClassFromLoaderNoInit(descriptor, loader);
1312 * loader. This calls out to let the ClassLoader object do its thing.
1317 Object* loader)
1320 // descriptor, loader);
1324 assert(loader != NULL);
1329 * The class loader code does the "is it already loaded" check as
1336 ClassObject* clazz = dvmLookupClass(descriptor, loader, false);
1338 LOGVV("Already loaded: %s %p", descriptor, loader);
1341 LOGVV("Not already loaded: %s %p", descriptor, loader);
1365 * the bootstrap class loader can find it before doing its own load.
1367 LOGVV("--- Invoking loadClass(%s, %p)", dotName, loader);
1370 loader->clazz->vtable[gDvm.voffJavaLangClassLoader_loadClass];
1372 dvmCallMethod(self, loadClass, loader, &result, nameObj);
1380 dotName, loader, excep->clazz->descriptor);
1397 dvmAddInitiatingLoader(clazz, loader);
1400 descriptor, clazz->classLoader, loader, clazz);
1428 * Uses NULL as the defining class loader.
1470 * class twice in the same class loader, they should get a LinkageError,
1473 static ClassObject* findClassNoInit(const char* descriptor, Object* loader,
1480 if (loader != NULL) {
1481 LOGVV("#### findClassNoInit(%s,%p,%p)", descriptor, loader,
1505 clazz = dvmLookupClass(descriptor, loader, true);
1517 assert(loader == NULL); /* shouldn't be here otherwise */
1535 clazz = loadClassFromDex(pDvmDex, pClassDef, loader);
1559 assert(clazz->classLoader == loader);
1579 clazz = dvmLookupClass(descriptor, loader, true);
1650 * but the bootclasspath loader.
1652 assert(loader == NULL);
2650 * regardless of the class loader? For now, assume it is.
2884 * regardless of the class loader? For now, assume it is.
3929 * We can skip a second lookup by name if the second class loader is
3930 * in the initiating loader list of the class object we retrieved.
3932 * the second loader, and it resolved to the same class.) If it's not
3936 * The initiating loader test should catch the majority of cases
3942 * argument, so that way if it's from the bootstrap loader this test
3943 * will work. (The bootstrap loader, by definition, never shows up
3944 * as the initiating loader of a class defined by some other loader.)
3966 * Neither class loader could find this class. Apparently it
3972 * because a "tricky" class loader could start returning
4040 * different class loader. If the subclass overrides the method, it will
4083 * because it's possible that the new class loader has redefined
4113 * different class loader). If the superclass also implements the
4649 * Retrieve the system (a/k/a application) class loader.
4664 Object* loader = (Object*)result.l;
4665 dvmAddTrackedAlloc(loader, self);
4666 return loader;