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
    • Field Summary

      Fields 
      Modifier and Type Fields Description
      static java.lang.String ATTRIBUTES
      Predefined constant to make Asciidoctor parse content as attributes.
      static java.lang.String COMPOUND
      Predefined constant to let Asciidoctor know that this BlockProcessor creates zero or more child blocks.
      static java.lang.String EMPTY
      Predefined constant to make Asciidoctor not expect any content.
      static java.lang.String KEY
      This value is used as the config option key to configure how Asciidoctor should treat blocks created by this Processor.
      static java.lang.String RAW
      Predefined constant to make Asciidoctor pass through the content unprocessed.
      static java.lang.String SIMPLE
      Predefined constant to let Asciidoctor know that this BlockProcessor creates simple paragraph content.
      static java.lang.String SKIP
      Predefined constant to make Asciidoctor drop the content.
      static java.lang.String VERBATIM
      Predefined constant to let Asciidoctor know that this BlockProcessor creates literal content.
    • Required Element Summary

      Required Elements 
      Modifier and Type Required Element Description
      java.lang.String value
      See the constants defined in this enumeration for possible values.
    • Field Detail

      • KEY

        static final java.lang.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);
         
         

      • COMPOUND

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

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

        static final java.lang.String VERBATIM
        Predefined constant to let Asciidoctor know that this BlockProcessor creates literal content.
      • RAW

        static final java.lang.String RAW
        Predefined constant to make Asciidoctor pass through the content unprocessed.
      • SKIP

        static final java.lang.String SKIP
        Predefined constant to make Asciidoctor drop the content.
      • EMPTY

        static final java.lang.String EMPTY
        Predefined constant to make Asciidoctor not expect any content.
      • ATTRIBUTES

        static final java.lang.String ATTRIBUTES
        Predefined constant to make Asciidoctor parse content as attributes.
    • Element Detail

      • value

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