aboutsummaryrefslogtreecommitdiff
path: root/plugins/templating/src/main/kotlin/templates/CommandHandler.kt
blob: c06d52c388a1100ee66e97b311a5316549cd9203 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/*
 * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
 */

package org.jetbrains.dokka.templates

import org.jetbrains.dokka.base.templating.Command
import org.jsoup.nodes.Element
import org.jsoup.nodes.Node
import java.io.File


public interface CommandHandler  {
    @Deprecated("This was renamed to handleCommandAsTag", ReplaceWith("handleCommandAsTag(command, element, input, output)"))
    public fun handleCommand(element: Element, command: Command, input: File, output: File) { }

    @Suppress("DEPRECATION")
    public fun handleCommandAsTag(command: Command, body: Element, input: File, output: File) {
        handleCommand(body, command, input, output)
    }
    public fun handleCommandAsComment(command: Command, body: List<Node>, input: File, output: File) { }
    public fun canHandle(command: Command): Boolean
    public fun finish(output: File) {}
}