Package org.datanucleus.enhancer
Class CommandLineHelper
java.lang.Object
org.datanucleus.enhancer.CommandLineHelper
Helper used by
DataNucleusEnhancer.main(String[])
to process the command line arguments.
Important: This class uses System.exit(int)
in case of failures. It must therefore not be
used anywhere else than a main(...)
method!
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final CommandLine
private String[]
static final NucleusLogger
Logger for enhancing. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate void
configureDestination
(DataNucleusEnhancer enhancer) private void
configureDetachListener
(DataNucleusEnhancer enhancer) private void
private void
configureGeneratePK
(DataNucleusEnhancer enhancer) private void
configureQuietAndVerbose
(DataNucleusEnhancer enhancer) private static CommandLine
protected String
String[]
getFiles()
Gets the files to be enhanced.boolean
isQuiet()
boolean
boolean
private void
logClasspath
(DataNucleusEnhancer enhancer) private void
logEnhancerVersion
(DataNucleusEnhancer enhancer, String apiName) Reads the file-list-file.
-
Field Details
-
LOGGER
Logger for enhancing. -
cl
-
files
-
-
Constructor Details
-
CommandLineHelper
-
-
Method Details
-
createCommandLine
-
isQuiet
public boolean isQuiet() -
isVerbose
public boolean isVerbose() -
isValidating
public boolean isValidating() -
getPersistenceUnitName
-
getDirectory
-
getFiles
Gets the files to be enhanced.This is either the list of default arguments (i.e. program arguments without a "-"-prefix) or the contents of the file-list-file passed as "-flf" argument. If a file-list-file was specified, the default arguments are ignored.
- Returns:
- the files to be enhanced. Never
null
.
-
getFileListFile
-
createDataNucleusEnhancer
-
configureQuietAndVerbose
-
configureDestination
-
configureGenerateConstructor
-
configureGeneratePK
-
configureDetachListener
-
logEnhancerVersion
-
logClasspath
-
readAndDeleteFileListFile
Reads the file-list-file.This file serves as replacement for directly passing the files to be enhanced (classes or *.jdo files) to the enhancer as program arguments. It must be UTF-8-encoded and it must contain one file per line.
See: NUCACCECLIPSE-11
- Returns:
- the contents of the file-list-file. Never
null
. Empty lines and comments are filtered out.
-