MCPcopy Index your code
hub / github.com/apache/groovy / invokeMethod

Method invokeMethod

src/main/java/groovy/lang/Sequence.java:223–236  ·  view source on GitHub ↗

{@inheritDoc}

(String name, Object args)

Source from the content-addressed store, hash-verified

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}

Callers 1

testInvokeMethodMethod · 0.95

Calls 5

getMetaClassMethod · 0.95
invokeMethodMethod · 0.95
invokeMethodMethod · 0.65
sizeMethod · 0.65
addMethod · 0.65

Tested by 1

testInvokeMethodMethod · 0.76