![JAR search and dependency download from the Maven repository](/logo.png)
com.kyleu.projectile.models.thrift.schema.ThriftService.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of projectile-parser-thrift_2.13 Show documentation
Show all versions of projectile-parser-thrift_2.13 Show documentation
Reads and transforms Thrift IDL files
The newest version!
package com.kyleu.projectile.models.thrift.schema
import com.facebook.swift.parser.model.Service
import scala.jdk.CollectionConverters._
object ThriftService {
def fromThrift(s: Service, pkg: Seq[String]) = {
val methods = s.getMethods.asScala.toIndexedSeq.map(ThriftServiceMethod.fromThrift)
ThriftService(key = s.getName, pkg = pkg, methods = methods)
}
}
case class ThriftService(
key: String,
pkg: Seq[String],
methods: Seq[ThriftServiceMethod]
) {
override val toString = s"Service [${(pkg :+ key).mkString(".")}] with methods [${methods.mkString(", ")}]"
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy