Interface MessageCatalogFormat

All Known Implementing Classes:
PropertiesFormat

public interface MessageCatalogFormat
Interface for writing various message catalog formats.


WARNING: this API is expected to change as we develop additional message catalog formats. In particular, this interface will be extended to support reading message catalogs and further changes may be required.

Implementations of this interface are executed at compile time and therefore must not contain any JSNI code.

  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the extension to use for this file type, including the dot.
    void
    write(TreeLogger logger, String locale, com.google.gwt.i18n.rebind.AbstractResource.ResourceList resourceList, PrintWriter out, JClassType messageInterface)
    Write a message catalog file.
  • Method Details

    • write

      void write(TreeLogger logger, String locale, com.google.gwt.i18n.rebind.AbstractResource.ResourceList resourceList, PrintWriter out, JClassType messageInterface) throws UnableToCompleteException
      Write a message catalog file.
      Parameters:
      logger - TreeLogger for logging errors/etc
      locale - locale of this output file
      resourceList - the contents to write
      out - the PrintWriter to generate output on
      messageInterface - the interface to create (so additional annotations may be accessed)
      Throws:
      UnableToCompleteException - if a fatal error prevents generating the output file. In this case, the implementation must have already logged an appropriate ERROR message to the logger.
    • getExtension

      String getExtension()
      Returns the extension to use for this file type, including the dot.