public abstract class Generator extends Object
Constructor and Description |
---|
Generator() |
Modifier and Type | Method and Description |
---|---|
static String |
escape(String unescaped)
Escapes string content to be a valid string literal.
|
abstract String |
generate(TreeLogger logger,
GeneratorContext context,
String typeName)
Generate a default constructible subclass of the requested type.
|
public static String escape(String unescaped)
unescaped
, suitable for being
enclosed in double quotes in Java sourcepublic abstract String generate(TreeLogger logger, GeneratorContext context, String typeName) throws UnableToCompleteException
UnableToCompleteException
if for any reason
it cannot provide a substitute classnull
to cause the requested type itself to be
usedUnableToCompleteException
Copyright © 2018. All rights reserved.