Lines Matching refs:target
44 * in which a single method is applied to a target and
47 * to denote the target and its argument, a statement
52 * the target and an array of argument values.
71 private final Object target;
78 * for the specified target object to invoke the method
81 * The {@code target} and the {@code methodName} values should not be {@code null}.
87 * @param target the target object of this statement
88 * @param methodName the name of the method to invoke on the specified target
91 @ConstructorProperties({"target", "methodName", "arguments"})
92 public Statement(Object target, String methodName, Object[] arguments) {
93 this.target = target;
99 * Returns the target object of this statement.
104 * @return the target object of this statement
107 return target;
137 * the target.
139 * When the target's class defines many methods with the given name
142 * (15.11). The dynamic class of the target and arguments are used
151 * Static methods may be called by using a class object as the target.
163 * @throws NullPointerException if the value of the {@code target} or
197 Object target = getTarget();
200 if (target == null || methodName == null) {
201 throw new NullPointerException((target == null ? "target" :
212 if (target == Class.class && methodName.equals("forName")) {
221 if (target instanceof Class) {
236 if (methodName.equals("newInstance") && ((Class)target).isArray()) {
237 Object result = Array.newInstance(((Class)target).getComponentType(), arguments.length);
249 if (target == Character.class && arguments.length == 1 &&
254 m = ConstructorFinder.findConstructor((Class)target, argClasses);
260 if (m == null && target != Class.class) {
261 m = getMethod((Class)target, methodName, argClasses);
276 if (target.getClass().isArray() &&
280 return Array.get(target, index);
283 Array.set(target, index, arguments[1]);
287 m = getMethod(target.getClass(), methodName, argClasses);
292 return MethodUtil.invoke((Method)m, target, arguments);
300 methodName + " on " + target.getClass(),
337 Object target = getTarget();
343 StringBuffer result = new StringBuffer(instanceName(target) + "." + methodName + "(");