Package io.protostuff.compiler
Class ProtoToProtoCompiler
java.lang.Object
io.protostuff.compiler.STCodeGenerator
io.protostuff.compiler.ProtoToProtoCompiler
- All Implemented Interfaces:
ProtoCompiler
Kind of preprocessor for proto files. Able to extend one messages with fields from other ones.
-
Field Summary
FieldsFields inherited from class io.protostuff.compiler.STCodeGenerator
DEFAULT_FORMATTERS, DEFAULT_RENDERERS, ERROR_LISTENER, errorCount, FORMAT_DELIM, GROUP_LOADER, id, STRING_ATTRIBUTE_RENDERER, TEMPLATE_BASE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
compile
(ProtoModule module, Proto proto) static String
static String
generateIndentation
(String indentation, int length) static String
generateTimestamp
(Message extend, Message by) static String
injectAfterAnnotation
(Message extend, Message by, String extendProto, String byContent) static String
injectAfterOption
(Message extend, Message by, String extendProto, String byContent) static String
insertIndentation
(String content, String indent) Methods inherited from class io.protostuff.compiler.STCodeGenerator
chainedFormat, collect, compile, compile, format, getOutputId, getST, getSTG, override, parseProto, postCompile, setAttributeRenderer, setFormatter, setGroupLoader
-
Field Details
-
LINE_SEPARATOR
-
-
Constructor Details
-
ProtoToProtoCompiler
public ProtoToProtoCompiler()
-
-
Method Details
-
compile
- Specified by:
compile
in classSTCodeGenerator
- Throws:
IOException
-
extendBy
public static String extendBy(org.antlr.stringtemplate.StringTemplateGroup group, Message extend, Message by) throws IOException - Throws:
IOException
-
injectAfterAnnotation
-
injectAfterOption
-
insertIndentation
-
generateIndentation
-
generateTimestamp
-