From dd44b5b2b2381cdcece4be3cd60de13501466f4e Mon Sep 17 00:00:00 2001 From: Johannes Spangenberg Date: Sat, 8 Feb 2025 23:32:54 +0100 Subject: [PATCH] OverrideOnly: Update documentation to exclude static methods --- src/commonMain/kotlin/org/jetbrains/annotations/ApiStatus.kt | 2 +- src/jvmMain/java/org/jetbrains/annotations/ApiStatus.java | 2 +- src/nonJvmMain/kotlin/org/jetbrains/annotations/ApiStatus.kt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/commonMain/kotlin/org/jetbrains/annotations/ApiStatus.kt b/src/commonMain/kotlin/org/jetbrains/annotations/ApiStatus.kt index 6ae5e94..9313743 100644 --- a/src/commonMain/kotlin/org/jetbrains/annotations/ApiStatus.kt +++ b/src/commonMain/kotlin/org/jetbrains/annotations/ApiStatus.kt @@ -200,7 +200,7 @@ expect class ApiStatus private constructor() { * * Indicates that the annotated method is part of SPI (Service Provider Interface), which is intended to be * **only implemented or overridden** but not called by clients of the declaring library. - * If a class or interface is marked with this annotation it means that all its methods can be only overridden. + * If a class or interface is marked with this annotation it means that all its instance methods can be only overridden. * * * Although there is a standard mechanism of `protected` methods, it is not applicable to interface's methods. diff --git a/src/jvmMain/java/org/jetbrains/annotations/ApiStatus.java b/src/jvmMain/java/org/jetbrains/annotations/ApiStatus.java index 2f47e29..90f624c 100644 --- a/src/jvmMain/java/org/jetbrains/annotations/ApiStatus.java +++ b/src/jvmMain/java/org/jetbrains/annotations/ApiStatus.java @@ -149,7 +149,7 @@ private ApiStatus() { /** *

Indicates that the annotated method is part of SPI (Service Provider Interface), which is intended to be * only implemented or overridden but not called by clients of the declaring library. - * If a class or interface is marked with this annotation it means that all its methods can be only overridden.

+ * If a class or interface is marked with this annotation it means that all its instance methods can be only overridden.

* *

Although there is a standard mechanism of {@code protected} methods, it is not applicable to interface's methods. * Also, API method may be made {@code public} to allow calls only from different parts of the declaring library but not outside it.

diff --git a/src/nonJvmMain/kotlin/org/jetbrains/annotations/ApiStatus.kt b/src/nonJvmMain/kotlin/org/jetbrains/annotations/ApiStatus.kt index ec33881..13f9308 100644 --- a/src/nonJvmMain/kotlin/org/jetbrains/annotations/ApiStatus.kt +++ b/src/nonJvmMain/kotlin/org/jetbrains/annotations/ApiStatus.kt @@ -200,7 +200,7 @@ actual class ApiStatus private actual constructor() { * * Indicates that the annotated method is part of SPI (Service Provider Interface), which is intended to be * **only implemented or overridden** but not called by clients of the declaring library. - * If a class or interface is marked with this annotation it means that all its methods can be only overridden. + * If a class or interface is marked with this annotation it means that all its instance methods can be only overridden. * * * Although there is a standard mechanism of `protected` methods, it is not applicable to interface's methods.