Serialize descriptors for local/anonymous classes on JVM
Reflection needs this information to work for local classes and anonymous objects
This commit is contained in:
@@ -23,5 +23,18 @@ import java.lang.annotation.RetentionPolicy;
|
||||
public @interface KotlinClass {
|
||||
int abiVersion();
|
||||
|
||||
Kind kind();
|
||||
|
||||
String[] data();
|
||||
|
||||
enum Kind {
|
||||
CLASS,
|
||||
|
||||
/**
|
||||
* A class has this kind if and only if its first non-class container is not a package.
|
||||
*/
|
||||
LOCAL_CLASS,
|
||||
|
||||
ANONYMOUS_OBJECT,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,8 +25,7 @@ public @interface KotlinSyntheticClass {
|
||||
|
||||
Kind kind();
|
||||
|
||||
// Inner classes of local classes have kind LOCAL_CLASS
|
||||
public static enum Kind {
|
||||
enum Kind {
|
||||
PACKAGE_PART,
|
||||
TRAIT_IMPL,
|
||||
LOCAL_TRAIT_IMPL,
|
||||
@@ -35,7 +34,5 @@ public @interface KotlinSyntheticClass {
|
||||
CALLABLE_REFERENCE_WRAPPER,
|
||||
LOCAL_FUNCTION,
|
||||
ANONYMOUS_FUNCTION,
|
||||
LOCAL_CLASS,
|
||||
ANONYMOUS_OBJECT,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user