/** * Answers a bound static function. The static function is looked up from the passed in clz and * then is bound to that clz. If the optional args are passed in, they are treated as curry args. */ public <R> JFunction<Class<?>, R> bind( Class<?> clz, Class<R> returnType, String funcName, Object... args) { JFunction<Class<?>, R> f = ref(clz, returnType, funcName); return FuncX.bind(clz, f, args); }
/** * The returned function closure (currying function) will combine the passed-in arguments with * arguments at the time of function invocation. */ public <T, E> JFunction<T, E> curry(JFunction<T, E> func, Object... args) { return FuncX.curry(func, args); }
/** * The returned function closure (currying function) will combine the passed-in arguments with * arguments at the time of function invocation. */ public <T> INativeJsFuncProxy<T> curry(INativeJsFuncProxy<T> func, Object... args) { return FuncX.curry(func, args); }
/** * If openCtx is false, the returned function will ensure that the func in closure will always be * bound to ctx. If openCtx is true, the returned function will ensure that the func in closure * will be bound to ctx if the calling function is bound to global context, otherwise, func will * be rebound to new context associated with calling function. */ public <T> INativeJsFuncProxy<T> hitch(T ctx, INativeJsFuncProxy<T> func, boolean openCtx) { return FuncX.hitch(ctx, func, openCtx); }
/** The returned function will ensure that the func in enclosure will always be bound to ctx. */ public <T> INativeJsFuncProxy<T> hitch(T ctx, INativeJsFuncProxy<T> func) { return FuncX.hitch(ctx, func); }
/** * If openCtx is false, the returned function will ensure that the func in closure will always be * bound to ctx. If openCtx is true, the returned function will ensure that the func in closure * will be bound to ctx if the calling function is bound to global context, otherwise, func will * be rebound to new context associated with calling function. */ public <T, E> JFunction<T, E> hitch(T ctx, JFunction<T, E> func, boolean openCtx) { return FuncX.hitch(ctx, func, openCtx); }
/** The returned function will ensure that the func in enclosure will always be bound to ctx. */ public <T, E> JFunction<T, E> hitch(T ctx, JFunction<T, E> func) { return FuncX.hitch(ctx, func); }
/** * Answers a bound instance function. The instance function is looked up from the passed in * thisObj and then is bound to that thisObj. If the optional args are passed in, they are treated * as curry args. */ public <T, R> JFunction<T, R> bind( T thisObj, Class<R> returnType, String funcName, Object... args) { JFunction<T, R> f = ref(thisObj, returnType, funcName); return FuncX.bind(thisObj, f, args); }