Class PluginInstallUtils.ModuleIdentity

java.lang.Object
com.ultikits.ultitools.utils.PluginInstallUtils.ModuleIdentity
Enclosing class:
PluginInstallUtils

private static final class PluginInstallUtils.ModuleIdentity extends Object
Everything later decisions need about which module this is, resolved once.

Two identity namespaces meet here and are reconciled in this one place: a module's runtime name (getPluginName(), which UltiToolsPlugin(String pluginName, ...) takes as an argument) and the name a JAR's plugin.yml declares. Gate 1's two blockers were both a comparison of a name from one space against a name from the other; after this resolution no code path compares across them -- entries are matched against keys, and loaded instances were already found by both.

Since:
6.0.0
Author:
wisdomme
  • Field Details

    • requested

      private final String requested
    • loaded

      private final List<UltiToolsPlugin> loaded
    • ownJars

      private final Set<String> ownJars
    • keys

      private final Set<String> keys
    • bystanderJars

      private final Set<String> bystanderJars
    • bystanderOf

      private final Map<String,String> bystanderOf
    • someCodeSourceUnknown

      private final boolean someCodeSourceUnknown
    • recorded

      private final PluginInstallUtils.Recorded recorded
      What the module loader and the loaded instances recorded about the targets (#516, round 10).
    • removedJarNames

      private final List<String> removedJarNames
      The file names of the entries the folder scan identified as this module's, collected as the directory scan identifies them for the pending removal.
  • Constructor Details

  • Method Details

    • noteCandidates

      private void noteCandidates(List<File> jars)
      Notes the entries the folder scan identified as this module's, before anything is deleted.
      Parameters:
      jars - the entries
    • removedModule

      private ModuleFileTransactions.RemovedModule removedModule()
      The uninstalled module in every form an update transaction can name it by, for the cancellation (round-10 review): the unloaded instances' identify-strings and runtime names, the name keys, the JARs they were loaded from, the JARs the start-up scan recorded as declaring their main class, and the entries the folder scan identified. Everything except the last is known before the folder is touched, so it holds whatever the folder then does.
      Returns:
      the removed module