|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectweka.core.RTSI
This utility class is looking for all the classes implementing or
inheriting from a given interface or class.
(RTSI = RunTime Subclass Identification)
Notes
StringCompare
)
RTSI.StringCompare
Nested Class Summary | |
class |
RTSI.StringCompare
compares two strings with the following order: case insensitive german umlauts (ä , ö etc.) or other non-ASCII letters are treated as special chars special chars < numbers < letters |
Field Summary | |
static boolean |
VERBOSE
whether to output some debug information |
Constructor Summary | |
RTSI()
|
Method Summary | |
static java.util.Vector |
find(java.lang.String tosubclassname)
Returns all the classes inheriting or implementing a given class in the currently loaded packages. Note: If a package, containing subclasses, has not been loaded by the time of this method call, these classes won't be found! It's better to define the package name explicitly in which to look for subclasses, like in find(String,String) . |
static java.util.Vector |
find(java.lang.String pckgname,
java.lang.Class tosubclass)
Return all the classes inheriting or implementing a given class in a given package. |
static java.util.Vector |
find(java.lang.String pckname,
java.lang.String tosubclassname)
Returns all the classes inheriting or implementing a given class in a given package. |
static boolean |
hasInterface(java.lang.Class intf,
java.lang.Class 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 void |
main(java.lang.String[] args)
for testing only |
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 RTSI()
Method Detail |
public static java.util.Vector find(java.lang.String tosubclassname)
find(String,String)
.
tosubclassname
- the name of the class to inherit from
find(String,String)
public static java.util.Vector find(java.lang.String pckname, java.lang.String tosubclassname)
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.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 pckgname, java.lang.Class tosubclass)
pckgname
- the fully qualified name of the packagetosubclass
- the Class object to inherit from
public static void main(java.lang.String[] args)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |