在ResourceHandler.kt Readium类中找不到get()方法的用法

时间:2019-06-17 08:51:46

标签: java android android-studio kotlin

我试图找到我正在使用的library如何读取文件。我已将搜索范围缩小到ResourceHandler.ktResourceHandler.kt是由Readium生成的只读文件,其中包含我感兴趣的方法。但是,每当我尝试查找该方法的用法时,都会出现问题。当我使用ctrl+click查看用法时,它给出了warning

这是我要查找其用途的方法:

override fun get(uriResource: RouterNanoHTTPD.UriResource?, urlParams: 
Map<String, String>?,
                 session: IHTTPSession?): Response? {
    try {
        Log.v(TAG, "Method: ${session!!.method}, Uri: ${session.uri}")
        val fetcher = uriResource!!.initParameter(Fetcher::class.java)

        val filePath = getHref(session.uri)
        val link = fetcher.publication.linkWithHref(filePath)!!
        val mimeType = link.typeLink!!

        // If the content is of type html return the response this is done to
        // skip the check for following font deobfuscation check
        if (mimeType == "application/xhtml+xml") {
            return serveResponse(session, fetcher.dataStream(filePath), mimeType)
        }

        // ********************
        //  FONT DEOBFUSCATION
        // ********************

        return serveResponse(session, fetcher.dataStream(filePath), mimeType)
    } catch (e: Exception) {
        Log.e(TAG, "Exception in get", e)
        return newFixedLengthResponse(Status.INTERNAL_ERROR, mimeType, ResponseStatus.FAILURE_RESPONSE)
    }
}

这是我收到的警告:

fun get(uriResource: RouterNanoHTTPD.UriResource?, urlParams: Map<String, 
String>?, session: IHTTPSession?): Response? defined in 
org.readium.r2.streamer.server.handler.ResourceHandler overrides 
declarations in the following classes/interfaces: 
[Java] class DefaultHandler
[Java] interface UriResponder
[Java] class DefaultStreamHandler
 Do you want to find usages of the base declarations?

bla 天气我在警告上单击“是”或“否”,不会显示任何用法。我试图访问警告显示的三个类/接口,但是找不到这些文件。

我的问题是:如何找到该方法的使用位置以及如何访问警告消息显示给我的类/接口。

0 个答案:

没有答案