Class ProtoToProtoCompiler

  • All Implemented Interfaces:
    ProtoCompiler

    public class ProtoToProtoCompiler
    extends STCodeGenerator
    Kind of preprocessor for proto files. Able to extend one messages with fields from other ones.
    • Field Detail

      • LINE_SEPARATOR

        public static final java.lang.String LINE_SEPARATOR
    • Constructor Detail

      • ProtoToProtoCompiler

        public ProtoToProtoCompiler()
    • Method Detail

      • extendBy

        public static java.lang.String extendBy​(org.antlr.stringtemplate.StringTemplateGroup group,
                                                Message extend,
                                                Message by)
                                         throws java.io.IOException
        Throws:
        java.io.IOException
      • injectAfterAnnotation

        public static java.lang.String injectAfterAnnotation​(Message extend,
                                                             Message by,
                                                             java.lang.String extendProto,
                                                             java.lang.String byContent)
      • injectAfterOption

        public static java.lang.String injectAfterOption​(Message extend,
                                                         Message by,
                                                         java.lang.String extendProto,
                                                         java.lang.String byContent)
      • insertIndentation

        public static java.lang.String insertIndentation​(java.lang.String content,
                                                         java.lang.String indent)
      • generateIndentation

        public static java.lang.String generateIndentation​(java.lang.String indentation,
                                                           int length)
      • generateTimestamp

        public static java.lang.String generateTimestamp​(Message extend,
                                                         Message by)