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

com.twitter.scrooge.java_generator.ConstController.scala Maven / Gradle / Ivy

The newest version!
package com.twitter.scrooge.java_generator

import com.twitter.scrooge.ast.{ConstDefinition, Identifier, SimpleID}

/**
 * Helps generate a class that holds all the constants.
 */
class ConstController(defs: Seq[ConstDefinition], generator: ApacheJavaGenerator, ns: Option[Identifier])
  extends TypeController("Constants", generator, ns) {
  val constants = defs map { d =>
    Map("rendered_value" -> indent(generator.printConstValue(d.sid.name, d.fieldType, d.value, ns), 2))
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy