*/
private void initMessageParameters() {
if ((pairSeparator == null) || (keyValuePairSeparator == null)) {
for (Class<?> cl : models) {
// Get annotation @Message from the class
Message message = cl.getAnnotation(Message.class);
// Get annotation @Section from the class
Section section = cl.getAnnotation(Section.class);
if (message != null) {
// Get Pair Separator parameter
ObjectHelper.notNull(message.pairSeparator(),
"No Pair Separator has been defined in the @Message annotation !");
pairSeparator = message.pairSeparator();
if (LOG.isDebugEnabled()) {
LOG.debug("Pair Separator defined for the message : " + pairSeparator);
}
// Get KeyValuePair Separator parameter
ObjectHelper.notNull(message.keyValuePairSeparator(),
"No Key Value Pair Separator has been defined in the @Message annotation !");
keyValuePairSeparator = message.keyValuePairSeparator();
if (LOG.isDebugEnabled()) {
LOG.debug("Key Value Pair Separator defined for the message : " + keyValuePairSeparator);
}
// Get carriage return parameter
crlf = message.crlf();
if (LOG.isDebugEnabled()) {
LOG.debug("Carriage return defined for the message : " + crlf);
}
// Get isOrderer parameter
messageOrdered = message.isOrdered();
if (LOG.isDebugEnabled()) {
LOG.debug("Is the message ordered in output : " + messageOrdered);
}
}