java-proto-generator icon indicating copy to clipboard operation
java-proto-generator copied to clipboard

Creates an null type of message

Open 121077313 opened this issue 12 years ago • 5 comments

created message content:

//Generated by JavaToProto Generator v0.1 @ Tue Mar 26 10:43:58 CST 2013

message AutoAttacksVO{ message AttackResultVO{ optional sint64 attackId = 1; optional sint32 spriteId = 2; optional sint32 targetSpriteId = 3; message Point{ optional sint32 x = 1; optional sint32 y = 2; } repeated AutoAttacksVO.AttackResultVO.Point targetPoint = 4; message BombVO{ optional sint32 weaponType = 1; optional sint32 spriteId = 2; optional sint32 hurt = 3; } repeated null bombs = 5; } repeated null attacks = 1; }

attacks 、bombs type is null

Does not support this format?

121077313 avatar Mar 26 '13 02:03 121077313

Do you have the original class?

I suggest you just step through the proto generator to work out what's happening

lloydsparkes avatar Mar 26 '13 06:03 lloydsparkes

public class AutoAttacksVO{ private List<AttackResultVO> attacks; } public class AttackResultVO {

private long attackId;
private List<BombVO> bombs;

} public class BombVO { private int hurt; }

like this

121077313 avatar Mar 26 '13 06:03 121077313

you can use this class take a test

121077313 avatar Mar 26 '13 07:03 121077313

Although simple point would be better, but some of the hierarchy is a must

121077313 avatar Mar 26 '13 07:03 121077313

your java-proto-generator is very helpful,I do not know that there is no official solution.

121077313 avatar Mar 26 '13 07:03 121077313