org.asciidoctor.extension.Location Maven / Gradle / Ivy
package org.asciidoctor.extension;
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 the location where the content created by a DocinfoProcessor will be added.
* The following example will add a robots meta tag to the head element of the resulting HTML document:
*
*
* @Location(LocationType.HEADER)
* class RobotsDocinfoProcessor extends DocinfoProcessor {
*
* public static final String META_TAG = "<meta name=\"robots\" content=\"index, follow\"/>";
*
* public String process(Document document) {
* return META_TAG;
* }
* }
*
*
* Applicable for:
*
* BlockMacroProcessor
* BlockProcessor
* BlockProcessor
* DocInfoProcessor ✓
* IncludeProcessor
* InlineMacroProcessor
* Postprocessor
* Preprocessor
* Treeprocessor
*
*/
@Documented
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
public @interface Location {
LocationType value() default LocationType.HEADER;
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy