Home
last modified time | relevance | path

Searched refs:ClassLoader (Results 1 – 25 of 222) sorted by relevance

123456789

/art/test/912-classes/src-art/art/
DDexData.java25 public static ClassLoader getBootClassLoader() { in getBootClassLoader()
26 ClassLoader cl = DexData.class.getClassLoader(); in getBootClassLoader()
33 public static ClassLoader create1() { in create1()
36 public static ClassLoader create1(ClassLoader parent) { in create1()
40 public static ClassLoader create2() { in create2()
43 public static ClassLoader create2(ClassLoader parent) { in create2()
47 public static ClassLoader create12() { in create12()
50 public static ClassLoader create12(ClassLoader parent) { in create12()
54 private static ClassLoader create(ClassLoader parent, String... stringData) { in create()
DTest912.java152 private static boolean IsBootClassLoader(ClassLoader l) { in IsBootClassLoader()
165 if (!(cl instanceof ClassLoader)) { in testClassLoader()
178 ClassLoader cl1 = DexData.create2(DexData.create1()); in testClassLoaderClasses()
185 ClassLoader cl2 = DexData.create2(DexData.create1()); in testClassLoaderClasses()
193 ClassLoader cl3 = DexData.create12(); in testClassLoaderClasses()
199 ClassLoader boot = ClassLoader.getSystemClassLoader().getParent(); in testClassLoaderClasses()
246 Constructor<?> ctor = class_loader_class.getConstructor(ByteBuffer.class, ClassLoader.class); in testClassVersion()
247 Class target = ((ClassLoader)ctor.newInstance( in testClassVersion()
253 ClassLoader cl = Main.class.getClassLoader(); in testClassEvents()
257 final ClassLoader boot = cl; in testClassEvents()
[all …]
/art/test/134-nodex2oat-nofallback/
Dexpected.txt5 at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
6 at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
17 at java.lang.ClassLoader.createSystemClassLoader(ClassLoader.java:128)
18 at java.lang.ClassLoader.access$000(ClassLoader.java:65)
19 at java.lang.ClassLoader$SystemClassLoader.<clinit>(ClassLoader.java:81)
20 at java.lang.ClassLoader.getSystemClassLoader(ClassLoader.java:137)
29 at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
30 at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
31 at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
36 at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
[all …]
/art/test/688-shared-library/src-art/
DMain.java24 static ClassLoader bootLoader = Object.class.getClassLoader();
44 ClassLoader loader = new PathClassLoader(MAIN_JAR_FILE, null, bootLoader); in testNoLibrary()
50 ClassLoader[] sharedLibraries = { in testOneLibrary()
53 ClassLoader delegateFirst = in testOneLibrary()
60 ClassLoader delegateLast = in testOneLibrary()
69 ClassLoader[] sharedLibraries = { in testTwoLibraries1()
73 ClassLoader delegateFirst = new PathClassLoader("", null, bootLoader, sharedLibraries); in testTwoLibraries1()
79 ClassLoader delegateLast = in testTwoLibraries1()
88 ClassLoader[] sharedLibraries = { in testTwoLibraries2()
92 ClassLoader delegateFirst = new PathClassLoader("", null, bootLoader, sharedLibraries); in testTwoLibraries2()
[all …]
/art/test/141-class-unload/src/
DMain.java36 pathClassLoader.getDeclaredConstructor(String.class, String.class, ClassLoader.class); in main()
108 WeakReference<ClassLoader> loader = setUpUnloadLoader(constructor, true); in testUnloadLoader()
128 WeakReference<ClassLoader> loader = setUpLoadLibrary(constructor); in testLoadAndUnloadLibrary()
135 private static Object testNoUnloadHelper(ClassLoader loader) throws Exception { in testNoUnloadHelper()
141 public Pair(Object o, ClassLoader l) { in Pair()
143 classLoader = new WeakReference<ClassLoader>(l); in Pair()
147 public WeakReference<ClassLoader> classLoader;
151 ClassLoader loader = (ClassLoader) constructor.newInstance( in testNoUnloadInstanceHelper()
152 DEX_FILE, LIBRARY_SEARCH_PATH, ClassLoader.getSystemClassLoader()); in testNoUnloadInstanceHelper()
166 ClassLoader loader = (ClassLoader) constructor.newInstance( in setUpUnloadClass()
[all …]
/art/runtime/mirror/
Dclass_loader.h36 class MANAGED ClassLoader : public Object {
40 return sizeof(ClassLoader); in InstanceSize()
43 ObjPtr<ClassLoader> GetParent() REQUIRES_SHARED(Locks::mutator_lock_);
48 GetField64<kVerifyFlags>(OFFSET_OF_OBJECT_MEMBER(ClassLoader, class_table_))); in GetClassTable()
52 SetField64<false>(OFFSET_OF_OBJECT_MEMBER(ClassLoader, class_table_), in SetClassTable()
58 GetField64(OFFSET_OF_OBJECT_MEMBER(ClassLoader, allocator_))); in GetAllocator()
62 SetField64<false>(OFFSET_OF_OBJECT_MEMBER(ClassLoader, allocator_), in SetAllocator()
79 HeapReference<ClassLoader> parent_;
88 DISALLOW_IMPLICIT_CONSTRUCTORS(ClassLoader);
Dclass_loader-inl.h28 inline ObjPtr<ClassLoader> ClassLoader::GetParent() { in GetParent()
29 return GetFieldObject<ClassLoader>(OFFSET_OF_OBJECT_MEMBER(ClassLoader, parent_)); in GetParent()
36 inline void ClassLoader::VisitReferences(ObjPtr<mirror::Class> klass, const Visitor& visitor) { in VisitReferences()
/art/test/164-resolution-trampoline-dex-cache/src/
DMain.java30 ClassLoader systemLoader = ClassLoader.getSystemClassLoader().getParent(); in main()
31 ClassLoader baseLoader = getClassLoaderFor(dex_location, systemLoader, /* ex */ false); in main()
32 ClassLoader mainLoader = getClassLoaderFor(dex_location, baseLoader, /* ex */ true); in main()
42 public static ClassLoader getClassLoaderFor(String location, ClassLoader parent, boolean ex) in getClassLoaderFor()
47 class_loader_class.getConstructor(String.class, ClassLoader.class); in getClassLoaderFor()
49 return (ClassLoader)ctor.newInstance(path, parent); in getClassLoaderFor()
/art/test/692-vdex-inmem-loader/src/
DMain.java31 private static ClassLoader singleLoader() { in singleLoader()
37 private static ClassLoader[] multiLoader() { in multiLoader()
38 ClassLoader clA = new InMemoryDexClassLoader(ByteBuffer.wrap(DEX_BYTES_A), /*parent*/ null); in multiLoader()
39 ClassLoader clB = new InMemoryDexClassLoader(ByteBuffer.wrap(DEX_BYTES_B), /*parent*/ clA); in multiLoader()
40 return new ClassLoader[] { clA, clB }; in multiLoader()
43 private static void test(ClassLoader loader, in test()
72 ClassLoader[] loaders = null; in main()
124 private static native boolean areClassesVerified(ClassLoader loader); in areClassesVerified()
125 private static native boolean hasVdexFile(ClassLoader loader); in hasVdexFile()
126 private static native boolean isBackedByOatFile(ClassLoader loader); in isBackedByOatFile()
[all …]
/art/test/155-java-set-resolved-type/src/
DMain.java34 ClassLoader systemLoader = ClassLoader.getSystemClassLoader().getParent(); in main()
35 ClassLoader exLoader = getClassLoaderFor(dex_location, systemLoader, /* ex */ true); in main()
36 ClassLoader mainLoader = getClassLoaderFor(dex_location, exLoader, /* ex */ false); in main()
68 public static ClassLoader getClassLoaderFor(String location, ClassLoader parent, boolean ex) in getClassLoaderFor()
73 class_loader_class.getConstructor(String.class, ClassLoader.class); in getClassLoaderFor()
76 return (ClassLoader)ctor.newInstance(path, parent); in getClassLoaderFor()
/art/test/616-cha-unloading/src-art/
DMain.java25 static Constructor<? extends ClassLoader> sConstructor;
28 private CHAUnloaderRetType(WeakReference<ClassLoader> cl, in CHAUnloaderRetType()
35 public WeakReference<ClassLoader> cl;
43 …Class<ClassLoader> pathClassLoader = (Class<ClassLoader>) Class.forName("dalvik.system.PathClassLo… in main()
45 pathClassLoader.getDeclaredConstructor(String.class, String.class, ClassLoader.class); in main()
53 WeakReference<ClassLoader> loader = result.cl; in testUnload()
78 ClassLoader loader = sConstructor.newInstance( in setupLoader()
79 DEX_FILE, LIBRARY_SEARCH_PATH, ClassLoader.getSystemClassLoader()); in setupLoader()
/art/test/949-in-memory-transform/src/art/
DTest949.java90 ClassLoader loader; in run()
93 loader = (ClassLoader)Class.forName("dalvik.system.InMemoryDexClassLoader") in run()
94 .getConstructor(ByteBuffer.class, ClassLoader.class) in run()
96 ClassLoader.getSystemClassLoader()); in run()
99 loader = new ClassLoader() { in run()
112 public static void doTest(ClassLoader loader) throws Exception { in doTest()
/art/test/636-wrong-static-access/src/
DMain.java30 pathClassLoader.getDeclaredConstructor(String.class, ClassLoader.class); in main()
31 ClassLoader loader = (ClassLoader) constructor.newInstance( in main()
32 DEX_FILE, ClassLoader.getSystemClassLoader()); in main()
/art/test/142-classloader2/src/
DMain.java25 private static ClassLoader createClassLoader(String dexPath, ClassLoader parent) { in createClassLoader()
29 ClassLoader.class); in createClassLoader()
30 return (ClassLoader)constructor.newInstance(dexPath, parent); in createClassLoader()
52 ClassLoader myClassLoader = createClassLoader( in main()
53 cp, ClassLoader.getSystemClassLoader().getParent()); in main()
/art/test/071-dexfile/src/
DMain.java68 ClassLoader dexClassLoader = getDexClassLoader(); in testDexClassLoader()
80 private static ClassLoader getDexClassLoader() throws Exception { in getDexClassLoader()
81 ClassLoader classLoader = Main.class.getClassLoader(); in getDexClassLoader()
86 ClassLoader.class); in getDexClassLoader()
88 return (ClassLoader) DexClassLoader_init.newInstance(CLASS_PATH, in getDexClassLoader()
95 ClassLoader classLoader = Main.class.getClassLoader(); in testDexFile()
/art/test/661-classloader-allocator/src/
DMain.java51 pathClassLoader.getDeclaredConstructor(String.class, String.class, ClassLoader.class); in loadClass()
52 ClassLoader loader = (ClassLoader) constructor.newInstance( in loadClass()
53 DEX_FILE, LIBRARY_SEARCH_PATH, ClassLoader.getSystemClassLoader()); in loadClass()
/art/test/998-redefine-use-after-free/src/
DMain.java30 public static ClassLoader getClassLoaderFor(String location) throws Exception { in getClassLoaderFor()
33 Constructor<?> ctor = class_loader_class.getConstructor(String.class, ClassLoader.class); in getClassLoaderFor()
34 return (ClassLoader)ctor.newInstance(location + "/" + TEST_NAME + "-ex.jar", in getClassLoaderFor()
46 ClassLoader c = getClassLoaderFor(System.getenv("DEX_LOCATION")); in runSeveralTimes()
/art/test/1963-add-to-dex-classloader-in-memory/src/art/
DTest1963.java183 ClassLoader cl = getClassLoader(); in run()
198 public static class ExtensibleClassLoader extends ClassLoader {
220 public static ClassLoader getClassLoader() throws Exception { in getClassLoader()
225 Constructor<?> ctor = class_loader_class.getConstructor(ByteBuffer.class, ClassLoader.class); in getClassLoader()
226 return (ClassLoader)ctor.newInstance(ByteBuffer.wrap(DEX_BYTES), in getClassLoader()
231 public static void addToClassLoader(ClassLoader cl, byte[] class_bytes, byte[] dex_bytes) { in addToClassLoader()
239 public static native void addToClassLoaderNative(ClassLoader loader, ByteBuffer buff); in addToClassLoaderNative()
/art/test/938-load-transform-bcp/src/
DMain.java86 public static ClassLoader getClassLoaderFor(String location) throws Exception { in getClassLoaderFor()
89 Constructor<?> ctor = class_loader_class.getConstructor(String.class, ClassLoader.class); in getClassLoaderFor()
90 return (ClassLoader)ctor.newInstance(location + "/" + TEST_NAME + "-ex.jar", in getClassLoaderFor()
105 ClassLoader new_loader = getClassLoaderFor(System.getenv("DEX_LOCATION")); in main()
/art/test/1949-short-dex-file/src/art/
DTest1949.java118 private static ClassLoader CreateClassLoader(byte[] clz, byte[] dex) throws Exception { in CreateClassLoader()
121 Constructor<?> ctor = class_loader_class.getConstructor(ByteBuffer.class, ClassLoader.class); in CreateClassLoader()
123 return (ClassLoader)ctor.newInstance(ByteBuffer.wrap(dex), Test1949.class.getClassLoader()); in CreateClassLoader()
125 return new ClassLoader() { in CreateClassLoader()
/art/test/138-duplicate-classes-check2/src/
DMain.java27 public static ClassLoader getClassLoaderFor(String location) throws Exception { in getClassLoaderFor()
31 class_loader_class.getConstructor(String.class, ClassLoader.class); in getClassLoaderFor()
33 return (ClassLoader) ctor.newInstance(location + "/" + TEST_NAME + "-ex.jar", in getClassLoaderFor()
52 ClassLoader new_loader = getClassLoaderFor(System.getenv("DEX_LOCATION")); in run()
/art/test/086-null-super/src/
DMain.java47 static class BrokenDexLoader extends ClassLoader {
60 public BrokenDexLoader(ClassLoader parent) { in BrokenDexLoader()
78 Class<?> mDexClass = ClassLoader.getSystemClassLoader(). in findDexClass()
83 getMethod("loadClass", String.class, ClassLoader.class); in findDexClass()
150 loader = new BrokenDexLoader(ClassLoader.getSystemClassLoader()); in testFailLoadAndGc()
/art/test/1946-list-descriptors/src-art/art/
DTest1946.java93 ClassLoader.getSystemClassLoader())), in run()
112 private static ClassLoader makeClassLoaderFrom(byte[] data, ClassLoader parent) throws Exception { in makeClassLoaderFrom()
116 private static ClassLoader makeClassLoaderFrom(List<byte[]> data, ClassLoader parent) in makeClassLoaderFrom()
126 private static native String[] getClassloaderDescriptors(ClassLoader loader); in getClassloaderDescriptors()
/art/test/934-load-transform/src/
DMain.java58 public static ClassLoader getClassLoaderFor(String location) throws Exception { in getClassLoaderFor()
61 Constructor<?> ctor = class_loader_class.getConstructor(String.class, ClassLoader.class); in getClassLoaderFor()
63 return (ClassLoader)ctor.newInstance(location + "/" + TEST_NAME + "-ex.jar", in getClassLoaderFor()
80 ClassLoader new_loader = getClassLoaderFor(System.getenv("DEX_LOCATION")); in main()
/art/test/612-jit-dex-cache/src-art/
DMain.java25 public DelegateLastPathClassLoader(String dexPath, ClassLoader parent) { in DelegateLastPathClassLoader()
46 ClassLoader loader = new DelegateLastPathClassLoader(DEX_FILE, Main.class.getClassLoader()); in classFromDifferentLoader()
60 ClassLoader loader = (ClassLoader) m.invoke(null); in main()

123456789