Package io.hawt.util.introspect.support
Class ClassScanner
java.lang.Object
io.hawt.util.introspect.support.ClassScanner
A helper class to scan classes on the classpath
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddPackageResources(Package aPackage, Map<String, ClassResource> urlSet, ClassLoader[] classLoaders) protected booleanclassNameMatches(String className, String search) Returns true if the given class name matches the filter searchvoidprotected CacheValuecreateCacheValue(String key, ClassResource classResource) protected StringgetJavaResourceKey(URL resource) protected StringgetPackageRelativePath(String packageName) getResources(String relPath, ClassLoader... classLoaders) static ClassScannerprotected voidprocessDirectoryClassNames(File directory, String packageName, Set<String> classes) protected voidprocessJarClassNames(ClassResource classResource, Set<String> classes) voidsetClassLoaderProvider(String id, ClassLoaderProvider classLoaderProvider) Registers a named class loader provider or removes it if the classLoaderProvider is nullprotected booleanwithinLimit(Integer limit, Collection<?> collection) Returns true if we are within the limit value for the number of results in the collection
-
Constructor Details
-
ClassScanner
-
-
Method Details
-
newInstance
-
clearCache
public void clearCache() -
setClassLoaderProvider
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
-
processDirectoryClassNames
-
processJarClassNames
-
getJavaResourceKey
-
getResources
-
classNameMatches
Returns true if the given class name matches the filter search -
getPackageRelativePath
-
withinLimit
Returns true if we are within the limit value for the number of results in the collection -
getClassLoaders
-