Class ModuleFileTransactions.RemovedModule

java.lang.Object
com.ultikits.ultitools.utils.ModuleFileTransactions.RemovedModule
Enclosing class:
ModuleFileTransactions

public static final class ModuleFileTransactions.RemovedModule extends Object
A module an uninstall removed, in every form a transaction can name it by: the identify-strings and runtime names of the instances it unloaded (plus the argument it was given), and the file names of its JARs -- the ones those instances were loaded from, the ones the start-up scan recorded as declaring their main class, and the ones it deleted or recorded for deletion. A cancellation matches on all of them, so it follows the identity the uninstall resolved rather than the name the operator typed (round-10 review).
  • Field Details

    • identifyKeys

      private final Set<String> identifyKeys
    • moduleNames

      private final Set<String> moduleNames
    • jarNames

      private final Set<String> jarNames
  • Constructor Details

    • RemovedModule

      public RemovedModule(Collection<String> identifyStrings, Collection<String> moduleNames, Collection<String> jarNames)
      The uninstalled module.
      Parameters:
      identifyStrings - its identify-strings; a null or blank one is skipped
      moduleNames - the names it was loaded under or named by
      jarNames - the file names of its JARs in the modules folder
  • Method Details

    • addNonNull

      private static void addNonNull(Set<String> into, Collection<String> values)
    • matches

      boolean matches(String key, String moduleName, String oldJarName)
      Whether a transaction that names a module this way belongs to this one.
      Parameters:
      key - the transaction's normalised identify-string
      moduleName - the runtime name it was staged under
      oldJarName - the file name of the JAR it replaces
      Returns:
      true when any of them is this module's
    • toString

      public String toString()
      Overrides:
      toString in class Object