Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,8 @@ public void generate(
writer.addImport("static com.hedera.pbj.runtime.ProtoConstants.*");
writer.addImport("static com.hedera.pbj.runtime.Utf8Tools.*");

var sbFunc = new StringBuilder();

// spotless:off
writer.append("""
/**
Expand Down Expand Up @@ -164,14 +166,15 @@ public void generate(
.replace("$codecClass", codecClassName)
.replace("$cacheableSupport", cacheableSupport)
.replace("$unsetOneOfConstants", CodecParseMethodGenerator.generateUnsetOneOfConstants(fields))
.replace("$parseMethod", CodecParseMethodGenerator.generateParseMethod(modelClassName, schemaClassName, fields, !cacheableSupport.isBlank()))
.replace("$parseMethod", CodecParseMethodGenerator.generateParseMethod(sbFunc, modelClassName, schemaClassName, fields, !cacheableSupport.isBlank()))
.replace("$writeMethod", writeMethod)
.replace("$writeByteArrayMethod", writeByteArrayMethod)
.replace("$measureDataMethod", CodecMeasureDataMethodGenerator.generateMeasureMethod(modelClassName, fields))
.replace("$measureRecordMethod", CodecMeasureRecordMethodGenerator.generateMeasureMethod(modelClassName, fields))
.replace("$fastEqualsMethod", CodecFastEqualsMethodGenerator.generateFastEqualsMethod(modelClassName, fields))
.replace("$getDefaultInstanceMethod", generateGetDefaultInstanceMethod(modelClassName))
);
writer.append(sbFunc.toString());
// spotless:on

for (final var item : msgDef.messageBody().messageElement()) {
Expand Down
Loading
Loading