• 大小: 850KB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2021-06-17
  • 语言: 其他
  • 标签: protobuf  

资源简介

已废弃,大家不必下载了。 实践中是这么使用的: messageClass.getSimpleName().hashCode() 通过消息的名字计算hashCode是比较容易拓展的方式,前后端通信都很方便

资源截图

代码片段和文件信息

// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: server_client.proto

package com.wjybxx.proto;

public final class server_client {
  private server_client() {}
  public static void registerAllExtensions(
      com.google.protobuf.ExtensionRegistryLite registry) {
  }

  public static void registerAllExtensions(
      com.google.protobuf.ExtensionRegistry registry) {
    registerAllExtensions(
        (com.google.protobuf.ExtensionRegistryLite) registry);
  }
  public interface server_client_first_messageOrBuilder extends
      // @@protoc_insertion_point(interface_extends:com.wjybxx.proto.server_client_first_message)
      com.google.protobuf.MessageOrBuilder {

    /**
     * int32 uid = 1;
     */
    int getUid();

    /**
     * string name = 2;
     */
    java.lang.String getName();
    /**
     * string name = 2;
     */
    com.google.protobuf.ByteString
        getNameBytes();
  }
  /**
   * 

   *1.消息体名称小写 server_client_first_message映射在枚举上
   * 

   *
   * Protobuf type {@code com.wjybxx.proto.server_client_first_message}
   */
  public  static final class server_client_first_message extends
      com.google.protobuf.GeneratedMessageV3 implements
      // @@protoc_insertion_point(message_implements:com.wjybxx.proto.server_client_first_message)
      server_client_first_messageOrBuilder {
  private static final long serialVersionUID = 0L;
    // Use server_client_first_message.newBuilder() to construct.
    private server_client_first_message(com.google.protobuf.GeneratedMessageV3.Builder builder) {
      super(builder);
    }
    private server_client_first_message() {
      uid_ = 0;
      name_ = ““;
    }

    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet
    getUnknownFields() {
      return this.unknownFields;
    }
    private server_client_first_message(
        com.google.protobuf.CodedInputStream input
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      this();
      if (extensionRegistry == null) {
        throw new java.lang.NullPointerException();
      }
      int mutable_bitField0_ = 0;
      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
          com.google.protobuf.UnknownFieldSet.newBuilder();
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            default: {
              if (!parseUnknownFieldProto3(
                  input unknownFields extensionRegistry tag)) {
                done = true;
              }
              break;
            }
            case 8: {

              uid_ = input.readInt32();
              break;
            }
            case 18: {
              java.lang.String s = input.readStringRequireUtf8();

              name_ = s;
           

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件        632  2018-05-15 15:37  game-proto\.idea\compiler.xml

     文件       1416  2018-05-15 15:40  game-proto\.idea\game-proto.iml

     文件        501  2018-05-15 15:39  game-proto\.idea\libraries\Maven__com_google_code_gson_gson_2_7.xml

     文件        499  2018-05-15 15:39  game-proto\.idea\libraries\Maven__com_google_guava_guava_19_0.xml

     文件        574  2018-05-15 15:39  game-proto\.idea\libraries\Maven__com_google_protobuf_protobuf_java_3_5_1.xml

     文件        609  2018-05-15 15:39  game-proto\.idea\libraries\Maven__com_google_protobuf_protobuf_java_util_3_5_1.xml

     文件        551  2018-05-15 15:38  game-proto\.idea\libraries\Maven__io_netty_netty_all_4_1_23_Final.xml

     文件        513  2018-05-15 15:40  game-proto\.idea\libraries\Maven__org_slf4j_slf4j_api_1_7_25.xml

     文件        396  2018-05-15 15:37  game-proto\.idea\misc.xml

     文件        272  2018-05-15 15:34  game-proto\.idea\modules.xml

     文件       8792  2018-05-15 18:20  game-proto\.idea\uiDesigner.xml

     文件      52755  2018-05-16 10:45  game-proto\.idea\workspace.xml

     文件        830  2018-05-15 15:34  game-proto\game-proto.iml

     文件       1435  2018-05-15 15:39  game-proto\pom.xml

     文件        102  2018-05-16 10:31  game-proto\src\bat\proto.bat

     文件        106  2018-05-15 18:35  game-proto\src\bat\proto.sh

     文件    4035584  2017-12-21 11:22  game-proto\src\bat\protoc.exe

     文件        543  2018-05-16 10:01  game-proto\src\bat\server_client.proto

     文件        314  2018-05-16 10:03  game-proto\src\bat\server_server.proto

     文件      79882  2018-05-16 10:31  game-proto\src\main\java\com\wjybxx\proto\server_client.java

     文件      39409  2018-05-16 10:31  game-proto\src\main\java\com\wjybxx\proto\server_server.java

     文件       2277  2018-05-15 19:10  game-proto\src\main\java\netty\protobufcodec\ByteToProtoBufDecoder.java

     文件       5622  2018-05-16 10:29  game-proto\src\main\java\netty\protobufcodec\ProtoBufEnum.java

     文件       2138  2018-05-16 10:44  game-proto\src\main\java\netty\protobufcodec\ProtoBufToByteEncoder.java

     文件       3158  2018-05-16 10:40  game-proto\src\main\java\netty\start\ProtoBufCodecTest.java

     文件       1001  2018-05-16 10:39  game-proto\target\classes\com\wjybxx\proto\server_client$1.class

     文件       1504  2018-05-16 10:39  game-proto\target\classes\com\wjybxx\proto\server_client$server_client_first_message$1.class

     文件      14594  2018-05-16 10:39  game-proto\target\classes\com\wjybxx\proto\server_client$server_client_first_message$Builder.class

     文件      14107  2018-05-16 10:39  game-proto\target\classes\com\wjybxx\proto\server_client$server_client_first_message.class

     文件        435  2018-05-16 10:39  game-proto\target\classes\com\wjybxx\proto\server_client$server_client_first_messageOrBuilder.class

............此处省略59个文件信息

评论

共有 条评论