程序包 weka.core
类 ClassDiscovery
java.lang.Object
weka.core.ClassDiscovery
- 所有已实现的接口:
RevisionHandler
This class is used for discovering classes that implement a certain
interface or a derived from a certain class.
- 版本:
- $Revision: 5377 $
- 作者:
- FracPete (fracpete at waikato dot ac dot nz)
- 另请参阅:
-
嵌套类概要
嵌套类 -
字段概要
字段 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static void
clears the cache for class/classnames relation.static Vector
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 Vector
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 Vector
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 Vector
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 Vector
Lists all packages it can find in the classpath.Returns the revision string.static boolean
hasInterface
(Class intf, Class cls) Checks whether the given class implements the given interface.static boolean
hasInterface
(String intf, String cls) Checks whether the given class implements the given interface.static boolean
isSubclass
(Class superclass, Class otherclass) Checks whether the "otherclass" is a subclass of the given "superclass".static boolean
isSubclass
(String superclass, String otherclass) Checks whether the "otherclass" is a subclass of the given "superclass".static void
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.
-
字段详细资料
-
VERBOSE
public static final boolean VERBOSEwhether to output some debug information.- 另请参阅:
-
-
构造器详细资料
-
ClassDiscovery
public ClassDiscovery()
-
-
方法详细资料
-
isSubclass
Checks whether the "otherclass" is a subclass of the given "superclass".- 参数:
superclass
- the superclass to check againstotherclass
- this class is checked whether it is a subclass of the the superclass- 返回:
- TRUE if "otherclass" is a true subclass
-
isSubclass
Checks whether the "otherclass" is a subclass of the given "superclass".- 参数:
superclass
- the superclass to check againstotherclass
- this class is checked whether it is a subclass of the the superclass- 返回:
- TRUE if "otherclass" is a true subclass
-
hasInterface
Checks whether the given class implements the given interface.- 参数:
intf
- the interface to look for in the given classcls
- the class to check for the interface- 返回:
- TRUE if the class contains the interface
-
hasInterface
Checks whether the given class implements the given interface.- 参数:
intf
- the interface to look for in the given classcls
- the class to check for the interface- 返回:
- TRUE if the class contains the interface
-
find
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.- 参数:
classname
- the class/interface to look forpkgnames
- the packages to search in- 返回:
- a list with all the found classnames
-
find
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.- 参数:
classname
- the class/interface to look forpkgname
- the package to search in- 返回:
- a list with all the found classnames
-
find
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.- 参数:
cls
- the class/interface to look forpkgnames
- the packages to search in- 返回:
- a list with all the found classnames
-
find
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.- 参数:
cls
- the class/interface to look forpkgname
- the package to search in- 返回:
- a list with all the found classnames
-
findPackages
Lists all packages it can find in the classpath.- 返回:
- a list with all the found packages
-
clearCache
public static void clearCache()clears the cache for class/classnames relation. -
getRevision
Returns the revision string.- 指定者:
getRevision
在接口中RevisionHandler
- 返回:
- the revision
-
main
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.
- 参数:
args
- the commandline arguments
-
weka.core.ClassDiscovery <packages>
-