Package jsinterop.base
Interface JsConstructorFn<T>
-
@JsFunction public interface JsConstructorFn<T>A JavaScript constructor function.Note that this interface is not intended for manual implementation.
See
Js.asConstructorFn(Class)to get an instance ofJsConstructorFnfrom aClass.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default java.lang.Class<T>asClass()Returns this constructor as a Class instance.default Tconstruct(@Nullable java.lang.Object... args)Invokes 'new' operator on this constructor.voidonInvoke(@Nullable java.lang.Object... args)Most of the time you don't want to call this method but callconstruct(java.lang.Object...)instead since this is a constructor function.
-
-
-
Method Detail
-
onInvoke
void onInvoke(@Nullable java.lang.Object... args)
Most of the time you don't want to call this method but callconstruct(java.lang.Object...)instead since this is a constructor function.
-
construct
@JsOverlay default T construct(@Nullable java.lang.Object... args)
Invokes 'new' operator on this constructor.
-
asClass
@JsOverlay default java.lang.Class<T> asClass()
Returns this constructor as a Class instance.
-
-