[javadoc] Add documentation to JavaDocInfoGenerator#findInheritDocTag

IJ-CR-158044

GitOrigin-RevId: df338cfceb1d33c5f623f35def3459717c62c9b4
This commit is contained in:
Louis Vignier
2025-03-24 22:48:37 +00:00
committed by intellij-monorepo-bot
parent ce1464534a
commit 8f624db93c
@@ -3069,7 +3069,14 @@ public class JavaDocInfoGenerator {
return pair != null ? pair.first : null;
}
public static @Nullable <T> Pair<T, InheritDocProvider<T>> findInheritDocTag(PsiMethod method, DocTagLocator<T> loc, PsiDocTagValue target) {
/**
* Searches supertypes for the inherited documentation element.
* @param method method for which parameter the JavaDoc tag is searched for
* @param loc locator to find the inherited documentation part in a given supertype
* @param target optional argument of the {@code @inheritDoc} tag
* @return the most specific applicable JavaDoc tag if found, {@code null} otherwise
*/
public static @Nullable <T> Pair<T, InheritDocProvider<T>> findInheritDocTag(@NotNull PsiMethod method, @NotNull DocTagLocator<T> loc, @Nullable PsiDocTagValue target) {
PsiClass aClass = method.getContainingClass();
if (aClass == null) return null;
final var pair = JavaSuperTypeSearchUtil.INSTANCE.automaticSupertypeSearch(aClass, method, target, loc);