public class DefaultVisitor extends Object implements MessageInterfaceVisitor, MessageVisitor
Constructor and Description |
---|
DefaultVisitor() |
Modifier and Type | Method and Description |
---|---|
void |
endMessage(Message msg,
MessageTranslation trans)
Called after processing a message is complete.
|
void |
endMessageInterface(MessageInterface msgIntf)
Called after processing a message interface is complete.
|
MessageVisitor |
visitMessage(Message msg,
MessageTranslation trans)
Visit a single message in the current
MessageInterface . |
void |
visitMessageInterface(MessageInterface msgIntf,
GwtLocale sourceLocale)
Called at the start of processing a new message interface.
|
void |
visitTranslation(String[] formNames,
boolean isDefault,
MessageFormatUtils.MessageStyle style,
String msg)
Called to process one variant of a message.
|
public void endMessage(Message msg, MessageTranslation trans) throws MessageProcessingException
MessageVisitor
endMessage
in interface MessageVisitor
msg
- Message
instancetrans
- message translation, which may be the same as msg
MessageProcessingException
public void endMessageInterface(MessageInterface msgIntf) throws MessageProcessingException
MessageInterfaceVisitor
endMessageInterface
in interface MessageInterfaceVisitor
MessageProcessingException
public MessageVisitor visitMessage(Message msg, MessageTranslation trans) throws MessageProcessingException
MessageInterfaceVisitor
MessageInterface
.visitMessage
in interface MessageInterfaceVisitor
MessageVisitor
instance which will be used to visit the
supplied message, or null if no visit is requiredMessageProcessingException
public void visitMessageInterface(MessageInterface msgIntf, GwtLocale sourceLocale) throws MessageProcessingException
MessageInterfaceVisitor
visitMessageInterface
in interface MessageInterfaceVisitor
sourceLocale
- the locale of source messages in this classMessageProcessingException
public void visitTranslation(String[] formNames, boolean isDefault, MessageFormatUtils.MessageStyle style, String msg) throws MessageProcessingException
MessageVisitor
Note that the default message will always be passed in a call to this method, even if there are no selectors.
visitTranslation
in interface MessageVisitor
formNames
- array of form names, one for each selectorisDefault
- true if this is the default message (ie, all forms are
"other")MessageProcessingException
Copyright © 2016. All rights reserved.