资源简介
Android中内存加载dex
代码片段和文件信息
/*
* Copyright (C) 2011 The Android Open Source Project
*
* Licensed under the Apache License Version 2.0 (the “License“);
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing software
* distributed under the License is distributed on an “AS IS“ BASIS
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package dalvik.system;
import java.io.File;
import java.net.URL;
import java.util.Enumeration;
/**
* base class for common functionality between various dex-based
* {@link ClassLoader} implementations.
*/
public class baseDexClassLoader extends ClassLoader {
/** originally specified path (just used for {@code toString()}) */
private final String originalPath;
/** originally specified library path (just used for {@code toString()}) */
private final String originalLibraryPath;
/** structured lists of path elements */
private final DexPathList pathList;
/**
* Constructs an instance.
*
* @param dexPath the list of jar/apk files containing classes and
* resources delimited by {@code File.pathSeparator} which
* defaults to {@code “:“} on Android
* @param optimizedDirectory directory where optimized dex files
* should be written; may be {@code null}
* @param libraryPath the list of directories containing native
* libraries delimited by {@code File.pathSeparator}; may be
* {@code null}
* @param parent the parent class loader
*/
public baseDexClassLoader(String dexPath File optimizedDirectory
String libraryPath ClassLoader parent) {
super(parent);
this.originalPath = dexPath;
this.originalLibraryPath = libraryPath;
this.pathList =
new DexPathList(this dexPath libraryPath optimizedDirectory);
}
@Override
protected Class> findClass(String name) throws ClassNotFoundException {
Class clazz = pathList.findClass(name);
if (clazz == null) {
throw new ClassNotFoundException(“Didn‘t find class \““ + name + “\“ on path: “ + originalPath);
}
return clazz;
}
@Override
protected URL findResource(String name) {
return pathList.findResource(name);
}
@Override
protected Enumeration findResources(String name) {
return pathList.findResources(name);
}
@Override
public String findLibrary(String name) {
return pathList.findLibrary(name);
}
/**
* Returns package information for the given package.
* Unfortunately instances of this class don‘t really have this
* information and as a non-secure {@code ClassLoader} it isn‘t
* even required to accordi
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 4750 2012-12-01 17:50 内存加载Dex\ba
文件 17029 2012-12-01 17:37 内存加载Dex\dalvik_system_DexFile.cpp
文件 24952 2015-04-29 12:53 内存加载Dex\dalvik_system_DexFile_5.0.cpp
文件 2472 2012-12-01 17:50 内存加载Dex\DexClassLoader.java
文件 105 2016-05-06 17:25 内存加载Dex\DexFileDynamicload\.gitignore
文件 37 2016-05-06 17:26 内存加载Dex\DexFileDynamicload\.gradle\2.8\taskArtifacts\cache.properties
文件 17 2016-06-01 20:34 内存加载Dex\DexFileDynamicload\.gradle\2.8\taskArtifacts\cache.properties.lock
文件 131878 2016-06-01 20:34 内存加载Dex\DexFileDynamicload\.gradle\2.8\taskArtifacts\fileHashes.bin
文件 874537 2016-06-01 20:34 内存加载Dex\DexFileDynamicload\.gradle\2.8\taskArtifacts\fileSnapshots.bin
文件 20012 2016-05-06 17:32 内存加载Dex\DexFileDynamicload\.gradle\2.8\taskArtifacts\outputFileStates.bin
文件 59179 2016-06-01 20:34 内存加载Dex\DexFileDynamicload\.gradle\2.8\taskArtifacts\taskArtifacts.bin
文件 18 2016-06-01 10:04 内存加载Dex\DexFileDynamicload\.idea\.name
文件 686 2016-06-01 10:04 内存加载Dex\DexFileDynamicload\.idea\compiler.xm
文件 76 2016-06-01 10:04 内存加载Dex\DexFileDynamicload\.idea\copyright\profiles_settings.xm
文件 159 2016-06-01 10:06 内存加载Dex\DexFileDynamicload\.idea\encodings.xm
文件 701 2016-06-01 10:04 内存加载Dex\DexFileDynamicload\.idea\gradle.xm
文件 774 2016-06-01 10:06 内存加载Dex\DexFileDynamicload\.idea\libraries\appcompat_v7_23_1_1.xm
文件 738 2016-06-01 10:06 内存加载Dex\DexFileDynamicload\.idea\libraries\design_23_1_1.xm
文件 792 2016-06-01 10:06 内存加载Dex\DexFileDynamicload\.idea\libraries\recyclerview_v7_23_1_1.xm
文件 521 2016-06-01 10:06 内存加载Dex\DexFileDynamicload\.idea\libraries\support_annotations_23_1_1.xm
文件 916 2016-06-01 10:06 内存加载Dex\DexFileDynamicload\.idea\libraries\support_v4_23_1_1.xm
文件 2226 2016-06-01 10:06 内存加载Dex\DexFileDynamicload\.idea\misc.xm
文件 373 2016-06-01 10:06 内存加载Dex\DexFileDynamicload\.idea\modules.xm
文件 564 2016-06-01 10:06 内存加载Dex\DexFileDynamicload\.idea\runConfigurations.xm
文件 164 2016-06-01 10:04 内存加载Dex\DexFileDynamicload\.idea\vcs.xm
文件 154472 2016-06-01 21:11 内存加载Dex\DexFileDynamicload\.idea\workspace.xm
文件 8 2016-05-06 17:25 内存加载Dex\DexFileDynamicload\app\.gitignore
文件 7560 2016-06-01 10:06 内存加载Dex\DexFileDynamicload\app\app.iml
文件 481 2016-05-06 17:26 内存加载Dex\DexFileDynamicload\app\build\generated\source\buildConfig\androidTest\debug\cn\wjdiankong\dexfiledynamicload\test\BuildConfig.java
文件 471 2016-05-06 17:26 内存加载Dex\DexFileDynamicload\app\build\generated\source\buildConfig\debug\cn\wjdiankong\dexfiledynamicload\BuildConfig.java
............此处省略1671个文件信息
- 上一篇:java动态树形菜单与分页
- 下一篇:java门诊信息管理系统毕业设计程序
评论
共有 条评论