I am loading a class from a jarfile at runtime (because the script won't always use that exact jar), so I have a Class object of it. I am also doing that from javax.script.ScriptEngine
(javascript). That class has the method public static <T> User get(T base)
. I need to call it. What is the best way to do it?
It seems to me that there isn't much documentation on scripting for java...
I just need to find a method called "get" in a class with an argument of type T
using Class
's getMethod(String name, Class[] argumentTypes)
...