/** * Add a "call parameter" rule that sets a parameter from a * caller-provided object. This can be used to pass constants such as * strings to methods; it can also be used to pass mutable objects, * providing ways for objects to do things like "register" themselves * with some shared object. * <p> * Note that when attempting to locate a matching method to invoke, * the true type of the paramObj is used, so that despite the paramObj * being passed in here as type Object, the target method can declare * its parameters as being the true type of the object (or some ancestor * type, according to the usual type-conversion rules). * * @param paramIndex The zero-relative parameter number * @param paramObj Any arbitrary object to be passed to the target * method. * @see CallMethodRule * * @since 1.6 */ public void addObjectParam(String pattern, int paramIndex, Object paramObj) { addRule(pattern, new ObjectParamRule(paramIndex, paramObj)); }
/** * Add a "call parameter" rule that sets a parameter from a * caller-provided object. This can be used to pass constants such as * strings to methods; it can also be used to pass mutable objects, * providing ways for objects to do things like "register" themselves * with some shared object. * <p> * Note that when attempting to locate a matching method to invoke, * the true type of the paramObj is used, so that despite the paramObj * being passed in here as type Object, the target method can declare * its parameters as being the true type of the object (or some ancestor * type, according to the usual type-conversion rules). * * @param paramIndex The zero-relative parameter number * @param paramObj Any arbitrary object to be passed to the target * method. * @see CallMethodRule * * @since 1.6 */ public void addObjectParam(String pattern, int paramIndex, Object paramObj) { addRule(pattern, new ObjectParamRule(paramIndex, paramObj)); }
/** * Add a "call parameter" rule that sets a parameter from a * caller-provided object. This can be used to pass constants such as * strings to methods; it can also be used to pass mutable objects, * providing ways for objects to do things like "register" themselves * with some shared object. * <p> * Note that when attempting to locate a matching method to invoke, * the true type of the paramObj is used, so that despite the paramObj * being passed in here as type Object, the target method can declare * its parameters as being the true type of the object (or some ancestor * type, according to the usual type-conversion rules). * * @param paramIndex The zero-relative parameter number * @param paramObj Any arbitrary object to be passed to the target * method. * @see CallMethodRule * * @since 1.6 */ public void addObjectParam(String pattern, int paramIndex, Object paramObj) { addRule(pattern, new ObjectParamRule(paramIndex, paramObj)); }
/** * Add a "call parameter" rule that sets a parameter from a * caller-provided object. This can be used to pass constants such as * strings to methods; it can also be used to pass mutable objects, * providing ways for objects to do things like "register" themselves * with some shared object. * <p> * Note that when attempting to locate a matching method to invoke, * the true type of the paramObj is used, so that despite the paramObj * being passed in here as type Object, the target method can declare * its parameters as being the true type of the object (or some ancestor * type, according to the usual type-conversion rules). * * @param paramIndex The zero-relative parameter number * @param paramObj Any arbitrary object to be passed to the target * method. * @see CallMethodRule * * @since 1.6 */ public void addObjectParam(String pattern, int paramIndex, Object paramObj) { addRule(pattern, new ObjectParamRule(paramIndex, paramObj)); }
/** * Add a "call parameter" rule that sets a parameter from a * caller-provided object. This can be used to pass constants such as * strings to methods; it can also be used to pass mutable objects, * providing ways for objects to do things like "register" themselves * with some shared object. * <p> * Note that when attempting to locate a matching method to invoke, * the true type of the paramObj is used, so that despite the paramObj * being passed in here as type Object, the target method can declare * its parameters as being the true type of the object (or some ancestor * type, according to the usual type-conversion rules). * * @param paramIndex The zero-relative parameter number * @param paramObj Any arbitrary object to be passed to the target * method. * @see CallMethodRule * * @since 1.6 */ public void addObjectParam(String pattern, int paramIndex, Object paramObj) { addRule(pattern, new ObjectParamRule(paramIndex, paramObj)); }