All Downloads are FREE. Search and download functionalities are using the official Maven repository.

coursier.launcher.Generator.scala Maven / Gradle / Ivy

The newest version!
package coursier.launcher

import java.nio.file.Path

abstract class Generator[T <: Parameters] {
  def generate(parameters: T, output: Path): Unit
}

object Generator extends Generator[Parameters] {
  def generate(parameters: Parameters, output: Path): Unit =
    parameters match {
      case a: Parameters.Assembly    => AssemblyGenerator.generate(a, output)
      case b: Parameters.Bootstrap   => BootstrapGenerator.generate(b, output)
      case n: Parameters.NativeImage => NativeImageGenerator.generate(n, output)
      case p: Parameters.Prebuilt    => PrebuiltGenerator.generate(p, output)
      case s: Parameters.ScalaNative => ScalaNativeGenerator.generate(s, output)
      case d: Parameters.DummyNative => DummyNativeGenerator.generate(d, output)
      case m: Parameters.ManifestJar => ManifestJarGenerator.generate(m, output)
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy