class PackageHelper
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 |
---|---|---|
static String |
IMPORT_COMPLETION_PREFERENCE_KEY |
|
static Pattern |
NAME_PATTERN |
|
protected static Logger |
log |
Type | Name and description |
---|---|
ClassLoader |
groovyClassLoader |
Map<String, CachedPackage> |
rootPackages |
Constructor and description |
---|
PackageHelper
(ClassLoader groovyClassLoader) |
Type | Name and description |
---|---|
static Collection<String> |
collectPackageNamesFromFolderRecursive(File directory, String prefix, Set<String> packnames) Crawls a folder, iterates over subfolders, looking for class files. |
static Set<String> |
getClassnames(Set<URL> urls, String packagename) Copied from JLine 1.0 ClassNameCompletor |
Set<String> |
getContents(String packagename) returns the names of Classes and direct subpackages contained in a package |
static Collection<String> |
getPackageNames(URL url) Returns all packagenames found at URL, accepts jar files and folders |
static Collection<String> |
getPackageNamesFromJar(JarFile jf) |
static Map<String, CachedPackage> |
initializePackages(ClassLoader groovyClassLoader) |
static def |
mergeNewPackages(Collection<String> packageNames, URL url, Map<String, CachedPackage> rootPackages) |
void |
preferenceChange(PreferenceChangeEvent evt) |
Crawls a folder, iterates over subfolders, looking for class files.
Copied from JLine 1.0 ClassNameCompletor
returns the names of Classes and direct subpackages contained in a package
Returns all packagenames found at URL, accepts jar files and folders
Copyright © 2003-2014 The Codehaus. All rights reserved.