forked from ReVanced/revanced-patcher
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
36 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
src/main/kotlin/app/revanced/patcher/annotation/Deprecated.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package app.revanced.patcher.annotation | ||
|
||
import app.revanced.patcher.data.Data | ||
import app.revanced.patcher.patch.Patch | ||
import kotlin.reflect.KClass | ||
|
||
/** | ||
* Declares a [Patch] deprecated for removal. | ||
* @param reason The reason why the patch is deprecated. | ||
* @param replacement The replacement for the deprecated patch, if any. | ||
*/ | ||
@Target(AnnotationTarget.CLASS) | ||
@Retention(AnnotationRetention.RUNTIME) | ||
@MustBeDocumented | ||
@Repeatable | ||
annotation class PatchDeprecated( | ||
val reason: String, | ||
val replacement: KClass<out Patch<Data>> = Patch::class | ||
// Values cannot be nullable in annotations, so this will have to do. | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters