diff options
| author | 2020-06-03 13:39:42 -0400 | |
|---|---|---|
| committer | 2020-06-03 18:39:42 +0100 | |
| commit | 0f47403d0220757fed189b76e2071e25b1025cb8 (patch) | |
| tree | 879bf72c4476f0a5e0d82da99d7ff2b2276bcaca /src/test/java/cuchaz/enigma/TestEntryFactory.java | |
| parent | Fix search dialog hanging for a short time sometimes (#250) (diff) | |
| download | enigma-fork-0f47403d0220757fed189b76e2071e25b1025cb8.tar.gz enigma-fork-0f47403d0220757fed189b76e2071e25b1025cb8.tar.xz enigma-fork-0f47403d0220757fed189b76e2071e25b1025cb8.zip | |
Split GUI code to separate module (#242)
* Split into modules
* Post merge compile fixes
Co-authored-by: modmuss50 <modmuss50@gmail.com>
Diffstat (limited to 'src/test/java/cuchaz/enigma/TestEntryFactory.java')
| -rw-r--r-- | src/test/java/cuchaz/enigma/TestEntryFactory.java | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/src/test/java/cuchaz/enigma/TestEntryFactory.java b/src/test/java/cuchaz/enigma/TestEntryFactory.java deleted file mode 100644 index 9e1425a..0000000 --- a/src/test/java/cuchaz/enigma/TestEntryFactory.java +++ /dev/null | |||
| @@ -1,49 +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 | |||
| 12 | package cuchaz.enigma; | ||
| 13 | |||
| 14 | import cuchaz.enigma.analysis.EntryReference; | ||
| 15 | import cuchaz.enigma.translation.representation.*; | ||
| 16 | import cuchaz.enigma.translation.representation.entry.ClassEntry; | ||
| 17 | import cuchaz.enigma.translation.representation.entry.FieldEntry; | ||
| 18 | import cuchaz.enigma.translation.representation.entry.MethodEntry; | ||
| 19 | |||
| 20 | public class TestEntryFactory { | ||
| 21 | |||
| 22 | public static ClassEntry newClass(String name) { | ||
| 23 | return new ClassEntry(name); | ||
| 24 | } | ||
| 25 | |||
| 26 | public static FieldEntry newField(String className, String fieldName, String fieldType) { | ||
| 27 | return newField(newClass(className), fieldName, fieldType); | ||
| 28 | } | ||
| 29 | |||
| 30 | public static FieldEntry newField(ClassEntry classEntry, String fieldName, String fieldType) { | ||
| 31 | return new FieldEntry(classEntry, fieldName, new TypeDescriptor(fieldType)); | ||
| 32 | } | ||
| 33 | |||
| 34 | public static MethodEntry newMethod(String className, String methodName, String methodSignature) { | ||
| 35 | return newMethod(newClass(className), methodName, methodSignature); | ||
| 36 | } | ||
| 37 | |||
| 38 | public static MethodEntry newMethod(ClassEntry classEntry, String methodName, String methodSignature) { | ||
| 39 | return new MethodEntry(classEntry, methodName, new MethodDescriptor(methodSignature)); | ||
| 40 | } | ||
| 41 | |||
| 42 | public static EntryReference<FieldEntry, MethodEntry> newFieldReferenceByMethod(FieldEntry fieldEntry, String callerClassName, String callerName, String callerSignature) { | ||
| 43 | return new EntryReference<>(fieldEntry, "", newMethod(callerClassName, callerName, callerSignature)); | ||
| 44 | } | ||
| 45 | |||
| 46 | public static EntryReference<MethodEntry, MethodEntry> newBehaviorReferenceByMethod(MethodEntry methodEntry, String callerClassName, String callerName, String callerSignature) { | ||
| 47 | return new EntryReference<>(methodEntry, "", newMethod(callerClassName, callerName, callerSignature)); | ||
| 48 | } | ||
| 49 | } | ||