Class ClassScanner

java.lang.Object
io.hawt.util.introspect.support.ClassScanner

public class ClassScanner extends Object
A helper class to scan classes on the classpath
  • Constructor Details

    • ClassScanner

      public ClassScanner(ClassLoader... classLoaders)
  • Method Details

    • newInstance

      public static ClassScanner newInstance()
    • clearCache

      public void clearCache()
    • setClassLoaderProvider

      public void setClassLoaderProvider(String id, ClassLoaderProvider classLoaderProvider)
      Registers a named class loader provider or removes it if the classLoaderProvider is null
    • addPackageResources

      protected void addPackageResources(Package aPackage, Map<String,ClassResource> urlSet, ClassLoader[] classLoaders)
    • createCacheValue

      protected CacheValue createCacheValue(String key, ClassResource classResource)
    • processDirectoryClassNames

      protected void processDirectoryClassNames(File directory, String packageName, Set<String> classes)
    • processJarClassNames

      protected void processJarClassNames(ClassResource classResource, Set<String> classes)
    • getJavaResourceKey

      protected String getJavaResourceKey(URL resource)
    • getResources

      protected List<URL> getResources(String relPath, ClassLoader... classLoaders)
    • classNameMatches

      protected boolean classNameMatches(String className, String search)
      Returns true if the given class name matches the filter search
    • getPackageRelativePath

      protected String getPackageRelativePath(String packageName)
    • withinLimit

      protected boolean withinLimit(Integer limit, Collection<?> collection)
      Returns true if we are within the limit value for the number of results in the collection
    • getClassLoaders

      public List<ClassLoader> getClassLoaders()