|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectweka.core.ClassDiscovery
public class ClassDiscovery
This class is used for discovering classes that implement a certain interface or a derived from a certain class.
ClassDiscovery.StringCompare| Nested Class Summary | |
|---|---|
static class |
ClassDiscovery.StringCompare
compares two strings. |
| Field Summary | |
|---|---|
static boolean |
VERBOSE
whether to output some debug information. |
| Constructor Summary | |
|---|---|
ClassDiscovery()
|
|
| Method Summary | |
|---|---|
static void |
clearCache()
clears the cache for class/classnames relation. |
static java.util.Vector |
find(java.lang.Class cls,
java.lang.String pkgname)
Checks the given package for classes that inherited from the given class, in case it's a class, or implement this class, in case it's an interface. |
static java.util.Vector |
find(java.lang.Class cls,
java.lang.String[] pkgnames)
Checks the given packages for classes that inherited from the given class, in case it's a class, or implement this class, in case it's an interface. |
static java.util.Vector |
find(java.lang.String classname,
java.lang.String pkgname)
Checks the given package for classes that inherited from the given class, in case it's a class, or implement this class, in case it's an interface. |
static java.util.Vector |
find(java.lang.String classname,
java.lang.String[] pkgnames)
Checks the given packages for classes that inherited from the given class, in case it's a class, or implement this class, in case it's an interface. |
static java.util.Vector |
findPackages()
Lists all packages it can find in the classpath. |
java.lang.String |
getRevision()
Returns the revision string. |
static boolean |
hasInterface(java.lang.Class intf,
java.lang.Class cls)
Checks whether the given class implements the given interface. |
static boolean |
hasInterface(java.lang.String intf,
java.lang.String cls)
Checks whether the given class implements the given interface. |
static boolean |
isSubclass(java.lang.Class superclass,
java.lang.Class otherclass)
Checks whether the "otherclass" is a subclass of the given "superclass". |
static boolean |
isSubclass(java.lang.String superclass,
java.lang.String otherclass)
Checks whether the "otherclass" is a subclass of the given "superclass". |
static void |
main(java.lang.String[] args)
Possible calls: weka.core.ClassDiscovery <packages> Prints all the packages in the current classpath weka.core.ClassDiscovery <classname> <packagename(s)> Prints the classes it found. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final boolean VERBOSE
| Constructor Detail |
|---|
public ClassDiscovery()
| Method Detail |
|---|
public static boolean isSubclass(java.lang.String superclass,
java.lang.String otherclass)
superclass - the superclass to check againstotherclass - this class is checked whether it is a subclass
of the the superclass
public static boolean isSubclass(java.lang.Class superclass,
java.lang.Class otherclass)
superclass - the superclass to check againstotherclass - this class is checked whether it is a subclass
of the the superclass
public static boolean hasInterface(java.lang.String intf,
java.lang.String cls)
intf - the interface to look for in the given classcls - the class to check for the interface
public static boolean hasInterface(java.lang.Class intf,
java.lang.Class cls)
intf - the interface to look for in the given classcls - the class to check for the interface
public static java.util.Vector find(java.lang.String classname,
java.lang.String[] pkgnames)
classname - the class/interface to look forpkgnames - the packages to search in
public static java.util.Vector find(java.lang.String classname,
java.lang.String pkgname)
classname - the class/interface to look forpkgname - the package to search in
public static java.util.Vector find(java.lang.Class cls,
java.lang.String[] pkgnames)
cls - the class/interface to look forpkgnames - the packages to search in
public static java.util.Vector find(java.lang.Class cls,
java.lang.String pkgname)
cls - the class/interface to look forpkgname - the package to search in
public static java.util.Vector findPackages()
public static void clearCache()
public java.lang.String getRevision()
getRevision in interface RevisionHandlerpublic static void main(java.lang.String[] args)
args - the commandline arguments
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||