summaryrefslogtreecommitdiff
path: root/src/cuchaz/enigma/mapping/EntryFactory.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/cuchaz/enigma/mapping/EntryFactory.java')
-rw-r--r--src/cuchaz/enigma/mapping/EntryFactory.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/cuchaz/enigma/mapping/EntryFactory.java b/src/cuchaz/enigma/mapping/EntryFactory.java
index 333bb09b..7bc61839 100644
--- a/src/cuchaz/enigma/mapping/EntryFactory.java
+++ b/src/cuchaz/enigma/mapping/EntryFactory.java
@@ -138,6 +138,10 @@ public class EntryFactory {
138 public static BehaviorEntry getBehaviorEntry(String className, String behaviorName, String behaviorSignature) { 138 public static BehaviorEntry getBehaviorEntry(String className, String behaviorName, String behaviorSignature) {
139 return getBehaviorEntry(new ClassEntry(className), behaviorName, new Signature(behaviorSignature)); 139 return getBehaviorEntry(new ClassEntry(className), behaviorName, new Signature(behaviorSignature));
140 } 140 }
141
142 public static BehaviorEntry getBehaviorEntry(String className, String behaviorName) {
143 return getBehaviorEntry(new ClassEntry(className), behaviorName);
144 }
141 145
142 public static BehaviorEntry getBehaviorEntry(ClassEntry classEntry, String behaviorName, Signature behaviorSignature) { 146 public static BehaviorEntry getBehaviorEntry(ClassEntry classEntry, String behaviorName, Signature behaviorSignature) {
143 if (behaviorName.equals("<init>")) { 147 if (behaviorName.equals("<init>")) {
@@ -149,6 +153,14 @@ public class EntryFactory {
149 } 153 }
150 } 154 }
151 155
156 public static BehaviorEntry getBehaviorEntry(ClassEntry classEntry, String behaviorName) {
157 if(behaviorName.equals("<clinit>")) {
158 return new ConstructorEntry(classEntry);
159 } else {
160 throw new IllegalArgumentException("Only class initializers don't have signatures");
161 }
162 }
163
152 public static BehaviorEntry getBehaviorEntry(MethodDefinition def) { 164 public static BehaviorEntry getBehaviorEntry(MethodDefinition def) {
153 if (def.isConstructor() || def.isTypeInitializer()) { 165 if (def.isConstructor() || def.isTypeInitializer()) {
154 return getConstructorEntry(def); 166 return getConstructorEntry(def);