Generate "$kotlinClass"/"$kotlinPackage" reflection fields to every class

Some seemingly irrelevant tests were changed because now there's <clinit> in
almost every class and class initialization begins with executing it
This commit is contained in:
Alexander Udalov
2014-05-20 20:20:53 +04:00
parent 4ef089d2ed
commit 59777e7df6
17 changed files with 99 additions and 41 deletions
@@ -45,6 +45,8 @@ public final class JvmAbi {
public static final String CLASS_OBJECT_FIELD = "object$";
public static final FqName K_OBJECT = new FqName("kotlin.jvm.internal.KObject");
public static final String KOTLIN_CLASS_FIELD_NAME = "$kotlinClass";
public static final String KOTLIN_PACKAGE_FIELD_NAME = "$kotlinPackage";
public static boolean isClassObjectFqName(@NotNull FqName fqName) {
return fqName.lastSegmentIs(Name.identifier(CLASS_OBJECT_CLASS_NAME));