|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.unitils.reflectionassert.ReflectionComparatorFactory
public class ReflectionComparatorFactory
A factory for creating a reflection comparator. This will assemble the apropriate comparator chain and constructs a reflection comparator.
By default, a strict comparison is performed, but if needed, some leniency can be configured by setting one or more comparator modes:
Field Summary | |
---|---|
protected static Comparator |
COLLECTION_COMPARATOR
The CollectionComparator singleton insance |
protected static Comparator |
HIBERNATE_PROXY_COMPARATOR
The HibernateProxyComparator singleton insance |
protected static Comparator |
IGNORE_DEFAULTS_COMPARATOR
The IgnoreDefaultsComparator singleton insance |
protected static Comparator |
LENIENT_DATES_COMPARATOR
The LenientDatesComparator singleton insance |
protected static Comparator |
LENIENT_NUMBER_COMPARATOR
The LenientNumberComparator singleton insance |
protected static Comparator |
LENIENT_ORDER_COMPARATOR
The LenientOrderCollectionComparator singleton insance |
protected static Comparator |
MAP_COMPARATOR
The MapComparator singleton insance |
protected static Comparator |
OBJECT_COMPARATOR
The ObjectComparator singleton insance |
protected static Comparator |
SIMPLE_CASES_COMPARATOR
The SimpleCasesComparatorsingleton insance |
Constructor Summary | |
---|---|
ReflectionComparatorFactory()
|
Method Summary | |
---|---|
static ReflectionComparator |
createRefectionComparator(ReflectionComparatorMode... modes)
Creates a reflection comparator for the given modes. |
protected static List<Comparator> |
getComparatorChain(Set<ReflectionComparatorMode> modes)
Creates a comparator chain for the given modes. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final Comparator LENIENT_DATES_COMPARATOR
protected static final Comparator IGNORE_DEFAULTS_COMPARATOR
protected static final Comparator LENIENT_NUMBER_COMPARATOR
protected static final Comparator SIMPLE_CASES_COMPARATOR
protected static final Comparator LENIENT_ORDER_COMPARATOR
protected static final Comparator COLLECTION_COMPARATOR
protected static final Comparator MAP_COMPARATOR
protected static final Comparator HIBERNATE_PROXY_COMPARATOR
protected static final Comparator OBJECT_COMPARATOR
Constructor Detail |
---|
public ReflectionComparatorFactory()
Method Detail |
---|
public static ReflectionComparator createRefectionComparator(ReflectionComparatorMode... modes)
modes
- The modes, null for strict comparison
protected static List<Comparator> getComparatorChain(Set<ReflectionComparatorMode> modes)
modes
- The modes, null for strict comparison
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |