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

Method getMethods

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

Get info about usual Java instance and class Methods as well as Constructors. @return Array of StringArrays that can be indexed with the MEMBER_xxx_IDX constants

()

Source from the content-addressed store, hash-verified

175 * @return Array of StringArrays that can be indexed with the MEMBER_xxx_IDX constants
176 */
177 public Object[] getMethods() {
178 Method[] methods = getClassUnderInspection().getMethods();
179 Constructor[] ctors = getClassUnderInspection().getConstructors();
180 Object[] result = new Object[methods.length + ctors.length];
181 int resultIndex = 0;
182 for (; resultIndex < methods.length; resultIndex++) {
183 Method method = methods[resultIndex];
184 result[resultIndex] = methodInfo(method);
185 }
186 for (int i = 0; i < ctors.length; i++, resultIndex++) {
187 Constructor ctor = ctors[i];
188 result[resultIndex] = methodInfo(ctor);
189 }
190 return result;
191 }
192
193 /**
194 * Get info about usual Java instance and class Methods as well as Constructors.

Callers 2

testMethodsMethod · 0.95
testStaticMethodsMethod · 0.95

Calls 4

methodInfoMethod · 0.95
getConstructorsMethod · 0.80
getMethodsMethod · 0.65

Tested by 2

testMethodsMethod · 0.76
testStaticMethodsMethod · 0.76