|
GWT 2.7.0 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.google.gwt.core.ext.Generator
public abstract class Generator
Generates source code for subclasses during deferred binding requests. Subclasses must be thread-safe.
Resource reading should be done through the ResourceOracle in the provided GeneratorContext (not via ClassLoader.getResource(), File, or URL) so that Generator Resource dependencies can be detected and used to facilitate fast incremental recompiles.
Constructor Summary | |
---|---|
Generator()
|
Method Summary | |
---|---|
static java.lang.String |
escape(java.lang.String unescaped)
Escapes string content to be a valid string literal. |
static java.lang.String |
escapeClassName(java.lang.String unescapedString)
Returns an escaped version of a String that is valid as a Java class name. Illegal characters become "_" + the character integer padded to 5 digits like "_01234". |
abstract java.lang.String |
generate(TreeLogger logger,
GeneratorContext context,
java.lang.String typeName)
Generate a default constructible subclass of the requested type. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Generator()
Method Detail |
---|
public static java.lang.String escape(java.lang.String unescaped)
unescaped
, suitable for being enclosed in double
quotes in Java sourcepublic static java.lang.String escapeClassName(java.lang.String unescapedString)
public abstract java.lang.String generate(TreeLogger logger, GeneratorContext context, java.lang.String typeName) throws UnableToCompleteException
UnableToCompleteException
if for any reason it cannot provide a substitute class
null
to cause the requested type itself to be used
UnableToCompleteException
|
GWT 2.7.0 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |