我正在使用 protobuf-gradle-plugin 从 proto 文件生成 java 类。
我的原型文件看起来像
syntax = "proto3";
package com.address;
option java_package = "com.address";
message AddressesMessage {
int32 id = 1;
string address_line_1 = 4;
string address_line_2 = 5;
string city = 7;
string postal_code = 9;
string country = 10;
}
该插件正在为我生成类,但现在我想在字段级别添加一些元数据信息。像
syntax = "proto3";
package com.address;
option java_package = "com.address";
message AddressesMessage {
int32 id = 1 [ (meta) = { isfact: false }];
string address_line_1 = 4;
string address_line_2 = 5;
string city = 7;
string postal_code = 9;
string country = 10;
}
这可能吗?