类 ProtobufIDLProxy

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

public class ProtobufIDLProxy extends Object
This class is for dynamic create protobuf utility class directly from .proto file
从以下版本开始:
1.0.2
作者:
xiemalin
  • 字段详细资料

    • DEFAULT_FILE_NAME

      public static final String DEFAULT_FILE_NAME
      default proto file name.
      另请参阅:
  • 构造器详细资料

    • ProtobufIDLProxy

      public ProtobufIDLProxy()
  • 方法详细资料

    • setFormatJavaField

      public static void setFormatJavaField(boolean needFormatJavaField)
      Sets the Constant formatJavaField.
      参数:
      needFormatJavaField - the new Constant formatJavaField
    • checkDirectory

      protected static void checkDirectory(boolean generateSouceOnly, File sourceOutputDir)
      Check directory.
      参数:
      generateSouceOnly - the generate souce only
      sourceOutputDir - the source output dir
    • create

      public static Map<String,IDLProxyObject> create(File file) throws IOException
      Creates the.
      参数:
      file - the file
      返回:
      the map
      抛出:
      IOException - Signals that an I/O exception has occurred.
    • create

      public static Map<String,IDLProxyObject> create(File file, boolean debug, boolean isUniName) throws IOException
      Creates the.
      参数:
      file - the file
      debug - the debug
      isUniName - the is uni name
      返回:
      the map
      抛出:
      IOException - Signals that an I/O exception has occurred.
    • create

      public static Map<String,IDLProxyObject> create(File file, boolean debug) throws IOException
      Creates the.
      参数:
      file - the file
      debug - the debug
      返回:
      the map
      抛出:
      IOException - Signals that an I/O exception has occurred.
    • create

      public static Map<String,IDLProxyObject> create(File file, boolean debug, File path) throws IOException
      Creates the.
      参数:
      file - the file
      debug - the debug
      path - the path
      返回:
      the map
      抛出:
      IOException - Signals that an I/O exception has occurred.
    • create

      public static Map<String,IDLProxyObject> create(File file, boolean debug, File path, boolean isUniName) throws IOException
      Creates the.
      参数:
      file - the file
      debug - the debug
      path - the path
      isUniName - the is uni name
      返回:
      the map
      抛出:
      IOException - Signals that an I/O exception has occurred.
    • create

      public static Map<String,IDLProxyObject> create(File file, boolean debug, File path, List<com.baidu.bjf.remoting.protobuf.ProtobufIDLProxy.CodeDependent> cds, Set<String> compiledClass) throws IOException
      Creates the.
      参数:
      file - the file
      debug - the debug
      path - the path
      cds - the cds
      compiledClass - the compiled class
      返回:
      the map
      抛出:
      IOException - Signals that an I/O exception has occurred.
    • create

      public static Map<String,IDLProxyObject> create(File file, boolean debug, File path, List<com.baidu.bjf.remoting.protobuf.ProtobufIDLProxy.CodeDependent> cds, Set<String> compiledClass, boolean isUniName) throws IOException
      Creates the.
      参数:
      file - the file
      debug - the debug
      path - the path
      cds - the cds
      compiledClass - the compiled class
      isUniName - the is uni name
      返回:
      the map
      抛出:
      IOException - Signals that an I/O exception has occurred.
    • create

      public static Map<String,IDLProxyObject> create(InputStream is) throws IOException
      Creates the.
      参数:
      is - the is
      返回:
      the map
      抛出:
      IOException - Signals that an I/O exception has occurred.
    • create

      public static Map<String,IDLProxyObject> create(InputStream is, boolean debug) throws IOException
      Creates the.
      参数:
      is - the is
      debug - the debug
      返回:
      the map
      抛出:
      IOException - Signals that an I/O exception has occurred.
    • create

      public static Map<String,IDLProxyObject> create(InputStream is, boolean debug, boolean isUniName) throws IOException
      Creates the.
      参数:
      is - the is
      debug - the debug
      isUniName - the is uni name
      返回:
      the map
      抛出:
      IOException - Signals that an I/O exception has occurred.
    • create

      public static Map<String,IDLProxyObject> create(InputStream is, boolean debug, File path) throws IOException
      Creates the.
      参数:
      is - the is
      debug - the debug
      path - the path
      返回:
      the map
      抛出:
      IOException - Signals that an I/O exception has occurred.
    • create

      public static Map<String,IDLProxyObject> create(InputStream is, boolean debug, File path, boolean isUniName) throws IOException
      Creates the.
      参数:
      is - the is
      debug - the debug
      path - the path
      isUniName - the is uni name
      返回:
      the map
      抛出:
      IOException - Signals that an I/O exception has occurred.
    • create

      public static Map<String,IDLProxyObject> create(Reader reader) throws IOException
      Creates the.
      参数:
      reader - the reader
      返回:
      the map
      抛出:
      IOException - Signals that an I/O exception has occurred.
    • create

      public static Map<String,IDLProxyObject> create(Reader reader, boolean debug) throws IOException
      Creates the.
      参数:
      reader - the reader
      debug - the debug
      返回:
      the map
      抛出:
      IOException - Signals that an I/O exception has occurred.
    • create

      public static Map<String,IDLProxyObject> create(Reader reader, boolean debug, boolean isUniName) throws IOException
      Creates the.
      参数:
      reader - the reader
      debug - the debug
      isUniName - the is uni name
      返回:
      the map
      抛出:
      IOException - Signals that an I/O exception has occurred.
    • create

      public static Map<String,IDLProxyObject> create(Reader reader, boolean debug, File path) throws IOException
      Creates the.
      参数:
      reader - the reader
      debug - the debug
      path - the path
      返回:
      the map
      抛出:
      IOException - Signals that an I/O exception has occurred.
    • create

      public static Map<String,IDLProxyObject> create(Reader reader, boolean debug, File path, boolean isUniName) throws IOException
      Creates the.
      参数:
      reader - the reader
      debug - the debug
      path - the path
      isUniName - the is uni name
      返回:
      the map
      抛出:
      IOException - Signals that an I/O exception has occurred.
    • create

      public static Map<String,IDLProxyObject> create(String data)
      Creates the.
      参数:
      data - the data
      返回:
      the map
    • create

      public static Map<String,IDLProxyObject> create(String data, boolean debug)
      Creates the.
      参数:
      data - the data
      debug - the debug
      返回:
      the map
    • create

      public static Map<String,IDLProxyObject> create(String data, boolean debug, boolean isUniName)
      Creates the.
      参数:
      data - the data
      debug - the debug
      isUniName - the is uni name
      返回:
      the map
    • create

      public static Map<String,IDLProxyObject> create(String data, boolean debug, File path)
      Creates the.
      参数:
      data - the data
      debug - the debug
      path - the path
      返回:
      the map
    • create

      public static Map<String,IDLProxyObject> create(String data, boolean debug, File path, boolean isUniName)
      Creates the.
      参数:
      data - the data
      debug - the debug
      path - the path
      isUniName - the is uni name
      返回:
      the map
    • createSingle

      public static IDLProxyObject createSingle(InputStream is) throws IOException
      Creates the single.
      参数:
      is - the is
      返回:
      the IDL proxy object
      抛出:
      IOException - Signals that an I/O exception has occurred.
    • createSingle

      public static IDLProxyObject createSingle(InputStream is, boolean debug) throws IOException
      Creates the single.
      参数:
      is - the is
      debug - the debug
      返回:
      the IDL proxy object
      抛出:
      IOException - Signals that an I/O exception has occurred.
    • createSingle

      public static IDLProxyObject createSingle(InputStream is, boolean debug, boolean isUniName) throws IOException
      Creates the single.
      参数:
      is - the is
      debug - the debug
      isUniName - the is uni name
      返回:
      the IDL proxy object
      抛出:
      IOException - Signals that an I/O exception has occurred.
    • createSingle

      public static IDLProxyObject createSingle(InputStream is, boolean debug, File path) throws IOException
      Creates the single.
      参数:
      is - the is
      debug - the debug
      path - the path
      返回:
      the IDL proxy object
      抛出:
      IOException - Signals that an I/O exception has occurred.
    • createSingle

      public static IDLProxyObject createSingle(InputStream is, boolean debug, File path, boolean isUniName) throws IOException
      Creates the single.
      参数:
      is - the is
      debug - the debug
      path - the path
      isUniName - the is uni name
      返回:
      the IDL proxy object
      抛出:
      IOException - Signals that an I/O exception has occurred.
    • createSingle

      public static IDLProxyObject createSingle(Reader reader) throws IOException
      Creates the single.
      参数:
      reader - the reader
      返回:
      the IDL proxy object
      抛出:
      IOException - Signals that an I/O exception has occurred.
    • createSingle

      public static IDLProxyObject createSingle(Reader reader, boolean debug) throws IOException
      Creates the single.
      参数:
      reader - the reader
      debug - the debug
      返回:
      the IDL proxy object
      抛出:
      IOException - Signals that an I/O exception has occurred.
    • createSingle

      public static IDLProxyObject createSingle(Reader reader, boolean debug, boolean isUniName) throws IOException
      Creates the single.
      参数:
      reader - the reader
      debug - the debug
      isUniName - the is uni name
      返回:
      the IDL proxy object
      抛出:
      IOException - Signals that an I/O exception has occurred.
    • createSingle

      public static IDLProxyObject createSingle(Reader reader, boolean debug, File path) throws IOException
      Creates the single.
      参数:
      reader - the reader
      debug - the debug
      path - the path
      返回:
      the IDL proxy object
      抛出:
      IOException - Signals that an I/O exception has occurred.
    • createSingle

      public static IDLProxyObject createSingle(Reader reader, boolean debug, File path, boolean isUniName) throws IOException
      Creates the single.
      参数:
      reader - the reader
      debug - the debug
      path - the path
      isUniName - the is uni name
      返回:
      the IDL proxy object
      抛出:
      IOException - Signals that an I/O exception has occurred.
    • createSingle

      public static IDLProxyObject createSingle(String data)
      Creates the single.
      参数:
      data - the data
      返回:
      the IDL proxy object
    • createSingle

      public static IDLProxyObject createSingle(String data, boolean debug)
      Creates the single.
      参数:
      data - the data
      debug - the debug
      返回:
      the IDL proxy object
    • createSingle

      public static IDLProxyObject createSingle(String data, boolean debug, boolean isUniName)
      Creates the single.
      参数:
      data - the data
      debug - the debug
      isUniName - set true will create a unique different class name
      返回:
      the IDL proxy object
    • createSingle

      public static IDLProxyObject createSingle(String data, boolean debug, File path)
      Creates the single.
      参数:
      data - the data
      debug - the debug
      path - the path
      返回:
      the IDL proxy object
    • createSingle

      public static IDLProxyObject createSingle(String data, boolean debug, File path, boolean isUniName)
      Creates the single.
      参数:
      data - the data
      debug - the debug
      path - the path
      isUniName - the is uni name
      返回:
      the IDL proxy object
    • generateSource

      public static void generateSource(File file, File sourceOutputPath) throws IOException
      Generate source.
      参数:
      file - the file
      sourceOutputPath - the source output path
      抛出:
      IOException - Signals that an I/O exception has occurred.
    • generateSource

      public static void generateSource(File file, File sourceOutputPath, List<com.baidu.bjf.remoting.protobuf.ProtobufIDLProxy.CodeDependent> cds, Set<String> compiledClass) throws IOException
      Generate source.
      参数:
      file - the file
      sourceOutputPath - the source output path
      cds - the cds
      compiledClass - the compiled class
      抛出:
      IOException - Signals that an I/O exception has occurred.
    • generateSource

      public static void generateSource(InputStream is, File sourceOutputPath) throws IOException
      Generate source.
      参数:
      is - the is
      sourceOutputPath - the source output path
      抛出:
      IOException - Signals that an I/O exception has occurred.
    • generateSource

      public static void generateSource(Reader reader, File sourceOutputPath) throws IOException
      Generate source.
      参数:
      reader - the reader
      sourceOutputPath - the source output path
      抛出:
      IOException - Signals that an I/O exception has occurred.
    • generateSource

      public static void generateSource(String data, File sourceOutputPath)
      Generate source.
      参数:
      data - the data
      sourceOutputPath - the source output path