From 6f998f4e3397cabafffada6934dacab68e570aae Mon Sep 17 00:00:00 2001 From: JeremyStarTM Date: Sun, 15 Dec 2024 13:50:09 +0100 Subject: [PATCH] Update NonKotlinContact targets --- .../engine/base/annotation/NonKotlinContact.kt | 10 +++++++--- .../engine/base/utility/FileAccess.kt | 16 +++++++++++----- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/base/src/main/kotlin/de/staropensource/engine/base/annotation/NonKotlinContact.kt b/base/src/main/kotlin/de/staropensource/engine/base/annotation/NonKotlinContact.kt index 0472721..f3f445b 100644 --- a/base/src/main/kotlin/de/staropensource/engine/base/annotation/NonKotlinContact.kt +++ b/base/src/main/kotlin/de/staropensource/engine/base/annotation/NonKotlinContact.kt @@ -40,9 +40,13 @@ package de.staropensource.engine.base.annotation * @since v1-alpha10 */ @Target( - AnnotationTarget.TYPE_PARAMETER, - AnnotationTarget.VALUE_PARAMETER, - AnnotationTarget.TYPE, + AnnotationTarget.PROPERTY, + AnnotationTarget.FIELD, + AnnotationTarget.CONSTRUCTOR, + AnnotationTarget.FUNCTION, + AnnotationTarget.PROPERTY_GETTER, + AnnotationTarget.PROPERTY_SETTER, + AnnotationTarget.TYPEALIAS, ) @Retention(AnnotationRetention.RUNTIME) @MustBeDocumented diff --git a/base/src/main/kotlin/de/staropensource/engine/base/utility/FileAccess.kt b/base/src/main/kotlin/de/staropensource/engine/base/utility/FileAccess.kt index 1aa8153..042527c 100644 --- a/base/src/main/kotlin/de/staropensource/engine/base/utility/FileAccess.kt +++ b/base/src/main/kotlin/de/staropensource/engine/base/utility/FileAccess.kt @@ -227,7 +227,8 @@ class FileAccess { * @return matching [Path] * @since v1-alpha10 */ - fun formatToPath(string: String): @NonKotlinContact Path = Path.of(format(string)) + @NonKotlinContact + fun formatToPath(string: String): Path = Path.of(format(string)) /** * Undoes formatting made by [format] @@ -247,7 +248,8 @@ class FileAccess { * @return unformatted string path * @since v1-alpha10 */ - fun unformatFromPath(path: @NonKotlinContact Path): String = unformat(path.toString()) + @NonKotlinContact + fun unformatFromPath(path: Path): String = unformat(path.toString()) } @@ -262,7 +264,9 @@ class FileAccess { * * @since v1-alpha10 */ - val path: @NonKotlinContact Path + @NonKotlinContact + val path: Path + @NonKotlinContact @JvmName(name = "getJavaPath") get @@ -276,7 +280,8 @@ class FileAccess { * * @since v1-alpha10 */ - private val file: @NonKotlinContact File + private val file: File + @NonKotlinContact @JvmName(name = "getJavaFile") get @@ -520,7 +525,8 @@ class FileAccess { * @return filesystem * @since v1-alpha10 */ - fun getFileSystem(): @NonKotlinContact FileSystem = path.fileSystem + @NonKotlinContact + fun getFileSystem(): FileSystem = path.fileSystem /** * Returns if the filesystem this file