|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectch.elca.el4j.services.persistence.hibernate.entityfinder.ClassLocator
public class ClassLocator
Utility to locate classes from the classpath.
| Field Summary | |
|---|---|
protected ClassLoader |
classLoader
Is the used classloader to lookup classes. |
protected String[] |
packageNames
Are the package names the found classes' package must start with. |
| Constructor Summary | |
|---|---|
ClassLocator(ClassLoader classLoader,
String... packageNames)
Locates all classes that are in one of the given packages (inclusive sub-packages). |
|
ClassLocator(String... packageNames)
Locates all classes that are in one of the given packages (inclusive sub-packages). |
|
| Method Summary | |
|---|---|
List<ClassLocation> |
getAllClassLocations()
Returns all located classes where the found classes' package starts with one of the given package names. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final String[] packageNames
protected final ClassLoader classLoader
| Constructor Detail |
|---|
public ClassLocator(String... packageNames)
throws ClassNotFoundException
packageNames - Are the package names the found classes' package must start with.
ClassNotFoundException - If the context classloader of the current thread could not be fetched.
public ClassLocator(ClassLoader classLoader,
String... packageNames)
classLoader - Is the used classloader to lookup classes.packageNames - Are the package names the found classes' package must start with.| Method Detail |
|---|
public List<ClassLocation> getAllClassLocations()
throws ClassNotFoundException,
IOException
ClassNotFoundException - If no class could be found for one of the given packages.
IOException - If there was a general IO problem.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||