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

Method invokeMethod

src/main/java/groovy/lang/GString.java:112–120  ·  view source on GitHub ↗

Overloaded to implement duck typing for Strings so that any method that can't be evaluated on this object will be forwarded to the toString() object instead.

(String name, Object args)

Source from the content-addressed store, hash-verified

110 * object will be forwarded to the toString() object instead.
111 */
112 @Override
113 public Object invokeMethod(String name, Object args) {
114 try {
115 return super.invokeMethod(name, args);
116 } catch (MissingMethodException e) {
117 // let's try to invoke the method on the real String
118 return InvokerHelper.invokeMethod(toString(), name, args);
119 }
120 }
121
122 /**
123 * Returns the interpolated values.

Callers

nothing calls this directly

Calls 3

invokeMethodMethod · 0.95
toStringMethod · 0.95
invokeMethodMethod · 0.65

Tested by

no test coverage detected