public class APIComparator
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
APIDiff |
apiDiff
Top-level object representing the differences between two APIs.
|
jdiff.PackageDiff |
pkgDiff
Package-level object representing the differences between two packages.
|
Constructor and Description |
---|
APIComparator()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
static int |
changedInheritance(java.lang.String oldInherit,
java.lang.String newInherit)
Decide if two elements changed where they were defined.
|
boolean |
compareAllCtors(jdiff.ClassAPI oldClass,
jdiff.ClassAPI newClass,
jdiff.ClassDiff classDiff)
Compare all the constructors in two classes.
|
boolean |
compareAllFields(jdiff.ClassAPI oldClass,
jdiff.ClassAPI newClass,
jdiff.ClassDiff classDiff)
Compare all the fields in two classes.
|
boolean |
compareAllMethods(jdiff.ClassAPI oldClass,
jdiff.ClassAPI newClass,
jdiff.ClassDiff classDiff)
Compare all the methods in two classes.
|
void |
compareAPIs(API oldAPI,
API newAPI)
Compare two APIs.
|
double |
compareClasses(jdiff.ClassAPI oldClass,
jdiff.ClassAPI newClass,
jdiff.PackageDiff pkgDiff)
Compare two classes.
|
boolean |
compareMethods(jdiff.MethodAPI oldMethod,
jdiff.MethodAPI newMethod,
jdiff.ClassDiff classDiff)
Compare two methods which have the same name.
|
double |
comparePackages(jdiff.PackageAPI oldPkg,
jdiff.PackageAPI newPkg)
Compare two packages.
|
static boolean |
docChanged(java.lang.String oldDoc,
java.lang.String newDoc)
Decide if two blocks of documentation changed.
|
static java.lang.String |
linkToClass(jdiff.FieldAPI m,
boolean useNew)
Generate a link to the Javadoc page for the given field.
|
static java.lang.String |
linkToClass(jdiff.MethodAPI m,
boolean useNew)
Generate a link to the Javadoc page for the given method.
|
static java.lang.String |
linkToClass(java.lang.String className,
java.lang.String memberName,
java.lang.String memberType,
boolean useNew)
Given the name of the class, generate a link to a relevant page.
|
int |
numLocalFields(java.util.List fields)
Return the number of fields which are locally defined.
|
int |
numLocalMethods(java.util.List methods)
Return the number of methods which are locally defined.
|
public APIDiff apiDiff
public jdiff.PackageDiff pkgDiff
public double comparePackages(jdiff.PackageAPI oldPkg, jdiff.PackageAPI newPkg)
public double compareClasses(jdiff.ClassAPI oldClass, jdiff.ClassAPI newClass, jdiff.PackageDiff pkgDiff)
public boolean compareAllCtors(jdiff.ClassAPI oldClass, jdiff.ClassAPI newClass, jdiff.ClassDiff classDiff)
public boolean compareAllMethods(jdiff.ClassAPI oldClass, jdiff.ClassAPI newClass, jdiff.ClassDiff classDiff)
public boolean compareMethods(jdiff.MethodAPI oldMethod, jdiff.MethodAPI newMethod, jdiff.ClassDiff classDiff)
public boolean compareAllFields(jdiff.ClassAPI oldClass, jdiff.ClassAPI newClass, jdiff.ClassDiff classDiff)
public static boolean docChanged(java.lang.String oldDoc, java.lang.String newDoc)
public static int changedInheritance(java.lang.String oldInherit, java.lang.String newInherit)
public static java.lang.String linkToClass(jdiff.MethodAPI m, boolean useNew)
public static java.lang.String linkToClass(jdiff.FieldAPI m, boolean useNew)
public static java.lang.String linkToClass(java.lang.String className, java.lang.String memberName, java.lang.String memberType, boolean useNew)
public int numLocalMethods(java.util.List methods)
public int numLocalFields(java.util.List fields)