public class BeanCodeGen extends Object
This reads in a .java file, parses it, and writes out an updated version.
| Constructor and Description |
|---|
BeanCodeGen(List<File> files,
BeanGenConfig config,
int verbosity,
boolean write)
Creates the generator for a single bean.
|
| Modifier and Type | Method and Description |
|---|---|
static BeanCodeGen |
createFromArgs(String[] args)
Creates an instance of
BeanCodeGen from arguments. |
static void |
main(String[] args)
Main method.
|
int |
process()
Processes the file, recursing as necessary, generating the source code.
|
List<File> |
processFiles()
Processes the file, recursing as necessary, generating the source code.
|
public BeanCodeGen(List<File> files, BeanGenConfig config, int verbosity, boolean write)
To generate, use process().
files - the files to process, not nullconfig - the configuration to use, not nullverbosity - the verbosity, from 0 to 3write - whether to write or notpublic static void main(String[] args)
This calls System.exit.
args - the arguments, not nullpublic static BeanCodeGen createFromArgs(String[] args)
BeanCodeGen from arguments.
This is intended for tools and does not call System.exit.
args - the arguments, not nullRuntimeException - if unable to createpublic int process()
throws Exception
The number of altered files is returned.
Exception - if an error occursCopyright © 2007–2017 Joda.org. All rights reserved.