Class LazyGetProtobufSizeMethodGenerator

java.lang.Object
com.hedera.pbj.compiler.impl.generators.protobuf.LazyGetProtobufSizeMethodGenerator

public class LazyGetProtobufSizeMethodGenerator extends Object
Code to generate the measure record method for Codec classes. This measures the number of bytes that would be written if the record was serialized in protobuf format.
  • Constructor Details

    • LazyGetProtobufSizeMethodGenerator

      public LazyGetProtobufSizeMethodGenerator()
  • Method Details

    • generateLazyGetProtobufSize

      public static String generateLazyGetProtobufSize(List<Field> fields, String schemaClassName)
    • buildFieldSizeOfLines

      static String buildFieldSizeOfLines(String modelClassName, String schemaClassName, List<Field> fields, Function<Field,String> getValueBuilder, boolean skipDefault)
    • formatUnknownFieldsSizeOfLines

      static String formatUnknownFieldsSizeOfLines()