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

Method getSignature

src/main/java/groovy/lang/MetaMethod.java:242–262  ·  view source on GitHub ↗

Returns the signature of this method. @return The signature of this method

()

Source from the content-addressed store, hash-verified

240 * @return The signature of this method
241 */
242 public synchronized String getSignature() {
243 if (signature == null) {
244 CachedClass [] parameters = getParameterTypes();
245 final String name = getName();
246 StringBuilder buf = new StringBuilder(name.length()+parameters.length*10);
247 buf.append(getReturnType().getName());
248
249 buf.append(' ');
250 buf.append(name);
251 buf.append('(');
252 for (int i = 0; i < parameters.length; i++) {
253 if (i > 0) {
254 buf.append(", ");
255 }
256 buf.append(parameters[i].getName());
257 }
258 buf.append(')');
259 signature = buf.toString();
260 }
261 return signature;
262 }
263
264 /**
265 * Returns the method name used by Groovy's MOP bridge methods.

Callers 2

createSignatureMethod · 0.45
describeOperationMethod · 0.45

Calls 7

getNameMethod · 0.95
getReturnTypeMethod · 0.95
getNameMethod · 0.65
toStringMethod · 0.65
getParameterTypesMethod · 0.45
lengthMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected