private static String getJavaOuterClassname(
DescriptorProtos.FileDescriptorProto fileDescriptor,
DescriptorProtos.FileOptions fileOptions) {
if (fileOptions.hasJavaOuterClassname()) {
return fileOptions.getJavaOuterClassname();
}
// If the outer class name is not explicitly defined, then we take the proto filename, strip its extension,
// and convert it from snake case to camel case.
String filename = fileDescriptor.getName().substring(0, fileDescriptor.getName().length() - ".proto".length());
filename = CaseFormat.LOWER_UNDERSCORE.to(CaseFormat.UPPER_CAMEL, filename);
return appendOuterClassSuffix(filename, fileDescriptor);
}
ProtoTypeMap.java 文件源码
java
阅读 40
收藏 0
点赞 0
评论 0
项目:grpc-java-contrib
作者:
评论列表
文章目录