org.asciidoctor.ast.ContentModel Maven / Gradle / Ivy
package org.asciidoctor.ast;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* This annotation defines how to handle content created by a {@code BlockProcessor}.
* Applicable for:
*
* BlockMacroProcessor
* BlockProcessor ✓
* BlockProcessor
* DocInfoProcessor
* IncludeProcessor
* InlineMacroProcessor
* Postprocessor
* Preprocessor
* Treeprocessor
*
*/
@Documented
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
public @interface ContentModel {
/**
* 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);
*
*
*
*/
String KEY = "content_model";
/**
* Predefined constant to let Asciidoctor know that this BlockProcessor creates zero or more child blocks.
*/
String COMPOUND = ":compound";
/**
* Predefined constant to let Asciidoctor know that this BlockProcessor creates simple paragraph content.
*/
String SIMPLE = ":simple";
/**
* Predefined constant to let Asciidoctor know that this BlockProcessor creates literal content.
*/
String VERBATIM = ":verbatim";
/**
* Predefined constant to make Asciidoctor pass through the content unprocessed.
*/
String RAW = ":raw";
/**
* Predefined constant to make Asciidoctor drop the content.
*/
String SKIP = ":skip";
/**
* Predefined constant to make Asciidoctor not expect any content.
*/
String EMPTY = ":empty";
/**
* Predefined constant to make Asciidoctor parse content as attributes.
*/
String ATTRIBUTES = ":attributes";
/**
* See the constants defined in this enumeration for possible values.
* @return The defined content model
*/
String value();
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy