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

sbtbuildinfo.JavaSingletonRenderer.scala Maven / Gradle / Ivy

package sbtbuildinfo

case class JavaSingletonRenderer(options: Seq[BuildInfoOption], pkg: String, cl: String) extends JavaRenderer(pkg, cl, false) {

  override def renderKeys(buildInfoResults: Seq[BuildInfoResult]): Seq[String] =
    header ++
      instanceLine ++
      buildInfoResults.flatMap(line) ++
      Seq(toStringLines(buildInfoResults)) ++
      toMapLines(buildInfoResults) ++
      Seq(buildUrlLines, buildMapLines) ++
      buildJsonLines ++
      toJsonLines ++
      footer

  private def instanceLine: Seq[String] =
    List(
      s"  public static final $cl instance = new $cl();",
      ""
    )

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy