Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.any23.util
Class DiscoveryUtils

    java.lang.Object
      org.apache.any23.util.DiscoveryUtils

    public class DiscoveryUtils

extends Object

This class provides utility methods for discovering classes in packages.

Author:
  Michele Mostarda (mostarda@fbk.eu)

Method Summary
`static List<Class>` | `getClassesInPackage(String packageName)` Scans all classes accessible from the context class loader which belong to the given package and sub-packages.
`static List<Class>` | `getClassesInPackage(String packageName, Class filter)` Scans all classes accessible from the context class loader which belong to the given package and sub-packages and filter them by ones implementing the specified interface `iface`.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### getClassesInPackage

    public static List<Class> getClassesInPackage(String packageName)

  Scans all classes accessible from the context class loader which belong to the given package and sub-packages.

  Parameters:
    `packageName` - the root package.
  Returns:
    list of matching classes.
  Throws:
    `IOException`

### getClassesInPackage

    public static List<Class> getClassesInPackage(String packageName,
                                                  Class filter)

  Scans all classes accessible from the context class loader which belong to the given package and sub-packages and filter them by ones implementing the specified interface `iface`.

  Parameters:
    `packageName` - the root package.
    `filter` - the interface/class filter.
  Returns:
    list of matching classes.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2010-2012 The Apache Software Foundation. All Rights Reserved.