Remove @annotation from stdlib and compiler
This commit is contained in:
@@ -76,15 +76,6 @@ public enum class AnnotationRetention {
|
||||
@MustBeDocumented
|
||||
public annotation class Target(vararg val allowedTargets: AnnotationTarget)
|
||||
|
||||
/**
|
||||
* This special meta-annotation is used to declare an annotation.
|
||||
* So a class in Kotlin is an annotation if and only if it has the "annotation" meta-annotation.
|
||||
*/
|
||||
@Target(AnnotationTarget.ANNOTATION_CLASS)
|
||||
@Retention(AnnotationRetention.SOURCE)
|
||||
@MustBeDocumented
|
||||
private annotation class annotation
|
||||
|
||||
/**
|
||||
* This meta-annotation determines whether an annotation is stored in binary output and visible for reflection. By default, both are true.
|
||||
*
|
||||
|
||||
-1
@@ -45,7 +45,6 @@ class LazyJavaAnnotations(
|
||||
|
||||
override fun iterator() =
|
||||
(annotationOwner.annotations.asSequence().map(annotationDescriptors)
|
||||
+ JavaAnnotationMapper.findMappedJavaAnnotation(KotlinBuiltIns.FQ_NAMES.annotation, annotationOwner, c)
|
||||
+ JavaAnnotationMapper.findMappedJavaAnnotation(KotlinBuiltIns.FQ_NAMES.deprecated, annotationOwner, c)).filterNotNull().iterator()
|
||||
|
||||
override fun isEmpty() = !iterator().hasNext()
|
||||
|
||||
@@ -145,7 +145,6 @@ public abstract class KotlinBuiltIns {
|
||||
public final FqName crossinline = fqName("crossinline");
|
||||
public final FqName extension = fqName("Extension");
|
||||
public final FqName target = annotationName("Target");
|
||||
public final FqName annotation = annotationName("annotation");
|
||||
public final FqName annotationTarget = annotationName("AnnotationTarget");
|
||||
public final FqName annotationRetention = annotationName("AnnotationRetention");
|
||||
public final FqName retention = annotationName("Retention");
|
||||
@@ -428,11 +427,6 @@ public abstract class KotlinBuiltIns {
|
||||
return result instanceof ClassDescriptor ? (ClassDescriptor) result : null;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public ClassDescriptor getAnnotationAnnotation() {
|
||||
return getAnnotationClassByName(FQ_NAMES.annotation.shortName());
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public ClassDescriptor getString() {
|
||||
return getBuiltInClassByName("String");
|
||||
@@ -1019,11 +1013,6 @@ public abstract class KotlinBuiltIns {
|
||||
return FQ_NAMES.array.equals(getFqName(descriptor));
|
||||
}
|
||||
|
||||
public static boolean isAnnotation(@NotNull ClassDescriptor descriptor) {
|
||||
return DescriptorUtils.getFqName(descriptor) == FQ_NAMES.annotation.toUnsafe()
|
||||
|| containsAnnotation(descriptor, FQ_NAMES.annotation);
|
||||
}
|
||||
|
||||
public static boolean isCloneable(@NotNull ClassDescriptor descriptor) {
|
||||
return FQ_NAMES.cloneable.equals(getFqName(descriptor));
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ import org.jetbrains.kotlin.types.Variance
|
||||
|
||||
// Please synchronize this set with JetTokens.ANNOTATION_MODIFIERS_KEYWORDS_ARRAY
|
||||
public val ANNOTATION_MODIFIERS_FQ_NAMES: Set<FqName> =
|
||||
arrayOf("inline", "noinline", "tailrec", "external", "annotation.annotation", "crossinline").map { FqName("kotlin.$it") }.toSet()
|
||||
arrayOf("inline", "noinline", "tailrec", "external", "crossinline").map { FqName("kotlin.$it") }.toSet()
|
||||
|
||||
public fun KotlinBuiltIns.createDeprecatedAnnotation(message: String, replaceWith: String): AnnotationDescriptor {
|
||||
val deprecatedAnnotation = deprecatedAnnotation
|
||||
|
||||
Reference in New Issue
Block a user