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 Appendable
private static final String
private boolean
private final boolean
private final boolean
private final boolean
private static final String
private 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 String
classNames
(Twin<Class<?>> classPair) compareAndPrint
(Class<?> leftClass, Class<?> rightClass) difference
(Class<?> leftClass, Class<?> rightClass) getMethodNames
(Class<?> classOne) private boolean
includeMethod
(Method method) void
static boolean
isProperSubsetOf
(Class<?> subsetClass, Class<?> supersetClass) static boolean
isProperSupersetOf
(Class<?> supersetClass, Class<?> subsetClass) private String
methodName
(Method method) private void
private void
outputGroupByToString
(RichIterable<String> methods) private void
outputTitle
(String title) private String
parameterNames
(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
-
compare
-
difference
-
printDifference
-
symmetricDifference
-
printSymmetricDifference
-
intersect
-
printIntersection
-
printClass
-
compareAndPrint
-
output
-
classNames
-
getMethodNames
-
includeObjectMethods
public void includeObjectMethods() -
includeMethod
-
methodName
-
parameterNames
-
outputTitle
-
outputGroupByToString
-