templates.JavaCommon.txt.ApiInterface.template.scala Maven / Gradle / Ivy
package templates.JavaCommon.txt
import _root_.play.twirl.api.TwirlFeatureImports._
import _root_.play.twirl.api.TwirlHelperImports._
import _root_.play.twirl.api.Html
import _root_.play.twirl.api.JavaScript
import _root_.play.twirl.api.Txt
import _root_.play.twirl.api.Xml
object ApiInterface extends _root_.play.twirl.api.BaseScalaTemplate[play.twirl.api.TxtFormat.Appendable,_root_.play.twirl.api.Format[play.twirl.api.TxtFormat.Appendable]](play.twirl.api.TxtFormat) with _root_.play.twirl.api.Template1[org.apache.pekko.grpc.gen.javadsl.Service,play.twirl.api.TxtFormat.Appendable] {
/*
* Copyright (C) 2018-2021 Lightbend Inc.
*/
def apply/*14.2*/(service: org.apache.pekko.grpc.gen.javadsl.Service):play.twirl.api.TxtFormat.Appendable = {
_display_ {
{
Seq[Any](format.raw/*15.1*/("""
"""),_display_(/*16.2*/org/*16.5*/.apache.pekko.grpc.gen.Constants.DoNotEditComment),format.raw/*16.54*/("""
"""),format.raw/*17.1*/("""package """),_display_(/*17.10*/service/*17.17*/.packageName),format.raw/*17.29*/(""";
import org.apache.pekko.grpc.ProtobufSerializer;
import org.apache.pekko.grpc.javadsl.GoogleProtobufSerializer;
import org.apache.pekko.grpc.PekkoGrpcGenerated;
"""),_display_(/*24.2*/for(comment <- service.comment) yield /*24.33*/ {_display_(Seq[Any](format.raw/*24.35*/("""/**
"""),_display_(/*25.2*/{java.util.regex.Pattern.compile("^\\s?(.*)$", java.util.regex.Pattern.MULTILINE).matcher(comment).replaceAll(" * $1")}),format.raw/*25.121*/(""" """),format.raw/*25.122*/("""*/""")))}),format.raw/*25.125*/("""
"""),format.raw/*26.1*/("""public interface """),_display_(/*26.19*/{service.name}),format.raw/*26.33*/(""" """),format.raw/*26.34*/("""{"""),format.raw/*26.35*/("""
"""),_display_(/*27.4*/for(method <- service.methods) yield /*27.34*/ {_display_(Seq[Any](format.raw/*27.36*/("""
"""),_display_(/*28.4*/for(comment <- method.comment) yield /*28.34*/ {_display_(Seq[Any](format.raw/*28.36*/("""/**
"""),_display_(/*29.2*/{java.util.regex.Pattern.compile("^\\s?(.*)$", java.util.regex.Pattern.MULTILINE).matcher(comment).replaceAll(" * $1")}),format.raw/*29.123*/(""" """),format.raw/*29.126*/("""*/""")))}),format.raw/*29.129*/("""
"""),_display_(/*30.4*/{method.getReturnType}),format.raw/*30.26*/(""" """),_display_(/*30.28*/{method.name}),format.raw/*30.41*/("""("""),_display_(/*30.43*/{method.getParameterType}),format.raw/*30.68*/(""" """),format.raw/*30.69*/("""in);
""")))}),format.raw/*31.4*/("""
"""),format.raw/*33.3*/("""static String name = """"),_display_(/*33.26*/service/*33.33*/.grpcName),format.raw/*33.42*/("""";
static org.apache.pekko.grpc.ServiceDescription description = new org.apache.pekko.grpc.internal.ServiceDescriptionImpl(name, """),_display_(/*34.130*/service/*34.137*/.descriptor),format.raw/*34.148*/(""");
@PekkoGrpcGenerated
public static class Serializers """),format.raw/*37.35*/("""{"""),format.raw/*37.36*/("""
"""),_display_(/*38.6*/for(serializer <- service.serializers) yield /*38.44*/ {_display_(Seq[Any](format.raw/*38.46*/("""
"""),format.raw/*39.7*/("""public static ProtobufSerializer<"""),_display_(/*39.41*/{serializer.messageType}),format.raw/*39.65*/("""> """),_display_(/*39.68*/serializer/*39.78*/.name),format.raw/*39.83*/(""" """),format.raw/*39.84*/("""= """),_display_(/*39.87*/serializer/*39.97*/.init),format.raw/*39.102*/(""";
""")))}),format.raw/*40.6*/("""
"""),format.raw/*41.3*/("""}"""),format.raw/*41.4*/("""
"""),format.raw/*42.1*/("""}"""),format.raw/*42.2*/("""
"""))
}
}
}
def render(service:org.apache.pekko.grpc.gen.javadsl.Service): play.twirl.api.TxtFormat.Appendable = apply(service)
def f:((org.apache.pekko.grpc.gen.javadsl.Service) => play.twirl.api.TxtFormat.Appendable) = (service) => apply(service)
def ref: this.type = this
}
/*
-- GENERATED --
SOURCE: codegen/src/main/twirl/templates/JavaCommon/ApiInterface.scala.txt
HASH: 46b335e5c4ab9503a7dbc7019ff28ac5c9a1b23f
MATRIX: 691->364|837->417|865->419|876->422|946->471|974->472|1010->481|1026->488|1059->500|1252->667|1299->698|1339->700|1370->705|1511->824|1541->825|1576->828|1604->829|1649->847|1684->861|1713->862|1742->863|1772->867|1818->897|1858->899|1888->903|1934->933|1974->935|2005->940|2148->1061|2180->1064|2215->1067|2245->1071|2288->1093|2317->1095|2351->1108|2380->1110|2426->1135|2455->1136|2493->1144|2524->1148|2574->1171|2590->1178|2620->1187|2780->1319|2797->1326|2830->1337|2918->1398|2947->1399|2979->1405|3033->1443|3073->1445|3107->1452|3168->1486|3213->1510|3243->1513|3262->1523|3288->1528|3317->1529|3347->1532|3366->1542|3393->1547|3430->1554|3460->1557|3488->1558|3516->1559|3544->1560
LINES: 16->14|21->15|22->16|22->16|22->16|23->17|23->17|23->17|23->17|30->24|30->24|30->24|31->25|31->25|31->25|31->25|32->26|32->26|32->26|32->26|32->26|33->27|33->27|33->27|34->28|34->28|34->28|35->29|35->29|35->29|35->29|36->30|36->30|36->30|36->30|36->30|36->30|36->30|37->31|39->33|39->33|39->33|39->33|40->34|40->34|40->34|43->37|43->37|44->38|44->38|44->38|45->39|45->39|45->39|45->39|45->39|45->39|45->39|45->39|45->39|45->39|46->40|47->41|47->41|48->42|48->42
-- GENERATED --
*/
© 2015 - 2025 Weber Informatics LLC | Privacy Policy