Class NodePostProcessorFactory
- java.lang.Object
-
- com.vladsch.flexmark.parser.block.NodePostProcessorFactory
-
- All Implemented Interfaces:
PostProcessorFactory
,Dependent
,java.util.function.Function<Document,PostProcessor>
- Direct Known Subclasses:
AbbreviationNodePostProcessor.Factory
,AnchorLinkNodePostProcessor.Factory
,AttributesNodePostProcessor.Factory
,AutolinkNodePostProcessor.Factory
,EnumeratedReferenceNodePostProcessor.Factory
,EscapedCharacterNodePostProcessor.Factory
,IncludeNodePostProcessor.Factory
,MediaTagsNodePostProcessor.Factory
,SyntheticLinkSample.SyntheticLinkPostProcessor.Factory
,YouTubeLinkNodePostProcessor.Factory
,YouTubeLinkSample.YouTubeLinkNodePostProcessor.Factory
,ZzzzzzNodePostProcessor.Factory
public abstract class NodePostProcessorFactory extends java.lang.Object implements PostProcessorFactory
-
-
Constructor Summary
Constructors Constructor Description NodePostProcessorFactory(boolean ignored)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected void
addNodes(java.lang.Class<?>... nodeTypes)
protected void
addNodeWithExclusions(java.lang.Class<? extends Node> nodeType, java.lang.Class<?>... excludeDescendantsOf)
boolean
affectsGlobalScope()
abstract NodePostProcessor
apply(Document document)
java.util.Set<java.lang.Class<?>>
getAfterDependents()
java.util.Set<java.lang.Class<?>>
getBeforeDependents()
java.util.Map<java.lang.Class<?>,java.util.Set<java.lang.Class<?>>>
getNodeTypes()
A map of nodes of interest as keys and values a set of classes, if implemented by an ancestors then the node should be excluded from processing by this processor i.e.
-
-
-
Method Detail
-
getAfterDependents
@Nullable public java.util.Set<java.lang.Class<?>> getAfterDependents()
- Specified by:
getAfterDependents
in interfaceDependent
- Returns:
- null or a list of dependents that must be executed before calling this one if any of the blocks in the list affect global state then these will be run on ALL blocks of the document before this preprocessor is called.
-
getBeforeDependents
@Nullable public java.util.Set<java.lang.Class<?>> getBeforeDependents()
- Specified by:
getBeforeDependents
in interfaceDependent
- Returns:
- null or a list of dependents that must be executed after calling this one if any of the blocks in the list affect global state then these will be run on ALL blocks of the document before this preprocessor is called.
-
affectsGlobalScope
public final boolean affectsGlobalScope()
- Specified by:
affectsGlobalScope
in interfaceDependent
- Returns:
- true if this dependent affects the global scope, which means that any that depend on it have to be run after this dependent has run against all elements. Otherwise, the dependent can run on an element after its dependents have processed an element. parsed.
-
addNodeWithExclusions
protected final void addNodeWithExclusions(java.lang.Class<? extends Node> nodeType, java.lang.Class<?>... excludeDescendantsOf)
-
addNodes
protected final void addNodes(java.lang.Class<?>... nodeTypes)
-
getNodeTypes
public final java.util.Map<java.lang.Class<?>,java.util.Set<java.lang.Class<?>>> getNodeTypes()
Description copied from interface:PostProcessorFactory
A map of nodes of interest as keys and values a set of classes, if implemented by an ancestors then the node should be excluded from processing by this processor i.e. DoNotDecorate.class if the processor adds links so that existing links will be ignored.- Specified by:
getNodeTypes
in interfacePostProcessorFactory
- Returns:
- a map of desired node types mapped to a set of ancestors under which the post processor does not process the block
-
apply
@NotNull public abstract NodePostProcessor apply(@NotNull Document document)
- Specified by:
apply
in interfacejava.util.function.Function<Document,PostProcessor>
- Specified by:
apply
in interfacePostProcessorFactory
- Parameters:
document
- for which to create the post processor- Returns:
- post processor for the document
-
-