diff options
Diffstat (limited to 'test/cuchaz/enigma/TestEntryFactory.java')
| -rw-r--r-- | test/cuchaz/enigma/TestEntryFactory.java | 67 |
1 files changed, 0 insertions, 67 deletions
diff --git a/test/cuchaz/enigma/TestEntryFactory.java b/test/cuchaz/enigma/TestEntryFactory.java deleted file mode 100644 index 4aa773b..0000000 --- a/test/cuchaz/enigma/TestEntryFactory.java +++ /dev/null | |||
| @@ -1,67 +0,0 @@ | |||
| 1 | /******************************************************************************* | ||
| 2 | * Copyright (c) 2015 Jeff Martin. | ||
| 3 | * All rights reserved. This program and the accompanying materials | ||
| 4 | * are made available under the terms of the GNU Lesser General Public | ||
| 5 | * License v3.0 which accompanies this distribution, and is available at | ||
| 6 | * http://www.gnu.org/licenses/lgpl.html | ||
| 7 | * | ||
| 8 | * Contributors: | ||
| 9 | * Jeff Martin - initial API and implementation | ||
| 10 | ******************************************************************************/ | ||
| 11 | package cuchaz.enigma; | ||
| 12 | |||
| 13 | import cuchaz.enigma.analysis.EntryReference; | ||
| 14 | import cuchaz.enigma.mapping.BehaviorEntry; | ||
| 15 | import cuchaz.enigma.mapping.ClassEntry; | ||
| 16 | import cuchaz.enigma.mapping.ConstructorEntry; | ||
| 17 | import cuchaz.enigma.mapping.FieldEntry; | ||
| 18 | import cuchaz.enigma.mapping.MethodEntry; | ||
| 19 | import cuchaz.enigma.mapping.Signature; | ||
| 20 | import cuchaz.enigma.mapping.Type; | ||
| 21 | |||
| 22 | public class TestEntryFactory { | ||
| 23 | |||
| 24 | public static ClassEntry newClass(String name) { | ||
| 25 | return new ClassEntry(name); | ||
| 26 | } | ||
| 27 | |||
| 28 | public static FieldEntry newField(String className, String fieldName, String fieldType) { | ||
| 29 | return newField(newClass(className), fieldName, fieldType); | ||
| 30 | } | ||
| 31 | |||
| 32 | public static FieldEntry newField(ClassEntry classEntry, String fieldName, String fieldType) { | ||
| 33 | return new FieldEntry(classEntry, fieldName, new Type(fieldType)); | ||
| 34 | } | ||
| 35 | |||
| 36 | public static MethodEntry newMethod(String className, String methodName, String methodSignature) { | ||
| 37 | return newMethod(newClass(className), methodName, methodSignature); | ||
| 38 | } | ||
| 39 | |||
| 40 | public static MethodEntry newMethod(ClassEntry classEntry, String methodName, String methodSignature) { | ||
| 41 | return new MethodEntry(classEntry, methodName, new Signature(methodSignature)); | ||
| 42 | } | ||
| 43 | |||
| 44 | public static ConstructorEntry newConstructor(String className, String signature) { | ||
| 45 | return newConstructor(newClass(className), signature); | ||
| 46 | } | ||
| 47 | |||
| 48 | public static ConstructorEntry newConstructor(ClassEntry classEntry, String signature) { | ||
| 49 | return new ConstructorEntry(classEntry, new Signature(signature)); | ||
| 50 | } | ||
| 51 | |||
| 52 | public static EntryReference<FieldEntry,BehaviorEntry> newFieldReferenceByMethod(FieldEntry fieldEntry, String callerClassName, String callerName, String callerSignature) { | ||
| 53 | return new EntryReference<FieldEntry,BehaviorEntry>(fieldEntry, "", newMethod(callerClassName, callerName, callerSignature)); | ||
| 54 | } | ||
| 55 | |||
| 56 | public static EntryReference<FieldEntry,BehaviorEntry> newFieldReferenceByConstructor(FieldEntry fieldEntry, String callerClassName, String callerSignature) { | ||
| 57 | return new EntryReference<FieldEntry,BehaviorEntry>(fieldEntry, "", newConstructor(callerClassName, callerSignature)); | ||
| 58 | } | ||
| 59 | |||
| 60 | public static EntryReference<BehaviorEntry,BehaviorEntry> newBehaviorReferenceByMethod(BehaviorEntry behaviorEntry, String callerClassName, String callerName, String callerSignature) { | ||
| 61 | return new EntryReference<BehaviorEntry,BehaviorEntry>(behaviorEntry, "", newMethod(callerClassName, callerName, callerSignature)); | ||
| 62 | } | ||
| 63 | |||
| 64 | public static EntryReference<BehaviorEntry,BehaviorEntry> newBehaviorReferenceByConstructor(BehaviorEntry behaviorEntry, String callerClassName, String callerSignature) { | ||
| 65 | return new EntryReference<BehaviorEntry,BehaviorEntry>(behaviorEntry, "", newConstructor(callerClassName, callerSignature)); | ||
| 66 | } | ||
| 67 | } | ||