doc util-rt: Document com.intellij.util.ReflectionUtilRt.collectMethods

GitOrigin-RevId: 1c3b69b46623f69724468155f15eef667d11f9c4
This commit is contained in:
Andrei.Kuznetsov
2026-02-02 16:54:45 +00:00
committed by intellij-monorepo-bot
parent 6fdf0d02ea
commit 76cd0b0581
@@ -48,6 +48,15 @@ public final class ReflectionUtilRt {
return result;
}
/**
* Collects all methods declared in the given class or interface and its superclasses (including methods from Object)
* and interfaces, including public, protected, default (package) access, static, private methods, but excluding {@code <clinit>} method.
* <p>
* The same method with the same name and parameters may appear in the result several times with different receiver or return type.
*
* @param clazz The class to collect methods from.
* @return A list of methods declared in the class and its superclasses/interfaces. The list is not sorted.
*/
@NotNull
public static List<Method> collectMethods(@NotNull Class<?> clazz) {
List<Method> result = new ArrayList<>();