Justin Tullgren
04/08/2021, 5:17 PMIrPluginContext#referenceFunctions(FqName)
but the list keeps coming back emptyJustin Tullgren
04/08/2021, 5:25 PMJustin Tullgren
04/08/2021, 5:25 PMprivate val funPrintln = pluginContext.referenceFunctions(FqName("kotlin.io.println"))
Justin Tullgren
04/08/2021, 5:26 PMJustin Tullgren
04/08/2021, 5:26 PMprivate val funPrintln = pluginContext.referenceFunctions(FqName("path.Class.staticMethod"))
Youssef Shoaib [MOD]
04/08/2021, 5:39 PMmoduleFragment.descriptor.resolveTopLevelClass(FqName("path.Class"), NoLookupLocation.FROM_BACKEND)?.let{
pluginContext.symbolTable.referenceClass(it).owner.functions.filter { it.name.identifier == "staticMethodName" }.first()
}
not sure if it'll work or not but it's worth a tryJustin Tullgren
04/08/2021, 5:40 PMshikasd
04/08/2021, 6:07 PMJustin Tullgren
04/08/2021, 6:26 PMJustin Tullgren
04/08/2021, 6:26 PMprivate val androidLog = pluginContext.referenceClass(FqName("android.util.Log"))
private val androidDebug = androidLog?.owner?.functions?.first {
it.name == Name.identifier("d")
}?.symbol
Justin Tullgren
04/08/2021, 6:26 PMshikasd
04/08/2021, 7:18 PM