test_class.declarator: tempDir
test_class.modifier: private
test_class.original_string: private File tempDir;
test_class.type: File
test_class.var_name: tempDir
test_class.file: cli/src/test/java/net/adamcin/oakpal/cli/OptionsTest.java
test_class.identifier: OptionsTest
test_case.body: @Test
      public void testCacheRepoInits_emptyRepoInits() throws Exception {
          final File testOutDir = new File(tempDir, "testCacheRepoInits_emptyRepoInits");
          FileUtils.deleteDirectory(testOutDir);
          final File cacheDir = new File(testOutDir, "oakpal-cache");
          Result<URL> urlResult = Options.cacheRepoInits(cacheDir, Collections.emptyList());
          assertTrue("empty repoInits get failure to cache", urlResult.isFailure());
      }
test_case.class_method_signature: OptionsTest.testCacheRepoInits_emptyRepoInits()
test_case.full_signature: @Test public void testCacheRepoInits_emptyRepoInits()
test_case.identifier: testCacheRepoInits_emptyRepoInits
test_case.invocations: deleteDirectory cacheRepoInits emptyList assertTrue isFailure
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testCacheRepoInits_emptyRepoInits()
focal_class.declarator: CACHE_DIR_NAME = ".oakpal-cache"
focal_class.modifier: static final
focal_class.original_string: static final String CACHE_DIR_NAME = ".oakpal-cache";
focal_class.type: String
focal_class.var_name: CACHE_DIR_NAME
focal_class.declarator: EMPTY_PRINTER = message -> IO.empty
focal_class.modifier: static final
focal_class.original_string: static final Function<StructuredMessage, IO<Nothing>> EMPTY_PRINTER = message -> IO.empty;
focal_class.type: Function<StructuredMessage, IO<Nothing>>
focal_class.var_name: EMPTY_PRINTER
focal_class.declarator: DEFAULT_OPTIONS = new Options()
focal_class.modifier: static final
focal_class.original_string: static final Options DEFAULT_OPTIONS = new Options();
focal_class.type: Options
focal_class.var_name: DEFAULT_OPTIONS
focal_class.declarator: justHelp
focal_class.modifier: private final
focal_class.original_string: private final boolean justHelp;
focal_class.type: boolean
focal_class.var_name: justHelp
focal_class.declarator: justVersion
focal_class.modifier: private final
focal_class.original_string: private final boolean justVersion;
focal_class.type: boolean
focal_class.var_name: justVersion
focal_class.declarator: storeBlobs
focal_class.modifier: private final
focal_class.original_string: private final boolean storeBlobs;
focal_class.type: boolean
focal_class.var_name: storeBlobs
focal_class.declarator: planUrl
focal_class.modifier: private final
focal_class.original_string: private final URL planUrl;
focal_class.type: URL
focal_class.var_name: planUrl
focal_class.declarator: scanClassLoader
focal_class.modifier: private final
focal_class.original_string: private final ClassLoader scanClassLoader;
focal_class.type: ClassLoader
focal_class.var_name: scanClassLoader
focal_class.declarator: cacheDir
focal_class.modifier: private final
focal_class.original_string: private final File cacheDir;
focal_class.type: File
focal_class.var_name: cacheDir
focal_class.declarator: opearFile
focal_class.modifier: private final
focal_class.original_string: private final File opearFile;
focal_class.type: File
focal_class.var_name: opearFile
focal_class.declarator: planName
focal_class.modifier: private final
focal_class.original_string: private final String planName;
focal_class.type: String
focal_class.var_name: planName
focal_class.declarator: planFile
focal_class.modifier: private final
focal_class.original_string: private final File planFile;
focal_class.type: File
focal_class.var_name: planFile
focal_class.declarator: planFileBaseDir
focal_class.modifier: private final
focal_class.original_string: private final File planFileBaseDir;
focal_class.type: File
focal_class.var_name: planFileBaseDir
focal_class.declarator: preInstallFiles
focal_class.modifier: private final
focal_class.original_string: private final List<File> preInstallFiles;
focal_class.type: List<File>
focal_class.var_name: preInstallFiles
focal_class.declarator: repoInitFiles
focal_class.modifier: private final
focal_class.original_string: private final List<File> repoInitFiles;
focal_class.type: List<File>
focal_class.var_name: repoInitFiles
focal_class.declarator: runModes
focal_class.modifier: private final
focal_class.original_string: private final List<String> runModes;
focal_class.type: List<String>
focal_class.var_name: runModes
focal_class.declarator: noRunModes
focal_class.modifier: private final
focal_class.original_string: private final boolean noRunModes;
focal_class.type: boolean
focal_class.var_name: noRunModes
focal_class.declarator: extendedClassPathFiles
focal_class.modifier: private final
focal_class.original_string: private final List<File> extendedClassPathFiles;
focal_class.type: List<File>
focal_class.var_name: extendedClassPathFiles
focal_class.declarator: noHooks
focal_class.modifier: private final
focal_class.original_string: private final boolean noHooks;
focal_class.type: boolean
focal_class.var_name: noHooks
focal_class.declarator: scanFiles
focal_class.modifier: private final
focal_class.original_string: private final List<File> scanFiles;
focal_class.type: List<File>
focal_class.var_name: scanFiles
focal_class.declarator: printer
focal_class.modifier: private final
focal_class.original_string: private final Function<StructuredMessage, IO<Nothing>> printer;
focal_class.type: Function<StructuredMessage, IO<Nothing>>
focal_class.var_name: printer
focal_class.declarator: failOnSeverity
focal_class.modifier: private final
focal_class.original_string: private final Severity failOnSeverity;
focal_class.type: Severity
focal_class.var_name: failOnSeverity
focal_class.file: cli/src/main/java/net/adamcin/oakpal/cli/Options.java
focal_class.identifier: Options
focal_class.class_method_signature: Options.Options()
focal_class.full_signature:   Options()
focal_class.identifier: Options
focal_class.parameters: ()
focal_class.signature:  Options()
focal_class.class_method_signature: Options.Options(final boolean justHelp,
              final boolean justVersion,
              final boolean storeBlobs,
              final @NotNull URL planUrl,
              final @NotNull ClassLoader scanClassLoader,
              final @NotNull File cacheDir,
              final @Nullable File opearFile,
              final @Nullable String planName,
              final @Nullable File planFile,
              final @Nullable File planFileBaseDir,
              final @NotNull List<File> preInstallFiles,
              final @NotNull List<File> repoInitFiles,
              final @NotNull List<String> runModes,
              final boolean noRunModes,
              final @NotNull List<File> extendedClassPathFiles,
              final boolean noHooks,
              final @NotNull List<File> scanFiles,
              final @NotNull Function<StructuredMessage, IO<Nothing>> printer,
              final @NotNull Severity failOnSeverity)
focal_class.full_signature:   Options(final boolean justHelp,
              final boolean justVersion,
              final boolean storeBlobs,
              final @NotNull URL planUrl,
              final @NotNull ClassLoader scanClassLoader,
              final @NotNull File cacheDir,
              final @Nullable File opearFile,
              final @Nullable String planName,
              final @Nullable File planFile,
              final @Nullable File planFileBaseDir,
              final @NotNull List<File> preInstallFiles,
              final @NotNull List<File> repoInitFiles,
              final @NotNull List<String> runModes,
              final boolean noRunModes,
              final @NotNull List<File> extendedClassPathFiles,
              final boolean noHooks,
              final @NotNull List<File> scanFiles,
              final @NotNull Function<StructuredMessage, IO<Nothing>> printer,
              final @NotNull Severity failOnSeverity)
focal_class.identifier: Options
focal_class.parameters: (final boolean justHelp,
              final boolean justVersion,
              final boolean storeBlobs,
              final @NotNull URL planUrl,
              final @NotNull ClassLoader scanClassLoader,
              final @NotNull File cacheDir,
              final @Nullable File opearFile,
              final @Nullable String planName,
              final @Nullable File planFile,
              final @Nullable File planFileBaseDir,
              final @NotNull List<File> preInstallFiles,
              final @NotNull List<File> repoInitFiles,
              final @NotNull List<String> runModes,
              final boolean noRunModes,
              final @NotNull List<File> extendedClassPathFiles,
              final boolean noHooks,
              final @NotNull List<File> scanFiles,
              final @NotNull Function<StructuredMessage, IO<Nothing>> printer,
              final @NotNull Severity failOnSeverity)
focal_class.signature:  Options(final boolean justHelp,
              final boolean justVersion,
              final boolean storeBlobs,
              final @NotNull URL planUrl,
              final @NotNull ClassLoader scanClassLoader,
              final @NotNull File cacheDir,
              final @Nullable File opearFile,
              final @Nullable String planName,
              final @Nullable File planFile,
              final @Nullable File planFileBaseDir,
              final @NotNull List<File> preInstallFiles,
              final @NotNull List<File> repoInitFiles,
              final @NotNull List<String> runModes,
              final boolean noRunModes,
              final @NotNull List<File> extendedClassPathFiles,
              final boolean noHooks,
              final @NotNull List<File> scanFiles,
              final @NotNull Function<StructuredMessage, IO<Nothing>> printer,
              final @NotNull Severity failOnSeverity)
focal_class.class_method_signature: Options.isJustHelp()
focal_class.full_signature: public boolean isJustHelp()
focal_class.identifier: isJustHelp
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isJustHelp()
focal_class.class_method_signature: Options.isJustVersion()
focal_class.full_signature: public boolean isJustVersion()
focal_class.identifier: isJustVersion
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isJustVersion()
focal_class.class_method_signature: Options.isStoreBlobs()
focal_class.full_signature: public boolean isStoreBlobs()
focal_class.identifier: isStoreBlobs
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isStoreBlobs()
focal_class.class_method_signature: Options.isNoHooks()
focal_class.full_signature: public boolean isNoHooks()
focal_class.identifier: isNoHooks
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isNoHooks()
focal_class.class_method_signature: Options.getPlanUrl()
focal_class.full_signature: public URL getPlanUrl()
focal_class.identifier: getPlanUrl
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: URL
focal_class.signature: URL getPlanUrl()
focal_class.class_method_signature: Options.getScanClassLoader()
focal_class.full_signature: public ClassLoader getScanClassLoader()
focal_class.identifier: getScanClassLoader
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: ClassLoader
focal_class.signature: ClassLoader getScanClassLoader()
focal_class.class_method_signature: Options.getCacheDir()
focal_class.full_signature: public File getCacheDir()
focal_class.identifier: getCacheDir
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: File
focal_class.signature: File getCacheDir()
focal_class.class_method_signature: Options.getOpearFile()
focal_class.full_signature: public @Nullable File getOpearFile()
focal_class.identifier: getOpearFile
focal_class.modifiers: public @Nullable
focal_class.parameters: ()
focal_class.return: File
focal_class.signature: File getOpearFile()
focal_class.class_method_signature: Options.getPlanName()
focal_class.full_signature: public @Nullable String getPlanName()
focal_class.identifier: getPlanName
focal_class.modifiers: public @Nullable
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getPlanName()
focal_class.class_method_signature: Options.getPlanFile()
focal_class.full_signature: public @Nullable File getPlanFile()
focal_class.identifier: getPlanFile
focal_class.modifiers: public @Nullable
focal_class.parameters: ()
focal_class.return: File
focal_class.signature: File getPlanFile()
focal_class.class_method_signature: Options.getPlanFileBaseDir()
focal_class.full_signature: public @Nullable File getPlanFileBaseDir()
focal_class.identifier: getPlanFileBaseDir
focal_class.modifiers: public @Nullable
focal_class.parameters: ()
focal_class.return: File
focal_class.signature: File getPlanFileBaseDir()
focal_class.class_method_signature: Options.getPreInstallFiles()
focal_class.full_signature: public @NotNull List<File> getPreInstallFiles()
focal_class.identifier: getPreInstallFiles
focal_class.modifiers: public @NotNull
focal_class.parameters: ()
focal_class.return: List<File>
focal_class.signature: List<File> getPreInstallFiles()
focal_class.class_method_signature: Options.getRepoInitFiles()
focal_class.full_signature: public @NotNull List<File> getRepoInitFiles()
focal_class.identifier: getRepoInitFiles
focal_class.modifiers: public @NotNull
focal_class.parameters: ()
focal_class.return: List<File>
focal_class.signature: List<File> getRepoInitFiles()
focal_class.class_method_signature: Options.getRunModes()
focal_class.full_signature: public @NotNull List<String> getRunModes()
focal_class.identifier: getRunModes
focal_class.modifiers: public @NotNull
focal_class.parameters: ()
focal_class.return: List<String>
focal_class.signature: List<String> getRunModes()
focal_class.class_method_signature: Options.isNoRunModes()
focal_class.full_signature: public boolean isNoRunModes()
focal_class.identifier: isNoRunModes
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isNoRunModes()
focal_class.class_method_signature: Options.getExtendedClassPathFiles()
focal_class.full_signature: public @NotNull List<File> getExtendedClassPathFiles()
focal_class.identifier: getExtendedClassPathFiles
focal_class.modifiers: public @NotNull
focal_class.parameters: ()
focal_class.return: List<File>
focal_class.signature: List<File> getExtendedClassPathFiles()
focal_class.class_method_signature: Options.getScanFiles()
focal_class.full_signature: public List<File> getScanFiles()
focal_class.identifier: getScanFiles
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: List<File>
focal_class.signature: List<File> getScanFiles()
focal_class.class_method_signature: Options.getPrinter()
focal_class.full_signature: public Function<StructuredMessage, IO<Nothing>> getPrinter()
focal_class.identifier: getPrinter
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Function<StructuredMessage, IO<Nothing>>
focal_class.signature: Function<StructuredMessage, IO<Nothing>> getPrinter()
focal_class.class_method_signature: Options.getFailOnSeverity()
focal_class.full_signature: public Severity getFailOnSeverity()
focal_class.identifier: getFailOnSeverity
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Severity
focal_class.signature: Severity getFailOnSeverity()
focal_class.class_method_signature: Options.hasOverrides()
focal_class.full_signature:  boolean hasOverrides()
focal_class.identifier: hasOverrides
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean hasOverrides()
focal_class.class_method_signature: Options.applyOverrides(final @NotNull OakpalPlan basePlan)
focal_class.full_signature: public OakpalPlan applyOverrides(final @NotNull OakpalPlan basePlan)
focal_class.identifier: applyOverrides
focal_class.modifiers: public
focal_class.parameters: (final @NotNull OakpalPlan basePlan)
focal_class.return: OakpalPlan
focal_class.signature: OakpalPlan applyOverrides(final @NotNull OakpalPlan basePlan)
focal_class.class_method_signature: Options.getRepoInitBytes(final List<String> repoInits)
focal_class.full_signature: static byte[] getRepoInitBytes(final List<String> repoInits)
focal_class.identifier: getRepoInitBytes
focal_class.modifiers: static
focal_class.parameters: (final List<String> repoInits)
focal_class.return: byte[]
focal_class.signature: byte[] getRepoInitBytes(final List<String> repoInits)
focal_class.class_method_signature: Options.fileNameForRepoInitBytes(final byte[] repoInitBytes)
focal_class.full_signature: static Result<String> fileNameForRepoInitBytes(final byte[] repoInitBytes)
focal_class.identifier: fileNameForRepoInitBytes
focal_class.modifiers: static
focal_class.parameters: (final byte[] repoInitBytes)
focal_class.return: Result<String>
focal_class.signature: Result<String> fileNameForRepoInitBytes(final byte[] repoInitBytes)
focal_class.class_method_signature: Options.writeToStream(final @NotNull byte[] bytesToWrite,
                                           final @NotNull Fun.ThrowingSupplier<OutputStream> streamSupplier)
focal_class.full_signature: static Result<Nothing> writeToStream(final @NotNull byte[] bytesToWrite,
                                           final @NotNull Fun.ThrowingSupplier<OutputStream> streamSupplier)
focal_class.identifier: writeToStream
focal_class.modifiers: static
focal_class.parameters: (final @NotNull byte[] bytesToWrite,
                                           final @NotNull Fun.ThrowingSupplier<OutputStream> streamSupplier)
focal_class.return: Result<Nothing>
focal_class.signature: Result<Nothing> writeToStream(final @NotNull byte[] bytesToWrite,
                                           final @NotNull Fun.ThrowingSupplier<OutputStream> streamSupplier)
focal_class.class_method_signature: Options.cacheRepoInits(final @NotNull File cacheDir, final @NotNull List<String> repoInits)
focal_class.full_signature: static Result<URL> cacheRepoInits(final @NotNull File cacheDir, final @NotNull List<String> repoInits)
focal_class.identifier: cacheRepoInits
focal_class.modifiers: static
focal_class.parameters: (final @NotNull File cacheDir, final @NotNull List<String> repoInits)
focal_class.return: Result<URL>
focal_class.signature: Result<URL> cacheRepoInits(final @NotNull File cacheDir, final @NotNull List<String> repoInits)
focal_class.class_method_signature: Options.messageWriter(final @NotNull Console console,
                                                                                     final boolean outputJson,
                                                                                     final @Nullable File outFile)
focal_class.full_signature: static @NotNull Result<Function<StructuredMessage, IO<Nothing>>> messageWriter(final @NotNull Console console,
                                                                                     final boolean outputJson,
                                                                                     final @Nullable File outFile)
focal_class.identifier: messageWriter
focal_class.modifiers: static @NotNull
focal_class.parameters: (final @NotNull Console console,
                                                                                     final boolean outputJson,
                                                                                     final @Nullable File outFile)
focal_class.return: Result<Function<StructuredMessage, IO<Nothing>>>
focal_class.signature: Result<Function<StructuredMessage, IO<Nothing>>> messageWriter(final @NotNull Console console,
                                                                                     final boolean outputJson,
                                                                                     final @Nullable File outFile)
focal_method.body: static Result<URL> cacheRepoInits(final @NotNull File cacheDir, final @NotNull List<String> repoInits) {
          if (repoInits.isEmpty()) {
              return Result.failure("refusing to cache empty repoinit script");
          }
          final byte[] repoInitBytes = getRepoInitBytes(repoInits);
          final File parentDir = cacheDir.toPath().resolve("repoinits").toFile();
          parentDir.mkdirs();
          return fileNameForRepoInitBytes(repoInitBytes)
                  .map(fileName -> new File(parentDir, fileName))
                  .flatMap(cacheFile -> {
                      final Result<URL> cacheFileUrl = compose1(File::toURI, result1(URI::toURL)).apply(cacheFile);
                      if (cacheFile.exists()) {
                          return cacheFileUrl;
                      } else {
                          return writeToStream(repoInitBytes, () -> new FileOutputStream(cacheFile))
                                  .flatMap(constantly1(() -> cacheFileUrl));
                      }
                  });
      }
focal_method.class_method_signature: Options.cacheRepoInits(final @NotNull File cacheDir, final @NotNull List<String> repoInits)
focal_method.full_signature: static Result<URL> cacheRepoInits(final @NotNull File cacheDir, final @NotNull List<String> repoInits)
focal_method.identifier: cacheRepoInits
focal_method.invocations: isEmpty failure getRepoInitBytes toFile resolve toPath mkdirs flatMap map fileNameForRepoInitBytes apply compose1 result1 exists flatMap writeToStream constantly1
focal_method.modifiers: static
focal_method.parameters: (final @NotNull File cacheDir, final @NotNull List<String> repoInits)
focal_method.return: Result<URL>
focal_method.signature: Result<URL> cacheRepoInits(final @NotNull File cacheDir, final @NotNull List<String> repoInits)