public class

I18NSync

extends ToolBase
java.lang.Object
   ↳ com.google.gwt.util.tools.ToolBase
     ↳ com.google.gwt.i18n.tools.I18NSync

Class Overview

Common public access point for localization support methods.

Summary

Constants
String ID Created Key.
Public Methods
static void createConstantsInterfaceFromClassName(String className, File outDir)
Creates a Constants interface from a class name.
static void createConstantsWithLookupInterfaceFromClassName(String className)
Creates a ConstantsWithLookup interface from a class name.
static void createConstantsWithLookupInterfaceFromClassName(String className, File sourceDir)
Creates a ConstantsWithLookup interface from a class name.
static void createInterfaceFromClassName(String className, File sourceDir, Class<? extends Localizable> interfaceType)
Creates one of a Messages, ConstantsWithLookup, or Constants subclass.
static void createMessagesInterfaceFromClassName(String className)
Creates a Messages interface from a class name.
static void createMessagesInterfaceFromClassName(String className, File sourceDir)
Creates a Messages interface from a class name.
static void main(String[] args)
Creates Messages and Constants java source files.
Protected Methods
boolean run()
Creates the interface.
[Expand]
Inherited Methods
From class com.google.gwt.util.tools.ToolBase
From class java.lang.Object

Constants

public static final String ID

Created Key.

Constant Value: "@gwt.key "

Public Methods

public static void createConstantsInterfaceFromClassName (String className, File outDir)

Creates a Constants interface from a class name. The resource file needed to create the class must be on your class path.

Parameters
className the name of the Constants class to be created
outDir source dir root
Throws
IOException

public static void createConstantsWithLookupInterfaceFromClassName (String className)

Creates a ConstantsWithLookup interface from a class name. The resource file needed to create the class must be on your class path.

Parameters
className the name of the Constants class to be created
Throws
IOException

public static void createConstantsWithLookupInterfaceFromClassName (String className, File sourceDir)

Creates a ConstantsWithLookup interface from a class name. The resource file needed to create the class must be on your class path.

Parameters
className the name of the Constants class to be created
sourceDir source dir root
Throws
IOException

public static void createInterfaceFromClassName (String className, File sourceDir, Class<? extends Localizable> interfaceType)

Creates one of a Messages, ConstantsWithLookup, or Constants subclass.

Parameters
className Name of the subclass to be created
sourceDir source directory root
interfaceType What kind of base class to use
Throws
IOException

public static void createMessagesInterfaceFromClassName (String className)

Creates a Messages interface from a class name. The resource file needed to create the class must be on your class path.

Parameters
className the name of the Constants class to be created
Throws
IOException

public static void createMessagesInterfaceFromClassName (String className, File sourceDir)

Creates a Messages interface from a class name. The resource file needed to create the class must be on your class path.

Parameters
className the name of the Constants class to be created
sourceDir source directory root
Throws
IOException

public static void main (String[] args)

Creates Messages and Constants java source files.

Parameters
args arguments for generation

Protected Methods

protected boolean run ()

Creates the interface.

Returns
  • whether the interface was created