Skip to content

Commit

Permalink
♻️ Refactor versioning annotations
Browse files Browse the repository at this point in the history
Each annotation is located in its own file.
  • Loading branch information
LVMVRQUXL committed Jan 10, 2025
1 parent ba157ea commit 82a51ae
Show file tree
Hide file tree
Showing 6 changed files with 119 additions and 107 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package org.kotools.types.internal

import kotools.types.internal.InternalKotoolsTypesApi

/**
* Specifies the first [version] of Kotools Types where a declaration has
* appeared as a **deprecated** feature with an [error][DeprecationLevel.ERROR]
* level.
*/
@InternalKotoolsTypesApi
@MustBeDocumented
@Retention(AnnotationRetention.SOURCE)
@Target(
AnnotationTarget.CLASS,
AnnotationTarget.FUNCTION,
AnnotationTarget.PROPERTY,
AnnotationTarget.TYPEALIAS
)
public annotation class DeprecatedAsErrorSince(
/**
* The first version of Kotools Types where the declaration was deprecated
* with an error level.
*/
val version: KotoolsTypesVersion
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package org.kotools.types.internal

import kotools.types.internal.InternalKotoolsTypesApi

/**
* Specifies the first [version] of Kotools Types where a declaration has
* appeared as a **deprecated** feature with a
* [warning][DeprecationLevel.WARNING] level.
*/
@InternalKotoolsTypesApi
@MustBeDocumented
@Retention(AnnotationRetention.SOURCE)
@Target(
AnnotationTarget.CLASS,
AnnotationTarget.FUNCTION,
AnnotationTarget.PROPERTY,
AnnotationTarget.TYPEALIAS
)
public annotation class DeprecatedAsWarningSince(
/**
* The first version of Kotools Types where the declaration was deprecated
* with a warning level.
*/
val version: KotoolsTypesVersion
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package org.kotools.types.internal

import kotools.types.internal.InternalKotoolsTypesApi

/**
* Specifies the first [version] of Kotools Types where a declaration has
* appeared as an **experimental** feature.
*/
@InternalKotoolsTypesApi
@MustBeDocumented
@Retention(AnnotationRetention.SOURCE)
@Target(
AnnotationTarget.CLASS,
AnnotationTarget.CONSTRUCTOR,
AnnotationTarget.FUNCTION,
AnnotationTarget.PROPERTY,
AnnotationTarget.TYPEALIAS
)
public annotation class ExperimentalSince(
/** The version of Kotools Types where the declaration was introduced. */
val version: KotoolsTypesVersion
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package org.kotools.types.internal

import kotools.types.internal.InternalKotoolsTypesApi

/**
* Specifies the first [version] of Kotools Types where a declaration has been
* [hidden][DeprecationLevel.HIDDEN] from code.
*/
@InternalKotoolsTypesApi
@MustBeDocumented
@Retention(AnnotationRetention.SOURCE)
@Target(
AnnotationTarget.CLASS,
AnnotationTarget.FUNCTION,
AnnotationTarget.PROPERTY,
AnnotationTarget.TYPEALIAS
)
public annotation class HiddenSince(
/**
* The first version of Kotools Types where the declaration was hidden from
* sources.
*/
val version: KotoolsTypesVersion
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package org.kotools.types.internal

import kotools.types.internal.InternalKotoolsTypesApi

/**
* Specifies the first [version] of Kotools Types where a declaration has
* appeared as a **stable** feature.
*/
@InternalKotoolsTypesApi
@MustBeDocumented
@Retention(AnnotationRetention.SOURCE)
@Target(
AnnotationTarget.CLASS,
AnnotationTarget.FUNCTION,
AnnotationTarget.PROPERTY,
AnnotationTarget.TYPEALIAS
)
public annotation class Since(
/**
* The first version of Kotools Types where the declaration was stabilized.
*/
val version: KotoolsTypesVersion
)

This file was deleted.

0 comments on commit 82a51ae

Please sign in to comment.