public class DependencyAnalyzer
extends java.lang.Object
Constructor and Description |
---|
DependencyAnalyzer() |
Modifier and Type | Method and Description |
---|---|
java.util.Set<java.lang.String> |
getLocalPackages()
Returns the set of own package names, i.e.
|
java.util.Set<java.lang.String> |
getUsedPackages()
Retrieves the combined set of accumulated used/external packages.
|
java.util.Set<java.lang.String> |
getUsedPackages(java.lang.String packageName)
Retrieves the accumulated used/external packages for a given package.
|
void |
scanClasses(java.io.File classesDir)
Scans a directory containing compiled class files.
|
void |
scanClassPath(java.util.Collection<java.io.File> classPath)
Scans the given classpath.
|
void |
scanJAR(java.io.File jar)
Scans a JAR file.
|
void |
scanJarEntry(java.util.jar.JarFile jar,
java.util.jar.JarEntry e)
Scans a particular entry in a JAR file.
|
public void scanClassPath(java.util.Collection<java.io.File> classPath) throws java.io.IOException
File
instances passed in can be directories
containing ".class" files or JAR files.classPath
- the classpath to scanjava.io.IOException
- if an I/O error occurspublic void scanJarEntry(java.util.jar.JarFile jar, java.util.jar.JarEntry e) throws java.io.IOException
jar
- the JAR filee
- the entry to scanjava.io.IOException
- if an I/O error occurspublic void scanJAR(java.io.File jar) throws java.io.IOException
jar
- the JAR file to scanjava.io.IOException
- if an I/O error occurspublic void scanClasses(java.io.File classesDir) throws java.io.IOException
classesDir
- the directoryjava.io.IOException
- if an I/O error occurspublic java.util.Set<java.lang.String> getUsedPackages(java.lang.String packageName)
packageName
- the package namepublic java.util.Set<java.lang.String> getUsedPackages()
public java.util.Set<java.lang.String> getLocalPackages()
Copyright 2009-2010 Jeremias M?rki. All Rights Reserved.