com.google.gwt.core.ext
Class Generator
java.lang.Object
com.google.gwt.core.ext.Generator
- Direct Known Subclasses:
- JUnitTestCaseStubGenerator, ServiceInterfaceProxyGenerator
- public abstract class Generator
- extends Object
Generates source code for subclasses during deferred binding requests.
Subclasses must be thread-safe.
Generator
public Generator()
generate
public abstract String generate(TreeLogger logger,
GeneratorContext context,
String typeName)
throws UnableToCompleteException
- Generate a default constructible subclass of the requested type.
- Returns:
- the name of a subclass to substitute for the requested class, or
return
null to cause the requested type itself to be
used
- Throws:
UnableToCompleteException - if for any reason the generator cannot
provide a substitute class
escape
public static String escape(String unescaped)
- Escapes string content to be a valid string literal.
- Returns:
- an escaped version of
unescaped, suitable for being
enclosed in double quotes in Java source
This javadoc distribution was not produced by Google. The official documentation is here.