Class ClassComparer
java.lang.Object
org.eclipse.collections.impl.test.ClassComparer
This class will compare the method signatures between two classes. The comparison
can be based on the following method information:
- Method Name
- Method Name + Parameter Types
- Method Name + Return Type
- Method Name + Parameter Types + Return Type
The operations that can be used to compare the method signatures of two classes are:
- Intersection
- Difference
- Symmetric difference
- isProperSubsetOf
- isProperSupersetOf
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Appendableprivate static final Stringprivate booleanprivate final booleanprivate final booleanprivate final booleanprivate static final Stringprivate static final String -
Constructor Summary
ConstructorsConstructorDescriptionClassComparer(boolean includeParameterTypesInMethods, boolean includeReturnTypes, boolean includePackageNames) ClassComparer(Appendable out) ClassComparer(Appendable out, boolean includeParameterTypesInMethods, boolean includeReturnTypes, boolean includePackageNames) -
Method Summary
Modifier and TypeMethodDescriptionprivate StringclassNames(Twin<Class<?>> classPair) compareAndPrint(Class<?> leftClass, Class<?> rightClass) difference(Class<?> leftClass, Class<?> rightClass) getInstanceMethodNames(Class<?> classOne) getMethodNames(Class<?> classOne) private booleanincludeMethod(Method method) voidstatic booleanisProperSubsetOf(Class<?> subsetClass, Class<?> supersetClass) static booleanisProperSubsetOfInstance(Class<?> subsetClass, Class<?> supersetClass) static booleanisProperSupersetOf(Class<?> supersetClass, Class<?> subsetClass) static booleanisProperSupersetOfInstance(Class<?> supersetClass, Class<?> subsetClass) private StringmethodName(Method method) private voidprivate voidoutputGroupByToString(RichIterable<String> methods) private voidoutputTitle(String title) private StringparameterNames(Method method) printClass(Class<?> clazz) printDifference(Class<?> leftClass, Class<?> rightClass) printIntersection(Class<?> leftClass, Class<?> rightClass) printSymmetricDifference(Class<?> leftClass, Class<?> rightClass) symmetricDifference(Class<?> leftClass, Class<?> rightClass)
-
Field Details
-
SYMMETRIC_DIFFERENCE
- See Also:
-
INTERSECTION
- See Also:
-
DIFFERENCE
- See Also:
-
includeParameterTypesInMethods
private final boolean includeParameterTypesInMethods -
includeReturnTypes
private final boolean includeReturnTypes -
includePackageNames
private final boolean includePackageNames -
includeObjectMethods
private boolean includeObjectMethods -
appendable
-
-
Constructor Details
-
ClassComparer
public ClassComparer() -
ClassComparer
-
ClassComparer
public ClassComparer(boolean includeParameterTypesInMethods, boolean includeReturnTypes, boolean includePackageNames) -
ClassComparer
public ClassComparer(Appendable out, boolean includeParameterTypesInMethods, boolean includeReturnTypes, boolean includePackageNames)
-
-
Method Details
-
isProperSupersetOf
-
isProperSubsetOf
-
isProperSupersetOfInstance
-
isProperSubsetOfInstance
-
compare
-
difference
-
printDifference
-
symmetricDifference
-
printSymmetricDifference
-
intersect
-
printIntersection
-
printClass
-
compareAndPrint
-
output
-
classNames
-
getMethodNames
-
getInstanceMethodNames
-
includeObjectMethods
public void includeObjectMethods() -
includeMethod
-
methodName
-
parameterNames
-
outputTitle
-
outputGroupByToString
-