Do not always generate synthetic "$annotations" as private
Since annotations are a part of the declaration, they must have the same visibility as the declaration in the bytecode. Otherwise obfuscators like Proguard might strip the "$annotations" method and no annotations would be found via Kotlin reflection #KT-15993 Fixed
This commit is contained in:
+1
-1
@@ -9,7 +9,7 @@ public annotation class Ann {
|
||||
|
||||
@kotlin.Metadata
|
||||
public final class AnnotationsOnTypeAliasesKt {
|
||||
private synthetic deprecated static @Ann method TA$annotations(): void
|
||||
public synthetic deprecated static @Ann method TA$annotations(): void
|
||||
public final static method assertHasDeclaredMethodWithAnn(@org.jetbrains.annotations.NotNull p0: java.lang.Class): void
|
||||
public final static @org.jetbrains.annotations.NotNull method box(): java.lang.String
|
||||
}
|
||||
|
||||
Vendored
+3
-3
@@ -21,7 +21,7 @@ public final class Test {
|
||||
public final static @org.jetbrains.annotations.NotNull method getTestK(): java.lang.String
|
||||
public final static @org.jetbrains.annotations.NotNull method getTestO(): java.lang.String
|
||||
public final static @org.jetbrains.annotations.NotNull method getTestOK(): java.lang.String
|
||||
private synthetic deprecated static @kotlin.jvm.JvmStatic method testK$annotations(): void
|
||||
private synthetic deprecated static @kotlin.jvm.JvmStatic method testO$annotations(): void
|
||||
private synthetic deprecated static @kotlin.jvm.JvmStatic method testOK$annotations(): void
|
||||
public synthetic deprecated static @kotlin.jvm.JvmStatic method testK$annotations(): void
|
||||
public synthetic deprecated static @kotlin.jvm.JvmStatic method testO$annotations(): void
|
||||
public synthetic deprecated static @kotlin.jvm.JvmStatic method testOK$annotations(): void
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ public final class A {
|
||||
private final static @org.jetbrains.annotations.NotNull field b: java.lang.String
|
||||
private final static @org.jetbrains.annotations.NotNull field c: java.lang.String
|
||||
private method <init>(): void
|
||||
private synthetic deprecated static @kotlin.jvm.JvmStatic method c$annotations(): void
|
||||
public synthetic deprecated static @kotlin.jvm.JvmStatic method c$annotations(): void
|
||||
public final @org.jetbrains.annotations.NotNull method getB(): java.lang.String
|
||||
public final static @org.jetbrains.annotations.NotNull method getC(): java.lang.String
|
||||
public final static @kotlin.jvm.JvmStatic @org.jetbrains.annotations.NotNull method test1(): java.lang.String
|
||||
|
||||
@@ -15,7 +15,7 @@ public final class A {
|
||||
public final static class A/Companion {
|
||||
inner class A/Companion
|
||||
private method <init>(): void
|
||||
private synthetic deprecated static @kotlin.jvm.JvmStatic method c$annotations(): void
|
||||
public synthetic deprecated static @kotlin.jvm.JvmStatic method c$annotations(): void
|
||||
public final @org.jetbrains.annotations.NotNull method getB(): java.lang.String
|
||||
public final @org.jetbrains.annotations.NotNull method getC(): java.lang.String
|
||||
public final @kotlin.jvm.JvmStatic @org.jetbrains.annotations.NotNull method test1(): java.lang.String
|
||||
|
||||
@@ -16,7 +16,7 @@ public enum class A {
|
||||
public final static class A/Companion {
|
||||
inner class A/Companion
|
||||
private method <init>(): void
|
||||
private synthetic deprecated static @kotlin.jvm.JvmStatic method bar$annotations(): void
|
||||
public synthetic deprecated static @kotlin.jvm.JvmStatic method bar$annotations(): void
|
||||
public final @kotlin.jvm.JvmStatic @org.jetbrains.annotations.NotNull method baz(): java.lang.String
|
||||
public final @org.jetbrains.annotations.NotNull method getBar(): java.lang.String
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ public final class AX {
|
||||
public final @org.jetbrains.annotations.NotNull method aNonStatic(): java.lang.String
|
||||
public final static @kotlin.jvm.JvmStatic @org.jetbrains.annotations.NotNull method aStatic(): java.lang.String
|
||||
public final static @kotlin.jvm.JvmStatic @org.jetbrains.annotations.NotNull method b(): java.lang.String
|
||||
private synthetic deprecated static @kotlin.jvm.JvmStatic method c$annotations(): void
|
||||
public synthetic deprecated static @kotlin.jvm.JvmStatic method c$annotations(): void
|
||||
public final static @org.jetbrains.annotations.NotNull method getC(): java.lang.String
|
||||
public final @org.jetbrains.annotations.NotNull method getProperty(): java.lang.String
|
||||
}
|
||||
|
||||
+2
-2
@@ -14,7 +14,7 @@ public final static class C/Companion {
|
||||
private method <init>(): void
|
||||
public final @kotlin.jvm.JvmStatic method f1(): int
|
||||
public final method getP1(): int
|
||||
private synthetic deprecated static @kotlin.jvm.JvmStatic method p1$annotations(): void
|
||||
public synthetic deprecated static @kotlin.jvm.JvmStatic method p1$annotations(): void
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
@@ -29,5 +29,5 @@ public final class O {
|
||||
private method <init>(): void
|
||||
public final static @kotlin.jvm.JvmStatic method f(): int
|
||||
public final static method getP(): int
|
||||
private synthetic deprecated static @kotlin.jvm.JvmStatic method p$annotations(): void
|
||||
public synthetic deprecated static @kotlin.jvm.JvmStatic method p$annotations(): void
|
||||
}
|
||||
|
||||
@@ -19,6 +19,6 @@ public final class Test {
|
||||
public final static method setSomeProperty(@org.jetbrains.annotations.NotNull p0: java.lang.String, p1: int): void
|
||||
public final static method setSomeProperty(p0: long, p1: long): void
|
||||
public final method setZ(@org.jetbrains.annotations.NotNull p0: java.lang.String): void
|
||||
private synthetic deprecated static @kotlin.jvm.JvmStatic method someProperty$annotations(p0: java.lang.String): void
|
||||
private synthetic deprecated static @kotlin.jvm.JvmStatic method someProperty$annotations(p0: long): void
|
||||
public synthetic deprecated static @kotlin.jvm.JvmStatic method someProperty$annotations(p0: java.lang.String): void
|
||||
public synthetic deprecated static @kotlin.jvm.JvmStatic method someProperty$annotations(p0: long): void
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ public final class A {
|
||||
private final static @org.jetbrains.annotations.NotNull field b: java.lang.String
|
||||
private final static @org.jetbrains.annotations.NotNull field c: java.lang.String
|
||||
private method <init>(): void
|
||||
private synthetic deprecated static @kotlin.jvm.JvmStatic method c$annotations(): void
|
||||
public synthetic deprecated static @kotlin.jvm.JvmStatic method c$annotations(): void
|
||||
public final @org.jetbrains.annotations.NotNull method getB(): java.lang.String
|
||||
public final static @org.jetbrains.annotations.NotNull method getC(): java.lang.String
|
||||
public final static @kotlin.jvm.JvmStatic @org.jetbrains.annotations.NotNull method test1(): java.lang.String
|
||||
|
||||
@@ -5,7 +5,7 @@ public final class A {
|
||||
private static field b: int
|
||||
private static field c: int
|
||||
private method <init>(): void
|
||||
private synthetic deprecated static @kotlin.jvm.JvmStatic method a$annotations(): void
|
||||
public synthetic deprecated static @kotlin.jvm.JvmStatic method a$annotations(): void
|
||||
public final static method getA(): int
|
||||
public final static @kotlin.jvm.JvmStatic method getB(): int
|
||||
public final method getC(): int
|
||||
|
||||
@@ -5,7 +5,7 @@ public final class A {
|
||||
private static field b: int
|
||||
private static field c: int
|
||||
private method <init>(): void
|
||||
private synthetic deprecated static @kotlin.jvm.JvmStatic method a$annotations(): void
|
||||
public synthetic deprecated static @kotlin.jvm.JvmStatic method a$annotations(): void
|
||||
public final static method getA(): int
|
||||
public final static @kotlin.jvm.JvmStatic method getB(): int
|
||||
public final method getC(): int
|
||||
|
||||
@@ -21,5 +21,5 @@ public final static class TestApp/Companion {
|
||||
public synthetic final static method access$setValue$p(p0: TestApp.Companion, @org.jetbrains.annotations.NotNull p1: java.lang.String): void
|
||||
public final @org.jetbrains.annotations.NotNull method getValue(): java.lang.String
|
||||
private final method setValue(p0: java.lang.String): void
|
||||
private synthetic deprecated static @kotlin.jvm.JvmStatic method value$annotations(): void
|
||||
public synthetic deprecated static @kotlin.jvm.JvmStatic method value$annotations(): void
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ public final class A {
|
||||
private static field b: int
|
||||
private static field c: int
|
||||
private method <init>(): void
|
||||
private synthetic deprecated static @kotlin.jvm.JvmStatic method a$annotations(): void
|
||||
public synthetic deprecated static @kotlin.jvm.JvmStatic method a$annotations(): void
|
||||
public final static method getA(): int
|
||||
public final static @kotlin.jvm.JvmStatic method getB(): int
|
||||
public final method getC(): int
|
||||
|
||||
@@ -11,5 +11,5 @@ public final class X {
|
||||
public synthetic static method fn$default(p0: X, p1: java.lang.String, p2: int, p3: java.lang.Object): java.lang.String
|
||||
public final @org.jetbrains.annotations.NotNull method fn(@org.jetbrains.annotations.NotNull p0: java.lang.String): java.lang.String
|
||||
public final static @org.jetbrains.annotations.NotNull method getX(): java.lang.String
|
||||
private synthetic deprecated static @kotlin.jvm.JvmStatic method x$annotations(): void
|
||||
public synthetic deprecated static @kotlin.jvm.JvmStatic method x$annotations(): void
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ public final class A {
|
||||
private final static @org.jetbrains.annotations.NotNull field b: java.lang.String
|
||||
private final static @org.jetbrains.annotations.NotNull field c: java.lang.String
|
||||
private method <init>(): void
|
||||
private synthetic deprecated static @kotlin.jvm.JvmStatic method c$annotations(): void
|
||||
public synthetic deprecated static @kotlin.jvm.JvmStatic method c$annotations(): void
|
||||
public final @org.jetbrains.annotations.NotNull method getB(): java.lang.String
|
||||
public final static @org.jetbrains.annotations.NotNull method getC(): java.lang.String
|
||||
public final static @kotlin.jvm.JvmStatic @org.jetbrains.annotations.NotNull method test1(): java.lang.String
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@ public annotation class a/A
|
||||
@kotlin.Metadata
|
||||
public final class a/MultifileClass {
|
||||
public final static @org.jetbrains.annotations.NotNull field OK: java.lang.String
|
||||
private synthetic deprecated static @a.A method OK$annotations(): void
|
||||
public synthetic deprecated static @a.A method OK$annotations(): void
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
|
||||
+2
-2
@@ -5,8 +5,8 @@ public annotation class Anno
|
||||
@kotlin.Metadata
|
||||
public final class TwoAnnotatedExtensionPropertiesWithoutBackingFieldsKt {
|
||||
public final static @org.jetbrains.annotations.NotNull method box(): java.lang.String
|
||||
private synthetic deprecated static @Anno method foo$annotations(p0: int): void
|
||||
private synthetic deprecated static @Anno method foo$annotations(p0: java.lang.String): void
|
||||
public synthetic deprecated static @Anno method foo$annotations(p0: int): void
|
||||
public synthetic deprecated static @Anno method foo$annotations(p0: java.lang.String): void
|
||||
public final static method getFoo(@org.jetbrains.annotations.NotNull p0: java.lang.String): int
|
||||
public final static method getFoo(p0: int): int
|
||||
}
|
||||
|
||||
Vendored
+1
-1
@@ -8,5 +8,5 @@ public annotation class Ann {
|
||||
public final class PropertyWithoutBackingFieldKt {
|
||||
public final static @org.jetbrains.annotations.NotNull method box(): java.lang.String
|
||||
public final static @org.jetbrains.annotations.NotNull method getProperty(): java.lang.String
|
||||
private synthetic deprecated static @Ann method property$annotations(): void
|
||||
public synthetic deprecated static @Ann method property$annotations(): void
|
||||
}
|
||||
|
||||
+1
-1
@@ -9,6 +9,6 @@ public annotation class Simple {
|
||||
public final class SimpleValAnnotationKt {
|
||||
private final static field foo: int
|
||||
public final static @org.jetbrains.annotations.NotNull method box(): java.lang.String
|
||||
private synthetic deprecated static @Simple method foo$annotations(): void
|
||||
public synthetic deprecated static @Simple method foo$annotations(): void
|
||||
public final static method getFoo(): int
|
||||
}
|
||||
|
||||
+4
-4
@@ -23,10 +23,10 @@ public final static class Host/Companion {
|
||||
public final method getYy(): int
|
||||
public final method setY(p0: int): void
|
||||
public final method setYy(p0: int): void
|
||||
private synthetic deprecated static @kotlin.jvm.JvmStatic method x$annotations(): void
|
||||
private synthetic deprecated static @kotlin.jvm.JvmStatic method xx$annotations(): void
|
||||
private synthetic deprecated static @kotlin.jvm.JvmStatic method y$annotations(): void
|
||||
private synthetic deprecated static @kotlin.jvm.JvmStatic method yy$annotations(): void
|
||||
public synthetic deprecated static @kotlin.jvm.JvmStatic method x$annotations(): void
|
||||
public synthetic deprecated static @kotlin.jvm.JvmStatic method xx$annotations(): void
|
||||
public synthetic deprecated static @kotlin.jvm.JvmStatic method y$annotations(): void
|
||||
public synthetic deprecated static @kotlin.jvm.JvmStatic method yy$annotations(): void
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
|
||||
Vendored
+4
-4
@@ -10,10 +10,10 @@ public final class Host {
|
||||
public final static method getYy(): int
|
||||
public final static method setY(p0: int): void
|
||||
public final static method setYy(p0: int): void
|
||||
private synthetic deprecated static @kotlin.jvm.JvmStatic method x$annotations(): void
|
||||
private synthetic deprecated static @kotlin.jvm.JvmStatic method xx$annotations(): void
|
||||
private synthetic deprecated static @kotlin.jvm.JvmStatic method y$annotations(): void
|
||||
private synthetic deprecated static @kotlin.jvm.JvmStatic method yy$annotations(): void
|
||||
public synthetic deprecated static @kotlin.jvm.JvmStatic method x$annotations(): void
|
||||
public synthetic deprecated static @kotlin.jvm.JvmStatic method xx$annotations(): void
|
||||
public synthetic deprecated static @kotlin.jvm.JvmStatic method y$annotations(): void
|
||||
public synthetic deprecated static @kotlin.jvm.JvmStatic method yy$annotations(): void
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
|
||||
Reference in New Issue
Block a user