类 ProtobufIDLGenerator

java.lang.Object
com.baidu.bjf.remoting.protobuf.ProtobufIDLGenerator

public class ProtobufIDLGenerator extends Object
Utility class for generate protobuf IDL content from @Protobuf
从以下版本开始:
1.0.1
作者:
xiemalin
  • 字段详细资料

    • GOOGLE_PROTOBUF_ANY_DEF

      public static final String GOOGLE_PROTOBUF_ANY_DEF
      The Constant GOOGLE_PROTOBUF_ANY_DEF.
      另请参阅:
  • 构造器详细资料

    • ProtobufIDLGenerator

      public ProtobufIDLGenerator()
  • 方法详细资料

    • getIDL

      public static String getIDL(Class<?> cls, Set<Class<?>> cachedTypes, Set<Class<?>> cachedEnumTypes, boolean ignoreJava)
      get IDL content from class.
      参数:
      cls - target class to parse for IDL message.
      cachedTypes - if type already in set will not generate IDL. if a new type found will add to set
      cachedEnumTypes - if enum already in set will not generate IDL. if a new enum found will add to set
      ignoreJava - set true to ignore generate package and class name
      返回:
      protobuf IDL content in string
      另请参阅:
    • getIDL

      public static String getIDL(Class<?> cls, Set<Class<?>> cachedTypes, Set<Class<?>> cachedEnumTypes)
      get IDL content from class.
      参数:
      cls - target class to parse for IDL message.
      cachedTypes - if type already in set will not generate IDL. if a new type found will add to set
      cachedEnumTypes - if enum already in set will not generate IDL. if a new enum found will add to set
      返回:
      protobuf IDL content in string
      另请参阅:
    • getIDL

      public static String getIDL(Class<?> cls)
      get IDL content from class.
      参数:
      cls - target protobuf class to parse
      返回:
      protobuf IDL content in string