From 1e40c8b12164754da190673eeaffa249d6a0d38a Mon Sep 17 00:00:00 2001 From: JeremyStarTM Date: Sun, 15 Dec 2024 01:09:58 +0100 Subject: [PATCH] Add NonKotlinContact annotation --- .../base/annotation/NonKotlinContact.kt | 49 +++++++++++++++++++ .../engine/base/annotation/package-info.kt | 26 ++++++++++ 2 files changed, 75 insertions(+) create mode 100644 base/src/main/kotlin/de/staropensource/engine/base/annotation/NonKotlinContact.kt create mode 100644 base/src/main/kotlin/de/staropensource/engine/base/annotation/package-info.kt 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 new file mode 100644 index 000000000..04727218f --- /dev/null +++ b/base/src/main/kotlin/de/staropensource/engine/base/annotation/NonKotlinContact.kt @@ -0,0 +1,49 @@ +/* + * STAROPENSOURCE ENGINE SOURCE FILE + * Copyright (c) 2024 The StarOpenSource Engine Authors + * Licensed under the GNU Affero General Public License v3 + * with an exception allowing classpath linking. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package de.staropensource.engine.base.annotation + +/** + * Marks contacts with classes or code in other + * programming languages besides Kotlin in + * the public API. + * + * Using anything non-Kotlin in conjunction with + * the StarOpenSource Engine is highly discouraged, + * as the engine may be multiplatform in future + * releases and will not support using other + * languages. + * + * Using anything in contact with non-Kotlin code + * is therefore deemed unsafe and should be + * avoided at all costs. Only use methods and + * variables interacting with non-Kotlin stuff + * if absolutely necessary. + * + * @since v1-alpha10 + */ +@Target( + AnnotationTarget.TYPE_PARAMETER, + AnnotationTarget.VALUE_PARAMETER, + AnnotationTarget.TYPE, +) +@Retention(AnnotationRetention.RUNTIME) +@MustBeDocumented +annotation class NonKotlinContact diff --git a/base/src/main/kotlin/de/staropensource/engine/base/annotation/package-info.kt b/base/src/main/kotlin/de/staropensource/engine/base/annotation/package-info.kt new file mode 100644 index 000000000..493bf095c --- /dev/null +++ b/base/src/main/kotlin/de/staropensource/engine/base/annotation/package-info.kt @@ -0,0 +1,26 @@ +/* + * STAROPENSOURCE ENGINE SOURCE FILE + * Copyright (c) 2024 The StarOpenSource Engine Authors + * Licensed under the GNU Affero General Public License v3 + * with an exception allowing classpath linking. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +/** + * Annotations used by the engine and subsystems. + * + * @since v1-alpha10 + */ +package de.staropensource.engine.base.annotation;