org.pkl.thirdparty.commonmark.renderer.NodeRenderer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pkl-tools Show documentation
Show all versions of pkl-tools Show documentation
Fat Jar containing pkl-cli, pkl-codegen-java, pkl-codegen-kotlin, pkl-config-java, pkl-core, pkl-doc, and their shaded third-party dependencies.
package org.pkl.thirdparty.commonmark.renderer;
import org.pkl.thirdparty.commonmark.node.Node;
import java.util.Set;
/**
* A renderer for a set of node types.
*/
public interface NodeRenderer {
/**
* @return the types of nodes that this renderer handles
*/
Set> getNodeTypes();
/**
* Render the specified node.
*
* @param node the node to render, will be an instance of one of {@link #getNodeTypes()}
*/
void render(Node node);
/**
* Called before the root node is rendered, to do any initial processing at the start.
*
* @param rootNode the root (top-level) node
*/
default void beforeRoot(Node rootNode) {
}
/**
* Called after the root node is rendered, to do any final processing at the end.
*
* @param rootNode the root (top-level) node
*/
default void afterRoot(Node rootNode) {
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy