package java.lang;
public abstract class ClassLoader {
......
private transient long classTable;
......
}
package dalvik.system;
public class BaseDexClassLoader extends ClassLoader {
private final DexPathList pathList;
......
@Override
protected Class<?> findClass(String name) throws ClassNotFoundException {
......
Class c = pathList.findClass(name, suppressedExceptions);
......
return c;
}
......
}
package dalvik.system;
public class PathClassLoader extends BaseDexClassLoader {
......
}
package dalvik.system;
final class DexPathList {
......
private static DexFile loadDexFile(File file, File optimizedDirectory,
ClassLoader loader,Element[] elements)throws IOException {
if (optimizedDirectory == null) {
return new DexFile(file, loader, elements);
} else {
String optimizedPath = optimizedPathFor(file, optimizedDirectory);
return DexFile.loadDex(file.getPath(), optimizedPath, 0,
loader, elements);
}
}
......
}
网友评论