private val currentClass = Class.forName("com.compute.biz.clue.streaming.SyncClueStreamingFunctions$") private val currentObj = currentClass.getField("MODULE$").get(null) // 所有方法的map,(methodName->method) private val methodMap = currentClass.getDeclaredMethods.map(m => { (m.getName, m) }).toMap
scala伴生对象的反射
最新推荐文章于 2024-11-01 14:28:11 发布