{@inheritDoc}
(String name, Object args)
| 221 | * {@inheritDoc} |
| 222 | */ |
| 223 | @Override |
| 224 | public Object invokeMethod(String name, Object args) { |
| 225 | try { |
| 226 | return getMetaClass().invokeMethod(this, name, args); |
| 227 | } catch (MissingMethodException e) { |
| 228 | // let's apply the method to each item in the collection |
| 229 | List answer = new ArrayList(size()); |
| 230 | for (Object element : this) { |
| 231 | Object value = InvokerHelper.invokeMethod(element, name, args); |
| 232 | answer.add(value); |
| 233 | } |
| 234 | return answer; |
| 235 | } |
| 236 | } |
| 237 | |
| 238 | /** |
| 239 | * {@inheritDoc} |