You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be great if invokeMethod could take the return type, similar to public <T> T get(String name, Class<T> clazz)
The below code which passes an integer to Python and expects an integer back fails with the error class java.lang.Long cannot be cast to class java.lang.Integer
So functionally everything is available, with a public <T> T invokeMethod(String name, Class<T> clazz, Object... args) method just providing syntactic sugar
The text was updated successfully, but these errors were encountered:
It would be great if
invokeMethod
could take the return type, similar topublic <T> T get(String name, Class<T> clazz)
The below code which passes an integer to Python and expects an integer back fails with the error
class java.lang.Long cannot be cast to class java.lang.Integer
An integer can be retrieved by using the generic
get
alongsideexec
but is fiddlier and less prettyOr can accept the value back as a
Long
and convert it to an int valueSo functionally everything is available, with a
public <T> T invokeMethod(String name, Class<T> clazz, Object... args)
method just providing syntactic sugarThe text was updated successfully, but these errors were encountered: