美文网首页
无标题文章

无标题文章

作者: zhaoxuyang | 来源:发表于2017-06-26 16:11 被阅读8次
    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);
            }
        }
        ......
    }
    

    相关文章

      网友评论

          本文标题:无标题文章

          本文链接:https://www.haomeiwen.com/subject/qsrjcxtx.html