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

scala.record.ssp Maven / Gradle / Ivy

The newest version!
<%
  // Copyright 2013 Foursquare Labs Inc. All Rights Reserved.

  import com.foursquare.spindle.codegen.runtime.{ProgramSource, ScalaProgram}
  import java.net.InetAddress
  import org.joda.time.DateTime
%>
<%@ val program: ScalaProgram %>
<%@ val source: ProgramSource %>
<%@ val templatePath: String %>
<%@ val version: String %>

/**
 * GENERATED CODE - DO NOT EDIT!
 * Generated by foursquare.thrift.codegen v${version}
 * 
<%--
// Remove these so they don't interfere with artifact caching.
//
// TODO: Make source file fingerprints ignore comments?
// Until we do, do NOT add invocation-specific info like these to the generated code,
// or we won't be able to pull generated code from the artifact cache.
 * Time:            ${DateTime.now}
 * Host:            ${InetAddress.getLocalHost.getHostName}
 * Template source: ${templatePath}
 * Thrift source:   ${source.file.getPath}
 *
 * Includes:
#for (include <- source.includedFiles)
 *   ${include.getPath}
#end
 *
--%>
 */

#if (program.pkg.isDefined)
package ${program.pkg}
#else
// WARNING: No package statement because no java namespace specified in Thrift file.
#end

import scalaj.collection.Imports._
import ${program.pkg}.java_${source.baseName}._

#if (program.constants.nonEmpty)
<% render("constants.ssp", Map("constants" -> program.constants, "baseName" -> source.capitalizedBaseName)) %>
#end

#for (enum <- program.enums)
<% render("enum.ssp", Map("enum" -> enum)) %>
#end

#if (program.typedefs.nonEmpty)
<% render("typedefs.ssp", Map("typedefs" -> program.typedefs, "baseName" -> source.capitalizedBaseName)) %>
#end

#for (cls <- program.structs)
<% render("class.ssp", Map("cls" -> cls, "clsContainer" -> "")) %>
#end

#for (union <- program.unions)
<%-- /* TODO(jorge): make this support real unions */ --%>
<% render("class.ssp", Map("cls" -> union, "clsContainer" -> "")) %>
#end

#for (exception <- program.exceptions)
<% render("exception.ssp", Map("cls" -> exception, "resolver" -> program.resolver)) %>
#end

#for (service <- program.services)
<% render("service.ssp", Map("service" -> service, "resolver" -> program.resolver)) %>
#end




© 2015 - 2025 Weber Informatics LLC | Privacy Policy