public static class MessageInterfaceVisitor extends Object
The general calling sequence of methods on this visitor and sub-visitors should be, for example, for the following interface:
interface Foo extends Messages { @DefaultMessage("0") @AlternateMessage({ "one|MALE", "2", "one|FEMALE", "1", "one|other", "3", "other|FEMALE", "4", "other|MALE", "5", }) String foo(@PluralCount int count, String where, Gender gender); }the following sequence of calls would be generated:
MessageInterfaceVisitor miv; miv.visitMessageInterface(msgInf, locale); MessageVisitor mv = miv.visitMessage(msg, msgTrans); mv.visitTranslation(["one", "FEMALE"], false, msgStyle, "1"); mv.visitTranslation(["one", "MALE"], false, msgStyle, "2");} mv.visitTranslation(["one", "other"], false, msgStyle, "3"); mv.visitTranslation(["other", "FEMALE"], false, msgStyle, "4"); mv.visitTranslation(["other", "MALE"], false, msgStyle, "5"); mv.visitTranslation(["other", "other"], true, msgStyle, "0"); mv.endMessage(msg); miv.endMessageInterface(msgIntf);Visitors that are interested in knowing when particular selectors and their form values begin/end should see
FormVisitorDriver
.Copyright © 2018. All rights reserved.