Class Runtimes

java.lang.Object
eu.maveniverse.maven.mima.context.Runtimes

public final class Runtimes extends Object
Registry of known Runtime instances. It orders them by priority. This class is the "entry point" in MIMA to obtain actual Runtime instance.
  • Field Details

    • INSTANCE

      public static final Runtimes INSTANCE
  • Method Details

    • getRuntime

      public Runtime getRuntime()
      Returns the Runtime instance with the highest priority out of all registered instances, never null. The method should be used to obtains runtime instance to work with.
    • getRuntimes

      public Collection<Runtime> getRuntimes()
      Returns an unmodifiable snapshot (copy) collection of all registered Runtime instances.
    • registerRuntime

      public void registerRuntime(Runtime mimaRuntime)
      Registers a Runtime instance. If instance with same Runtime.name() was already registered, this method is no-op (first registration wins).
    • resetRuntimes

      public void resetRuntimes()
      Clears all registered instances.