ClassSearcher

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.jagatoo.util.classes
Class ClassSearcher

    java.lang.Object
      org.jagatoo.util.classes.ClassSearcher

    public class ClassSearcher

extends java.lang.Object

The `ClassSearcher` provides utility methods to search classes.

Author:
  Marvin Froehlich (aka Qudus)

Method Summary
`static java.util.List<java.lang.Class<?>>` | `findClasses(boolean includeClassPath, java.net.URLClassLoader classLoader, ClassSearchCriterium crit, java.lang.String... packagePrefixes)` Reads all classnames from given packages into a List, that match certrain criteria.
`static java.util.List<java.lang.Class<?>>` | `findClasses(boolean includeClassPath, java.net.URLClassLoader classLoader, java.util.Map<java.lang.Class<?>,java.util.jar.JarFile> jarMap, ClassSearchCriterium crit, java.lang.String... packagePrefixes)` Reads all classnames from given packages into a List, that match certrain criteria.
`static java.util.List<java.lang.Class<?>>` | `findClasses(ClassSearchCriterium crit, java.lang.String... packagePrefixes)` Reads all classnames from given packages into a List, that match certrain criteria.
`static java.util.List<java.lang.Class<?>>` | `findClasses(java.util.Map<java.lang.Class<?>,java.util.jar.JarFile> jarMap, ClassSearchCriterium crit, java.lang.String... packagePrefixes)` Reads all classnames from given packages into a List, that match certrain criteria.
`static java.util.List<java.lang.Class<?>>` | `findClasses(java.net.URLClassLoader classLoader, ClassSearchCriterium crit, java.lang.String... packagePrefixes)` Reads all classnames from given packages into a List, that match certrain criteria.
`static java.util.List<java.lang.Class<?>>` | `findClasses(java.net.URLClassLoader classLoader, java.util.Map<java.lang.Class<?>,java.util.jar.JarFile> jarMap, ClassSearchCriterium crit, java.lang.String... packagePrefixes)` Reads all classnames from given packages into a List, that match certrain criteria.

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

Method Detail

### findClasses

    public static java.util.List<java.lang.Class<?>> findClasses(java.util.Map<java.lang.Class<?>,java.util.jar.JarFile> jarMap,
                                                                 ClassSearchCriterium crit,
                                                                 java.lang.String... packagePrefixes)

  Reads all classnames from given packages into a List, that match certrain criteria.

  Parameters:
    `jarMap` - a map to fill with class-to-jar mappings (or null to ignore)
    `crit` - the Criterium to check for each class
    `packagePrefixes` - dot separated package prefix names (like "org.jagatoo.test")
  Returns:
    the filled up List

### findClasses

    public static java.util.List<java.lang.Class<?>> findClasses(ClassSearchCriterium crit,
                                                                 java.lang.String... packagePrefixes)

  Reads all classnames from given packages into a List, that match certrain criteria.

  Parameters:
    `crit` - the Criterium to check for each class
    `packagePrefixes` - dot separated package prefix names (like "org.jagatoo.test")
  Returns:
    the filled up List

### findClasses

    public static java.util.List<java.lang.Class<?>> findClasses(boolean includeClassPath,
                                                                 java.net.URLClassLoader classLoader,
                                                                 java.util.Map<java.lang.Class<?>,java.util.jar.JarFile> jarMap,
                                                                 ClassSearchCriterium crit,
                                                                 java.lang.String... packagePrefixes)
                                                          throws java.io.IOException

  Reads all classnames from given packages into a List, that match certrain criteria.

  Parameters:
    `includeClassPath` - whether to search the class path, too
    `classLoader` - the class loader to search classes in
    `jarMap` - a map to fill with class-to-jar mappings (or null to ignore)
    `crit` - the Criterium to check for each class
    `packagePrefixes` - dot separated package prefix names (like "org.jagatoo.test")
  Returns:
    the filled up List
  Throws:
    `java.io.IOException`

### findClasses

    public static java.util.List<java.lang.Class<?>> findClasses(boolean includeClassPath,
                                                                 java.net.URLClassLoader classLoader,
                                                                 ClassSearchCriterium crit,
                                                                 java.lang.String... packagePrefixes)
                                                          throws java.io.IOException

  Reads all classnames from given packages into a List, that match certrain criteria.

  Parameters:
    `includeClassPath` - whether to search the class path, too
    `classLoader` - the class loader to search classes in
    `crit` - the Criterium to check for each class
    `packagePrefixes` - dot separated package prefix names (like "org.jagatoo.test")
  Returns:
    the filled up List
  Throws:
    `java.io.IOException`

### findClasses

    public static java.util.List<java.lang.Class<?>> findClasses(java.net.URLClassLoader classLoader,
                                                                 java.util.Map<java.lang.Class<?>,java.util.jar.JarFile> jarMap,
                                                                 ClassSearchCriterium crit,
                                                                 java.lang.String... packagePrefixes)
                                                          throws java.io.IOException

  Reads all classnames from given packages into a List, that match certrain criteria.

  Parameters:
    `classLoader` - the class loader to search classes in
    `jarMap` - a map to fill with class-to-jar mappings (or null to ignore)
    `crit` - the Criterium to check for each class
    `packagePrefixes` - dot separated package prefix names (like "org.jagatoo.test")
  Returns:
    the filled up List
  Throws:
    `java.io.IOException`

### findClasses

    public static java.util.List<java.lang.Class<?>> findClasses(java.net.URLClassLoader classLoader,
                                                                 ClassSearchCriterium crit,
                                                                 java.lang.String... packagePrefixes)
                                                          throws java.io.IOException

  Reads all classnames from given packages into a List, that match certrain criteria.

  Parameters:
    `classLoader` - the class loader to search classes in
    `crit` - the Criterium to check for each class
    `packagePrefixes` - dot separated package prefix names (like "org.jagatoo.test")
  Returns:
    the filled up List
  Throws:
    `java.io.IOException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD