public class SubclassFinder extends Object
InstanceParameterSet that can be used to
instantiate a sub-class of InstantiableFromParameterSet.CollectionParameter using all possible
InstanceParameterSets (for classes that are a subclass of a specified
superclass) as elementsClassLoader than the caller| Constructor and Description |
|---|
SubclassFinder() |
| Modifier and Type | Method and Description |
|---|---|
static LinkedList<Class> |
findInstantiableSubclasses(Class clazz,
String startPackage)
Returns all sub-classes of
T that can be instantiated, i.e. |
static LinkedList<Class> |
findSubclasses(Class clazz,
String startPackage)
Returns all sub-classes of
T including interfaces and
abstract classes that are located in a package below
startPackage. |
static LinkedList<Class> |
findSubclasses(String prefix,
Class clazz,
String startPackage) |
public static LinkedList<Class> findInstantiableSubclasses(Class clazz, String startPackage) throws ClassNotFoundException, IOException
T that can be instantiated, i.e.
are neither an interface nor abstract, and that are located in a package
below startPackage.T - The class to obtain the sub-classes forclazz - the Class object for TstartPackage - the package under which to searchClass objects for the sub-classesClassNotFoundException - if one of the classes is present in the file system or jar
but cannot be loaded by the class loaderIOException - is thrown if the classes are searched for in a jar file, but
that file could not be accessed or readpublic static LinkedList<Class> findSubclasses(Class clazz, String startPackage) throws ClassNotFoundException, IOException
T including interfaces and
abstract classes that are located in a package below
startPackage.T - The class to obtain the sub-classes forclazz - the Class object for TstartPackage - the package under which to searchClass objects for the sub-classesClassNotFoundException - if one of the classes is present in the file system or jar
but cannot be loaded by the class loaderIOException - is thrown if the classes are searched for in a jar file, but
that file could not be accessed or readpublic static LinkedList<Class> findSubclasses(String prefix, Class clazz, String startPackage) throws ClassNotFoundException, IOException
ClassNotFoundExceptionIOExceptionCopyright © 2010–2015 Martin Luther University Halle-Wittenberg, Institute of Computer Science, Pattern Recognition and Bioinformatics. All rights reserved.