[ULC] Unify modifiers for RepeatableAnnotationContainer
All the other annotation classes has abstract modifier. All nested interfaces has static modifiers. This commit is not so important for compiler, but it is matter for IDE, because when we load classes in IDE via KtLightClassForDecompiledDeclaration -- there are Abstract and Static on the Container class
This commit is contained in:
+5
-1
@@ -79,7 +79,7 @@ private class KtUltraLightModifierListForRepeatableAnnotationContainer(
|
||||
private val containingClass: KtLightClassForSourceDeclaration,
|
||||
support: KtUltraLightSupport,
|
||||
) : KtUltraLightModifierList<KtLightClassForSourceDeclaration>(containingClass, support) {
|
||||
override fun hasModifierProperty(name: String): Boolean = name == PsiModifier.PUBLIC
|
||||
override fun hasModifierProperty(name: String): Boolean = name in modifiers
|
||||
override fun copy() = KtUltraLightModifierListForRepeatableAnnotationContainer(containingClass, support)
|
||||
override fun PsiAnnotation.additionalConverter(): KtLightAbstractAnnotation? = tryConvertAsRepeatableContainer(support)
|
||||
override val annotationsFilter: ((KtLightAbstractAnnotation) -> Boolean) = { it.qualifiedName in allowedAnnotations }
|
||||
@@ -92,5 +92,9 @@ private class KtUltraLightModifierListForRepeatableAnnotationContainer(
|
||||
CommonClassNames.JAVA_LANG_ANNOTATION_TARGET,
|
||||
StandardNames.FqNames.target.asString(),
|
||||
)
|
||||
|
||||
// It is marked as Abstract because all the annotation classes are marked as Abstract
|
||||
// It is marked as Static because all nested interfaces marked as Static
|
||||
private val modifiers = setOf(PsiModifier.PUBLIC, PsiModifier.ABSTRACT, PsiModifier.STATIC)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ public abstract @interface One /* simple.One*/ {
|
||||
|
||||
@java.lang.annotation.Retention(value = java.lang.annotation.RetentionPolicy.RUNTIME)
|
||||
@kotlin.jvm.internal.RepeatableContainer()
|
||||
public @interface Container /* simple.One.Container*/ {
|
||||
public static abstract @interface Container /* simple.One.Container*/ {
|
||||
public abstract simple.One[] value();// value()
|
||||
|
||||
}}
|
||||
+1
-1
@@ -15,7 +15,7 @@ public abstract @interface Anno /* Anno*/ {
|
||||
@kotlin.annotation.Retention(value = kotlin.annotation.AnnotationRetention.SOURCE)
|
||||
@kotlin.annotation.Target(allowedTargets = {kotlin.annotation.AnnotationTarget.TYPE_PARAMETER, kotlin.annotation.AnnotationTarget.TYPE})
|
||||
@kotlin.jvm.internal.RepeatableContainer()
|
||||
public @interface Container /* Anno.Container*/ {
|
||||
public static abstract @interface Container /* Anno.Container*/ {
|
||||
public abstract Anno[] value();// value()
|
||||
|
||||
}}
|
||||
+1
-1
@@ -15,7 +15,7 @@ public abstract @interface Anno /* Anno*/ {
|
||||
@kotlin.annotation.Retention(value = kotlin.annotation.AnnotationRetention.SOURCE)
|
||||
@kotlin.annotation.Target(allowedTargets = {kotlin.annotation.AnnotationTarget.TYPE_PARAMETER, kotlin.annotation.AnnotationTarget.TYPE})
|
||||
@kotlin.jvm.internal.RepeatableContainer()
|
||||
public @interface Container /* Anno.Container*/ {
|
||||
public static abstract @interface Container /* Anno.Container*/ {
|
||||
public abstract Anno[] value();// value()
|
||||
|
||||
}}
|
||||
Reference in New Issue
Block a user