diff options
Diffstat (limited to 'src/cuchaz/enigma/mapping/EntryFactory.java')
| -rw-r--r-- | src/cuchaz/enigma/mapping/EntryFactory.java | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/src/cuchaz/enigma/mapping/EntryFactory.java b/src/cuchaz/enigma/mapping/EntryFactory.java index 69c1630..af96eb3 100644 --- a/src/cuchaz/enigma/mapping/EntryFactory.java +++ b/src/cuchaz/enigma/mapping/EntryFactory.java | |||
| @@ -11,9 +11,6 @@ import javassist.expr.FieldAccess; | |||
| 11 | import javassist.expr.MethodCall; | 11 | import javassist.expr.MethodCall; |
| 12 | import javassist.expr.NewExpr; | 12 | import javassist.expr.NewExpr; |
| 13 | 13 | ||
| 14 | import com.strobel.assembler.metadata.FieldDefinition; | ||
| 15 | import com.strobel.assembler.metadata.MethodDefinition; | ||
| 16 | |||
| 17 | import cuchaz.enigma.analysis.JarIndex; | 14 | import cuchaz.enigma.analysis.JarIndex; |
| 18 | 15 | ||
| 19 | public class EntryFactory { | 16 | public class EntryFactory { |
| @@ -55,14 +52,6 @@ public class EntryFactory { | |||
| 55 | ); | 52 | ); |
| 56 | } | 53 | } |
| 57 | 54 | ||
| 58 | public static FieldEntry getFieldEntry(FieldDefinition def) { | ||
| 59 | return new FieldEntry( | ||
| 60 | new ClassEntry(def.getDeclaringType().getInternalName()), | ||
| 61 | def.getName(), | ||
| 62 | new Type(def.getErasedSignature()) | ||
| 63 | ); | ||
| 64 | } | ||
| 65 | |||
| 66 | public static FieldEntry getFieldEntry(String className, String name, String type) { | 55 | public static FieldEntry getFieldEntry(String className, String name, String type) { |
| 67 | return new FieldEntry(new ClassEntry(className), name, new Type(type)); | 56 | return new FieldEntry(new ClassEntry(className), name, new Type(type)); |
| 68 | } | 57 | } |
| @@ -91,14 +80,6 @@ public class EntryFactory { | |||
| 91 | ); | 80 | ); |
| 92 | } | 81 | } |
| 93 | 82 | ||
| 94 | public static MethodEntry getMethodEntry(MethodDefinition def) { | ||
| 95 | return new MethodEntry( | ||
| 96 | new ClassEntry(def.getDeclaringType().getInternalName()), | ||
| 97 | def.getName(), | ||
| 98 | new Signature(def.getErasedSignature()) | ||
| 99 | ); | ||
| 100 | } | ||
| 101 | |||
| 102 | public static ConstructorEntry getConstructorEntry(CtConstructor constructor) { | 83 | public static ConstructorEntry getConstructorEntry(CtConstructor constructor) { |
| 103 | if (constructor.isClassInitializer()) { | 84 | if (constructor.isClassInitializer()) { |
| 104 | return new ConstructorEntry( | 85 | return new ConstructorEntry( |
| @@ -126,19 +107,6 @@ public class EntryFactory { | |||
| 126 | ); | 107 | ); |
| 127 | } | 108 | } |
| 128 | 109 | ||
| 129 | public static ConstructorEntry getConstructorEntry(MethodDefinition def) { | ||
| 130 | if (def.isTypeInitializer()) { | ||
| 131 | return new ConstructorEntry( | ||
| 132 | new ClassEntry(def.getDeclaringType().getInternalName()) | ||
| 133 | ); | ||
| 134 | } else { | ||
| 135 | return new ConstructorEntry( | ||
| 136 | new ClassEntry(def.getDeclaringType().getInternalName()), | ||
| 137 | new Signature(def.getErasedSignature()) | ||
| 138 | ); | ||
| 139 | } | ||
| 140 | } | ||
| 141 | |||
| 142 | public static BehaviorEntry getBehaviorEntry(CtBehavior behavior) { | 110 | public static BehaviorEntry getBehaviorEntry(CtBehavior behavior) { |
| 143 | if (behavior instanceof CtMethod) { | 111 | if (behavior instanceof CtMethod) { |
| 144 | return getMethodEntry((CtMethod)behavior); | 112 | return getMethodEntry((CtMethod)behavior); |
| @@ -178,14 +146,6 @@ public class EntryFactory { | |||
| 178 | } | 146 | } |
| 179 | } | 147 | } |
| 180 | 148 | ||
| 181 | public static BehaviorEntry getBehaviorEntry(MethodDefinition def) { | ||
| 182 | if (def.isConstructor() || def.isTypeInitializer()) { | ||
| 183 | return getConstructorEntry(def); | ||
| 184 | } else { | ||
| 185 | return getMethodEntry(def); | ||
| 186 | } | ||
| 187 | } | ||
| 188 | |||
| 189 | public static BehaviorEntry getObfBehaviorEntry(ClassEntry classEntry, MethodMapping methodMapping) { | 149 | public static BehaviorEntry getObfBehaviorEntry(ClassEntry classEntry, MethodMapping methodMapping) { |
| 190 | return getBehaviorEntry(classEntry, methodMapping.getObfName(), methodMapping.getObfSignature()); | 150 | return getBehaviorEntry(classEntry, methodMapping.getObfName(), methodMapping.getObfSignature()); |
| 191 | } | 151 | } |