Class JarIndexer

java.lang.Object
overit.geocall.util.JarIndexer

public class JarIndexer extends Object
Utility to scan jar files and maintain a cache of the content
  • Field Details

    • USEFUL_PACKAGING_RESOURCES

      public static final StringFilter USEFUL_PACKAGING_RESOURCES
      these are the resources that are in interest to geocall to be scanned
    • cache

      protected static ConcurrentHashMap<String,Set<String>> cache
      a set of queries idetified by a key, and the respective query result
  • Constructor Details

    • JarIndexer

      public JarIndexer()
  • Method Details

    • listContent

      public static Set<String> listContent(String pkg)
      scans or retrieves the USEFUL RESOURCES inside the packed pkg, scanned all over the jars
      Parameters:
      pkg - the package to be scanned
      Returns:
      the set of resources
    • listContent

      public static Set<String> listContent(String pkg, StringFilter sf)
      scans or retrieves some resources inside the packed pkg, scanned all over the jars
      Parameters:
      pkg - the package to be scanned
      sf - the flter to identificate interesting resurces
      Returns:
      the set of resources
    • scanJarContent

      protected static void scanJarContent(String jar, String pkg, StringFilter sf, Set<String> collect)
      scans the content of a jar file to collect all the interesting resources
      Parameters:
      jar - the path to the jar file
      pkg - the packed to look inside for resources
      sf - the filter to identificate interesting resources
      collect - a set to put collected resources inside