Most visited

Recently visited

Added in API level 1

PathClassLoader

public class PathClassLoader
extends BaseDexClassLoader

java.lang.Object
   ↳ java.lang.ClassLoader
     ↳ dalvik.system.BaseDexClassLoader
       ↳ dalvik.system.PathClassLoader


提供一个简单的ClassLoader实现,该实现对本地文件系统中的文件和目录列表进行操作,但不尝试从网络加载类。 Android使用此类作为其系统类加载器和其应用程序类加载器。

Summary

Public constructors

PathClassLoader(String dexPath, ClassLoader parent)

创建一个运行在给定文件和目录列表上的 PathClassLoader

PathClassLoader(String dexPath, String librarySearchPath, ClassLoader parent)

创建一个 PathClassLoaderPathClassLoader两个给定的文件和目录列表进行操作。

Inherited methods

From class dalvik.system.BaseDexClassLoader
From class java.lang.ClassLoader
From class java.lang.Object

Public constructors

PathClassLoader

Added in API level 1
PathClassLoader (String dexPath, 
                ClassLoader parent)

创建一个运行在给定文件和目录列表上的PathClassLoader 此方法等同于使用null值为第二个参数调用PathClassLoader(String, String, ClassLoader) (请参阅此处的说明)。

Parameters
dexPath String: the list of jar/apk files containing classes and resources, delimited by File.pathSeparator, which defaults to ":" on Android
parent ClassLoader: the parent class loader

PathClassLoader

Added in API level 1
PathClassLoader (String dexPath, 
                String librarySearchPath, 
                ClassLoader parent)

创建一个PathClassLoader ,它在两个给定的文件和目录列表上运行。 第一个列表的条目应该是以下之一:

  • JAR/ZIP/APK files, possibly containing a "classes.dex" file as well as arbitrary resources.
  • Raw ".dex" files (not inside a zip file).
The entries of the second list should be directories containing native library files.

Parameters
dexPath String: the list of jar/apk files containing classes and resources, delimited by File.pathSeparator, which defaults to ":" on Android
librarySearchPath String: the list of directories containing native libraries, delimited by File.pathSeparator; may be null
parent ClassLoader: the parent class loader

Hooray!