public class MessageComparator extends Object
| Constructor and Description |
|---|
MessageComparator(Class<?> container)
Creates a new comparator for the given container class and the
fallback properties file deduced from the class's message
provider.
|
MessageComparator(Class<?> container,
Locale locale)
Creates a new comparator for the given container class and the
properties file deduced from the class's message provider and
the given locale.
|
MessageComparator(ContainerClassInfo classInfo)
Creates a new comparator for the given container class
meta-information and the properties file deduced from the
container's message provider.
|
MessageComparator(List<MessageInfo> srcInfo,
List<MessageInfo> dstInfo)
Creates a new comparator for the given meta-information.
|
MessageComparator(MessageInfoProvider srcProvider,
MessageInfoProvider dstProvider)
Creates a new comparator for the given meta-information
providers.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getDifferences()
Returns a textual form of the differences between source and
destination.
|
MessageInfo[] |
getExtraDstInfo()
Returns the receiver's list of destination meta-information
that is absent from the source.
|
MessageInfo[] |
getExtraSrcInfo()
Returns the receiver's list of source meta-information that is
absent from the destination.
|
MessageInfoPair[] |
getMismatches()
Returns the receiver's mismatches.
|
boolean |
isMatch()
Checks whether the receiver found no differences between source
and destination.
|
public MessageComparator(List<MessageInfo> srcInfo, List<MessageInfo> dstInfo)
srcInfo - The source meta-information.dstInfo - The destination meta-information.public MessageComparator(MessageInfoProvider srcProvider, MessageInfoProvider dstProvider)
srcProvider - The source meta-information provider.dstProvider - The destination meta-information provider.public MessageComparator(ContainerClassInfo classInfo) throws I18NException
classInfo - The meta-information of a container class.I18NException - Thrown if there is a problem obtaining
the meta-information of the properties file.public MessageComparator(Class<?> container, Locale locale) throws I18NException
container - The class.locale - The locale. Use Locale.ROOT for the
fallback properties file.I18NException - Thrown if there is a problem obtaining
the meta-information of either the container or the properties
file.public MessageComparator(Class<?> container) throws I18NException
container - The class.I18NException - Thrown if there is a problem obtaining
the meta-information of either the container or the properties
file.public MessageInfoPair[] getMismatches()
public MessageInfo[] getExtraSrcInfo()
public MessageInfo[] getExtraDstInfo()
public boolean isMatch()
public String getDifferences()
Copyright © 2015. All Rights Reserved.