Read package name in KotlinClassHeader and use it in decompiler
(cherry picked from commit 119d5ab)
This commit is contained in:
+2
-1
@@ -30,7 +30,8 @@ class KotlinClassHeader(
|
||||
val incompatibleData: Array<String>?,
|
||||
val strings: Array<String>?,
|
||||
val extraString: String?,
|
||||
val extraInt: Int
|
||||
val extraInt: Int,
|
||||
val packageName: String?
|
||||
) {
|
||||
// See kotlin.Metadata
|
||||
enum class Kind(val id: Int) {
|
||||
|
||||
+8
-1
@@ -52,6 +52,7 @@ public class ReadKotlinClassHeaderAnnotationVisitor implements AnnotationVisitor
|
||||
private JvmBytecodeBinaryVersion bytecodeVersion = null;
|
||||
private String extraString = null;
|
||||
private int extraInt = 0;
|
||||
private String packageName = null;
|
||||
private String[] data = null;
|
||||
private String[] strings = null;
|
||||
private String[] incompatibleData = null;
|
||||
@@ -84,7 +85,8 @@ public class ReadKotlinClassHeaderAnnotationVisitor implements AnnotationVisitor
|
||||
incompatibleData,
|
||||
strings,
|
||||
extraString,
|
||||
extraInt
|
||||
extraInt,
|
||||
packageName
|
||||
);
|
||||
}
|
||||
|
||||
@@ -153,6 +155,11 @@ public class ReadKotlinClassHeaderAnnotationVisitor implements AnnotationVisitor
|
||||
extraInt = (Integer) value;
|
||||
}
|
||||
}
|
||||
else if (METADATA_PACKAGE_NAME_FIELD_NAME.equals(string)) {
|
||||
if (value instanceof String) {
|
||||
packageName = (String) value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user