Package com.google.gwt.i18n.rebind.MessageFormatParser

Examples of com.google.gwt.i18n.rebind.MessageFormatParser.ArgumentChunk


    try {
      for (TemplateChunk chunk : MessageFormatParser.parse(template)) {
        if (chunk.isLiteral()) {
          buf.appendStringLiteral(chunk.getString());
        } else if (chunk instanceof ArgumentChunk) {
          ArgumentChunk argChunk = (ArgumentChunk) chunk;
          int argNumber = argChunk.getArgumentNumber();
          if (argNumber >= params.length) {
            throw error(logger, "Argument " + argNumber
                + " beyond range of arguments: " + template);
          }
          seenFlag[argNumber] = true;
          String arg = "arg" + argNumber;
          String format = argChunk.getFormat();
          if (format != null) {
            String subformat = argChunk.getSubFormat();
            ValueFormatter formatter = formatters.get(format);
            if (formatter != null) {
              // TODO(jat): add support for specifying additional dynamic data
              //     in another argument -- examples would be the currency code
              //     for a number format or the timezone for a date/time format.
View Full Code Here

TOP

Related Classes of com.google.gwt.i18n.rebind.MessageFormatParser.ArgumentChunk

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.