Environment for
DeveLoping
KDD-Applications
Supported by Index-Structures

de.lmu.ifi.dbs.elki.utilities
Class InspectionUtil

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.utilities.InspectionUtil

public class InspectionUtil
extends Object

A collection of inspection-related utility functions.

Author:
Erich Schubert

Nested Class Summary
(package private) static class InspectionUtil.DirClassIterator
           
(package private) static class InspectionUtil.JarClassIterator
           
 
Field Summary
private static String[] DEFAULT_IGNORES
          Default package ignores.
 
Constructor Summary
InspectionUtil()
           
 
Method Summary
static List<Class<?>> findAllImplementations(Class<?> c, boolean everything)
          Find all implementations of a given class in the classpath.
static List<Class<?>> findAllImplementations(String[] classpath, Class<?> c, String[] ignorepackages, boolean everything)
          Find all implementations of a given class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_IGNORES

private static final String[] DEFAULT_IGNORES
Default package ignores.

Constructor Detail

InspectionUtil

public InspectionUtil()
Method Detail

findAllImplementations

public static List<Class<?>> findAllImplementations(Class<?> c,
                                                    boolean everything)
Find all implementations of a given class in the classpath. Note: returned classes may be abstract.

Parameters:
c - Class restriction
everything - include interfaces, abstract and private classes
Returns:
List of found classes.

findAllImplementations

public static List<Class<?>> findAllImplementations(String[] classpath,
                                                    Class<?> c,
                                                    String[] ignorepackages,
                                                    boolean everything)
Find all implementations of a given class.

Parameters:
classpath - Classpath to use (JARs and folders supported)
c - Class restriction
ignorepackages - List of packages to ignore
everything - include interfaces, abstract and private classes
Returns:
List of found classes.

Release 0.2 (2009-07-06_1820)