AllOpen: Add IDE integration
This commit is contained in:
committed by
Yan Zhulanow
parent
4d638c2cfd
commit
6abde4223b
@@ -0,0 +1,19 @@
|
||||
@AllOpen
|
||||
annotation class AllOpen
|
||||
|
||||
@AllOpen
|
||||
interface Intf
|
||||
|
||||
@AllOpen
|
||||
object Obj
|
||||
|
||||
@AllOpen
|
||||
enum class Enum
|
||||
|
||||
class MyClass {
|
||||
@AllOpen
|
||||
fun method() {}
|
||||
|
||||
@field:AllOpen @get:AllOpen @set:AllOpen
|
||||
var prop: String = ""
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
@AllOpen
|
||||
@java.lang.annotation.Retention
|
||||
@kotlin.Metadata
|
||||
public annotation class AllOpen
|
||||
|
||||
@AllOpen
|
||||
@kotlin.Metadata
|
||||
public enum class Enum {
|
||||
private synthetic final static field $VALUES: Enum[]
|
||||
static method <clinit>(): void
|
||||
protected method <init>(p0: java.lang.String, p1: int): void
|
||||
public static method valueOf(p0: java.lang.String): Enum
|
||||
public static method values(): Enum[]
|
||||
}
|
||||
|
||||
@AllOpen
|
||||
@kotlin.Metadata
|
||||
public interface Intf
|
||||
|
||||
@kotlin.Metadata
|
||||
public final class MyClass {
|
||||
private @AllOpen @org.jetbrains.annotations.NotNull field prop: java.lang.String
|
||||
public method <init>(): void
|
||||
public final @AllOpen @org.jetbrains.annotations.NotNull method getProp(): java.lang.String
|
||||
public final @AllOpen method method(): void
|
||||
public final @AllOpen method setProp(@org.jetbrains.annotations.NotNull p0: java.lang.String): void
|
||||
}
|
||||
|
||||
@AllOpen
|
||||
@kotlin.Metadata
|
||||
public final class Obj {
|
||||
public final static field INSTANCE: Obj
|
||||
static method <clinit>(): void
|
||||
private method <init>(): void
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
annotation class AllOpen
|
||||
|
||||
@AllOpen
|
||||
open class Test1
|
||||
|
||||
@AllOpen
|
||||
open class Test2 {
|
||||
open fun method() {}
|
||||
val prop: String = ""
|
||||
}
|
||||
|
||||
@AllOpen
|
||||
class Test3 {
|
||||
fun method() {}
|
||||
open val prop: String = ""
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
@java.lang.annotation.Retention
|
||||
@kotlin.Metadata
|
||||
public annotation class AllOpen
|
||||
|
||||
@AllOpen
|
||||
@kotlin.Metadata
|
||||
public class Test1 {
|
||||
public method <init>(): void
|
||||
}
|
||||
|
||||
@AllOpen
|
||||
@kotlin.Metadata
|
||||
public class Test2 {
|
||||
private final @org.jetbrains.annotations.NotNull field prop: java.lang.String
|
||||
public method <init>(): void
|
||||
public @org.jetbrains.annotations.NotNull method getProp(): java.lang.String
|
||||
public method method(): void
|
||||
}
|
||||
|
||||
@AllOpen
|
||||
@kotlin.Metadata
|
||||
public class Test3 {
|
||||
private final @org.jetbrains.annotations.NotNull field prop: java.lang.String
|
||||
public method <init>(): void
|
||||
public @org.jetbrains.annotations.NotNull method getProp(): java.lang.String
|
||||
public method method(): void
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
annotation class AllOpen
|
||||
|
||||
@AllOpen
|
||||
final class Test1
|
||||
|
||||
@AllOpen
|
||||
class Test2 {
|
||||
fun method1() {}
|
||||
val prop1: String = ""
|
||||
|
||||
final fun method2() {}
|
||||
final val prop2: String = ""
|
||||
final var prop3: String = ""
|
||||
|
||||
// Modifier 'final' is not applicable to 'setter'
|
||||
// var prop4: String = ""
|
||||
// final set
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
@java.lang.annotation.Retention
|
||||
@kotlin.Metadata
|
||||
public annotation class AllOpen
|
||||
|
||||
@AllOpen
|
||||
@kotlin.Metadata
|
||||
public final class Test1 {
|
||||
public method <init>(): void
|
||||
}
|
||||
|
||||
@AllOpen
|
||||
@kotlin.Metadata
|
||||
public class Test2 {
|
||||
private final @org.jetbrains.annotations.NotNull field prop1: java.lang.String
|
||||
private final @org.jetbrains.annotations.NotNull field prop2: java.lang.String
|
||||
private @org.jetbrains.annotations.NotNull field prop3: java.lang.String
|
||||
public method <init>(): void
|
||||
public @org.jetbrains.annotations.NotNull method getProp1(): java.lang.String
|
||||
public final @org.jetbrains.annotations.NotNull method getProp2(): java.lang.String
|
||||
public final @org.jetbrains.annotations.NotNull method getProp3(): java.lang.String
|
||||
public method method1(): void
|
||||
public final method method2(): void
|
||||
public final method setProp3(@org.jetbrains.annotations.NotNull p0: java.lang.String): void
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
annotation class AllOpen
|
||||
|
||||
@AllOpen
|
||||
annotation class MyComponent
|
||||
|
||||
@MyComponent // Double-transitive annotations is not supported
|
||||
annotation class OtherComponent
|
||||
|
||||
class TestWithoutAnnotations_ShouldBeFinal
|
||||
|
||||
@AllOpen
|
||||
class TestAllOpen_ShouldBeOpen
|
||||
|
||||
@MyComponent
|
||||
class TestMyComponent_ShouldBeOpen
|
||||
|
||||
@OtherComponent
|
||||
class TestOtherComponent_ShouldBeFinal
|
||||
|
||||
@MyComponent
|
||||
abstract class MyComponentBase
|
||||
|
||||
class MyComponentImpl_ShouldBeOpen : MyComponentBase() {
|
||||
fun method() {}
|
||||
}
|
||||
|
||||
final class MyComponentImpl2_ShouldBeFinal : MyComponentBase() {
|
||||
fun method() {}
|
||||
}
|
||||
|
||||
class MyComponentImpl3_ShouldBeOpen : MyComponentBase() {
|
||||
final fun method_ShouldBeFinal() {}
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
@java.lang.annotation.Retention
|
||||
@kotlin.Metadata
|
||||
public annotation class AllOpen
|
||||
|
||||
@AllOpen
|
||||
@java.lang.annotation.Retention
|
||||
@kotlin.Metadata
|
||||
public annotation class MyComponent
|
||||
|
||||
@MyComponent
|
||||
@kotlin.Metadata
|
||||
public abstract class MyComponentBase {
|
||||
public method <init>(): void
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
public final class MyComponentImpl2_ShouldBeFinal {
|
||||
public method <init>(): void
|
||||
public method method(): void
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
public class MyComponentImpl3_ShouldBeOpen {
|
||||
public method <init>(): void
|
||||
public final method method_ShouldBeFinal(): void
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
public class MyComponentImpl_ShouldBeOpen {
|
||||
public method <init>(): void
|
||||
public method method(): void
|
||||
}
|
||||
|
||||
@MyComponent
|
||||
@java.lang.annotation.Retention
|
||||
@kotlin.Metadata
|
||||
public annotation class OtherComponent
|
||||
|
||||
@AllOpen
|
||||
@kotlin.Metadata
|
||||
public class TestAllOpen_ShouldBeOpen {
|
||||
public method <init>(): void
|
||||
}
|
||||
|
||||
@MyComponent
|
||||
@kotlin.Metadata
|
||||
public class TestMyComponent_ShouldBeOpen {
|
||||
public method <init>(): void
|
||||
}
|
||||
|
||||
@OtherComponent
|
||||
@kotlin.Metadata
|
||||
public final class TestOtherComponent_ShouldBeFinal {
|
||||
public method <init>(): void
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
public final class TestWithoutAnnotations_ShouldBeFinal {
|
||||
public method <init>(): void
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
annotation class AllOpen
|
||||
|
||||
@AllOpen
|
||||
class Test {
|
||||
fun testMethod() {}
|
||||
|
||||
class Nested {
|
||||
fun nestedMethod() {}
|
||||
}
|
||||
|
||||
inner class Inner {
|
||||
fun innerMethod() {}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
@java.lang.annotation.Retention
|
||||
@kotlin.Metadata
|
||||
public annotation class AllOpen
|
||||
|
||||
@kotlin.Metadata
|
||||
public final class Test$Inner {
|
||||
synthetic final field this$0: Test
|
||||
inner class Test$Inner
|
||||
public method <init>(p0: Test): void
|
||||
public final method innerMethod(): void
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
public final class Test$Nested {
|
||||
inner class Test$Nested
|
||||
public method <init>(): void
|
||||
public final method nestedMethod(): void
|
||||
}
|
||||
|
||||
@AllOpen
|
||||
@kotlin.Metadata
|
||||
public class Test {
|
||||
inner class Test$Inner
|
||||
inner class Test$Nested
|
||||
public method <init>(): void
|
||||
public method testMethod(): void
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
class Test {
|
||||
val prop: String = ""
|
||||
fun method() {}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
@kotlin.Metadata
|
||||
public final class Test {
|
||||
private final @org.jetbrains.annotations.NotNull field prop: java.lang.String
|
||||
public method <init>(): void
|
||||
public final @org.jetbrains.annotations.NotNull method getProp(): java.lang.String
|
||||
public final method method(): void
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
annotation class AllOpen
|
||||
|
||||
@AllOpen
|
||||
sealed class Sealed {
|
||||
class C1 : Sealed() {}
|
||||
class C2 : Sealed() {}
|
||||
}
|
||||
|
||||
sealed class Sealed2 {
|
||||
@AllOpen
|
||||
class C1 : Sealed2() {}
|
||||
|
||||
class C2 : Sealed2() {}
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
@java.lang.annotation.Retention
|
||||
@kotlin.Metadata
|
||||
public annotation class AllOpen
|
||||
|
||||
@kotlin.Metadata
|
||||
public class Sealed$C1 {
|
||||
inner class Sealed$C1
|
||||
public method <init>(): void
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
public class Sealed$C2 {
|
||||
inner class Sealed$C2
|
||||
public method <init>(): void
|
||||
}
|
||||
|
||||
@AllOpen
|
||||
@kotlin.Metadata
|
||||
public abstract class Sealed {
|
||||
inner class Sealed$C1
|
||||
inner class Sealed$C2
|
||||
private method <init>(): void
|
||||
public synthetic method <init>(p0: kotlin.jvm.internal.DefaultConstructorMarker): void
|
||||
}
|
||||
|
||||
@AllOpen
|
||||
@kotlin.Metadata
|
||||
public class Sealed2$C1 {
|
||||
inner class Sealed2$C1
|
||||
public method <init>(): void
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
public final class Sealed2$C2 {
|
||||
inner class Sealed2$C2
|
||||
public method <init>(): void
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
public abstract class Sealed2 {
|
||||
inner class Sealed2$C1
|
||||
inner class Sealed2$C2
|
||||
private method <init>(): void
|
||||
public synthetic method <init>(p0: kotlin.jvm.internal.DefaultConstructorMarker): void
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
annotation class AllOpen
|
||||
annotation class AllOpen2
|
||||
|
||||
@AllOpen
|
||||
@AllOpen2
|
||||
class Test {
|
||||
val prop: String = ""
|
||||
fun method() {}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
@java.lang.annotation.Retention
|
||||
@kotlin.Metadata
|
||||
public annotation class AllOpen
|
||||
|
||||
@java.lang.annotation.Retention
|
||||
@kotlin.Metadata
|
||||
public annotation class AllOpen2
|
||||
|
||||
@AllOpen
|
||||
@AllOpen2
|
||||
@kotlin.Metadata
|
||||
public class Test {
|
||||
private final @org.jetbrains.annotations.NotNull field prop: java.lang.String
|
||||
public method <init>(): void
|
||||
public @org.jetbrains.annotations.NotNull method getProp(): java.lang.String
|
||||
public method method(): void
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
annotation class AllOpen
|
||||
|
||||
@AllOpen
|
||||
class Test {
|
||||
val prop: String = ""
|
||||
fun method() {}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
@java.lang.annotation.Retention
|
||||
@kotlin.Metadata
|
||||
public annotation class AllOpen
|
||||
|
||||
@AllOpen
|
||||
@kotlin.Metadata
|
||||
public class Test {
|
||||
private final @org.jetbrains.annotations.NotNull field prop: java.lang.String
|
||||
public method <init>(): void
|
||||
public @org.jetbrains.annotations.NotNull method getProp(): java.lang.String
|
||||
public method method(): void
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
annotation class AllOpen
|
||||
|
||||
@AllOpen
|
||||
abstract class Base_ShouldBeOpen {
|
||||
fun baseMethod() {}
|
||||
}
|
||||
|
||||
open class BaseImpl : Base_ShouldBeOpen() {
|
||||
fun baseImplMethod_ShouldBeOpen() {}
|
||||
}
|
||||
|
||||
class BaseImpl2_ShouldBeOpen : BaseImpl() {
|
||||
fun baseImpl2Method_ShouldBeOpen() {}
|
||||
val baseImpl2Property_ShouldBeOpen = ""
|
||||
}
|
||||
|
||||
@AllOpen
|
||||
interface Intf {
|
||||
fun intfMethod() {}
|
||||
}
|
||||
|
||||
open class IntfImpl : Intf {
|
||||
fun intfImplMethod_ShouldBeOpen() {}
|
||||
}
|
||||
|
||||
class IntfImpl2_ShouldBeOpen : IntfImpl() {
|
||||
fun intfImpl2Method_ShouldBeOpen() {}
|
||||
}
|
||||
+50
@@ -0,0 +1,50 @@
|
||||
@java.lang.annotation.Retention
|
||||
@kotlin.Metadata
|
||||
public annotation class AllOpen
|
||||
|
||||
@kotlin.Metadata
|
||||
public class BaseImpl {
|
||||
public method <init>(): void
|
||||
public method baseImplMethod_ShouldBeOpen(): void
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
public class BaseImpl2_ShouldBeOpen {
|
||||
private final @org.jetbrains.annotations.NotNull field baseImpl2Property_ShouldBeOpen: java.lang.String
|
||||
public method <init>(): void
|
||||
public method baseImpl2Method_ShouldBeOpen(): void
|
||||
public @org.jetbrains.annotations.NotNull method getBaseImpl2Property_ShouldBeOpen(): java.lang.String
|
||||
}
|
||||
|
||||
@AllOpen
|
||||
@kotlin.Metadata
|
||||
public abstract class Base_ShouldBeOpen {
|
||||
public method <init>(): void
|
||||
public method baseMethod(): void
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
public final class Intf$DefaultImpls {
|
||||
inner class Intf$DefaultImpls
|
||||
public static method intfMethod(p0: Intf): void
|
||||
}
|
||||
|
||||
@AllOpen
|
||||
@kotlin.Metadata
|
||||
public interface Intf {
|
||||
inner class Intf$DefaultImpls
|
||||
public abstract method intfMethod(): void
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
public class IntfImpl {
|
||||
public method <init>(): void
|
||||
public method intfImplMethod_ShouldBeOpen(): void
|
||||
public method intfMethod(): void
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
public class IntfImpl2_ShouldBeOpen {
|
||||
public method <init>(): void
|
||||
public method intfImpl2Method_ShouldBeOpen(): void
|
||||
}
|
||||
Reference in New Issue
Block a user