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 CommandLineprivate String[]static final NucleusLoggerLogger for enhancing. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidconfigureDestination(DataNucleusEnhancer enhancer) private voidconfigureDetachListener(DataNucleusEnhancer enhancer) private voidprivate voidconfigureGeneratePK(DataNucleusEnhancer enhancer) private voidconfigureQuietAndVerbose(DataNucleusEnhancer enhancer) private static CommandLineprotected StringString[]getFiles()Gets the files to be enhanced.booleanisQuiet()booleanbooleanprivate voidlogClasspath(DataNucleusEnhancer enhancer) private voidlogEnhancerVersion(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.
-