/** * Prepend the given argument to the argument list, assigning it the * given name. * * @param name the name of the new argument * @param value the value of the new argument * @return a new SmartBinder with the prepend applied */ public SmartBinder prepend(String name, Object value) { return new SmartBinder(this, signature().prependArg(name, value.getClass()), binder.prepend(value)); }
/** * Prepend the given argument to the argument list, assigning it the * given name. * * @param name the name of the new argument * @param value the value of the new argument * @return a new SmartBinder with the prepend applied */ public SmartBinder prepend(String name, char value) { return new SmartBinder(this, signature().prependArg(name, char.class), binder.prepend(value)); }
/** * Prepend the given argument to the argument list, assigning it the * given name. * * @param name the name of the new argument * @param value the value of the new argument * @return a new SmartBinder with the prepend applied */ public SmartBinder prepend(String name, long value) { return new SmartBinder(this, signature().prependArg(name, long.class), binder.prepend(value)); }
/** * Prepend the given argument to the argument list, assigning it the * given name. * * @param name the name of the new argument * @param value the value of the new argument * @return a new SmartBinder with the prepend applied */ public SmartBinder prepend(String name, short value) { return new SmartBinder(this, signature().prependArg(name, short.class), binder.prepend(value)); }
/** * Prepend the given argument to the argument list, assigning it the * given name. * * @param name the name of the new argument * @param value the value of the new argument * @return a new SmartBinder with the prepend applied */ public SmartBinder prepend(String name, int value) { return new SmartBinder(this, signature().prependArg(name, int.class), binder.prepend(value)); }
/** * Prepend the given argument to the argument list, assigning it the * given name. * * @param name the name of the new argument * @param type the type to use in the new signature * @param value the value of the new argument * @return a new SmartBinder with the prepend applied */ public SmartBinder prepend(String name, Class<?> type, Object value) { return new SmartBinder(this, signature().prependArg(name, type), binder.prepend(type, value)); }
/** * Prepend the given argument to the argument list, assigning it the * given name. * * @param name the name of the new argument * @param value the value of the new argument * @return a new SmartBinder with the prepend applied */ public SmartBinder prepend(String name, boolean value) { return new SmartBinder(this, signature().prependArg(name, boolean.class), binder.prepend(value)); }
/** * Prepend the given argument to the argument list, assigning it the * given name. * * @param name the name of the new argument * @param value the value of the new argument * @return a new SmartBinder with the prepend applied */ public SmartBinder prepend(String name, float value) { return new SmartBinder(this, signature().prependArg(name, float.class), binder.prepend(value)); }
/** * Prepend the given argument to the argument list, assigning it the * given name. * * @param name the name of the new argument * @param value the value of the new argument * @return a new SmartBinder with the prepend applied */ public SmartBinder prepend(String name, double value) { return new SmartBinder(this, signature().prependArg(name, double.class), binder.prepend(value)); }
/** * Prepend the given argument to the argument list, assigning it the * given name. * * @param name the name of the new argument * @param value the value of the new argument * @return a new SmartBinder with the prepend applied */ public SmartBinder prepend(String name, byte value) { return new SmartBinder(this, signature().prependArg(name, byte.class), binder.prepend(value)); }
/** * Pass all arguments to the given function and insert the resulting value * as newName into the argument list. * * @param newName the name of the new first argument where the fold * function's result will be passed * @param function a function which will receive all arguments and have its * return value inserted into the call chain * @return a new SmartBinder with the fold applied */ public SmartBinder fold(String newName, MethodHandle function) { return new SmartBinder(this, signature().prependArg(newName, function.type().returnType()), binder.fold(function)); }
/** * Acquire a public static folding function from the given target class, * using the given name. Pass all arguments to that function and insert * the resulting value as newName into the argument list. * * @param newName the name of the new first argument where the fold * function's result will be passed * @param target the class on which to find the folding function * @param method the name of the method to become a folding function * @return a new SmartBinder with the fold applied */ public SmartBinder foldStatic(String newName, Class<?> target, String method) { Binder newBinder = binder.foldStatic(target, method); return new SmartBinder(this, signature().prependArg(newName, newBinder.type().parameterType(0)), newBinder); }
/** * Acquire a virtual folding function from the first argument's class, * using the given name and Lookup. Pass all arguments to that function and * insert the resulting value as newName into the argument list. * * @param newName the name of the new first argument where the fold * function's result will be passed * @param lookup the Lookup to use for acquiring a folding function * @param method the name of the method to become a folding function * @return a new SmartBinder with the fold applied */ public SmartBinder foldVirtual(String newName, Lookup lookup, String method) { Binder newBinder = binder.foldVirtual(lookup, method); return new SmartBinder(this, signature().prependArg(newName, newBinder.type().parameterType(0)), newBinder); }
/** * Acquire a public virtual folding function from the first argument's * class, using the given name and Lookup. Pass all arguments to that * function and insert the resulting value as newName into the argument * list. * * @param newName the name of the new first argument where the fold * function's result will be passed * @param method the name of the method to become a folding function * @return a new SmartBinder with the fold applied */ public SmartBinder foldVirtual(String newName, String method) { Binder newBinder = binder.foldVirtual(method); return new SmartBinder(this, signature().prependArg(newName, newBinder.type().parameterType(0)), newBinder); }
/** * Acquire a static folding function from the given target class, using the * given name and Lookup. Pass all arguments to that function and insert * the resulting value as newName into the argument list. * * @param newName the name of the new first argument where the fold * function's result will be passed * @param lookup the Lookup to use for acquiring a folding function * @param target the class on which to find the folding function * @param method the name of the method to become a folding function * @return a new SmartBinder with the fold applied */ public SmartBinder foldStatic(String newName, Lookup lookup, Class<?> target, String method) { Binder newBinder = binder.foldStatic(lookup, target, method); return new SmartBinder(this, signature().prependArg(newName, newBinder.type().parameterType(0)), binder); }
.from(VARIABLE_ARITY_SIGNATURE.prependArg("script", scriptClass)) .invokeStaticQuiet(LOOKUP, scriptClass, javaName) .bindTo(scriptObject); .from(SPECIFIC_ARITY_SIGNATURES[specificArity].prependArg("script", scriptClass)) .invokeStaticQuiet(LOOKUP, scriptClass, javaName) .bindTo(scriptObject);
.from(VARIABLE_ARITY_SIGNATURE.prependArg("script", scriptClass)) .invokeStaticQuiet(LOOKUP, scriptClass, javaName) .bindTo(scriptObject); .from(SPECIFIC_ARITY_SIGNATURES[specificArity].prependArg("script", scriptClass)) .invokeStaticQuiet(LOOKUP, scriptClass, javaName) .bindTo(scriptObject);