Package org.python.core.packagecache
Class CachedJarsPackageManager
java.lang.Object
org.python.core.packagecache.PackageManager
org.python.core.packagecache.CachedJarsPackageManager
- Direct Known Subclasses:
PathPackageManager
Abstract package manager that gathers info about statically known classes from a set of jars and
the Java runtime. This info can be cached, eventually. Off-the-shelf this class offers a local
file-system based cache implementation.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Class of object used to represent a cache file and last modification time, internally and tooutCreateCacheFile(org.python.core.packagecache.CachedJarsPackageManager.JarXEntry, boolean)
. -
Field Summary
Fields inherited from class org.python.core.packagecache.PackageManager
topLevelPackage
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addJarToPackages
(File jarfile) Gathers classes info from jar specified by File jarfile.void
addJarToPackages
(File jarfile, boolean cache) Gathers package and class lists from a jar specified by aFile
.void
addJarToPackages
(URL jarurl) Gathers classes info from jar specified by a URL.void
addJarToPackages
(URL jarurl, boolean cache) Gathers classes info from jar specified by URL.void
Write back cache index.Methods inherited from class org.python.core.packagecache.PackageManager
addDirectory, addJar, addJarDir, doDir, findClass, findClass, lookupName, makeJavaPackage, notifyPackageImport, packageExists
-
Constructor Details
-
CachedJarsPackageManager
public CachedJarsPackageManager()
-
-
Method Details
-
addJarToPackages
Gathers classes info from jar specified by a URL. Eventually just using previously cached info. Eventually updated info is not cached. Persistent cache storage access goes through inOpenCacheFile() and outCreateCacheFile(). -
addJarToPackages
Gathers classes info from jar specified by URL. Eventually just using previously cached info. Eventually updated info is (re-)cached if param cache is true. Persistent cache storage access goes through inOpenCacheFile() and outCreateCacheFile(). -
addJarToPackages
Gathers classes info from jar specified by File jarfile. Eventually just using previously cached info. Eventually updated info is not cached. Persistent cache storage access goes through inOpenCacheFile() and outCreateCacheFile(). -
addJarToPackages
Gathers package and class lists from a jar specified by aFile
. Eventually just using previously cached info. Eventually updated info is (re-)cached if param cache is true. Persistent cache storage access goes through inOpenCacheFile() and outCreateCacheFile(). -
saveCache
public void saveCache()Write back cache index. The index is a mapping from each source of class definitions to the file where the cache for that source is held. This list is accessed through outOpenIndex().
-