org.unitils.reflectionassert.difference
Class ClassDifference

java.lang.Object
  extended by org.unitils.reflectionassert.difference.Difference
      extended by org.unitils.reflectionassert.difference.ClassDifference

public class ClassDifference
extends Difference

Author:
Filip Neven, Tim Ducheyne

Constructor Summary
ClassDifference(String message, Object leftValue, Object rightValue, Class<?> leftClass, Class<?> rightClass)
          Creates a difference.
 
Method Summary
<T,A> T
accept(DifferenceVisitor<T,A> visitor, A argument)
          Double dispatch method.
 Class<?> getLeftClass()
           
 Class<?> getRightClass()
           
 
Methods inherited from class org.unitils.reflectionassert.difference.Difference
getLeftValue, getMessage, getRightValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClassDifference

public ClassDifference(String message,
                       Object leftValue,
                       Object rightValue,
                       Class<?> leftClass,
                       Class<?> rightClass)
Creates a difference.

Parameters:
message - a message describing the difference
leftValue - the left instance
rightValue - the right instance
Method Detail

getLeftClass

public Class<?> getLeftClass()

getRightClass

public Class<?> getRightClass()

accept

public <T,A> T accept(DifferenceVisitor<T,A> visitor,
                      A argument)
Description copied from class: Difference
Double dispatch method. Dispatches back to the given visitor.

All subclasses should copy this method in their own class body.

Overrides:
accept in class Difference
Parameters:
visitor - The visitor, not null
argument - An optional argument for the visitor, null if not applicable
Returns:
The result


Copyright © 2011. All Rights Reserved.