I'm trying to code something in PDI which uses Janino for compilation. This code
Element firstRow = doc.select("tr").first();
Elements headers = firstRow.select("td");
List list = headers.eachText();
throws and error
A method named "eachText" is not declared in any enclosing class nor any supertype, nor through a static import
I know that Janino does not support generics, so I looked into this answer https://stackoverflow.com/a/34218510/8142420
AFAIK, you can't use generics in Janino, so Janino can not determine exact class of the object returned by
hashtable.get("ERROR_2001")
method, so it assumes thatObject
is returned, which has nokeySet()
method defined. Try to cast the result ofhashtable.get("ERROR_2001")
to the value class, contained in your hashtable collection:
Hashtable errorEntry = (Hashtable) hashtable.get("ERROR_2001"); Set set = errorEntry.keySet();
But that doesn't solve my problem. What am I doing wrong?