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 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 TypeMethodDescriptionvoidcompile(ProtoModule module, Proto proto) static Stringstatic StringgenerateIndentation(String indentation, int length) static StringgenerateTimestamp(Message extend, Message by) static StringinjectAfterAnnotation(Message extend, Message by, String extendProto, String byContent) static StringinjectAfterOption(Message extend, Message by, String extendProto, String byContent) static StringinsertIndentation(String content, String indent) Methods inherited from class 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:
compilein 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
-