use of com.google.protobuf.DescriptorProtos.FileOptions in project closure-templates by google.
the class JavaQualifiedNames method getPackage.
static String getPackage(FileDescriptorProto file, ProtoFlavor flavor) {
FileOptions fileOptions = file.getOptions();
StringBuilder sb = new StringBuilder();
if (fileOptions.hasJavaPackage()) {
sb.append(fileOptions.getJavaPackage());
} else {
if (!file.getPackage().isEmpty()) {
sb.append(file.getPackage());
}
}
return sb.toString();
}
Aggregations