public class HabitatGenerator
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private static java.lang.String |
CLASS_PATH_PROP |
private static java.lang.String |
CLASSPATH |
static java.lang.String |
DIRECTORY_ARG
This option gives the name of directory in the target location where the file should be placed
|
private java.lang.String |
directoryOrFileToGenerateFor |
static java.lang.String |
FILE_ARG
The flag for the location of the file
|
static java.lang.String |
HK2_LOCATOR |
private boolean |
includeDate |
static java.lang.String |
LOCATOR_ARG
The flag for the name of the locator
|
private static java.lang.String |
LOCATOR_DEFAULT |
private java.lang.String |
locatorName |
private static java.lang.String |
META_INF |
static java.lang.String |
NO_DATE_ARG
This option gives the name of directory in the target location where the file should be placed
|
private boolean |
noSwap |
static java.lang.String |
NOSWAP_ARG
This option will write files in-place, which is quicker but will remove existing files prior to writing new ones
|
static java.lang.String |
OUTJAR_ARG
The name of the JAR file to write to (defaults to input file, ignored if input file is directory)
|
private java.lang.String |
outjarName |
private java.lang.String |
outputDirectory |
private java.lang.String |
searchPath |
static java.lang.String |
SEARCHPATH_ARG
The path-separator delimited list of files to search for contracts and qualifiers (defaults to classpath)
|
private boolean |
verbose |
static java.lang.String |
VERBOSE_ARG
The flag for verbosity
|
Modifier | Constructor and Description |
---|---|
private |
HabitatGenerator(java.lang.String directoryOrFileToGenerateFor,
java.lang.String outjarName,
java.lang.String locatorName,
boolean verbose,
java.lang.String searchPath,
boolean noSwap,
java.lang.String outputDirectory,
boolean includeDate) |
Modifier and Type | Method and Description |
---|---|
static int |
embeddedMain(java.lang.String[] argv)
A utility to generate inhabitants files.
|
private int |
go() |
static void |
main(java.lang.String[] argv)
This method will call System.exit() with a 0 on success and non-zero on failure
|
private void |
printThrowable(java.lang.Throwable th) |
private static void |
usage() |
private static final java.lang.String CLASS_PATH_PROP
private static final java.lang.String CLASSPATH
public static final java.lang.String FILE_ARG
public static final java.lang.String LOCATOR_ARG
public static final java.lang.String VERBOSE_ARG
public static final java.lang.String OUTJAR_ARG
public static final java.lang.String SEARCHPATH_ARG
public static final java.lang.String NOSWAP_ARG
public static final java.lang.String DIRECTORY_ARG
public static final java.lang.String NO_DATE_ARG
private final java.lang.String directoryOrFileToGenerateFor
private final java.lang.String outjarName
private final java.lang.String locatorName
private final boolean verbose
private final java.lang.String searchPath
private final boolean noSwap
private final java.lang.String outputDirectory
private final boolean includeDate
private static final java.lang.String LOCATOR_DEFAULT
private static final java.lang.String META_INF
public static final java.lang.String HK2_LOCATOR
private HabitatGenerator(java.lang.String directoryOrFileToGenerateFor, java.lang.String outjarName, java.lang.String locatorName, boolean verbose, java.lang.String searchPath, boolean noSwap, java.lang.String outputDirectory, boolean includeDate)
private void printThrowable(java.lang.Throwable th)
private int go()
private static void usage()
public static int embeddedMain(java.lang.String[] argv)
HabitatGenerator [--file jarFileOrDirectory] [--searchPath path-separator-delimited-classpath] [--outjar jarfile] [--locator locatorName] [--directory targetDirectory] [--verbose]
If the input file is a directory then the output file will go into META-INF/locatorName in the original directoryIf the input file is a jar file then the output file will go into the JAR file under META-INF/locatorName, overwriting any file that was previously in that location
--outjar only works if the file being added to is a JAR file, in which case this is the name of the output jar file that should be written. This defaults to the input jar file itself if not specified. If specified and the jarFileOrDirectory parameter is a directory then this parameter is ignored
argv
- The set of command line argumentspublic static void main(java.lang.String[] argv)
argv
- The arguments to the command (see embeddedMain)