Class ModelGenerator
java.lang.Object
com.hedera.pbj.compiler.impl.generators.ModelGenerator
- All Implemented Interfaces:
Generator
Code generator that parses protobuf files and generates nice Java source for record files for each message type and
enum.
-
Field Summary
Fields inherited from interface com.hedera.pbj.compiler.impl.generators.Generator
GENERATORS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidgenerate(Protobuf3Parser.MessageDefContext msgDef, JavaFileWriter writer, ContextualLookupHelper lookupHelper) Generate a code from protobuf message type
-
Constructor Details
-
ModelGenerator
public ModelGenerator()
-
-
Method Details
-
generate
public void generate(Protobuf3Parser.MessageDefContext msgDef, JavaFileWriter writer, ContextualLookupHelper lookupHelper) throws IOException Generate a code from protobuf message typeGenerates a new model object.
- Specified by:
generatein interfaceGenerator- Parameters:
msgDef- the parsed messagelookupHelper- Lookup helper for global context lookups- Throws:
IOException- if there was a problem writing generated code
-