rouzwawi / grpc-kotlin

gRPC with Kotlin Coroutines
https://gitter.im/gRPC-Kotlin/Lobby
Apache License 2.0
220 stars 23 forks source link

Generate base class as a top level class #25

Closed rouzwawi closed 6 years ago

rouzwawi commented 6 years ago

Removing the package-type object named <Service>GrpcKt as it only served as a namespace object, which is discouraged. The generated code now produces a top level abstract class named <Service>ImplBase which encapsulates the internal MethodHandler and other functions as inner private classes/functions.

Any code that referenced the outer object can now just directly reference the *ImplBase class.

- class GreeterImpl : GreeterGrpcKt.GreeterImplBase() {
+ class GreeterImpl : GreeterImplBase() {