diff --git a/java/java-psi-api/src/com/intellij/codeInsight/InferredAnnotationsManager.java b/java/java-psi-api/src/com/intellij/codeInsight/InferredAnnotationsManager.java index 6c2db7a9b952..3696c4c666cc 100644 --- a/java/java-psi-api/src/com/intellij/codeInsight/InferredAnnotationsManager.java +++ b/java/java-psi-api/src/com/intellij/codeInsight/InferredAnnotationsManager.java @@ -20,17 +20,18 @@ import com.intellij.openapi.project.Project; import com.intellij.openapi.util.NotNullLazyKey; import com.intellij.psi.PsiAnnotation; import com.intellij.psi.PsiModifierListOwner; +import org.jetbrains.annotations.Contract; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; /** * Returns annotations inferred by bytecode or source code, for example contracts and nullity. * - * @see com.intellij.codeInsight.NullableNotNullManager - * @see org.jetbrains.annotations.Contract - * @see org.jetbrains.annotations.Nullable - * @see org.jetbrains.annotations.NotNull - * @see com.intellij.codeInsight.AnnotationUtil + * @see NullableNotNullManager + * @see Contract + * @see Nullable + * @see NotNull + * @see AnnotationUtil */ public abstract class InferredAnnotationsManager { private static final NotNullLazyKey INSTANCE_KEY = ServiceManager.createLazyKey(InferredAnnotationsManager.class); @@ -41,7 +42,7 @@ public abstract class InferredAnnotationsManager { /** * @return if exists, an inferred annotation by given qualified name on a given PSI element. Several invocations may return several - * different instances of {@link com.intellij.psi.PsiAnnotation}, which are not guaranteed to be equal. + * different instances of {@link PsiAnnotation}, which are not guaranteed to be equal. */ @Nullable public abstract PsiAnnotation findInferredAnnotation(@NotNull PsiModifierListOwner listOwner, @NotNull String annotationFQN); @@ -50,15 +51,17 @@ public abstract class InferredAnnotationsManager { * There is a number of well-known methods where automatic inference fails (for example, {@link java.util.Objects#requireNonNull(Object)}. * For such methods, contracts are hardcoded, and for their parameters inferred @NotNull are suppressed.

* + * {@link Contract} and {@link NotNull} annotations on methods are not necessarily applicable to the overridden implementations, so they're ignored, too.

+ * * In addition, package-default annotations like @ParametersAreNonnullByDefault are not honored for parameters where - * {@link org.jetbrains.annotations.NotNull} inference is ignored. + * {@link NotNull} inference is ignored. * * @return whether inference is to be suppressed the given annotation on the given method or parameter */ public abstract boolean ignoreInference(@NotNull PsiModifierListOwner owner, @Nullable String annotationFQN); /** - * When annotation name is known, prefer {@link #findInferredAnnotation(com.intellij.psi.PsiModifierListOwner, String)} as + * When annotation name is known, prefer {@link #findInferredAnnotation(PsiModifierListOwner, String)} as * potentially faster. * * @return all inferred annotations for the given element @@ -69,7 +72,7 @@ public abstract class InferredAnnotationsManager { /** * @return whether the given annotation was inferred by this service. * - * @see com.intellij.codeInsight.AnnotationUtil#isInferredAnnotation(com.intellij.psi.PsiAnnotation) + * @see AnnotationUtil#isInferredAnnotation(PsiAnnotation) */ public abstract boolean isInferredAnnotation(@NotNull PsiAnnotation annotation); }