我有proto files,并使用ScalaPB生成了Scala类。 输出如下:
@SerialVersionUID(0L)
final case class MetaData extends scalapb.GeneratedMessage {
object HeightReferencePointEnum extends _root_.scalapb.GeneratedEnumCompanion[HeightReferencePointEnum] {
implicit def enumCompanion: _root_.scalapb.GeneratedEnumCompanion[HeightReferencePointEnum] = this
// generated code
}
}
由于this Scala issue,在为getSimpleName
类调用HeightReferencePointEnum
时出现异常。
有什么方法可以配置ScalaPB以避免内部类?
消息原型为:
message MetaData {
message HeightDetail {
optional HeightReferencePointEnum heightReferencePoint = 1;
enum HeightReferencePointEnum {
// enums
}
optional heightReferencePointEnum heightReferencePoint = 2;
}
repeated HeightDetail heightDetail = 1;
}