|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ch.elca.el4j.util.classpath.DuplicateClassFinder
public class DuplicateClassFinder
A tool for looking up duplicate class definitions in the classpath. It can also be used to inspect all class definitions loaded.
Constructor Summary | |
---|---|
DuplicateClassFinder()
Default constructor - initialize the members. |
Method Summary | |
---|---|
void |
addClass(Class<?> c)
Add a class's classloader search path. |
void |
addSystemClassPath()
Add the system class path to the search path. |
void |
addUrl(URL url)
Add an URL to the search path. |
void |
addURLClassLoader(URLClassLoader cl)
Add all URLs of a given classloader to the search path. |
boolean |
duplicatesFound()
|
Set<String> |
getAllClasses()
|
Set<String> |
getAllDuplicates()
|
List<String> |
getLocations(String name)
Returns all locations a class is defined at. |
boolean |
hasClass(String name)
Looks up whether a class name exists. |
void |
report()
Display the search results. |
void |
search()
Search the added urls for classes. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DuplicateClassFinder()
Method Detail |
---|
public void addUrl(URL url)
url
- The URL to add.public void addURLClassLoader(URLClassLoader cl)
cl
- The classloader.public void addClass(Class<?> c)
URLClassLoader
, add its URLs. If not, add the system classpath.
c
- The class to add.public void addSystemClassPath()
public void search()
public void report()
public Set<String> getAllClasses()
public boolean hasClass(String name)
name
- The fully qualified class name.
public List<String> getLocations(String name)
name
- The class name.
public boolean duplicatesFound()
public Set<String> getAllDuplicates()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |