Package io.protostuff.compiler
Class ProtoToJavaBeanModelCompiler
- java.lang.Object
-
- io.protostuff.compiler.STCodeGenerator
-
- io.protostuff.compiler.ProtoToJavaBeanModelCompiler
-
- All Implemented Interfaces:
ProtoCompiler
public class ProtoToJavaBeanModelCompiler extends STCodeGenerator
Compiles proto files to protobuf java messages (pojos). Generates aSchema
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 io.protostuff.compiler.STCodeGenerator
DEFAULT_FORMATTERS, DEFAULT_RENDERERS, ERROR_LISTENER, errorCount, FORMAT_DELIM, GROUP_LOADER, id, STRING_ATTRIBUTE_RENDERER, TEMPLATE_BASE
-
-
Constructor Summary
Constructors Constructor Description ProtoToJavaBeanModelCompiler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
compile(ProtoModule module, Proto proto)
java.lang.String
getRemoteModelName(org.antlr.stringtemplate.StringTemplateGroup group, Message message)
java.lang.String
getRemoteModelSchemaName(org.antlr.stringtemplate.StringTemplateGroup group, Message message)
boolean
shouldGenerateModel(ProtoModule module, Proto proto, Message m)
-
Methods inherited from class io.protostuff.compiler.STCodeGenerator
chainedFormat, collect, compile, compile, format, getOutputId, getST, getSTG, override, parseProto, postCompile, setAttributeRenderer, setFormatter, setGroupLoader
-
-
-
-
Method Detail
-
compile
public void compile(ProtoModule module, Proto proto) throws java.io.IOException
- Specified by:
compile
in classSTCodeGenerator
- Throws:
java.io.IOException
-
shouldGenerateModel
public boolean shouldGenerateModel(ProtoModule module, Proto proto, Message m)
-
getRemoteModelName
public java.lang.String getRemoteModelName(org.antlr.stringtemplate.StringTemplateGroup group, Message message) throws java.io.IOException
- Throws:
java.io.IOException
-
getRemoteModelSchemaName
public java.lang.String getRemoteModelSchemaName(org.antlr.stringtemplate.StringTemplateGroup group, Message message) throws java.io.IOException
- Throws:
java.io.IOException
-
-