public abstract class Generator
extends java.lang.Object
Constructor and Description |
---|
Generator() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
escape(java.lang.String unescaped)
Escapes string content to be a valid string literal.
|
abstract java.lang.String |
generate(TreeLogger logger,
GeneratorContext context,
java.lang.String typeName)
Generate a default constructible subclass of the requested type.
|
public static java.lang.String escape(java.lang.String unescaped)
unescaped
, suitable for being
enclosed in double quotes in Java sourcepublic 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 classnull
to cause the requested type itself to be
usedUnableToCompleteException