Annotation Type ContentModel


@Documented @Retention(RUNTIME) @Target(TYPE) public @interface ContentModel
This annotation defines how to handle content created by a BlockProcessor. Applicable for:
BlockMacroProcessor
BlockProcessor
BlockProcessor
DocInfoProcessor
IncludeProcessor
InlineMacroProcessor
Postprocessor
Preprocessor
Treeprocessor
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    See the constants defined in this enumeration for possible values.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Predefined constant to make Asciidoctor parse content as attributes.
    static final String
    Predefined constant to let Asciidoctor know that this BlockProcessor creates zero or more child blocks.
    static final String
    Predefined constant to make Asciidoctor not expect any content.
    static final String
    This value is used as the config option key to configure how Asciidoctor should treat blocks created by this Processor.
    static final String
    Predefined constant to make Asciidoctor pass through the content unprocessed.
    static final String
    Predefined constant to let Asciidoctor know that this BlockProcessor creates simple paragraph content.
    static final String
    Predefined constant to make Asciidoctor drop the content.
    static final String
    Predefined constant to let Asciidoctor know that this BlockProcessor creates literal content.
  • Field Details

    • KEY

      static final String KEY
      This value is used as the config option key to configure how Asciidoctor should treat blocks created by this Processor. Its value must be a String constant.

      Example to Asciidoctor know that a BlockProcessor creates zero or more child blocks:

       
       Map<String, Object> config = new HashMap<>();
       config.put(ContentModel.KEY, ContentModel.COMPOUND);
       BlockProcessor blockProcessor = new BlockProcessor("foo", config);
       asciidoctor.javaExtensionRegistry().block(blockProcessor);
       
       

      See Also:
    • COMPOUND

      static final String COMPOUND
      Predefined constant to let Asciidoctor know that this BlockProcessor creates zero or more child blocks.
      See Also:
    • SIMPLE

      static final String SIMPLE
      Predefined constant to let Asciidoctor know that this BlockProcessor creates simple paragraph content.
      See Also:
    • VERBATIM

      static final String VERBATIM
      Predefined constant to let Asciidoctor know that this BlockProcessor creates literal content.
      See Also:
    • RAW

      static final String RAW
      Predefined constant to make Asciidoctor pass through the content unprocessed.
      See Also:
    • SKIP

      static final String SKIP
      Predefined constant to make Asciidoctor drop the content.
      See Also:
    • EMPTY

      static final String EMPTY
      Predefined constant to make Asciidoctor not expect any content.
      See Also:
    • ATTRIBUTES

      static final String ATTRIBUTES
      Predefined constant to make Asciidoctor parse content as attributes.
      See Also:
  • Element Details

    • value

      String value
      See the constants defined in this enumeration for possible values.
      Returns:
      The defined content model