public class JarDiff extends Object
| Modifier and Type | Field and Description |
|---|---|
protected Map |
depClassInfo
A map containing information about classes which are dependencies.
|
protected Map |
newClassInfo
A map containing information about classes in the new jar file.
|
protected Map |
oldClassInfo
A map containing information about classes in the old jar file.
|
| Constructor and Description |
|---|
JarDiff()
Create a new JarDiff object.
|
| Modifier and Type | Method and Description |
|---|---|
void |
diff(DiffHandler handler,
DiffCriteria criteria)
Perform a diff sending the output to the specified handler, using
the specified criteria to select diffs.
|
URL[] |
getDependencies()
Get the dependencies.
|
String |
getNewVersion()
Get the name of the new version.
|
String |
getOldVersion()
Get the name of the old version.
|
void |
loadNewClasses(File file)
Load new classes from the specified File.
|
void |
loadNewClasses(URL loc)
Load new classes from the specified URL.
|
void |
loadOldClasses(File file)
Load old classes from the specified File.
|
void |
loadOldClasses(URL loc)
Load old classes from the specified URL.
|
void |
setDependencies(URL[] deps)
Set the dependencies.
|
void |
setNewVersion(String newVersion)
Set the name of the new version.
|
void |
setOldVersion(String oldVersion)
Set the name of the old version.
|
protected Map depClassInfo
protected Map oldClassInfo
protected Map newClassInfo
public void setOldVersion(String oldVersion)
oldVersion - the namepublic String getOldVersion()
public void setNewVersion(String newVersion)
newVersion - public String getNewVersion()
public void setDependencies(URL[] deps)
deps - an array of urls pointing to jar files or directories
containing classes which are required dependencies.public URL[] getDependencies()
public void loadOldClasses(URL loc) throws DiffException
loc - The location of a jar file to load classes from.DiffException - if there is an IOException.public void loadNewClasses(URL loc) throws DiffException
loc - The location of a jar file to load classes from.DiffException - if there is an IOException.public void loadOldClasses(File file) throws DiffException
file - The location of a jar file to load classes from.DiffException - if there is an IOExceptionpublic void loadNewClasses(File file) throws DiffException
file - The location of a jar file to load classes from.DiffExeption - if there is an IOExceptionDiffExceptionpublic void diff(DiffHandler handler, DiffCriteria criteria) throws DiffException
handler - The handler to receive and handle differences.criteria - The criteria we use to select differences.DiffException - when there is an underlying exception, e.g.
writing to a file caused an IOExceptionCopyright © 2010–2014. All rights reserved.