Package org.jvnet.hk2.generator.internal
Class GeneratorRunner
java.lang.Object
org.jvnet.hk2.generator.internal.GeneratorRunner
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Stringprivate final Stringprivate final booleanprivate static final Stringprivate final Stringprivate static final Stringprivate final booleanprivate final booleanprivate final Stringprivate final Stringprivate static final Stringprivate final Utilitiesprivate final boolean -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate List<DescriptorImpl> voidgo()Does the work of writing out the inhabitants file to the proper locationprivate voidwriteHeader(PrintWriter writer) private FilewriteInhabitantsFile(List<DescriptorImpl> descriptors, File noSwapFile, File outDir) private voidwriteToDirectory(List<DescriptorImpl> allDescriptors) private voidwriteToJar(File jarFile, List<DescriptorImpl> descriptors) private voidwriteToJarNoSwap(File jarFile, List<DescriptorImpl> descriptors)
-
Field Details
-
DOT_CLASS
- See Also:
-
META_INF
- See Also:
-
INHABITANTS
- See Also:
-
TARGET_HABITATS
- See Also:
-
utilities
-
fileOrDirectory
-
outjarName
-
locatorName
-
verbose
private final boolean verbose -
noSwap
private final boolean noSwap -
outputDirectory
-
includeDate
private final boolean includeDate -
outJarIsInJar
private final boolean outJarIsInJar
-
-
Constructor Details
-
GeneratorRunner
public GeneratorRunner(String fileOrDirectory, String outjarName, String locatorName, boolean verbose, String searchPath, boolean noSwap, String outputDirectory, boolean includeDate) This initializes the GeneratorRunner with the values needed to run- Parameters:
fileOrDirectory- The fileOrDirectory to inspect for servicesoutjarName- The name of the jar file to create (can be the fileOrDirectory)locatorName- The name of the locator these files should be put intoverbose- true if this should print information about progresssearchPath- The path-separator delimited list of files or directories to search for contracts and qualifiers and various other annotationsnoSwap- true if this run should NOT swap files (faster but riskier)outputDirectory- The directory where the file should goincludeDate- Whether or not the output file should include a date
-
-
Method Details
-
go
Does the work of writing out the inhabitants file to the proper location- Throws:
AssertionError- On an error such as not being able to find the proper fileIOException- On IO error
-
writeToDirectory
- Throws:
IOException
-
writeToJar
- Throws:
IOException
-
writeToJarNoSwap
- Throws:
IOException
-
writeInhabitantsFile
private File writeInhabitantsFile(List<DescriptorImpl> descriptors, File noSwapFile, File outDir) throws IOException - Throws:
IOException
-
writeHeader
-
findAllServicesFromJar
- Throws:
IOException
-