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,
String indent,
String prefix,
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 code.
|
public BeanCodeGen(List<File> files, String indent, String prefix, int verbosity, boolean write)
To generate, use process()
.
files
- the files to process, not nullindent
- the indent to use, which will be directly inserted in the output, not nullprefix
- the prefix to use, which will be directly inserted in the output, 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 createCopyright © 2007–2013 Joda.org. All rights reserved.