summaryrefslogtreecommitdiff
path: root/src/main/java/cuchaz/enigma/analysis/JarIndex.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/cuchaz/enigma/analysis/JarIndex.java')
-rw-r--r--src/main/java/cuchaz/enigma/analysis/JarIndex.java14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/main/java/cuchaz/enigma/analysis/JarIndex.java b/src/main/java/cuchaz/enigma/analysis/JarIndex.java
index 54dd506..3479c5d 100644
--- a/src/main/java/cuchaz/enigma/analysis/JarIndex.java
+++ b/src/main/java/cuchaz/enigma/analysis/JarIndex.java
@@ -61,7 +61,7 @@ public class JarIndex {
61 jar.visit(node -> node.accept(new IndexClassVisitor(this, Opcodes.ASM5))); 61 jar.visit(node -> node.accept(new IndexClassVisitor(this, Opcodes.ASM5)));
62 62
63 // step 3: index field, method, constructor references 63 // step 3: index field, method, constructor references
64 jar.visit(node -> node.accept(new IndexReferenceVisitor(this, entryPool, Opcodes.ASM5))); 64 jar.visit(node -> node.accept(new IndexReferenceVisitor(this, Opcodes.ASM5)));
65 65
66 // step 4: index bridged methods 66 // step 4: index bridged methods
67 for (MethodDefEntry methodEntry : methods.values()) { 67 for (MethodDefEntry methodEntry : methods.values()) {
@@ -95,24 +95,24 @@ public class JarIndex {
95 } 95 }
96 } 96 }
97 97
98 protected ClassDefEntry indexClass(int access, String name, String superName, String[] interfaces) { 98 protected ClassDefEntry indexClass(int access, String name, String signature, String superName, String[] interfaces) {
99 for (String interfaceName : interfaces) { 99 for (String interfaceName : interfaces) {
100 if (name.equals(interfaceName)) { 100 if (name.equals(interfaceName)) {
101 throw new IllegalArgumentException("Class cannot be its own interface! " + name); 101 throw new IllegalArgumentException("Class cannot be its own interface! " + name);
102 } 102 }
103 } 103 }
104 return this.translationIndex.indexClass(access, name, superName, interfaces); 104 return this.translationIndex.indexClass(access, name, signature, superName, interfaces);
105 } 105 }
106 106
107 protected void indexField(ClassDefEntry owner, int access, String name, String desc) { 107 protected void indexField(ClassDefEntry owner, int access, String name, String desc, String signature) {
108 FieldDefEntry fieldEntry = new FieldDefEntry(owner, name, new TypeDescriptor(desc), new AccessFlags(access)); 108 FieldDefEntry fieldEntry = new FieldDefEntry(owner, name, new TypeDescriptor(desc), Signature.createTypedSignature(signature), new AccessFlags(access));
109 this.translationIndex.indexField(fieldEntry); 109 this.translationIndex.indexField(fieldEntry);
110 this.access.put(fieldEntry, Access.get(access)); 110 this.access.put(fieldEntry, Access.get(access));
111 this.fields.put(fieldEntry.getOwnerClassEntry(), fieldEntry); 111 this.fields.put(fieldEntry.getOwnerClassEntry(), fieldEntry);
112 } 112 }
113 113
114 protected void indexMethod(ClassDefEntry owner, int access, String name, String desc) { 114 protected void indexMethod(ClassDefEntry owner, int access, String name, String desc, String signature) {
115 MethodDefEntry methodEntry = new MethodDefEntry(owner, name, new MethodDescriptor(desc), new AccessFlags(access)); 115 MethodDefEntry methodEntry = new MethodDefEntry(owner, name, new MethodDescriptor(desc), Signature.createSignature(signature), new AccessFlags(access));
116 this.translationIndex.indexMethod(methodEntry); 116 this.translationIndex.indexMethod(methodEntry);
117 this.access.put(methodEntry, Access.get(access)); 117 this.access.put(methodEntry, Access.get(access));
118 this.methods.put(methodEntry.getOwnerClassEntry(), methodEntry); 118 this.methods.put(methodEntry.getOwnerClassEntry(), methodEntry);