Class CodecParseMethodGenerator
java.lang.Object
com.hedera.pbj.compiler.impl.generators.protobuf.CodecParseMethodGenerator
Code to generate the parse method for Codec classes.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static StringgenerateParseLoop(String caseStatements, String prefix, String schemaClassName) (package private) static StringgenerateParseMethod(String modelClassName, String schemaClassName, List<Field> fields) (package private) static StringgenerateUnsetOneOfConstants(List<Field> fields) Because all UNSET OneOf values are the same and we use them often we create a static constant for them and just reuse it throughout codec code.(package private) static StringreadMethod(Field field)
-
Constructor Details
-
CodecParseMethodGenerator
CodecParseMethodGenerator()
-
-
Method Details
-
generateUnsetOneOfConstants
Because all UNSET OneOf values are the same and we use them often we create a static constant for them and just reuse it throughout codec code.- Parameters:
fields- the fields to generate for- Returns:
- code for constants
-
generateParseMethod
-
generateParseLoop
-
readMethod
-