public void block(String blockName, BlockProcessor blockProcessor) {
    // this may change in future to external class to deal with dynamic
    // imports
    javaImport(rubyRuntime, blockProcessor.getClass());

    this.asciidoctorModule.block_processor(
        blockProcessor, RubyUtils.toSymbol(rubyRuntime, blockName));
  }
  /**
   * Generate the preamble for the payload block.
   *
   * @param bundle Bundle to generate preamble
   * @param xmit_blocks xmit_blocks to get the dictionary for generating preamble
   * @param block Block to write the payload preamble
   * @param link Link type
   * @param last If its a last block
   * @return If successfully generated then return Success message.
   */
  public int generate(
      final Bundle bundle,
      BlockInfoVec xmit_blocks,
      BlockInfo block,
      final Link link,
      boolean last) {
    // in the ::generate pass, we just need to set up the preamble,
    // since the payload stays on disk
    super.generate_preamble(
        xmit_blocks,
        block,
        bundle_block_type_t.PAYLOAD_BLOCK,
        last ? block_flag_t.BLOCK_FLAG_LAST_BLOCK.getCode() : 0,
        bundle.payload().length());

    return BP_SUCCESS;
  }
 public void block(BlockProcessor blockProcessor) {
   block(blockProcessor.getName(), blockProcessor);
 }