code: @Override
      @SuppressWarnings("unchecked")
      public void register(String extensionClassName, String blockName) throws MojoExecutionException {
  
          Class<? extends Processor> clazz;
          try {
              clazz = (Class<Processor>) Class.forName(extensionClassName);
          } catch (ClassCastException cce) {
              // Use RuntimeException to avoid catching, we only want the message in the Mojo
              throw new RuntimeException("'" + extensionClassName + "' is not a valid AsciidoctorJ processor class");
          } catch (ClassNotFoundException e) {
              throw new RuntimeException("'" + extensionClassName + "' not found in classpath");
          }
  
          // TODO: Replace with direct method calls again as soon as this project compiles against AsciidoctorJ 1.6.0
          if (DocinfoProcessor.class.isAssignableFrom(clazz)) {
              register(javaExtensionRegistry, "docinfoProcessor", clazz);
          } else if (Preprocessor.class.isAssignableFrom(clazz)) {
              register(javaExtensionRegistry, "preprocessor", clazz);
          } else if (Postprocessor.class.isAssignableFrom(clazz)) {
              register(javaExtensionRegistry, "postprocessor", clazz);
          } else if (Treeprocessor.class.isAssignableFrom(clazz)) {
              register(javaExtensionRegistry, "treeprocessor", clazz);
          } else if (BlockProcessor.class.isAssignableFrom(clazz)) {
              if (blockName == null) {
                  register(javaExtensionRegistry, "block", clazz);
              } else {
                  register(javaExtensionRegistry, "block", blockName, clazz);
              }
          } else if (IncludeProcessor.class.isAssignableFrom(clazz)) {
              register(javaExtensionRegistry, "includeProcessor", clazz);
          } else if (BlockMacroProcessor.class.isAssignableFrom(clazz)) {
              if (blockName == null) {
                  register(javaExtensionRegistry, "blockMacro", clazz);
              } else {
                  register(javaExtensionRegistry, "blockMacro", blockName, clazz);
              }
          } else if (InlineMacroProcessor.class.isAssignableFrom(clazz)) {
              if (blockName == null) {
                  register(javaExtensionRegistry, "inlineMacro", clazz);
              } else {
                  register(javaExtensionRegistry, "inlineMacro", blockName, clazz);
              }
          }
      }
docs: /*
  (non-Javadoc)
  
  @see
  org.asciidoctor.maven.processors.ProcessorRegistry#register(java.lang.String, java.lang.String)