|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.osjava.jardiff.JarDiff
A class to perform a diff between two jar files.
| Field Summary | |
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 Summary | |
JarDiff()
Create a new JarDiff object. |
|
| Method Summary | |
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. |
static void |
main(String[] args)
Main method to allow this to be run from the command line. |
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. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected Map depClassInfo
protected Map oldClassInfo
protected Map newClassInfo
| Constructor Detail |
public JarDiff()
| Method Detail |
public static void main(String[] args)
throws Exception
args - A string array of length two containing the filenames of
two jar files, the first of which being the older of the
two.
Exception - when there is an underlying exception, e.g.
writing to a file caused an IOExceptionpublic 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 IOException
public void loadNewClasses(File file)
throws DiffException
file - The location of a jar file to load classes from.
DiffExeption - if there is an IOException
DiffException
public 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 IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||