Class ProtoToJavaBeanModelCompiler
java.lang.Object
io.protostuff.compiler.STCodeGenerator
io.protostuff.compiler.ProtoToJavaBeanModelCompiler
- All Implemented Interfaces:
ProtoCompiler
Compiles proto files to protobuf java messages (pojos). Generates a
Schema from the proto files.
- Schemas are always separated from messages
- Schemas are able to be inherited
- Schemas have a lot of Annotation/Options to configure compiler output
- @Transient support for Messages/Enumerations
-
Field Summary
Fields 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) getRemoteModelName(org.antlr.stringtemplate.StringTemplateGroup group, Message message) getRemoteModelSchemaName(org.antlr.stringtemplate.StringTemplateGroup group, Message message) booleanshouldGenerateModel(ProtoModule module, Proto proto, Message m) Methods inherited from class STCodeGenerator
chainedFormat, collect, compile, compile, format, getOutputId, getST, getSTG, override, parseProto, postCompile, setAttributeRenderer, setFormatter, setGroupLoader
-
Constructor Details
-
ProtoToJavaBeanModelCompiler
public ProtoToJavaBeanModelCompiler()
-
-
Method Details
-
compile
- Specified by:
compilein classSTCodeGenerator- Throws:
IOException
-
shouldGenerateModel
-
getRemoteModelName
public String getRemoteModelName(org.antlr.stringtemplate.StringTemplateGroup group, Message message) throws IOException - Throws:
IOException
-
getRemoteModelSchemaName
public String getRemoteModelSchemaName(org.antlr.stringtemplate.StringTemplateGroup group, Message message) throws IOException - Throws:
IOException
-