Enum MarkdownSink.ElementContext
java.lang.Object
java.lang.Enum<MarkdownSink.ElementContext>
org.apache.maven.doxia.module.markdown.MarkdownSink.ElementContext
- All Implemented Interfaces:
Serializable, Comparable<MarkdownSink.ElementContext>
- Enclosing class:
MarkdownSink
Most important contextual metadata (of the surrounding element)
-
Nested Class Summary
Nested Classes -
Enum Constant Summary
Enum ConstantsEnum ConstantDescription -
Field Summary
FieldsModifier and TypeFieldDescription(package private) final UnaryOperator<String> The function to call to escape the given text.(package private) final String(package private) final Stringprefix to be used for a (nested) block elements inside the current container context (only not empty fortypebeingMarkdownSink.ElementContext.Type.CONTAINER_BLOCK)(package private) final booleaniftruerequires buffering any text appearing inside this context(package private) final booleanOnly relevant for block element, if set totruethe element requires to be surrounded by blank lines.(package private) final MarkdownSink.ElementContext.Typetrueif block element, otherwisefalsefor inline elements -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateElementContext(String name, MarkdownSink.ElementContext.Type type, UnaryOperator<String> escapeFunction) privateElementContext(String name, MarkdownSink.ElementContext.Type type, UnaryOperator<String> escapeFunction, boolean requiresBuffering) privateElementContext(String name, MarkdownSink.ElementContext.Type type, UnaryOperator<String> escapeFunction, boolean requiresBuffering, String prefix) privateElementContext(String name, MarkdownSink.ElementContext.Type type, UnaryOperator<String> escapeFunction, boolean requiresBuffering, String prefix, boolean requiresSurroundingByBlankLines) -
Method Summary
Modifier and TypeMethodDescription(package private) StringMust be called for each inline text to be emitted directly within this context (not relevant for nested context)(package private) booleanisBlock()(package private) booleanstatic MarkdownSink.ElementContextReturns the enum constant of this type with the specified name.static MarkdownSink.ElementContext[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
HEAD
-
BODY
-
FIGURE
-
CODE_BLOCK
-
CODE_SPAN
-
TABLE_CAPTION
-
TABLE_CELL
-
LIST_ITEM
-
BLOCKQUOTE
-
-
Field Details
-
name
-
type
trueif block element, otherwisefalsefor inline elements -
escapeFunction
The function to call to escape the given text. The function is supposed to return the escaped text or return just the given text if no escaping is necessary in this context -
requiresBuffering
final boolean requiresBufferingiftruerequires buffering any text appearing inside this context -
prefix
prefix to be used for a (nested) block elements inside the current container context (only not empty fortypebeingMarkdownSink.ElementContext.Type.CONTAINER_BLOCK) -
requiresSurroundingByBlankLines
final boolean requiresSurroundingByBlankLinesOnly relevant for block element, if set totruethe element requires to be surrounded by blank lines.
-
-
Constructor Details
-
ElementContext
private ElementContext(String name, MarkdownSink.ElementContext.Type type, UnaryOperator<String> escapeFunction) -
ElementContext
private ElementContext(String name, MarkdownSink.ElementContext.Type type, UnaryOperator<String> escapeFunction, boolean requiresBuffering) -
ElementContext
private ElementContext(String name, MarkdownSink.ElementContext.Type type, UnaryOperator<String> escapeFunction, boolean requiresBuffering, String prefix) -
ElementContext
private ElementContext(String name, MarkdownSink.ElementContext.Type type, UnaryOperator<String> escapeFunction, boolean requiresBuffering, String prefix, boolean requiresSurroundingByBlankLines)
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
escape
-
isBlock
boolean isBlock()- Returns:
truefor all block types,falseotherwise
-
isContainer
boolean isContainer()- Returns:
truefor all containers (allowing block elements as children),falseotherwise
-