@Documented
@Retention(value=RUNTIME)
@Target(value=TYPE)
public @interface PositionalAttributes
Example: For this inline macro that defines section as the first positional parameter:
@PositionalAttribute("section")
@('man')
public class ManPageMacroProcessor extends InlineMacroProcessor {
public ManPageMacroProcessor(String macroName) {
super(macroName)
}
public Object process(StructuralNode parent, String target, Map attributes) {
assertEquals(attributes.get("section"), "7")
}
}
this macro invocation will pass "7" as value for the attribute section:
man:gittutorial[7]
Applicable for:
| BlockMacroProcessor | ✓ |
| BlockProcessor | ✓ |
| BlockProcessor | ✓ |
| DocInfoProcessor | |
| IncludeProcessor | ✓ |
| InlineMacroProcessor | ✓ |
| Postprocessor | |
| Preprocessor | |
| Treeprocessor |
| Modifier and Type | Required Element and Description |
|---|---|
java.lang.String[] |
value |