Class BlockProcessor

    • Field Detail

      • CONTEXTS

        @Deprecated
        public static final java.lang.String CONTEXTS
        Deprecated.
        Please use Contexts.KEY
        This value is used as the config option key when defining the block type a Processor should process. Its value must be a list of String constants:

        Example to make a BlockProcessor work on listings and examples named foo:

         
         Map<String, Object> config = new HashMap<>();
         config.put(CONTEXTS, Arrays.asList(EXAMPLE, LISTING));
         BlockProcessor blockProcessor = new BlockProcessor("foo", config);
         asciidoctor.javaExtensionRegistry().block(blockProcessor);
         
         

        See Also:
        Constant Field Values
      • CONTEXT_OPEN

        @Deprecated
        public static final java.lang.String CONTEXT_OPEN
        Deprecated.
        Please use Contexts.OPEN
        Predefined constant for making a BlockProcessor work on open blocks. When passed with the CONTEXTS config option this BlockProcessor works on open blocks:
         [foo]
         --
         An open block can be an anonymous container,
         or it can masquerade as any other block.
         --
         
        See Also:
        Constant Field Values
      • CONTEXT_EXAMPLE

        @Deprecated
        public static final java.lang.String CONTEXT_EXAMPLE
        Deprecated.
        Please use Contexts.EXAMPLE
        Predefined constant for making a BlockProcessor work on example blocks. When passed with the CONTEXTS config option this BlockProcessor works on example blocks:
         [foo]
         ====
         This is just a neat example.
         ====
         
        See Also:
        Constant Field Values
      • CONTEXT_SIDEBAR

        @Deprecated
        public static final java.lang.String CONTEXT_SIDEBAR
        Deprecated.
        Please use Contexts.SIDEBAR
        Predefined constant for making a BlockProcessor work on sidebar blocks. When passed with the CONTEXTS config option this BlockProcessor works on sidebar blocks:
         [foo]
         ****
         This is just a sidebar.
         ****
         
        See Also:
        Constant Field Values
      • CONTEXT_LITERAL

        @Deprecated
        public static final java.lang.String CONTEXT_LITERAL
        Deprecated.
        Please use Contexts.LITERAL
        Predefined constant for making a BlockProcessor work on literal blocks. When passed with the CONTEXTS config option this BlockProcessor works on literal blocks:
         [foo]
         ....
         This is just a literal block.
         ....
         
        See Also:
        Constant Field Values
      • CONTEXT_LISTING

        @Deprecated
        public static final java.lang.String CONTEXT_LISTING
        Deprecated.
        Please use Contexts.LISTING
        Predefined constant for making a BlockProcessor work on source blocks. When passed with the CONTEXTS config option this BlockProcessor works on source blocks:
         [foo]
         ....
         This is just a literal block.
         ....
         
        See Also:
        Constant Field Values
      • CONTEXT_QUOTE

        @Deprecated
        public static final java.lang.String CONTEXT_QUOTE
        Deprecated.
        Please use Contexts.QUOTE
        Predefined constant for making a BlockProcessor work on quote blocks. When passed with the CONTEXTS config option this BlockProcessor works on quote blocks:
         [foo]
         ____
         To be or not to be...
         ____
         
        See Also:
        Constant Field Values
      • CONTEXT_PASS

        @Deprecated
        public static final java.lang.String CONTEXT_PASS
        Deprecated.
        Please use Contexts.PASS
        Predefined constant for making a BlockProcessor work on passthrough blocks. When passed with the CONTEXTS config option this BlockProcessor works on passthrough blocks:
         [foo]
         ++++
         <h1>Big text</h1>
         ++++
         
        See Also:
        Constant Field Values
      • CONTEXT_PARAGRAPH

        @Deprecated
        public static final java.lang.String CONTEXT_PARAGRAPH
        Deprecated.
        Predefined constant for making a BlockProcessor work on paragraph blocks. This is also the default for the CONTEXTS config option if no other context is given. When passed with the CONTEXTS config option this BlockProcessor works on paragraph blocks:
         [foo]
         Please process this paragraph.
        
         And don't process this.
         
        See Also:
        Constant Field Values
      • name

        protected java.lang.String name
    • Constructor Detail

      • BlockProcessor

        public BlockProcessor()
      • BlockProcessor

        public BlockProcessor​(java.lang.String name)
      • BlockProcessor

        public BlockProcessor​(java.lang.String name,
                              java.util.Map<java.lang.String,​java.lang.Object> config)
    • Method Detail

      • getName

        public java.lang.String getName()
      • setName

        public void setName​(java.lang.String name)
      • process

        public abstract java.lang.Object process​(StructuralNode parent,
                                                 Reader reader,
                                                 java.util.Map<java.lang.String,​java.lang.Object> attributes)