MCPcopy
hub / github.com/apache/groovy / methodInfo

Method methodInfo

src/main/java/groovy/inspect/Inspector.java:395–406  ·  view source on GitHub ↗

Builds descriptive information for a Java method. @param method the method to describe @return the method information array

(Method method)

Source from the content-addressed store, hash-verified

393 * @return the method information array
394 */
395 protected String[] methodInfo(Method method) {
396 String[] result = new String[MEMBER_EXCEPTIONS_IDX + 1];
397 result[MEMBER_ORIGIN_IDX] = JAVA;
398 result[MEMBER_DECLARER_IDX] = shortName(method.getDeclaringClass());
399 result[MEMBER_MODIFIER_IDX] = Modifier.toString(method.getModifiers());
400 result[MEMBER_NAME_IDX] = method.getName();
401 result[MEMBER_TYPE_IDX] = shortName(method.getReturnType());
402 result[MEMBER_PARAMS_IDX] = makeParamsInfo(method.getParameterTypes());
403 result[MEMBER_EXCEPTIONS_IDX] = makeExceptionInfo(method.getExceptionTypes());
404
405 return withoutNulls(result);
406 }
407
408 /**
409 * Builds descriptive information for a constructor.

Callers 4

getMethodsMethod · 0.95
getMethodsWithInfoMethod · 0.95
getMetaMethodsMethod · 0.95

Calls 12

shortNameMethod · 0.95
makeParamsInfoMethod · 0.95
makeExceptionInfoMethod · 0.95
withoutNullsMethod · 0.95
toStringMethod · 0.65
getModifiersMethod · 0.65
getNameMethod · 0.65
getTheClassMethod · 0.65
getDeclaringClassMethod · 0.45
getReturnTypeMethod · 0.45
getParameterTypesMethod · 0.45

Tested by

no test coverage detected