|
Groovy 2.2.0 | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | PROPERTY | CONSTR | METHOD | DETAIL: FIELD | PROPERTY | CONSTR | METHOD |
java.lang.Object org.codehaus.groovy.tools.shell.util.PackageHelper
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.
Field Summary | |
---|---|
static String |
IMPORT_COMPLETION_PREFERENCE_KEY
|
static Pattern |
NAME_PATTERN
|
protected static Logger |
log
|
Property Summary | |
---|---|
ClassLoader |
groovyClassLoader
|
Map |
rootPackages
|
Constructor Summary | |
PackageHelper(ClassLoader groovyClassLoader)
|
Method Summary | |
---|---|
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 packagenames found at URL, accepts jar files and folders |
static Collection
|
getPackageNamesFromJar(JarFile jf)
|
static Map
|
initializePackages(ClassLoader groovyClassLoader)
|
static def
|
mergeNewPackages(Collection packageNames, URL url, Map rootPackages)
|
void
|
preferenceChange(PreferenceChangeEvent evt)
|
Methods inherited from class Object | |
---|---|
wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll |
Field Detail |
---|
public static final String IMPORT_COMPLETION_PREFERENCE_KEY
public static final Pattern NAME_PATTERN
protected static final Logger log
Property Detail |
---|
ClassLoader groovyClassLoader
Map rootPackages
Constructor Detail |
---|
PackageHelper(ClassLoader groovyClassLoader)
Method Detail |
---|
static Collection collectPackageNamesFromFolderRecursive(File directory, String prefix, Set packnames)
static Set getClassnames(Set urls, String packagename)
Set getContents(String packagename)
static Collection getPackageNames(URL url)
static Collection getPackageNamesFromJar(JarFile jf)
static Map initializePackages(ClassLoader groovyClassLoader)
static def mergeNewPackages(Collection packageNames, URL url, Map rootPackages)
@Override void preferenceChange(PreferenceChangeEvent evt)
Copyright © 2003-2013 The Codehaus. All rights reserved.