Class BlockNodeVisitor
java.lang.Object
com.vladsch.flexmark.util.visitor.AstActionHandler<NodeVisitor, Node, Visitor<Node>, VisitHandler<Node>>
com.vladsch.flexmark.util.ast.NodeVisitor
com.vladsch.flexmark.util.ast.BlockNodeVisitor
- All Implemented Interfaces:
NodeVisitHandler, Visitor<Node>, AstAction<Node>
Used to visit only block nodes, non block nodes or children of non-block nodes are not visited
Can be used to only process certain nodes. If you override a method and want visiting to descend into children,
call NodeVisitor.visitChildren(Node).
-
Field Summary
Fields inherited from class NodeVisitor
EMPTY_HANDLERS -
Constructor Summary
ConstructorsConstructorDescriptionBlockNodeVisitor(@NotNull VisitHandler... handlers) BlockNodeVisitor(@NotNull VisitHandler[]... handlers) BlockNodeVisitor(@NotNull Collection<VisitHandler> handlers) -
Method Summary
Modifier and TypeMethodDescriptionvoidprocessNode(@NotNull Node node, boolean withChildren, @NotNull BiConsumer<Node, Visitor<Node>> processor) Node processing called for every node being processedMethods inherited from class NodeVisitor
addHandler, addHandlers, addHandlers, addHandlers, addTypedHandlers, visit, visitChildren, visitNodeOnlyMethods inherited from class AstActionHandler
addActionHandler, addActionHandlers, getAction, getAction, getHandler, getHandler, getNodeClasses, processChildren, processNodeOnly
-
Constructor Details
-
BlockNodeVisitor
public BlockNodeVisitor() -
BlockNodeVisitor
-
BlockNodeVisitor
-
BlockNodeVisitor
-
-
Method Details
-
processNode
public void processNode(@NotNull @NotNull Node node, boolean withChildren, @NotNull @NotNull BiConsumer<Node, Visitor<Node>> processor) Description copied from class:AstActionHandlerNode processing called for every node being processedOverride this to add customizations to standard processing callback.
- Overrides:
processNodein classAstActionHandler<NodeVisitor, Node, Visitor<Node>, VisitHandler<Node>>- Parameters:
node- node being processedwithChildren- whether to process child nodes if there is no handler for the node typeprocessor- processor to invoke to perform the processing, BiConsumer taking N node, and A action
-