Class CodecParseMethodGenerator
java.lang.Object
com.hedera.pbj.compiler.impl.generators.protobuf.CodecParseMethodGenerator
Code to generate the parse method for Codec classes.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final record -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static StringgenerateCacheableSupport(String modelClassName, List<Field> fields) (package private) static CodecParseMethodGenerator.ParseAndDefaultBodygenerateParseLoop(String caseStatements, String prefix, String schemaClassName) (package private) static StringgenerateParseMethod(StringBuilder sbFunc, String modelClassName, String schemaClassName, List<Field> fields, boolean isCacheable) (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
-
generateParseMethod
-
generateCacheableSupport
-
generateParseLoop
static CodecParseMethodGenerator.ParseAndDefaultBody generateParseLoop(String caseStatements, @NonNull String prefix, @NonNull String schemaClassName) -
readMethod
-