Package org.asciidoctor.extension
Class BlockProcessor
- java.lang.Object
-
- org.asciidoctor.extension.BaseProcessor
-
- org.asciidoctor.extension.BlockProcessor
-
- All Implemented Interfaces:
Processor
public abstract class BlockProcessor extends BaseProcessor
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
CONTEXT_EXAMPLE
Deprecated.Please useContexts.EXAMPLE
static java.lang.String
CONTEXT_LISTING
Deprecated.Please useContexts.LISTING
static java.lang.String
CONTEXT_LITERAL
Deprecated.Please useContexts.LITERAL
static java.lang.String
CONTEXT_OPEN
Deprecated.Please useContexts.OPEN
static java.lang.String
CONTEXT_PARAGRAPH
Deprecated.Please useContexts.PARAGRAPH
static java.lang.String
CONTEXT_PASS
Deprecated.Please useContexts.PASS
static java.lang.String
CONTEXT_QUOTE
Deprecated.Please useContexts.QUOTE
static java.lang.String
CONTEXT_SIDEBAR
Deprecated.Please useContexts.SIDEBAR
static java.lang.String
CONTEXTS
Deprecated.Please useContexts.KEY
protected java.lang.String
name
-
Constructor Summary
Constructors Constructor Description BlockProcessor()
BlockProcessor(java.lang.String name)
BlockProcessor(java.lang.String name, java.util.Map<java.lang.String,java.lang.Object> config)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description java.lang.String
getName()
abstract java.lang.Object
process(StructuralNode parent, Reader reader, java.util.Map<java.lang.String,java.lang.Object> attributes)
void
setName(java.lang.String name)
-
Methods inherited from class org.asciidoctor.extension.BaseProcessor
createBlock, createBlock, createBlock, createBlock, createBlock, createBlock, createBlock, createDocument, createList, createList, createList, createListItem, createListItem, createPhraseNode, createPhraseNode, createPhraseNode, createPhraseNode, createPhraseNode, createPhraseNode, createSection, createSection, createSection, createSection, createSection, createTable, createTable, createTableCell, createTableCell, createTableCell, createTableCell, createTableColumn, createTableColumn, createTableRow, getConfig, log, parseContent, setConfig, unwrap, updateConfig
-
-
-
-
Field Detail
-
CONTEXTS
@Deprecated public static final java.lang.String CONTEXTS
Deprecated.Please useContexts.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 useContexts.OPEN
Predefined constant for making a BlockProcessor work on open blocks. When passed with theCONTEXTS
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 useContexts.EXAMPLE
Predefined constant for making a BlockProcessor work on example blocks. When passed with theCONTEXTS
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 useContexts.SIDEBAR
Predefined constant for making a BlockProcessor work on sidebar blocks. When passed with theCONTEXTS
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 useContexts.LITERAL
Predefined constant for making a BlockProcessor work on literal blocks. When passed with theCONTEXTS
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 useContexts.LISTING
Predefined constant for making a BlockProcessor work on source blocks. When passed with theCONTEXTS
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 useContexts.QUOTE
Predefined constant for making a BlockProcessor work on quote blocks. When passed with theCONTEXTS
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 useContexts.PASS
Predefined constant for making a BlockProcessor work on passthrough blocks. When passed with theCONTEXTS
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.Please useContexts.PARAGRAPH
Predefined constant for making a BlockProcessor work on paragraph blocks. This is also the default for theCONTEXTS
config option if no other context is given. When passed with theCONTEXTS
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
-
-
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)
-
-