public class ClassCache extends Object implements RevisionHandler
| Modifier and Type | Class and Description |
|---|---|
static class |
ClassCache.ClassFileFilter
For filtering classes.
|
static class |
ClassCache.DirectoryFilter
For filtering classes.
|
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_PACKAGE
the key for the default package.
|
static boolean |
VERBOSE
whether to output some debug information.
|
| Constructor and Description |
|---|
ClassCache()
Initializes the cache.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(String classname)
Adds the classname to the cache.
|
ArrayList<String> |
find(String matchText)
Find all classes that have the supplied matchText String in their suffix.
|
HashSet<String> |
getClassnames(String pkgname)
Returns all the classes for the given package.
|
String |
getRevision()
Returns the revision string.
|
static void |
main(String[] args)
For testing only.
|
Enumeration<String> |
packages()
Returns all the stored packages.
|
boolean |
remove(String classname)
Removes the classname from the cache.
|
public static final boolean VERBOSE
public static final String DEFAULT_PACKAGE
public boolean add(String classname)
classname - the classname, automatically removes ".class" and turns
"/" or "\" into "."public boolean remove(String classname)
classname - the classname to removepublic Enumeration<String> packages()
public HashSet<String> getClassnames(String pkgname)
pkgname - the package to get the classes forpublic ArrayList<String> find(String matchText)
matchText - the text to matchpublic String getRevision()
getRevision in interface RevisionHandlerpublic static void main(String[] args)
args - ignoredCopyright © 2016 University of Waikato, Hamilton, NZ. All Rights Reserved.