|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectweka.core.ClassCache
public class ClassCache
A singleton that stores all classes on the classpath.
| Nested Class Summary | |
|---|---|
static class |
ClassCache.ClassFileFilter
For filtering classes. |
static class |
ClassCache.DirectoryFilter
For filtering classes. |
| Field Summary | |
|---|---|
static String |
DEFAULT_PACKAGE
the key for the default package. |
static boolean |
VERBOSE
whether to output some debug information. |
| Constructor Summary | |
|---|---|
ClassCache()
Initializes the cache. |
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final boolean VERBOSE
public static final String DEFAULT_PACKAGE
| Constructor Detail |
|---|
public ClassCache()
| Method Detail |
|---|
public boolean add(String classname)
classname - the classname, automatically removes ".class" and
turns "/" or "\" into "."
public boolean remove(String classname)
classname - the classname to remove
public Enumeration<String> packages()
public HashSet<String> getClassnames(String pkgname)
pkgname - the package to get the classes for
public ArrayList<String> find(String matchText)
matchText - the text to match
public String getRevision()
getRevision in interface RevisionHandlerpublic static void main(String[] args)
args - ignored
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||