Class 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 and the Java runtime. This info can be cached, eventually. Off-the-shelf this class offers a local file-system based cache implementation.
    • Constructor Detail

      • CachedJarsPackageManager

        public CachedJarsPackageManager()
    • Method Detail

      • addJarToPackages

        public void addJarToPackages​(java.net.URL jarurl)
        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

        public void addJarToPackages​(java.net.URL jarurl,
                                     boolean cache)
        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

        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 package and class lists from a jar specified by a File. 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().