JVM: Generate object and companion object INSTANCE fields as @NotNull
This commit is contained in:
@@ -771,10 +771,12 @@ public class ImplementationBodyCodegen extends ClassBodyCodegen {
|
|||||||
|
|
||||||
if (isNonCompanionObject(descriptor)) {
|
if (isNonCompanionObject(descriptor)) {
|
||||||
StackValue.Field field = StackValue.createSingletonViaInstance(descriptor, typeMapper, INSTANCE_FIELD);
|
StackValue.Field field = StackValue.createSingletonViaInstance(descriptor, typeMapper, INSTANCE_FIELD);
|
||||||
v.newField(JvmDeclarationOriginKt.OtherOriginFromPure(myClass),
|
FieldVisitor fv = v.newField(
|
||||||
ACC_PUBLIC | ACC_STATIC | ACC_FINAL,
|
JvmDeclarationOriginKt.OtherOriginFromPure(myClass),
|
||||||
field.name, field.type.getDescriptor(), null, null);
|
ACC_PUBLIC | ACC_STATIC | ACC_FINAL,
|
||||||
|
field.name, field.type.getDescriptor(), null, null
|
||||||
|
);
|
||||||
|
AnnotationCodegen.forField(fv, this, state).visitAnnotation(Type.getDescriptor(NotNull.class), false).visitEnd();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -816,10 +818,13 @@ public class ImplementationBodyCodegen extends ClassBodyCodegen {
|
|||||||
fieldAccessFlags |= ACC_SYNTHETIC;
|
fieldAccessFlags |= ACC_SYNTHETIC;
|
||||||
}
|
}
|
||||||
StackValue.Field field = StackValue.singleton(companionObjectDescriptor, typeMapper);
|
StackValue.Field field = StackValue.singleton(companionObjectDescriptor, typeMapper);
|
||||||
FieldVisitor fv = v.newField(JvmDeclarationOriginKt.OtherOrigin(companionObject == null ? myClass.getPsiOrParent() : companionObject),
|
FieldVisitor fv = v.newField(
|
||||||
fieldAccessFlags, field.name, field.type.getDescriptor(), null, null);
|
JvmDeclarationOriginKt.OtherOrigin(companionObject == null ? myClass.getPsiOrParent() : companionObject),
|
||||||
|
fieldAccessFlags, field.name, field.type.getDescriptor(), null, null
|
||||||
|
);
|
||||||
|
AnnotationCodegen.forField(fv, this, state).visitAnnotation(Type.getDescriptor(NotNull.class), false).visitEnd();
|
||||||
if (fieldShouldBeDeprecated) {
|
if (fieldShouldBeDeprecated) {
|
||||||
AnnotationCodegen.forField(fv, this, state).visitAnnotation("Ljava/lang/Deprecated;", true).visitEnd();
|
AnnotationCodegen.forField(fv, this, state).visitAnnotation(Type.getDescriptor(Deprecated.class), true).visitEnd();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -10,18 +10,19 @@ import com.intellij.psi.*
|
|||||||
import com.intellij.psi.impl.light.LightFieldBuilder
|
import com.intellij.psi.impl.light.LightFieldBuilder
|
||||||
import com.intellij.psi.util.TypeConversionUtil
|
import com.intellij.psi.util.TypeConversionUtil
|
||||||
import org.jetbrains.annotations.NonNls
|
import org.jetbrains.annotations.NonNls
|
||||||
|
import org.jetbrains.annotations.NotNull
|
||||||
import org.jetbrains.kotlin.asJava.LightClassGenerationSupport
|
import org.jetbrains.kotlin.asJava.LightClassGenerationSupport
|
||||||
import org.jetbrains.kotlin.asJava.builder.LightMemberOriginForDeclaration
|
import org.jetbrains.kotlin.asJava.builder.LightMemberOriginForDeclaration
|
||||||
import org.jetbrains.kotlin.asJava.elements.*
|
import org.jetbrains.kotlin.asJava.elements.KtLightElement
|
||||||
|
import org.jetbrains.kotlin.asJava.elements.KtLightField
|
||||||
|
import org.jetbrains.kotlin.asJava.elements.KtLightFieldForSourceDeclarationSupport
|
||||||
|
import org.jetbrains.kotlin.asJava.elements.KtUltraLightSimpleModifierList
|
||||||
import org.jetbrains.kotlin.codegen.PropertyCodegen
|
import org.jetbrains.kotlin.codegen.PropertyCodegen
|
||||||
import org.jetbrains.kotlin.descriptors.ClassDescriptor
|
import org.jetbrains.kotlin.descriptors.ClassDescriptor
|
||||||
import org.jetbrains.kotlin.descriptors.PropertyDescriptor
|
import org.jetbrains.kotlin.descriptors.PropertyDescriptor
|
||||||
import org.jetbrains.kotlin.descriptors.VariableDescriptor
|
|
||||||
import org.jetbrains.kotlin.descriptors.annotations.AnnotationUseSiteTarget
|
import org.jetbrains.kotlin.descriptors.annotations.AnnotationUseSiteTarget
|
||||||
import org.jetbrains.kotlin.idea.KotlinLanguage
|
import org.jetbrains.kotlin.idea.KotlinLanguage
|
||||||
import org.jetbrains.kotlin.lexer.KtModifierKeywordToken
|
|
||||||
import org.jetbrains.kotlin.lexer.KtTokens
|
import org.jetbrains.kotlin.lexer.KtTokens
|
||||||
import org.jetbrains.kotlin.lexer.KtTokens.VAL_KEYWORD
|
|
||||||
import org.jetbrains.kotlin.load.kotlin.TypeMappingMode
|
import org.jetbrains.kotlin.load.kotlin.TypeMappingMode
|
||||||
import org.jetbrains.kotlin.name.FqName
|
import org.jetbrains.kotlin.name.FqName
|
||||||
import org.jetbrains.kotlin.psi.*
|
import org.jetbrains.kotlin.psi.*
|
||||||
@@ -76,7 +77,8 @@ internal open class KtUltraLightFieldImpl protected constructor(
|
|||||||
KtUltraLightSimpleModifierListField(support, declaration, this, modifiers)
|
KtUltraLightSimpleModifierListField(support, declaration, this, modifiers)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun isEquivalentTo(another: PsiElement?): Boolean = kotlinOrigin == another || (another as? KtLightField)?.kotlinOrigin == kotlinOrigin
|
override fun isEquivalentTo(another: PsiElement?): Boolean =
|
||||||
|
kotlinOrigin == another || (another as? KtLightField)?.kotlinOrigin == kotlinOrigin
|
||||||
|
|
||||||
override fun getModifierList(): PsiModifierList = modifierList
|
override fun getModifierList(): PsiModifierList = modifierList
|
||||||
|
|
||||||
@@ -105,11 +107,12 @@ internal open class KtUltraLightFieldImpl protected constructor(
|
|||||||
}
|
}
|
||||||
|
|
||||||
override val qualifiedNameForNullabilityAnnotation: String?
|
override val qualifiedNameForNullabilityAnnotation: String?
|
||||||
get() {
|
get() =
|
||||||
// We don't generate nullability annotations for non-backing fields in backend
|
when (declaration) {
|
||||||
val typeForAnnotation = kotlinType?.takeUnless { declaration is KtEnumEntry || declaration is KtObjectDeclaration }
|
is KtObjectDeclaration -> NotNull::class.java.name
|
||||||
return computeQualifiedNameForNullabilityAnnotation(typeForAnnotation)
|
is KtEnumEntry -> null
|
||||||
}
|
else -> computeQualifiedNameForNullabilityAnnotation(kotlinType)
|
||||||
|
}
|
||||||
|
|
||||||
override val psiTypeForNullabilityAnnotation: PsiType?
|
override val psiTypeForNullabilityAnnotation: PsiType?
|
||||||
get() = type
|
get() = type
|
||||||
|
|||||||
@@ -309,6 +309,9 @@ open class KtLightNullabilityAnnotation<D : KtLightElement<*, PsiModifierListOwn
|
|||||||
// all data-class generated members are not-null
|
// all data-class generated members are not-null
|
||||||
if (annotatedElement is KtClass && annotatedElement.isData()) return NotNull::class.java.name
|
if (annotatedElement is KtClass && annotatedElement.isData()) return NotNull::class.java.name
|
||||||
|
|
||||||
|
// objects and companion objects are not null
|
||||||
|
if (annotatedElement is KtObjectDeclaration) return NotNull::class.java.name
|
||||||
|
|
||||||
if (annotatedElement is KtParameter) {
|
if (annotatedElement is KtParameter) {
|
||||||
if (annotatedElement.containingClassOrObject?.isAnnotation() == true) return null
|
if (annotatedElement.containingClassOrObject?.isAnnotation() == true) return null
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
public final class A {
|
public final class A {
|
||||||
|
@org.jetbrains.annotations.NotNull
|
||||||
public static final A.Companion Companion;
|
public static final A.Companion Companion;
|
||||||
|
|
||||||
public A() { /* compiled code */ }
|
public A() { /* compiled code */ }
|
||||||
@@ -7,6 +8,7 @@ public final class A {
|
|||||||
public static final void f() { /* compiled code */ }
|
public static final void f() { /* compiled code */ }
|
||||||
|
|
||||||
public static final class B {
|
public static final class B {
|
||||||
|
@org.jetbrains.annotations.NotNull
|
||||||
public static final A.B INSTANCE;
|
public static final A.B INSTANCE;
|
||||||
|
|
||||||
@kotlin.jvm.JvmStatic
|
@kotlin.jvm.JvmStatic
|
||||||
|
|||||||
@@ -5,12 +5,14 @@ public final class A {
|
|||||||
public B() { /* compiled code */ }
|
public B() { /* compiled code */ }
|
||||||
|
|
||||||
public static final class I {
|
public static final class I {
|
||||||
|
@org.jetbrains.annotations.NotNull
|
||||||
public static final A.B.I INSTANCE;
|
public static final A.B.I INSTANCE;
|
||||||
|
|
||||||
private I() { /* compiled code */ }
|
private I() { /* compiled code */ }
|
||||||
}
|
}
|
||||||
|
|
||||||
public static final class II {
|
public static final class II {
|
||||||
|
@org.jetbrains.annotations.NotNull
|
||||||
public static final A.B.II INSTANCE;
|
public static final A.B.II INSTANCE;
|
||||||
|
|
||||||
private II() { /* compiled code */ }
|
private II() { /* compiled code */ }
|
||||||
@@ -18,16 +20,19 @@ public final class A {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static final class C {
|
public static final class C {
|
||||||
|
@org.jetbrains.annotations.NotNull
|
||||||
public static final A.C INSTANCE;
|
public static final A.C INSTANCE;
|
||||||
|
|
||||||
private C() { /* compiled code */ }
|
private C() { /* compiled code */ }
|
||||||
|
|
||||||
public static final class D {
|
public static final class D {
|
||||||
|
@org.jetbrains.annotations.NotNull
|
||||||
public static final A.C.D INSTANCE;
|
public static final A.C.D INSTANCE;
|
||||||
|
|
||||||
private D() { /* compiled code */ }
|
private D() { /* compiled code */ }
|
||||||
|
|
||||||
public static final class G {
|
public static final class G {
|
||||||
|
@org.jetbrains.annotations.NotNull
|
||||||
public static final A.C.D.G INSTANCE;
|
public static final A.C.D.G INSTANCE;
|
||||||
|
|
||||||
private G() { /* compiled code */ }
|
private G() { /* compiled code */ }
|
||||||
|
|||||||
+1
@@ -1,4 +1,5 @@
|
|||||||
public interface TraitClassObjectField {
|
public interface TraitClassObjectField {
|
||||||
|
@org.jetbrains.annotations.NotNull
|
||||||
TraitClassObjectField.Companion Companion;
|
TraitClassObjectField.Companion Companion;
|
||||||
@org.jetbrains.annotations.Nullable
|
@org.jetbrains.annotations.Nullable
|
||||||
java.lang.String x = "";
|
java.lang.String x = "";
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
public final class A {
|
public final class A {
|
||||||
|
@org.jetbrains.annotations.NotNull
|
||||||
public static final A.Companion Companion;
|
public static final A.Companion Companion;
|
||||||
|
|
||||||
public A() { /* compiled code */ }
|
public A() { /* compiled code */ }
|
||||||
|
|||||||
+1
@@ -2,6 +2,7 @@ public final class ClassObjectField {
|
|||||||
@org.jetbrains.annotations.Nullable
|
@org.jetbrains.annotations.Nullable
|
||||||
private static final java.lang.String x;
|
private static final java.lang.String x;
|
||||||
private static final java.lang.String y;
|
private static final java.lang.String y;
|
||||||
|
@org.jetbrains.annotations.NotNull
|
||||||
public static final ClassObjectField.Companion Companion;
|
public static final ClassObjectField.Companion Companion;
|
||||||
|
|
||||||
public ClassObjectField() { /* compiled code */ }
|
public ClassObjectField() { /* compiled code */ }
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ public final class A {
|
|||||||
public static final int cc = 1;
|
public static final int cc = 1;
|
||||||
@org.jetbrains.annotations.NotNull
|
@org.jetbrains.annotations.NotNull
|
||||||
public static final java.lang.String cv = "A";
|
public static final java.lang.String cv = "A";
|
||||||
|
@org.jetbrains.annotations.NotNull
|
||||||
public static final pack.A INSTANCE;
|
public static final pack.A INSTANCE;
|
||||||
|
|
||||||
public final int getC() { /* compiled code */ }
|
public final int getC() { /* compiled code */ }
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ public final class C {
|
|||||||
@kotlin.jvm.JvmField
|
@kotlin.jvm.JvmField
|
||||||
@org.jetbrains.annotations.NotNull
|
@org.jetbrains.annotations.NotNull
|
||||||
public static final java.lang.String foo;
|
public static final java.lang.String foo;
|
||||||
|
@org.jetbrains.annotations.NotNull
|
||||||
public static final C.Companion Companion;
|
public static final C.Companion Companion;
|
||||||
|
|
||||||
public C() { /* compiled code */ }
|
public C() { /* compiled code */ }
|
||||||
|
|||||||
+1
-1
@@ -375,7 +375,7 @@ public final class SourceCrossinline$Factory {
|
|||||||
|
|
||||||
@kotlin.Metadata
|
@kotlin.Metadata
|
||||||
public interface SourceCrossinline {
|
public interface SourceCrossinline {
|
||||||
public final static field Factory: SourceCrossinline$Factory
|
public final static @org.jetbrains.annotations.NotNull field Factory: SourceCrossinline$Factory
|
||||||
inner class SourceCrossinline$Factory
|
inner class SourceCrossinline$Factory
|
||||||
static method <clinit>(): void
|
static method <clinit>(): void
|
||||||
public abstract @org.jetbrains.annotations.Nullable method consume(@org.jetbrains.annotations.NotNull p0: Sink, @org.jetbrains.annotations.NotNull p1: kotlin.coroutines.Continuation): java.lang.Object
|
public abstract @org.jetbrains.annotations.Nullable method consume(@org.jetbrains.annotations.NotNull p0: Sink, @org.jetbrains.annotations.NotNull p1: kotlin.coroutines.Continuation): java.lang.Object
|
||||||
|
|||||||
+1
-1
@@ -386,7 +386,7 @@ public final class SourceCrossinline$Factory {
|
|||||||
|
|
||||||
@kotlin.Metadata
|
@kotlin.Metadata
|
||||||
public interface SourceCrossinline {
|
public interface SourceCrossinline {
|
||||||
public final static field Factory: SourceCrossinline$Factory
|
public final static @org.jetbrains.annotations.NotNull field Factory: SourceCrossinline$Factory
|
||||||
inner class SourceCrossinline$Factory
|
inner class SourceCrossinline$Factory
|
||||||
static method <clinit>(): void
|
static method <clinit>(): void
|
||||||
public abstract @org.jetbrains.annotations.Nullable method consume(@org.jetbrains.annotations.NotNull p0: Sink, @org.jetbrains.annotations.NotNull p1: kotlin.coroutines.experimental.Continuation): java.lang.Object
|
public abstract @org.jetbrains.annotations.Nullable method consume(@org.jetbrains.annotations.NotNull p0: Sink, @org.jetbrains.annotations.NotNull p1: kotlin.coroutines.experimental.Continuation): java.lang.Object
|
||||||
|
|||||||
Vendored
-1
@@ -1,4 +1,3 @@
|
|||||||
// IGNORE_BACKEND: JVM_IR
|
|
||||||
class Foo private constructor(s: String) {
|
class Foo private constructor(s: String) {
|
||||||
|
|
||||||
private fun foo(s: String) {}
|
private fun foo(s: String) {}
|
||||||
|
|||||||
Vendored
+1
-1
@@ -8,7 +8,7 @@ public final class Foo$Companion {
|
|||||||
|
|
||||||
@kotlin.Metadata
|
@kotlin.Metadata
|
||||||
public final class Foo {
|
public final class Foo {
|
||||||
public final static field Companion: Foo$Companion
|
public final static @org.jetbrains.annotations.NotNull field Companion: Foo$Companion
|
||||||
inner class Foo$Companion
|
inner class Foo$Companion
|
||||||
static method <clinit>(): void
|
static method <clinit>(): void
|
||||||
private method <init>(p0: java.lang.String): void
|
private method <init>(p0: java.lang.String): void
|
||||||
|
|||||||
Vendored
+1
-1
@@ -12,7 +12,7 @@ public final class Foo$Companion {
|
|||||||
|
|
||||||
@kotlin.Metadata
|
@kotlin.Metadata
|
||||||
public final class Foo {
|
public final class Foo {
|
||||||
public final static field Companion: Foo$Companion
|
public final static @org.jetbrains.annotations.NotNull field Companion: Foo$Companion
|
||||||
inner class Foo$Companion
|
inner class Foo$Companion
|
||||||
static method <clinit>(): void
|
static method <clinit>(): void
|
||||||
private @Ann method <init>(@Ann p0: java.lang.String): void
|
private @Ann method <init>(@Ann p0: java.lang.String): void
|
||||||
|
|||||||
+4
-4
@@ -7,7 +7,7 @@ public final class TestInternalCompanionInClass$Companion {
|
|||||||
|
|
||||||
@kotlin.Metadata
|
@kotlin.Metadata
|
||||||
public final class TestInternalCompanionInClass {
|
public final class TestInternalCompanionInClass {
|
||||||
public final static field Companion: TestInternalCompanionInClass$Companion
|
public final static @org.jetbrains.annotations.NotNull field Companion: TestInternalCompanionInClass$Companion
|
||||||
inner class TestInternalCompanionInClass$Companion
|
inner class TestInternalCompanionInClass$Companion
|
||||||
static method <clinit>(): void
|
static method <clinit>(): void
|
||||||
public method <init>(): void
|
public method <init>(): void
|
||||||
@@ -22,7 +22,7 @@ final class TestPrivateCompanionInClass$Companion {
|
|||||||
|
|
||||||
@kotlin.Metadata
|
@kotlin.Metadata
|
||||||
public final class TestPrivateCompanionInClass {
|
public final class TestPrivateCompanionInClass {
|
||||||
private final static field Companion: TestPrivateCompanionInClass$Companion
|
private final static @org.jetbrains.annotations.NotNull field Companion: TestPrivateCompanionInClass$Companion
|
||||||
inner class TestPrivateCompanionInClass$Companion
|
inner class TestPrivateCompanionInClass$Companion
|
||||||
static method <clinit>(): void
|
static method <clinit>(): void
|
||||||
public method <init>(): void
|
public method <init>(): void
|
||||||
@@ -38,7 +38,7 @@ final class TestPrivateCompanionInInterface$Companion {
|
|||||||
|
|
||||||
@kotlin.Metadata
|
@kotlin.Metadata
|
||||||
public interface TestPrivateCompanionInInterface {
|
public interface TestPrivateCompanionInInterface {
|
||||||
public synthetic final static field Companion: TestPrivateCompanionInInterface$Companion
|
public synthetic final static @org.jetbrains.annotations.NotNull field Companion: TestPrivateCompanionInInterface$Companion
|
||||||
inner class TestPrivateCompanionInInterface$Companion
|
inner class TestPrivateCompanionInInterface$Companion
|
||||||
static method <clinit>(): void
|
static method <clinit>(): void
|
||||||
}
|
}
|
||||||
@@ -52,7 +52,7 @@ public final class TestProtectedCompanionInClass$Companion {
|
|||||||
|
|
||||||
@kotlin.Metadata
|
@kotlin.Metadata
|
||||||
public class TestProtectedCompanionInClass {
|
public class TestProtectedCompanionInClass {
|
||||||
protected final static field Companion: TestProtectedCompanionInClass$Companion
|
protected final static @org.jetbrains.annotations.NotNull field Companion: TestProtectedCompanionInClass$Companion
|
||||||
inner class TestProtectedCompanionInClass$Companion
|
inner class TestProtectedCompanionInClass$Companion
|
||||||
static method <clinit>(): void
|
static method <clinit>(): void
|
||||||
public method <init>(): void
|
public method <init>(): void
|
||||||
|
|||||||
+4
-4
@@ -7,7 +7,7 @@ public final class TestInternalCompanionInClass$Companion {
|
|||||||
|
|
||||||
@kotlin.Metadata
|
@kotlin.Metadata
|
||||||
public final class TestInternalCompanionInClass {
|
public final class TestInternalCompanionInClass {
|
||||||
public final static field Companion: TestInternalCompanionInClass$Companion
|
public final static @org.jetbrains.annotations.NotNull field Companion: TestInternalCompanionInClass$Companion
|
||||||
inner class TestInternalCompanionInClass$Companion
|
inner class TestInternalCompanionInClass$Companion
|
||||||
static method <clinit>(): void
|
static method <clinit>(): void
|
||||||
public method <init>(): void
|
public method <init>(): void
|
||||||
@@ -22,7 +22,7 @@ final class TestPrivateCompanionInClass$Companion {
|
|||||||
|
|
||||||
@kotlin.Metadata
|
@kotlin.Metadata
|
||||||
public final class TestPrivateCompanionInClass {
|
public final class TestPrivateCompanionInClass {
|
||||||
public deprecated final static @java.lang.Deprecated field Companion: TestPrivateCompanionInClass$Companion
|
public deprecated final static @java.lang.Deprecated @org.jetbrains.annotations.NotNull field Companion: TestPrivateCompanionInClass$Companion
|
||||||
inner class TestPrivateCompanionInClass$Companion
|
inner class TestPrivateCompanionInClass$Companion
|
||||||
static method <clinit>(): void
|
static method <clinit>(): void
|
||||||
public method <init>(): void
|
public method <init>(): void
|
||||||
@@ -38,7 +38,7 @@ final class TestPrivateCompanionInInterface$Companion {
|
|||||||
|
|
||||||
@kotlin.Metadata
|
@kotlin.Metadata
|
||||||
public interface TestPrivateCompanionInInterface {
|
public interface TestPrivateCompanionInInterface {
|
||||||
public deprecated final static @java.lang.Deprecated field Companion: TestPrivateCompanionInInterface$Companion
|
public deprecated final static @java.lang.Deprecated @org.jetbrains.annotations.NotNull field Companion: TestPrivateCompanionInInterface$Companion
|
||||||
inner class TestPrivateCompanionInInterface$Companion
|
inner class TestPrivateCompanionInInterface$Companion
|
||||||
static method <clinit>(): void
|
static method <clinit>(): void
|
||||||
}
|
}
|
||||||
@@ -52,7 +52,7 @@ public final class TestProtectedCompanionInClass$Companion {
|
|||||||
|
|
||||||
@kotlin.Metadata
|
@kotlin.Metadata
|
||||||
public class TestProtectedCompanionInClass {
|
public class TestProtectedCompanionInClass {
|
||||||
public deprecated final static @java.lang.Deprecated field Companion: TestProtectedCompanionInClass$Companion
|
public deprecated final static @java.lang.Deprecated @org.jetbrains.annotations.NotNull field Companion: TestProtectedCompanionInClass$Companion
|
||||||
inner class TestProtectedCompanionInClass$Companion
|
inner class TestProtectedCompanionInClass$Companion
|
||||||
static method <clinit>(): void
|
static method <clinit>(): void
|
||||||
public method <init>(): void
|
public method <init>(): void
|
||||||
|
|||||||
Vendored
+1
-1
@@ -8,7 +8,7 @@ public final class Foo$Companion {
|
|||||||
|
|
||||||
@kotlin.Metadata
|
@kotlin.Metadata
|
||||||
public final class Foo {
|
public final class Foo {
|
||||||
public final static field Companion: Foo$Companion
|
public final static @org.jetbrains.annotations.NotNull field Companion: Foo$Companion
|
||||||
private final static field constValInCompanion: int
|
private final static field constValInCompanion: int
|
||||||
private final field x: int
|
private final field x: int
|
||||||
inner class Foo$Companion
|
inner class Foo$Companion
|
||||||
|
|||||||
+2
-2
@@ -19,7 +19,7 @@ public final class ASimpleClass {
|
|||||||
|
|
||||||
@kotlin.Metadata
|
@kotlin.Metadata
|
||||||
public final class BSimpleObject {
|
public final class BSimpleObject {
|
||||||
public final static field INSTANCE: BSimpleObject
|
public final static @org.jetbrains.annotations.NotNull field INSTANCE: BSimpleObject
|
||||||
static method <clinit>(): void
|
static method <clinit>(): void
|
||||||
private method <init>(): void
|
private method <init>(): void
|
||||||
public synthetic static method showSnackbar$default(p0: java.lang.String, p1: int, p2: int, p3: int, p4: java.lang.Object): void
|
public synthetic static method showSnackbar$default(p0: java.lang.String, p1: int, p2: int, p3: int, p4: java.lang.Object): void
|
||||||
@@ -61,7 +61,7 @@ public final class CClassWithCompanion$Companion {
|
|||||||
|
|
||||||
@kotlin.Metadata
|
@kotlin.Metadata
|
||||||
public final class CClassWithCompanion {
|
public final class CClassWithCompanion {
|
||||||
public final static field Companion: CClassWithCompanion$Companion
|
public final static @org.jetbrains.annotations.NotNull field Companion: CClassWithCompanion$Companion
|
||||||
inner class CClassWithCompanion$Companion
|
inner class CClassWithCompanion$Companion
|
||||||
static method <clinit>(): void
|
static method <clinit>(): void
|
||||||
public method <init>(): void
|
public method <init>(): void
|
||||||
|
|||||||
+2
-2
@@ -1,6 +1,6 @@
|
|||||||
@kotlin.Metadata
|
@kotlin.Metadata
|
||||||
public final class AnObject {
|
public final class AnObject {
|
||||||
public final static field INSTANCE: AnObject
|
public final static @org.jetbrains.annotations.NotNull field INSTANCE: AnObject
|
||||||
static method <clinit>(): void
|
static method <clinit>(): void
|
||||||
private method <init>(): void
|
private method <init>(): void
|
||||||
public synthetic static method foo$default(p0: int, p1: int, p2: java.lang.Object): void
|
public synthetic static method foo$default(p0: int, p1: int, p2: java.lang.Object): void
|
||||||
@@ -18,7 +18,7 @@ public final class WithCompanion$Companion {
|
|||||||
|
|
||||||
@kotlin.Metadata
|
@kotlin.Metadata
|
||||||
public final class WithCompanion {
|
public final class WithCompanion {
|
||||||
public final static field Companion: WithCompanion$Companion
|
public final static @org.jetbrains.annotations.NotNull field Companion: WithCompanion$Companion
|
||||||
inner class WithCompanion$Companion
|
inner class WithCompanion$Companion
|
||||||
static method <clinit>(): void
|
static method <clinit>(): void
|
||||||
public method <init>(): void
|
public method <init>(): void
|
||||||
|
|||||||
+2
-2
@@ -14,7 +14,7 @@ public interface test/TopLevel$InnerInterface {
|
|||||||
|
|
||||||
@kotlin.Metadata
|
@kotlin.Metadata
|
||||||
public final class test/TopLevel$InnerObject {
|
public final class test/TopLevel$InnerObject {
|
||||||
public final static field INSTANCE: test.TopLevel$InnerObject
|
public final static @org.jetbrains.annotations.NotNull field INSTANCE: test.TopLevel$InnerObject
|
||||||
inner class test/TopLevel$InnerObject
|
inner class test/TopLevel$InnerObject
|
||||||
private method <init>(): void
|
private method <init>(): void
|
||||||
}
|
}
|
||||||
@@ -36,7 +36,7 @@ public final class test/TopLevel$NestedClass {
|
|||||||
|
|
||||||
@kotlin.Metadata
|
@kotlin.Metadata
|
||||||
public final class test/TopLevel {
|
public final class test/TopLevel {
|
||||||
public final static field Companion: test.TopLevel$Companion
|
public final static @org.jetbrains.annotations.NotNull field Companion: test.TopLevel$Companion
|
||||||
private final static @org.jetbrains.annotations.NotNull field q: java.lang.String
|
private final static @org.jetbrains.annotations.NotNull field q: java.lang.String
|
||||||
private final @org.jetbrains.annotations.NotNull field x: java.lang.String
|
private final @org.jetbrains.annotations.NotNull field x: java.lang.String
|
||||||
private final field y: int
|
private final field y: int
|
||||||
|
|||||||
+2
-2
@@ -1,9 +1,9 @@
|
|||||||
================ Step #1 =================
|
================ Step #1 =================
|
||||||
|
|
||||||
Cleaning output files:
|
Cleaning output files:
|
||||||
|
out/production/module/B.class
|
||||||
out/production/module/META-INF/module.kotlin_module
|
out/production/module/META-INF/module.kotlin_module
|
||||||
out/production/module/test/B.class
|
out/production/module/UseKt.class
|
||||||
out/production/module/test/UseKt.class
|
|
||||||
End of files
|
End of files
|
||||||
Compiling files:
|
Compiling files:
|
||||||
src/B.kt
|
src/B.kt
|
||||||
|
|||||||
+1
-1
@@ -29,7 +29,7 @@ public final class MyClass {
|
|||||||
@AllOpen
|
@AllOpen
|
||||||
@kotlin.Metadata
|
@kotlin.Metadata
|
||||||
public final class Obj {
|
public final class Obj {
|
||||||
public final static field INSTANCE: Obj
|
public final static @org.jetbrains.annotations.NotNull field INSTANCE: Obj
|
||||||
static method <clinit>(): void
|
static method <clinit>(): void
|
||||||
private method <init>(): void
|
private method <init>(): void
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -26,7 +26,7 @@ public abstract class Base_ShouldBeOpen {
|
|||||||
@kotlin.Metadata
|
@kotlin.Metadata
|
||||||
public final class Intf$DefaultImpls {
|
public final class Intf$DefaultImpls {
|
||||||
inner class Intf$DefaultImpls
|
inner class Intf$DefaultImpls
|
||||||
public static method intfMethod(p0: Intf): void
|
public static method intfMethod(@org.jetbrains.annotations.NotNull p0: Intf): void
|
||||||
}
|
}
|
||||||
|
|
||||||
@AllOpen
|
@AllOpen
|
||||||
@@ -47,4 +47,4 @@ public class IntfImpl {
|
|||||||
public class IntfImpl2_ShouldBeOpen {
|
public class IntfImpl2_ShouldBeOpen {
|
||||||
public method <init>(): void
|
public method <init>(): void
|
||||||
public method intfImpl2Method_ShouldBeOpen(): void
|
public method intfImpl2Method_ShouldBeOpen(): void
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ public final class test/BaseClass$Companion {
|
|||||||
}
|
}
|
||||||
@kotlin.Metadata
|
@kotlin.Metadata
|
||||||
public class test/BaseClass {
|
public class test/BaseClass {
|
||||||
public final static field Companion: test.BaseClass$Companion
|
public final static @org.jetbrains.annotations.NotNull field Companion: test.BaseClass$Companion
|
||||||
public final static field basePublicConst: int
|
public final static field basePublicConst: int
|
||||||
inner class test/BaseClass$Companion
|
inner class test/BaseClass$Companion
|
||||||
public method <init>(): void
|
public method <init>(): void
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ public enum E {
|
|||||||
|
|
||||||
@kotlin.Metadata()
|
@kotlin.Metadata()
|
||||||
public static final class Obj {
|
public static final class Obj {
|
||||||
|
@org.jetbrains.annotations.NotNull()
|
||||||
public static final E.Obj INSTANCE = null;
|
public static final E.Obj INSTANCE = null;
|
||||||
|
|
||||||
private Obj() {
|
private Obj() {
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ import java.lang.System;
|
|||||||
|
|
||||||
@kotlin.Metadata()
|
@kotlin.Metadata()
|
||||||
public final class BParceler implements Parceler<B> {
|
public final class BParceler implements Parceler<B> {
|
||||||
|
@org.jetbrains.annotations.NotNull()
|
||||||
public static final BParceler INSTANCE = null;
|
public static final BParceler INSTANCE = null;
|
||||||
|
|
||||||
private BParceler() {
|
private BParceler() {
|
||||||
@@ -42,6 +43,7 @@ import java.lang.System;
|
|||||||
|
|
||||||
@kotlin.Metadata()
|
@kotlin.Metadata()
|
||||||
public final class CParceler implements Parceler<C> {
|
public final class CParceler implements Parceler<C> {
|
||||||
|
@org.jetbrains.annotations.NotNull()
|
||||||
public static final CParceler INSTANCE = null;
|
public static final CParceler INSTANCE = null;
|
||||||
|
|
||||||
private CParceler() {
|
private CParceler() {
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ import java.lang.System;
|
|||||||
*/
|
*/
|
||||||
@kotlin.Metadata()
|
@kotlin.Metadata()
|
||||||
public final class Obj {
|
public final class Obj {
|
||||||
|
@org.jetbrains.annotations.NotNull()
|
||||||
public static final Obj INSTANCE = null;
|
public static final Obj INSTANCE = null;
|
||||||
|
|
||||||
private Obj() {
|
private Obj() {
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ import java.lang.System;
|
|||||||
|
|
||||||
@kotlin.Metadata()
|
@kotlin.Metadata()
|
||||||
public abstract interface Intf {
|
public abstract interface Intf {
|
||||||
|
@org.jetbrains.annotations.NotNull()
|
||||||
public static final Intf.Companion Companion = null;
|
public static final Intf.Companion Companion = null;
|
||||||
public static final int WHITE = 2;
|
public static final int WHITE = 2;
|
||||||
|
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ public final class JvmStaticTest {
|
|||||||
private static final int one = 1;
|
private static final int one = 1;
|
||||||
public static final int two = 2;
|
public static final int two = 2;
|
||||||
public static final char c = 'C';
|
public static final char c = 'C';
|
||||||
|
@org.jetbrains.annotations.NotNull()
|
||||||
public static final JvmStaticTest.Companion Companion = null;
|
public static final JvmStaticTest.Companion Companion = null;
|
||||||
|
|
||||||
public JvmStaticTest() {
|
public JvmStaticTest() {
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import java.lang.System;
|
|||||||
public final class Test {
|
public final class Test {
|
||||||
@org.jetbrains.annotations.NotNull()
|
@org.jetbrains.annotations.NotNull()
|
||||||
private static final java.lang.String test = "";
|
private static final java.lang.String test = "";
|
||||||
|
@org.jetbrains.annotations.NotNull()
|
||||||
public static final Test.A A = null;
|
public static final Test.A A = null;
|
||||||
|
|
||||||
public Test() {
|
public Test() {
|
||||||
|
|||||||
@@ -91,6 +91,7 @@ import java.lang.System;
|
|||||||
public final class JJ {
|
public final class JJ {
|
||||||
@org.jetbrains.annotations.NotNull()
|
@org.jetbrains.annotations.NotNull()
|
||||||
private static final java.lang.String b = null;
|
private static final java.lang.String b = null;
|
||||||
|
@org.jetbrains.annotations.NotNull()
|
||||||
public static final app.JJ INSTANCE = null;
|
public static final app.JJ INSTANCE = null;
|
||||||
|
|
||||||
@org.jetbrains.annotations.NotNull()
|
@org.jetbrains.annotations.NotNull()
|
||||||
|
|||||||
@@ -38,6 +38,7 @@ public final class A {
|
|||||||
|
|
||||||
@kotlin.Metadata()
|
@kotlin.Metadata()
|
||||||
public static final class C {
|
public static final class C {
|
||||||
|
@org.jetbrains.annotations.NotNull()
|
||||||
public static final A.C INSTANCE = null;
|
public static final A.C INSTANCE = null;
|
||||||
|
|
||||||
private C() {
|
private C() {
|
||||||
@@ -150,6 +151,7 @@ public final class Test {
|
|||||||
|
|
||||||
@kotlin.Metadata()
|
@kotlin.Metadata()
|
||||||
public static final class NestedObject {
|
public static final class NestedObject {
|
||||||
|
@org.jetbrains.annotations.NotNull()
|
||||||
public static final Test.NestedObject INSTANCE = null;
|
public static final Test.NestedObject INSTANCE = null;
|
||||||
|
|
||||||
private NestedObject() {
|
private NestedObject() {
|
||||||
|
|||||||
@@ -135,6 +135,7 @@ public final class Foo {
|
|||||||
|
|
||||||
@kotlin.Metadata()
|
@kotlin.Metadata()
|
||||||
public static final class Zoo {
|
public static final class Zoo {
|
||||||
|
@org.jetbrains.annotations.NotNull()
|
||||||
public static final Foo.Bar.Zoo INSTANCE = null;
|
public static final Foo.Bar.Zoo INSTANCE = null;
|
||||||
|
|
||||||
private Zoo() {
|
private Zoo() {
|
||||||
|
|||||||
+1
@@ -139,6 +139,7 @@ public final class Foo {
|
|||||||
|
|
||||||
@kotlin.Metadata()
|
@kotlin.Metadata()
|
||||||
public static final class Zoo {
|
public static final class Zoo {
|
||||||
|
@org.jetbrains.annotations.NotNull()
|
||||||
public static final test.Foo.Bar.Zoo INSTANCE = null;
|
public static final test.Foo.Bar.Zoo INSTANCE = null;
|
||||||
|
|
||||||
private Zoo() {
|
private Zoo() {
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ public final class NonExistentType {
|
|||||||
private static final Function1<ABCDEF, kotlin.Unit> c = null;
|
private static final Function1<ABCDEF, kotlin.Unit> c = null;
|
||||||
@org.jetbrains.annotations.Nullable()
|
@org.jetbrains.annotations.Nullable()
|
||||||
private static final ABCDEF<java.lang.String, Function1<java.util.List<ABCDEF>, kotlin.Unit>> d = null;
|
private static final ABCDEF<java.lang.String, Function1<java.util.List<ABCDEF>, kotlin.Unit>> d = null;
|
||||||
|
@org.jetbrains.annotations.NotNull()
|
||||||
public static final NonExistentType INSTANCE = null;
|
public static final NonExistentType INSTANCE = null;
|
||||||
|
|
||||||
@org.jetbrains.annotations.Nullable()
|
@org.jetbrains.annotations.Nullable()
|
||||||
|
|||||||
+1
@@ -32,6 +32,7 @@ public final class NonExistentType {
|
|||||||
public static error.NonExistentClass coocoo3;
|
public static error.NonExistentClass coocoo3;
|
||||||
@org.jetbrains.annotations.NotNull()
|
@org.jetbrains.annotations.NotNull()
|
||||||
public static error.NonExistentClass coocoo31;
|
public static error.NonExistentClass coocoo31;
|
||||||
|
@org.jetbrains.annotations.NotNull()
|
||||||
public static final NonExistentType INSTANCE = null;
|
public static final NonExistentType INSTANCE = null;
|
||||||
|
|
||||||
@org.jetbrains.annotations.Nullable()
|
@org.jetbrains.annotations.Nullable()
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ public final class PrimitiveTypes {
|
|||||||
public static final java.lang.String stringQuotes = "quotes \" \'\'quotes";
|
public static final java.lang.String stringQuotes = "quotes \" \'\'quotes";
|
||||||
@org.jetbrains.annotations.NotNull()
|
@org.jetbrains.annotations.NotNull()
|
||||||
public static final java.lang.String stringRN = "\r\n";
|
public static final java.lang.String stringRN = "\r\n";
|
||||||
|
@org.jetbrains.annotations.NotNull()
|
||||||
public static final PrimitiveTypes INSTANCE = null;
|
public static final PrimitiveTypes INSTANCE = null;
|
||||||
|
|
||||||
public final float getFloatMaxValue() {
|
public final float getFloatMaxValue() {
|
||||||
|
|||||||
+2
@@ -4,6 +4,7 @@ import java.lang.System;
|
|||||||
public final class Boo {
|
public final class Boo {
|
||||||
@org.jetbrains.annotations.NotNull()
|
@org.jetbrains.annotations.NotNull()
|
||||||
private static final java.lang.String z = null;
|
private static final java.lang.String z = null;
|
||||||
|
@org.jetbrains.annotations.NotNull()
|
||||||
public static final Boo INSTANCE = null;
|
public static final Boo INSTANCE = null;
|
||||||
|
|
||||||
@org.jetbrains.annotations.NotNull()
|
@org.jetbrains.annotations.NotNull()
|
||||||
@@ -49,6 +50,7 @@ public final class Foo {
|
|||||||
private static final java.lang.String j = null;
|
private static final java.lang.String j = null;
|
||||||
@org.jetbrains.annotations.NotNull()
|
@org.jetbrains.annotations.NotNull()
|
||||||
private static final java.lang.String k = null;
|
private static final java.lang.String k = null;
|
||||||
|
@org.jetbrains.annotations.NotNull()
|
||||||
public static final Foo INSTANCE = null;
|
public static final Foo INSTANCE = null;
|
||||||
|
|
||||||
@org.jetbrains.annotations.NotNull()
|
@org.jetbrains.annotations.NotNull()
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ import java.lang.System;
|
|||||||
|
|
||||||
@kotlin.Metadata()
|
@kotlin.Metadata()
|
||||||
public final class Simple {
|
public final class Simple {
|
||||||
|
@org.jetbrains.annotations.NotNull()
|
||||||
public static final test.Simple.Companion Companion = null;
|
public static final test.Simple.Companion Companion = null;
|
||||||
|
|
||||||
@MyAnnotation()
|
@MyAnnotation()
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ public annotation class NoArg
|
|||||||
@NoArg
|
@NoArg
|
||||||
@kotlin.Metadata
|
@kotlin.Metadata
|
||||||
public final class Obj {
|
public final class Obj {
|
||||||
public final static field INSTANCE: Obj
|
public final static @org.jetbrains.annotations.NotNull field INSTANCE: Obj
|
||||||
static method <clinit>(): void
|
static method <clinit>(): void
|
||||||
private method <init>(): void
|
private method <init>(): void
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user