public abstract class AbstractCob2JavaGeneratorMain extends Object
| Modifier and Type | Field and Description |
|---|---|
static Pattern |
PACKAGE_NAME_PATTERN |
| Constructor and Description |
|---|
AbstractCob2JavaGeneratorMain() |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
collectOptions(org.apache.commons.cli.Options options,
String[] args)
Take arguments received on the command line and setup corresponding
options.
|
protected org.apache.commons.cli.Options |
createOptions() |
void |
execute(String[] args)
Process command line options and run generator.
|
abstract void |
generate(Properties configProps,
File cobolFile,
String cobolFileEncoding,
File output,
String packageNamePrefix,
String xsltFileName) |
Properties |
getConfigProps() |
File |
getInput() |
String |
getInputEncoding() |
File |
getOutput() |
String |
getOutputPackage() |
String |
getXsltFileName() |
void |
setConfigProps(String configFilePath) |
void |
setInput(String inputPath)
Check the input parameter and keep it only if it is valid.
|
void |
setInputEncoding(String inputEncoding) |
void |
setOutput(String outputPath)
Check the output parameter and keep it only if it is valid.
|
void |
setOutputPackagePrefix(String packagePrefix)
Check that package prefix name provided is valid.
|
void |
setXsltFileName(String xsltFileName) |
public static final Pattern PACKAGE_NAME_PATTERN
public void execute(String[] args)
If no options are passed, prints the help. Help is also printed if the command line options are invalid.
args - generator optionspublic abstract void generate(Properties configProps, File cobolFile, String cobolFileEncoding, File output, String packageNamePrefix, String xsltFileName)
protected org.apache.commons.cli.Options createOptions()
protected boolean collectOptions(org.apache.commons.cli.Options options,
String[] args)
No arguments is valid. It means use the defaults.
options - the expected optionsargs - the actual arguments received on the command linepublic void setInput(String inputPath)
inputPath - a file or folder name (relative or absolute)public void setInputEncoding(String inputEncoding)
public void setOutput(String outputPath)
outputPath - a file or folder name (relative or absolute)public void setOutputPackagePrefix(String packagePrefix)
Null is acceptable and interpreted as no prefix.
packagePrefix - the generated java classes package namepublic void setConfigProps(String configFilePath)
configFilePath - the path to the optional configuration filepublic void setXsltFileName(String xsltFileName)
public File getInput()
public String getInputEncoding()
public File getOutput()
public String getOutputPackage()
public Properties getConfigProps()
public String getXsltFileName()
Copyright © 2021 LegSem. All rights reserved.