| java.lang.Object org.unitils.reflectionassert.ReflectionComparator org.unitils.reflectionassert.ObjectComparator
ObjectComparator | public class ObjectComparator extends ReflectionComparator (Code) | | todo javadoc
author: Tim Ducheyne author: Filip Neven |
Method Summary | |
public boolean | canHandle(Object left, Object right) | protected Difference | compareFields(Object left, Object right, Class> clazz, Stack<String> fieldStack, Map<TraversedInstancePair, Boolean> traversedInstancePairs) Compares the values of all fields in the given objects by use of reflection.
Parameters: left - the left object for the comparison, not null Parameters: right - the right object for the comparison, not null Parameters: clazz - the type of both objects Parameters: fieldStack - the current field names Parameters: traversedInstancePairs - Map with pairs of objects that have been compared with each other. | protected Difference | doGetDifference(Object left, Object right, Stack<String> fieldStack, Map<TraversedInstancePair, Boolean> traversedInstancePairs) |
compareFields | protected Difference compareFields(Object left, Object right, Class> clazz, Stack<String> fieldStack, Map<TraversedInstancePair, Boolean> traversedInstancePairs)(Code) | | Compares the values of all fields in the given objects by use of reflection.
Parameters: left - the left object for the comparison, not null Parameters: right - the right object for the comparison, not null Parameters: clazz - the type of both objects Parameters: fieldStack - the current field names Parameters: traversedInstancePairs - Map with pairs of objects that have been compared with each other. the difference, null if there is no difference |
Methods inherited from org.unitils.reflectionassert.ReflectionComparator | abstract public boolean canHandle(Object left, Object right)(Code)(Java Doc) abstract protected Difference doGetDifference(Object left, Object right, Stack<String> fieldStack, Map<TraversedInstancePair, Boolean> traversedInstancePairs)(Code)(Java Doc) public Difference getDifference(Object left, Object right)(Code)(Java Doc) protected Difference getDifference(Object left, Object right, Stack<String> fieldStack, Map<TraversedInstancePair, Boolean> traversedInstancePairs)(Code)(Java Doc) public boolean isEqual(Object left, Object right)(Code)(Java Doc) protected boolean isTraversedInstancePairEqual(Object left, Object right, Map<TraversedInstancePair, Boolean> traversedInstancePairs)(Code)(Java Doc) protected void registerTraversedInstancePair(Object left, Object right, boolean outcome, Map<TraversedInstancePair, Boolean> traversedInstancePairs)(Code)(Java Doc) protected void setRootComparator(ReflectionComparator rootComparator)(Code)(Java Doc)
|
|
|