Package io.karatelabs.js
Interface JavaCallable
- All Superinterfaces:
Consumer<Object>,Function<Object,,Object> Predicate<Object>,Runnable,Supplier<Object>
- All Known Subinterfaces:
JavaInvokable
- All Known Implementing Classes:
JsFunction,JsFunctionWrapper
-
Method Details
-
call
Override with varargs for external Java client convenience. Callers can use: callable.call(ctx, arg1, arg2) -
isExternal
default boolean isExternal() -
apply
-
test
-
accept
-
get
-
run
default void run() -
isConstructable
default boolean isConstructable()Whether this callable can be invoked withnew. Default: false — only things that explicitly opt in (user-defined non-arrow functions,JsFunctionsubclasses, builtin constructor singletons, and theJsConstructormarker for Java-bridge types) report true. Used by the interpreter's construct path to throw a TypeError onnew <non-constructor>(...)per spec.
-