code: private LocalVariableDefinition constructStructInstance(MethodDefinition read, Map<Short, LocalVariableDefinition> structData)
      {
          LocalVariableDefinition instance = read.addLocalVariable(structType, "instance");
  
          // create the new instance (or builder)
          if (metadata.getBuilderClass() == null) {
              read.newObject(structType).dup();
          }
          else {
              read.newObject(metadata.getBuilderClass()).dup();
          }
  
          // invoke constructor
          ThriftConstructorInjection constructor = metadata.getConstructorInjection().get();
          // push parameters on stack
          for (ThriftParameterInjection parameter : constructor.getParameters()) {
              read.loadVariable(structData.get(parameter.getId()));
          }
          // invoke constructor
          read.invokeConstructor(constructor.getConstructor())
                  .storeVariable(instance);
          return instance;
      }
docs: Defines the code to construct the struct (or builder) instance and stores it in a local
  variable.