public interface Generator
Classes implementing this interface must have a public default constructor which should set any required arguments to their defaults. When Main encounters a command line argument which maps to a specific Generator subclass, it will instantiate one and call parseArgs(...). At some later point, Main will invoke the generate(...) method once for _each_ class passed on the command line. WARNING: The contents of this source file are not part of any supported API. Code that depends on them does so at its own risk: they are subject to change or removal without notice.
| Modifier and Type | Method and Description |
|---|---|
void |
generate(BatchEnvironment env,
ClassDefinition cdef,
File destDir)
Generate output.
|
boolean |
parseArgs(String[] argv,
Main main)
Examine and consume command line arguments.
|
boolean parseArgs(String[] argv, Main main)
argv - The command line arguments. Ignore null
and unknown arguments. Set each consumed argument to null.main - Report any errors using the main.error() methods.void generate(BatchEnvironment env, ClassDefinition cdef, File destDir)
env - The compiler environmentcdef - The definition for the implementation class or interface from
which to generate outputdestDir - The directory for the root of the package hierarchy
for generated files. May be null.Copyright © 2017. All Rights Reserved.