Package org.python.core.packagecache
Class CachedJarsPackageManager
- java.lang.Object
-
- org.python.core.packagecache.PackageManager
-
- org.python.core.packagecache.CachedJarsPackageManager
-
- Direct Known Subclasses:
PathPackageManager
public abstract class CachedJarsPackageManager extends PackageManager
Abstract package manager that gathers info about statically known classes from a set of jars. This info can be eventually cached. Off-the-shelf this class offers a local file-system based cache impl.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CachedJarsPackageManager.JarXEntry
To pass a cachefile id by ref.
-
Field Summary
-
Fields inherited from class org.python.core.packagecache.PackageManager
topLevelPackage
-
-
Constructor Summary
Constructors Constructor Description CachedJarsPackageManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addJarToPackages(java.io.File jarfile)
Gathers classes info from jar specified by File jarfile.void
addJarToPackages(java.io.File jarfile, boolean cache)
Gathers classes info from jar specified by File jarfile.void
addJarToPackages(java.net.URL jarurl)
Gathers classes info from jar specified by jarurl URL.void
addJarToPackages(java.net.URL jarurl, boolean cache)
Gathers classes info from jar specified by jarurl URL.void
saveCache()
Write back cache index.-
Methods inherited from class org.python.core.packagecache.PackageManager
addDirectory, addJar, addJarDir, doDir, findClass, findClass, lookupName, makeJavaPackage, notifyPackageImport, packageExists
-
-
-
-
Method Detail
-
addJarToPackages
public void addJarToPackages(java.net.URL jarurl)
Gathers classes info from jar specified by jarurl URL. Eventually just using previously cached info. Eventually updated info is not cached. Persistent cache storage access goes through inOpenCacheFile() and outCreateCacheFile().
-
addJarToPackages
public void addJarToPackages(java.net.URL jarurl, boolean cache)
Gathers classes info from jar specified by jarurl 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
public void addJarToPackages(java.io.File jarfile)
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
public void addJarToPackages(java.io.File jarfile, boolean cache)
Gathers classes info from jar specified by File jarfile. 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. Index persistent storage is accessed through outOpenIndex().
-
-