Don't exclude internal type annotations from decompiler renderers

This commit is contained in:
Svetlana Isakova
2015-10-19 22:55:31 +03:00
parent 667f6269e4
commit abf4030ef9
3 changed files with 18 additions and 10 deletions
@@ -192,6 +192,18 @@ public interface DescriptorRendererOptions {
public var renderDefaultAnnotationArguments: Boolean
}
object ExcludedTypeAnnotations {
val annotationsForNullabilityAndMutability = setOf(
FqName("org.jetbrains.annotations.ReadOnly"),
FqName("org.jetbrains.annotations.Mutable"),
FqName("org.jetbrains.annotations.NotNull"),
FqName("org.jetbrains.annotations.Nullable"))
val internalAnnotationsForResolve = setOf(
FqName("kotlin.internal.NoInfer"),
FqName("kotlin.internal.Exact"))
}
public enum class RenderingFormat {
PLAIN,
HTML
@@ -107,12 +107,7 @@ internal class DescriptorRendererOptionsImpl : DescriptorRendererOptions {
override var excludedAnnotationClasses by property(emptySet<FqName>())
override var excludedTypeAnnotationClasses by property(setOf(
FqName("org.jetbrains.annotations.ReadOnly"),
FqName("org.jetbrains.annotations.Mutable"),
FqName("org.jetbrains.annotations.NotNull"),
FqName("org.jetbrains.annotations.Nullable"),
FqName("kotlin.internal.NoInfer"),
FqName("kotlin.internal.Exact")
))
override var excludedTypeAnnotationClasses by property(
ExcludedTypeAnnotations.annotationsForNullabilityAndMutability
+ ExcludedTypeAnnotations.internalAnnotationsForResolve)
}