All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.vladsch.flexmark.html.renderer.NodeRenderingHandler Maven / Gradle / Ivy

There is a newer version: 4.15.102
Show newest version
package com.vladsch.flexmark.html.renderer;

import com.vladsch.flexmark.html.HtmlWriter;
import com.vladsch.flexmark.util.ast.Node;
import com.vladsch.flexmark.util.visitor.AstAction;
import com.vladsch.flexmark.util.visitor.AstHandler;
import org.jetbrains.annotations.NotNull;

public class NodeRenderingHandler extends AstHandler> {
    public NodeRenderingHandler(@NotNull Class aClass, @NotNull CustomNodeRenderer adapter) {
        super(aClass, adapter);
    }

    public void render(@NotNull Node node, @NotNull NodeRendererContext context, @NotNull HtmlWriter html) {
        //noinspection unchecked
        getAdapter().render((N) node, context, html);
    }

    public interface CustomNodeRenderer extends AstAction {
        void render(@NotNull N node, @NotNull NodeRendererContext context, @NotNull HtmlWriter html);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy