@AutoFinalAutoFinal @CompileStaticCompileStatic class PackageHelperImpl extends Object
Helper class that crawls all items of the classpath for packages. Retrieves from those sources the list of subpackages and classes on demand.
Modifiers | Name | Description |
---|---|---|
protected static Logger |
LOG |
|
static Pattern |
NAME_PATTERN |
Pattern for regular class names. |
Type | Name and description |
---|---|
private ClassLoader |
groovyClassLoader |
private Map |
rootPackages |
Constructor and description |
---|
PackageHelperImpl
(ClassLoader groovyClassLoader) |
PackageHelperImpl
() |
Type Params | Return Type | Name and description |
---|---|---|
|
static Collection |
collectPackageNamesFromFolderRecursive(File directory, String prefix, Set packnames) Crawls a folder, iterates over subfolders, looking for class files. |
|
static Set |
getClassnames(Set urls, String packagename) Copied from JLine 1.0 ClassNameCompletor. |
|
Set |
getContents(String packagename) Returns the names of Classes and direct subpackages contained in a package. |
|
static Collection |
getPackageNames(URL url) Returns all package names found at URL; accepts jar files and folders. |
|
static Collection |
getPackageNamesFromJar(JarFile jf) |
|
static Object |
mergeNewPackages(Collection packageNames, URL url, Map rootPackages) |
|
void |
preferenceChange(PreferenceChangeEvent evt) |
|
void |
reset() |
Pattern for regular class names.
Crawls a folder, iterates over subfolders, looking for class files.
Returns the names of Classes and direct subpackages contained in a package.
Returns all package names found at URL; accepts jar files and folders.
Copyright © 2003-2020 The Apache Software Foundation. All rights reserved.