Examples of ProtobufMessage


Examples of com.google.code.proto.gcless.ProtobufMessage

    MemlessParser parser = new MemlessParser();
    parser.process("src/test/resources/unittest.proto");
    List<ProtobufMessage> messages = parser.getMessages();

    ProtobufMessage message = getMessage("TestAllTypes", messages);
    if (message == null) {
      throw new IllegalStateException();
    }

    for (ProtobufField curField : message.getFields()) {
      String data = null;
      if (curField.getNature().equals("repeated") && !curField.getType().equals("bytes")) {
        System.out.println("List<" + curField.getFullyClarifiedJavaType() + "> values" + curField.getBeanName() + " = new ArrayList<" + curField.getFullyClarifiedJavaType() + ">();");
        for (int i = 0; i < 2; i++) {
          System.out.println("values" + curField.getBeanName() + ".add(" + getJavaTypeValue(curField) + ");");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.