Rewrite UnderMigration and MigrationStatus in Java

to remove dependency on kotlin-stdlib.

#KT-33141
This commit is contained in:
Ilya Gorbunov
2020-01-11 02:32:46 +03:00
parent fa1c6c9697
commit 0764a065e8
3 changed files with 35 additions and 34 deletions
@@ -1,34 +0,0 @@
/*
* Copyright 2010-2017 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package kotlin.annotations.jvm
/**
* Contains the list of possible migration statuses.
*/
public enum class MigrationStatus {
IGNORE,
WARN,
@Deprecated("experimental feature")
STRICT
}
/**
* This meta-annotation is intended for user nullability annotations with JSR-305 type qualifiers. Behaviour of meta-annotated
* nullability annotations can be controlled via compilation flag.
*/
@Target(AnnotationTarget.ANNOTATION_CLASS)
public annotation class UnderMigration(val status: MigrationStatus)
@@ -0,0 +1,17 @@
/*
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
package kotlin.annotations.jvm;
/**
* Contains the list of possible migration statuses.
*/
public enum MigrationStatus {
IGNORE,
WARN,
/** @deprecated experimental feature */
@Deprecated
STRICT;
}
@@ -0,0 +1,18 @@
/*
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
package kotlin.annotations.jvm;
import java.lang.annotation.*;
/**
* This meta-annotation is intended for user nullability annotations with JSR-305 type qualifiers. Behaviour of meta-annotated
* nullability annotations can be controlled via compilation flag.
*/
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.ANNOTATION_TYPE})
public @interface UnderMigration {
MigrationStatus status();
}