We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
增加protobuf枚举类支持自定义value. 比如Channel:XIAOMI,OPPO,.... 这种可能,其它地方已经定义好了。需要保持统一。
enum Channel { PC= 0; XIAOMI = 1001; OPPO = 1002; HW = 1003; }
The text was updated successfully, but these errors were encountered:
refactor(proto): #414 Enumeration supports custom value
c68e379
java code
@ProtobufClass @ProtoFileMerge(fileName = TempProtoFile.fileName, filePackage = TempProtoFile.filePackage) public enum AnimalTypeEnum implements EnumReadable { /** the cat */ cat(0), /** the tiger */ tiger(10), ; final int value; AnimalTypeEnum(int value) { this.value = value; } @Override public int value() { return this.value; } }
generate .proto
// TestAnimalTypeEnum enum AnimalTypeEnum { // the cat cat = 0; // the tiger tiger = 10; }
Sorry, something went wrong.
iohao
No branches or pull requests
新增功能的使用场景
增加protobuf枚举类支持自定义value.
比如Channel:XIAOMI,OPPO,....
这种可能,其它地方已经定义好了。需要保持统一。
The text was updated successfully, but these errors were encountered: