我正在尝试在 PDI 中编写一些使用 Janino 进行编译的东西。这段代码
Element firstRow = doc.select("tr").first();
Elements headers = firstRow.select("td");
List list = headers.eachText();
抛出和错误
A method named "eachText" is not declared in any enclosing class nor any supertype, nor through a static import
我知道 Janino 不支持泛型,所以我查看了这个答案 https://stackoverflow.com/a/34218510/8142420
AFAIK,你不能在 Janino 中使用泛型,所以 Janino 无法确定
hashtable.get("ERROR_2001")
方法返回的对象的确切类,所以它假定返回的对象Object
没有keySet()
定义方法。尝试将结果hashtable.get("ERROR_2001")
转换为包含在哈希表集合中的值类:
Hashtable errorEntry = (Hashtable) hashtable.get("ERROR_2001"); Set set = errorEntry.keySet();
但这并不能解决我的问题。我究竟做错了什么?