public class DiffCommandJar extends DiffCommandZip
DiffCommandJar diff=new DiffCommandJar(jarfile1,jarfile2);
DiffResult result=diff.getResult();
for(DiffItem i:result){
switch(i.getItemType()){
case "java-class": {
String className=((DiffItemJavaClass)i).getclassName();
if(i.getDiffStatus()==DiffStatus.ADDED){
System.out.println(className +" is a new class");
}
System.out.println(i);
break;
}
default: {
System.out.println(i);
break;
}
}
}
DiffCommandZip.ZipSource, DiffCommandZip.ZipSourceFile| Modifier and Type | Field and Description |
|---|---|
static DiffCommandJar |
INSTANCE |
| Modifier | Constructor and Description |
|---|---|
protected |
DiffCommandJar() |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
acceptEntry(String entryName) |
int |
acceptInput(Object input) |
acceptDiffKey, createContentDiffItem, hash, map, prepareSourceOrTargetcreateChildItem, createContext, createResult, eval, getId, resolveDiffItemFactorypublic static final DiffCommandJar INSTANCE
protected boolean acceptEntry(String entryName)
acceptEntry in class DiffCommandZippublic int acceptInput(Object input)
acceptInput in interface DiffCommandacceptInput in class DiffCommandZipCopyright © 2022 vpc open source initiative. All rights reserved.