package net.dean.jraw.docs

class DocLinkGenerator {
    fun generate(name: String): String {
        val clazz = ProjectTypeFinder.from(name) ?:
            throw IllegalArgumentException("No JRAW classes with (simple) name '$name'")
        return generate(clazz)
    }

    fun generate(clazz: Class<*>): String {
        return BASE + clazz.name.replace('.', '/') + ".html"
    }

    companion object {
        // TODO update when we actually update docs
        private const val BASE = "#"
    }
}

package net.dean.jraw.docs

import net.dean.jraw.Version

class DocLinkGenerator {
    fun generate(name: String): String {
        val clazz = ProjectTypeFinder.from(name) ?:
            throw IllegalArgumentException("No JRAW classes with (simple) name '$name'")
        return generate(clazz)
    }

    fun generate(clazz: Class<*>): String {
        return BASE + clazz.name.replace('.', '/') + ".html"
    }

    companion object {
        private val BASE = "https://jitpack.io/com/github/mattbdean/JRAW/v${Version.get()}/javadoc/"
    }
}

Add working Javadoc link to gitbook site
Add working Javadoc link to gitbook site

thatJavaNerd/JRAW,thatJavaNerd/JRAW,Saketme/JRAW,Saketme/JRAW,Saketme/JRAW,thatJavaNerd/JRAW