summaryrefslogtreecommitdiff
path: root/src/test/java/cuchaz/enigma/inputs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/java/cuchaz/enigma/inputs')
-rw-r--r--src/test/java/cuchaz/enigma/inputs/Keep.java3
-rw-r--r--src/test/java/cuchaz/enigma/inputs/constructors/BaseClass.java7
-rw-r--r--src/test/java/cuchaz/enigma/inputs/constructors/Caller.java17
-rw-r--r--src/test/java/cuchaz/enigma/inputs/constructors/DefaultConstructable.java3
-rw-r--r--src/test/java/cuchaz/enigma/inputs/constructors/SubClass.java11
-rw-r--r--src/test/java/cuchaz/enigma/inputs/constructors/SubSubClass.java5
-rw-r--r--src/test/java/cuchaz/enigma/inputs/inheritanceTree/BaseClass.java11
-rw-r--r--src/test/java/cuchaz/enigma/inputs/inheritanceTree/SubclassA.java5
-rw-r--r--src/test/java/cuchaz/enigma/inputs/inheritanceTree/SubclassB.java13
-rw-r--r--src/test/java/cuchaz/enigma/inputs/inheritanceTree/SubsubclassAA.java9
-rw-r--r--src/test/java/cuchaz/enigma/inputs/innerClasses/A_Anonymous.java5
-rw-r--r--src/test/java/cuchaz/enigma/inputs/innerClasses/B_AnonymousWithScopeArgs.java5
-rw-r--r--src/test/java/cuchaz/enigma/inputs/innerClasses/C_ConstructorArgs.java21
-rw-r--r--src/test/java/cuchaz/enigma/inputs/innerClasses/D_Simple.java5
-rw-r--r--src/test/java/cuchaz/enigma/inputs/innerClasses/E_AnonymousWithOuterAccess.java9
-rw-r--r--src/test/java/cuchaz/enigma/inputs/innerClasses/F_ClassTree.java16
-rw-r--r--src/test/java/cuchaz/enigma/inputs/loneClass/LoneClass.java9
-rw-r--r--src/test/java/cuchaz/enigma/inputs/translation/A_Basic.java13
-rw-r--r--src/test/java/cuchaz/enigma/inputs/translation/B_BaseClass.java9
-rw-r--r--src/test/java/cuchaz/enigma/inputs/translation/C_SubClass.java9
-rw-r--r--src/test/java/cuchaz/enigma/inputs/translation/D_AnonymousTesting.java5
-rw-r--r--src/test/java/cuchaz/enigma/inputs/translation/E_Bridges.java4
-rw-r--r--src/test/java/cuchaz/enigma/inputs/translation/F_ObjectMethods.java7
-rw-r--r--src/test/java/cuchaz/enigma/inputs/translation/G_OuterClass.java18
-rw-r--r--src/test/java/cuchaz/enigma/inputs/translation/H_NamelessClass.java20
-rw-r--r--src/test/java/cuchaz/enigma/inputs/translation/I_Generics.java22
26 files changed, 142 insertions, 119 deletions
diff --git a/src/test/java/cuchaz/enigma/inputs/Keep.java b/src/test/java/cuchaz/enigma/inputs/Keep.java
index f04875f..4dbe8e2 100644
--- a/src/test/java/cuchaz/enigma/inputs/Keep.java
+++ b/src/test/java/cuchaz/enigma/inputs/Keep.java
@@ -4,10 +4,11 @@
4 * are made available under the terms of the GNU Lesser General Public 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 5 * License v3.0 which accompanies this distribution, and is available at
6 * http://www.gnu.org/licenses/lgpl.html 6 * http://www.gnu.org/licenses/lgpl.html
7 * 7 *
8 * Contributors: 8 * Contributors:
9 * Jeff Martin - initial API and implementation 9 * Jeff Martin - initial API and implementation
10 ******************************************************************************/ 10 ******************************************************************************/
11
11package cuchaz.enigma.inputs; 12package cuchaz.enigma.inputs;
12 13
13public class Keep { 14public class Keep {
diff --git a/src/test/java/cuchaz/enigma/inputs/constructors/BaseClass.java b/src/test/java/cuchaz/enigma/inputs/constructors/BaseClass.java
index ad5e950..f07e1f8 100644
--- a/src/test/java/cuchaz/enigma/inputs/constructors/BaseClass.java
+++ b/src/test/java/cuchaz/enigma/inputs/constructors/BaseClass.java
@@ -4,20 +4,21 @@
4 * are made available under the terms of the GNU Lesser General Public 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 5 * License v3.0 which accompanies this distribution, and is available at
6 * http://www.gnu.org/licenses/lgpl.html 6 * http://www.gnu.org/licenses/lgpl.html
7 * 7 *
8 * Contributors: 8 * Contributors:
9 * Jeff Martin - initial API and implementation 9 * Jeff Martin - initial API and implementation
10 ******************************************************************************/ 10 ******************************************************************************/
11
11package cuchaz.enigma.inputs.constructors; 12package cuchaz.enigma.inputs.constructors;
12 13
13// a 14// a
14public class BaseClass { 15public class BaseClass {
15 16
16 // <init>()V 17 // <init>()V
17 public BaseClass() { 18 public BaseClass() {
18 System.out.println("Default constructor"); 19 System.out.println("Default constructor");
19 } 20 }
20 21
21 // <init>(I)V 22 // <init>(I)V
22 public BaseClass(int i) { 23 public BaseClass(int i) {
23 System.out.println("Int constructor " + i); 24 System.out.println("Int constructor " + i);
diff --git a/src/test/java/cuchaz/enigma/inputs/constructors/Caller.java b/src/test/java/cuchaz/enigma/inputs/constructors/Caller.java
index dcd9617..71439fd 100644
--- a/src/test/java/cuchaz/enigma/inputs/constructors/Caller.java
+++ b/src/test/java/cuchaz/enigma/inputs/constructors/Caller.java
@@ -4,51 +4,52 @@
4 * are made available under the terms of the GNU Lesser General Public 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 5 * License v3.0 which accompanies this distribution, and is available at
6 * http://www.gnu.org/licenses/lgpl.html 6 * http://www.gnu.org/licenses/lgpl.html
7 * 7 *
8 * Contributors: 8 * Contributors:
9 * Jeff Martin - initial API and implementation 9 * Jeff Martin - initial API and implementation
10 ******************************************************************************/ 10 ******************************************************************************/
11
11package cuchaz.enigma.inputs.constructors; 12package cuchaz.enigma.inputs.constructors;
12 13
13// b 14// b
14public class Caller { 15public class Caller {
15 16
16 // a()V 17 // a()V
17 public void callBaseDefault() { 18 public void callBaseDefault() {
18 // a.<init>()V 19 // a.<init>()V
19 System.out.println(new BaseClass()); 20 System.out.println(new BaseClass());
20 } 21 }
21 22
22 // b()V 23 // b()V
23 public void callBaseInt() { 24 public void callBaseInt() {
24 // a.<init>(I)V 25 // a.<init>(I)V
25 System.out.println(new BaseClass(5)); 26 System.out.println(new BaseClass(5));
26 } 27 }
27 28
28 // c()V 29 // c()V
29 public void callSubDefault() { 30 public void callSubDefault() {
30 // d.<init>()V 31 // d.<init>()V
31 System.out.println(new SubClass()); 32 System.out.println(new SubClass());
32 } 33 }
33 34
34 // d()V 35 // d()V
35 public void callSubInt() { 36 public void callSubInt() {
36 // d.<init>(I)V 37 // d.<init>(I)V
37 System.out.println(new SubClass(6)); 38 System.out.println(new SubClass(6));
38 } 39 }
39 40
40 // e()V 41 // e()V
41 public void callSubIntInt() { 42 public void callSubIntInt() {
42 // d.<init>(II)V 43 // d.<init>(II)V
43 System.out.println(new SubClass(4, 2)); 44 System.out.println(new SubClass(4, 2));
44 } 45 }
45 46
46 // f()V 47 // f()V
47 public void callSubSubInt() { 48 public void callSubSubInt() {
48 // e.<init>(I)V 49 // e.<init>(I)V
49 System.out.println(new SubSubClass(3)); 50 System.out.println(new SubSubClass(3));
50 } 51 }
51 52
52 // g()V 53 // g()V
53 public void callDefaultConstructable() { 54 public void callDefaultConstructable() {
54 // c.<init>()V 55 // c.<init>()V
diff --git a/src/test/java/cuchaz/enigma/inputs/constructors/DefaultConstructable.java b/src/test/java/cuchaz/enigma/inputs/constructors/DefaultConstructable.java
index 655f4da..c3d4170 100644
--- a/src/test/java/cuchaz/enigma/inputs/constructors/DefaultConstructable.java
+++ b/src/test/java/cuchaz/enigma/inputs/constructors/DefaultConstructable.java
@@ -4,10 +4,11 @@
4 * are made available under the terms of the GNU Lesser General Public 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 5 * License v3.0 which accompanies this distribution, and is available at
6 * http://www.gnu.org/licenses/lgpl.html 6 * http://www.gnu.org/licenses/lgpl.html
7 * 7 *
8 * Contributors: 8 * Contributors:
9 * Jeff Martin - initial API and implementation 9 * Jeff Martin - initial API and implementation
10 ******************************************************************************/ 10 ******************************************************************************/
11
11package cuchaz.enigma.inputs.constructors; 12package cuchaz.enigma.inputs.constructors;
12 13
13public class DefaultConstructable { 14public class DefaultConstructable {
diff --git a/src/test/java/cuchaz/enigma/inputs/constructors/SubClass.java b/src/test/java/cuchaz/enigma/inputs/constructors/SubClass.java
index b2934a2..bc56b3b 100644
--- a/src/test/java/cuchaz/enigma/inputs/constructors/SubClass.java
+++ b/src/test/java/cuchaz/enigma/inputs/constructors/SubClass.java
@@ -4,33 +4,34 @@
4 * are made available under the terms of the GNU Lesser General Public 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 5 * License v3.0 which accompanies this distribution, and is available at
6 * http://www.gnu.org/licenses/lgpl.html 6 * http://www.gnu.org/licenses/lgpl.html
7 * 7 *
8 * Contributors: 8 * Contributors:
9 * Jeff Martin - initial API and implementation 9 * Jeff Martin - initial API and implementation
10 ******************************************************************************/ 10 ******************************************************************************/
11
11package cuchaz.enigma.inputs.constructors; 12package cuchaz.enigma.inputs.constructors;
12 13
13// d extends a 14// d extends a
14public class SubClass extends BaseClass { 15public class SubClass extends BaseClass {
15 16
16 // <init>()V 17 // <init>()V
17 public SubClass() { 18 public SubClass() {
18 // a.<init>()V 19 // a.<init>()V
19 } 20 }
20 21
21 // <init>(I)V 22 // <init>(I)V
22 public SubClass(int num) { 23 public SubClass(int num) {
23 // <init>()V 24 // <init>()V
24 this(); 25 this();
25 System.out.println("SubClass " + num); 26 System.out.println("SubClass " + num);
26 } 27 }
27 28
28 // <init>(II)V 29 // <init>(II)V
29 public SubClass(int a, int b) { 30 public SubClass(int a, int b) {
30 // <init>(I)V 31 // <init>(I)V
31 this(a + b); 32 this(a + b);
32 } 33 }
33 34
34 // <init>(III)V 35 // <init>(III)V
35 public SubClass(int a, int b, int c) { 36 public SubClass(int a, int b, int c) {
36 // a.<init>()V 37 // a.<init>()V
diff --git a/src/test/java/cuchaz/enigma/inputs/constructors/SubSubClass.java b/src/test/java/cuchaz/enigma/inputs/constructors/SubSubClass.java
index c1725fe..87b69d3 100644
--- a/src/test/java/cuchaz/enigma/inputs/constructors/SubSubClass.java
+++ b/src/test/java/cuchaz/enigma/inputs/constructors/SubSubClass.java
@@ -4,15 +4,16 @@
4 * are made available under the terms of the GNU Lesser General Public 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 5 * License v3.0 which accompanies this distribution, and is available at
6 * http://www.gnu.org/licenses/lgpl.html 6 * http://www.gnu.org/licenses/lgpl.html
7 * 7 *
8 * Contributors: 8 * Contributors:
9 * Jeff Martin - initial API and implementation 9 * Jeff Martin - initial API and implementation
10 ******************************************************************************/ 10 ******************************************************************************/
11
11package cuchaz.enigma.inputs.constructors; 12package cuchaz.enigma.inputs.constructors;
12 13
13// e extends d 14// e extends d
14public class SubSubClass extends SubClass { 15public class SubSubClass extends SubClass {
15 16
16 // <init>(I)V 17 // <init>(I)V
17 public SubSubClass(int i) { 18 public SubSubClass(int i) {
18 // c.<init>(I)V 19 // c.<init>(I)V
diff --git a/src/test/java/cuchaz/enigma/inputs/inheritanceTree/BaseClass.java b/src/test/java/cuchaz/enigma/inputs/inheritanceTree/BaseClass.java
index 1b1f369..b9c4929 100644
--- a/src/test/java/cuchaz/enigma/inputs/inheritanceTree/BaseClass.java
+++ b/src/test/java/cuchaz/enigma/inputs/inheritanceTree/BaseClass.java
@@ -4,28 +4,29 @@
4 * are made available under the terms of the GNU Lesser General Public 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 5 * License v3.0 which accompanies this distribution, and is available at
6 * http://www.gnu.org/licenses/lgpl.html 6 * http://www.gnu.org/licenses/lgpl.html
7 * 7 *
8 * Contributors: 8 * Contributors:
9 * Jeff Martin - initial API and implementation 9 * Jeff Martin - initial API and implementation
10 ******************************************************************************/ 10 ******************************************************************************/
11
11package cuchaz.enigma.inputs.inheritanceTree; 12package cuchaz.enigma.inputs.inheritanceTree;
12 13
13// a 14// a
14public abstract class BaseClass { 15public abstract class BaseClass {
15 16
16 // a 17 // a
17 private String name; 18 private String name;
18 19
19 // <init>(Ljava/lang/String;)V 20 // <init>(Ljava/lang/String;)V
20 protected BaseClass(String name) { 21 protected BaseClass(String name) {
21 this.name = name; 22 this.name = name;
22 } 23 }
23 24
24 // a()Ljava/lang/String; 25 // a()Ljava/lang/String;
25 public String getName() { 26 public String getName() {
26 return name; 27 return name;
27 } 28 }
28 29
29 // a()V 30 // a()V
30 public abstract void doBaseThings(); 31 public abstract void doBaseThings();
31} 32}
diff --git a/src/test/java/cuchaz/enigma/inputs/inheritanceTree/SubclassA.java b/src/test/java/cuchaz/enigma/inputs/inheritanceTree/SubclassA.java
index d0213a3..50e963c 100644
--- a/src/test/java/cuchaz/enigma/inputs/inheritanceTree/SubclassA.java
+++ b/src/test/java/cuchaz/enigma/inputs/inheritanceTree/SubclassA.java
@@ -4,15 +4,16 @@
4 * are made available under the terms of the GNU Lesser General Public 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 5 * License v3.0 which accompanies this distribution, and is available at
6 * http://www.gnu.org/licenses/lgpl.html 6 * http://www.gnu.org/licenses/lgpl.html
7 * 7 *
8 * Contributors: 8 * Contributors:
9 * Jeff Martin - initial API and implementation 9 * Jeff Martin - initial API and implementation
10 ******************************************************************************/ 10 ******************************************************************************/
11
11package cuchaz.enigma.inputs.inheritanceTree; 12package cuchaz.enigma.inputs.inheritanceTree;
12 13
13// b extends a 14// b extends a
14public abstract class SubclassA extends BaseClass { 15public abstract class SubclassA extends BaseClass {
15 16
16 // <init>(Ljava/lang/String;)V 17 // <init>(Ljava/lang/String;)V
17 protected SubclassA(String name) { 18 protected SubclassA(String name) {
18 // call to a.<init>(Ljava/lang/String)V 19 // call to a.<init>(Ljava/lang/String)V
diff --git a/src/test/java/cuchaz/enigma/inputs/inheritanceTree/SubclassB.java b/src/test/java/cuchaz/enigma/inputs/inheritanceTree/SubclassB.java
index 6d3b0d0..d0dd664 100644
--- a/src/test/java/cuchaz/enigma/inputs/inheritanceTree/SubclassB.java
+++ b/src/test/java/cuchaz/enigma/inputs/inheritanceTree/SubclassB.java
@@ -4,34 +4,35 @@
4 * are made available under the terms of the GNU Lesser General Public 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 5 * License v3.0 which accompanies this distribution, and is available at
6 * http://www.gnu.org/licenses/lgpl.html 6 * http://www.gnu.org/licenses/lgpl.html
7 * 7 *
8 * Contributors: 8 * Contributors:
9 * Jeff Martin - initial API and implementation 9 * Jeff Martin - initial API and implementation
10 ******************************************************************************/ 10 ******************************************************************************/
11
11package cuchaz.enigma.inputs.inheritanceTree; 12package cuchaz.enigma.inputs.inheritanceTree;
12 13
13// c extends a 14// c extends a
14public class SubclassB extends BaseClass { 15public class SubclassB extends BaseClass {
15 16
16 // a 17 // a
17 private int numThings; 18 private int numThings;
18 19
19 // <init>()V 20 // <init>()V
20 protected SubclassB() { 21 protected SubclassB() {
21 // a.<init>(Ljava/lang/String;)V 22 // a.<init>(Ljava/lang/String;)V
22 super("B"); 23 super("B");
23 24
24 // access to a 25 // access to a
25 numThings = 4; 26 numThings = 4;
26 } 27 }
27 28
28 @Override 29 @Override
29 // a()V 30 // a()V
30 public void doBaseThings() { 31 public void doBaseThings() {
31 // call to a.a()Ljava/lang/String; 32 // call to a.a()Ljava/lang/String;
32 System.out.println("Base things by B! " + getName()); 33 System.out.println("Base things by B! " + getName());
33 } 34 }
34 35
35 // b()V 36 // b()V
36 public void doBThings() { 37 public void doBThings() {
37 // access to a 38 // access to a
diff --git a/src/test/java/cuchaz/enigma/inputs/inheritanceTree/SubsubclassAA.java b/src/test/java/cuchaz/enigma/inputs/inheritanceTree/SubsubclassAA.java
index a5b25fd..c584570 100644
--- a/src/test/java/cuchaz/enigma/inputs/inheritanceTree/SubsubclassAA.java
+++ b/src/test/java/cuchaz/enigma/inputs/inheritanceTree/SubsubclassAA.java
@@ -4,27 +4,28 @@
4 * are made available under the terms of the GNU Lesser General Public 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 5 * License v3.0 which accompanies this distribution, and is available at
6 * http://www.gnu.org/licenses/lgpl.html 6 * http://www.gnu.org/licenses/lgpl.html
7 * 7 *
8 * Contributors: 8 * Contributors:
9 * Jeff Martin - initial API and implementation 9 * Jeff Martin - initial API and implementation
10 ******************************************************************************/ 10 ******************************************************************************/
11
11package cuchaz.enigma.inputs.inheritanceTree; 12package cuchaz.enigma.inputs.inheritanceTree;
12 13
13// d extends b 14// d extends b
14public class SubsubclassAA extends SubclassA { 15public class SubsubclassAA extends SubclassA {
15 16
16 protected SubsubclassAA() { 17 protected SubsubclassAA() {
17 // call to b.<init>(Ljava/lang/String;)V 18 // call to b.<init>(Ljava/lang/String;)V
18 super("AA"); 19 super("AA");
19 } 20 }
20 21
21 @Override 22 @Override
22 // a()Ljava/lang/String; 23 // a()Ljava/lang/String;
23 public String getName() { 24 public String getName() {
24 // call to b.a()Ljava/lang/String; 25 // call to b.a()Ljava/lang/String;
25 return "subsub" + super.getName(); 26 return "subsub" + super.getName();
26 } 27 }
27 28
28 @Override 29 @Override
29 // a()V 30 // a()V
30 public void doBaseThings() { 31 public void doBaseThings() {
diff --git a/src/test/java/cuchaz/enigma/inputs/innerClasses/A_Anonymous.java b/src/test/java/cuchaz/enigma/inputs/innerClasses/A_Anonymous.java
index f644439..f652d87 100644
--- a/src/test/java/cuchaz/enigma/inputs/innerClasses/A_Anonymous.java
+++ b/src/test/java/cuchaz/enigma/inputs/innerClasses/A_Anonymous.java
@@ -4,14 +4,15 @@
4 * are made available under the terms of the GNU Lesser General Public 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 5 * License v3.0 which accompanies this distribution, and is available at
6 * http://www.gnu.org/licenses/lgpl.html 6 * http://www.gnu.org/licenses/lgpl.html
7 * 7 *
8 * Contributors: 8 * Contributors:
9 * Jeff Martin - initial API and implementation 9 * Jeff Martin - initial API and implementation
10 ******************************************************************************/ 10 ******************************************************************************/
11
11package cuchaz.enigma.inputs.innerClasses; 12package cuchaz.enigma.inputs.innerClasses;
12 13
13public class A_Anonymous { 14public class A_Anonymous {
14 15
15 public void foo() { 16 public void foo() {
16 Runnable runnable = new Runnable() { 17 Runnable runnable = new Runnable() {
17 @Override 18 @Override
diff --git a/src/test/java/cuchaz/enigma/inputs/innerClasses/B_AnonymousWithScopeArgs.java b/src/test/java/cuchaz/enigma/inputs/innerClasses/B_AnonymousWithScopeArgs.java
index d78be84..d1b7601 100644
--- a/src/test/java/cuchaz/enigma/inputs/innerClasses/B_AnonymousWithScopeArgs.java
+++ b/src/test/java/cuchaz/enigma/inputs/innerClasses/B_AnonymousWithScopeArgs.java
@@ -4,14 +4,15 @@
4 * are made available under the terms of the GNU Lesser General Public 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 5 * License v3.0 which accompanies this distribution, and is available at
6 * http://www.gnu.org/licenses/lgpl.html 6 * http://www.gnu.org/licenses/lgpl.html
7 * 7 *
8 * Contributors: 8 * Contributors:
9 * Jeff Martin - initial API and implementation 9 * Jeff Martin - initial API and implementation
10 ******************************************************************************/ 10 ******************************************************************************/
11
11package cuchaz.enigma.inputs.innerClasses; 12package cuchaz.enigma.inputs.innerClasses;
12 13
13public class B_AnonymousWithScopeArgs { 14public class B_AnonymousWithScopeArgs {
14 15
15 public static void foo(final D_Simple arg) { 16 public static void foo(final D_Simple arg) {
16 System.out.println(new Object() { 17 System.out.println(new Object() {
17 @Override 18 @Override
diff --git a/src/test/java/cuchaz/enigma/inputs/innerClasses/C_ConstructorArgs.java b/src/test/java/cuchaz/enigma/inputs/innerClasses/C_ConstructorArgs.java
index eb03489..94061fa 100644
--- a/src/test/java/cuchaz/enigma/inputs/innerClasses/C_ConstructorArgs.java
+++ b/src/test/java/cuchaz/enigma/inputs/innerClasses/C_ConstructorArgs.java
@@ -4,27 +4,28 @@
4 * are made available under the terms of the GNU Lesser General Public 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 5 * License v3.0 which accompanies this distribution, and is available at
6 * http://www.gnu.org/licenses/lgpl.html 6 * http://www.gnu.org/licenses/lgpl.html
7 * 7 *
8 * Contributors: 8 * Contributors:
9 * Jeff Martin - initial API and implementation 9 * Jeff Martin - initial API and implementation
10 ******************************************************************************/ 10 ******************************************************************************/
11
11package cuchaz.enigma.inputs.innerClasses; 12package cuchaz.enigma.inputs.innerClasses;
12 13
13@SuppressWarnings("unused") 14@SuppressWarnings("unused")
14public class C_ConstructorArgs { 15public class C_ConstructorArgs {
15 16
17 Inner i;
18
19 public void foo() {
20 i = new Inner(5);
21 }
22
16 class Inner { 23 class Inner {
17 24
18 private int a; 25 private int a;
19 26
20 public Inner(int a) { 27 public Inner(int a) {
21 this.a = a; 28 this.a = a;
22 } 29 }
23 } 30 }
24
25 Inner i;
26
27 public void foo() {
28 i = new Inner(5);
29 }
30} 31}
diff --git a/src/test/java/cuchaz/enigma/inputs/innerClasses/D_Simple.java b/src/test/java/cuchaz/enigma/inputs/innerClasses/D_Simple.java
index 0e9bf82..71b3a6d 100644
--- a/src/test/java/cuchaz/enigma/inputs/innerClasses/D_Simple.java
+++ b/src/test/java/cuchaz/enigma/inputs/innerClasses/D_Simple.java
@@ -4,14 +4,15 @@
4 * are made available under the terms of the GNU Lesser General Public 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 5 * License v3.0 which accompanies this distribution, and is available at
6 * http://www.gnu.org/licenses/lgpl.html 6 * http://www.gnu.org/licenses/lgpl.html
7 * 7 *
8 * Contributors: 8 * Contributors:
9 * Jeff Martin - initial API and implementation 9 * Jeff Martin - initial API and implementation
10 ******************************************************************************/ 10 ******************************************************************************/
11
11package cuchaz.enigma.inputs.innerClasses; 12package cuchaz.enigma.inputs.innerClasses;
12 13
13public class D_Simple { 14public class D_Simple {
14 15
15 class Inner { 16 class Inner {
16 // nothing to do 17 // nothing to do
17 } 18 }
diff --git a/src/test/java/cuchaz/enigma/inputs/innerClasses/E_AnonymousWithOuterAccess.java b/src/test/java/cuchaz/enigma/inputs/innerClasses/E_AnonymousWithOuterAccess.java
index 255434d..976ec42 100644
--- a/src/test/java/cuchaz/enigma/inputs/innerClasses/E_AnonymousWithOuterAccess.java
+++ b/src/test/java/cuchaz/enigma/inputs/innerClasses/E_AnonymousWithOuterAccess.java
@@ -4,17 +4,18 @@
4 * are made available under the terms of the GNU Lesser General Public 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 5 * License v3.0 which accompanies this distribution, and is available at
6 * http://www.gnu.org/licenses/lgpl.html 6 * http://www.gnu.org/licenses/lgpl.html
7 * 7 *
8 * Contributors: 8 * Contributors:
9 * Jeff Martin - initial API and implementation 9 * Jeff Martin - initial API and implementation
10 ******************************************************************************/ 10 ******************************************************************************/
11
11package cuchaz.enigma.inputs.innerClasses; 12package cuchaz.enigma.inputs.innerClasses;
12 13
13public class E_AnonymousWithOuterAccess { 14public class E_AnonymousWithOuterAccess {
14 15
15 // reproduction of error case documented at: 16 // reproduction of error case documented at:
16 // https://bitbucket.org/cuchaz/enigma/issue/61/stackoverflowerror-when-deobfuscating 17 // https://bitbucket.org/cuchaz/enigma/issue/61/stackoverflowerror-when-deobfuscating
17 18
18 public Object makeInner() { 19 public Object makeInner() {
19 outerMethod(); 20 outerMethod();
20 return new Object() { 21 return new Object() {
@@ -24,7 +25,7 @@ public class E_AnonymousWithOuterAccess {
24 } 25 }
25 }; 26 };
26 } 27 }
27 28
28 private String outerMethod() { 29 private String outerMethod() {
29 return "foo"; 30 return "foo";
30 } 31 }
diff --git a/src/test/java/cuchaz/enigma/inputs/innerClasses/F_ClassTree.java b/src/test/java/cuchaz/enigma/inputs/innerClasses/F_ClassTree.java
index 7d1dab4..b1de3c9 100644
--- a/src/test/java/cuchaz/enigma/inputs/innerClasses/F_ClassTree.java
+++ b/src/test/java/cuchaz/enigma/inputs/innerClasses/F_ClassTree.java
@@ -4,25 +4,25 @@
4 * are made available under the terms of the GNU Lesser General Public 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 5 * License v3.0 which accompanies this distribution, and is available at
6 * http://www.gnu.org/licenses/lgpl.html 6 * http://www.gnu.org/licenses/lgpl.html
7 * 7 *
8 * Contributors: 8 * Contributors:
9 * Jeff Martin - initial API and implementation 9 * Jeff Martin - initial API and implementation
10 ******************************************************************************/ 10 ******************************************************************************/
11package cuchaz.enigma.inputs.innerClasses;
12 11
12package cuchaz.enigma.inputs.innerClasses;
13 13
14public class F_ClassTree { 14public class F_ClassTree {
15 15
16 public class Level1 { 16 public class Level1 {
17 17
18 public int f1; 18 public int f1;
19 19
20 public class Level2 { 20 public class Level2 {
21 21
22 public int f2; 22 public int f2;
23 23
24 public class Level3 { 24 public class Level3 {
25 25
26 public int f3; 26 public int f3;
27 } 27 }
28 } 28 }
diff --git a/src/test/java/cuchaz/enigma/inputs/loneClass/LoneClass.java b/src/test/java/cuchaz/enigma/inputs/loneClass/LoneClass.java
index d28ae97..ddc4e31 100644
--- a/src/test/java/cuchaz/enigma/inputs/loneClass/LoneClass.java
+++ b/src/test/java/cuchaz/enigma/inputs/loneClass/LoneClass.java
@@ -4,20 +4,21 @@
4 * are made available under the terms of the GNU Lesser General Public 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 5 * License v3.0 which accompanies this distribution, and is available at
6 * http://www.gnu.org/licenses/lgpl.html 6 * http://www.gnu.org/licenses/lgpl.html
7 * 7 *
8 * Contributors: 8 * Contributors:
9 * Jeff Martin - initial API and implementation 9 * Jeff Martin - initial API and implementation
10 ******************************************************************************/ 10 ******************************************************************************/
11
11package cuchaz.enigma.inputs.loneClass; 12package cuchaz.enigma.inputs.loneClass;
12 13
13public class LoneClass { 14public class LoneClass {
14 15
15 private String name; 16 private String name;
16 17
17 public LoneClass(String name) { 18 public LoneClass(String name) {
18 this.name = name; 19 this.name = name;
19 } 20 }
20 21
21 public String getName() { 22 public String getName() {
22 return name; 23 return name;
23 } 24 }
diff --git a/src/test/java/cuchaz/enigma/inputs/translation/A_Basic.java b/src/test/java/cuchaz/enigma/inputs/translation/A_Basic.java
index 26acac8..26f3718 100644
--- a/src/test/java/cuchaz/enigma/inputs/translation/A_Basic.java
+++ b/src/test/java/cuchaz/enigma/inputs/translation/A_Basic.java
@@ -4,28 +4,29 @@
4 * are made available under the terms of the GNU Lesser General Public 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 5 * License v3.0 which accompanies this distribution, and is available at
6 * http://www.gnu.org/licenses/lgpl.html 6 * http://www.gnu.org/licenses/lgpl.html
7 * 7 *
8 * Contributors: 8 * Contributors:
9 * Jeff Martin - initial API and implementation 9 * Jeff Martin - initial API and implementation
10 ******************************************************************************/ 10 ******************************************************************************/
11
11package cuchaz.enigma.inputs.translation; 12package cuchaz.enigma.inputs.translation;
12 13
13public class A_Basic { 14public class A_Basic {
14 15
15 public int one; 16 public int one;
16 public float two; 17 public float two;
17 public String three; 18 public String three;
18 19
19 public void m1() { 20 public void m1() {
20 } 21 }
21 22
22 public int m2() { 23 public int m2() {
23 return 42; 24 return 42;
24 } 25 }
25 26
26 public void m3(int a1) { 27 public void m3(int a1) {
27 } 28 }
28 29
29 public int m4(int a1) { 30 public int m4(int a1) {
30 return 5; // chosen by fair die roll, guaranteed to be random 31 return 5; // chosen by fair die roll, guaranteed to be random
31 } 32 }
diff --git a/src/test/java/cuchaz/enigma/inputs/translation/B_BaseClass.java b/src/test/java/cuchaz/enigma/inputs/translation/B_BaseClass.java
index 035e329..fd7f6e7 100644
--- a/src/test/java/cuchaz/enigma/inputs/translation/B_BaseClass.java
+++ b/src/test/java/cuchaz/enigma/inputs/translation/B_BaseClass.java
@@ -4,21 +4,22 @@
4 * are made available under the terms of the GNU Lesser General Public 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 5 * License v3.0 which accompanies this distribution, and is available at
6 * http://www.gnu.org/licenses/lgpl.html 6 * http://www.gnu.org/licenses/lgpl.html
7 * 7 *
8 * Contributors: 8 * Contributors:
9 * Jeff Martin - initial API and implementation 9 * Jeff Martin - initial API and implementation
10 ******************************************************************************/ 10 ******************************************************************************/
11
11package cuchaz.enigma.inputs.translation; 12package cuchaz.enigma.inputs.translation;
12 13
13public class B_BaseClass { 14public class B_BaseClass {
14 15
15 public int f1; 16 public int f1;
16 public char f2; 17 public char f2;
17 18
18 public int m1() { 19 public int m1() {
19 return 5; 20 return 5;
20 } 21 }
21 22
22 public int m2() { 23 public int m2() {
23 return 42; 24 return 42;
24 } 25 }
diff --git a/src/test/java/cuchaz/enigma/inputs/translation/C_SubClass.java b/src/test/java/cuchaz/enigma/inputs/translation/C_SubClass.java
index 6026a8d..9d74e44 100644
--- a/src/test/java/cuchaz/enigma/inputs/translation/C_SubClass.java
+++ b/src/test/java/cuchaz/enigma/inputs/translation/C_SubClass.java
@@ -4,23 +4,24 @@
4 * are made available under the terms of the GNU Lesser General Public 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 5 * License v3.0 which accompanies this distribution, and is available at
6 * http://www.gnu.org/licenses/lgpl.html 6 * http://www.gnu.org/licenses/lgpl.html
7 * 7 *
8 * Contributors: 8 * Contributors:
9 * Jeff Martin - initial API and implementation 9 * Jeff Martin - initial API and implementation
10 ******************************************************************************/ 10 ******************************************************************************/
11
11package cuchaz.enigma.inputs.translation; 12package cuchaz.enigma.inputs.translation;
12 13
13public class C_SubClass extends B_BaseClass { 14public class C_SubClass extends B_BaseClass {
14 15
15 public char f2; // shadows B_BaseClass.f2 16 public char f2; // shadows B_BaseClass.f2
16 public int f3; 17 public int f3;
17 public int f4; 18 public int f4;
18 19
19 @Override 20 @Override
20 public int m1() { 21 public int m1() {
21 return 32; 22 return 32;
22 } 23 }
23 24
24 public int m3() { 25 public int m3() {
25 return 7; 26 return 7;
26 } 27 }
diff --git a/src/test/java/cuchaz/enigma/inputs/translation/D_AnonymousTesting.java b/src/test/java/cuchaz/enigma/inputs/translation/D_AnonymousTesting.java
index a1827f9..99c83bb 100644
--- a/src/test/java/cuchaz/enigma/inputs/translation/D_AnonymousTesting.java
+++ b/src/test/java/cuchaz/enigma/inputs/translation/D_AnonymousTesting.java
@@ -4,17 +4,18 @@
4 * are made available under the terms of the GNU Lesser General Public 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 5 * License v3.0 which accompanies this distribution, and is available at
6 * http://www.gnu.org/licenses/lgpl.html 6 * http://www.gnu.org/licenses/lgpl.html
7 * 7 *
8 * Contributors: 8 * Contributors:
9 * Jeff Martin - initial API and implementation 9 * Jeff Martin - initial API and implementation
10 ******************************************************************************/ 10 ******************************************************************************/
11
11package cuchaz.enigma.inputs.translation; 12package cuchaz.enigma.inputs.translation;
12 13
13import java.util.ArrayList; 14import java.util.ArrayList;
14import java.util.List; 15import java.util.List;
15 16
16public class D_AnonymousTesting { 17public class D_AnonymousTesting {
17 18
18 public List<Object> getObjs() { 19 public List<Object> getObjs() {
19 List<Object> objs = new ArrayList<Object>(); 20 List<Object> objs = new ArrayList<Object>();
20 objs.add(new Object() { 21 objs.add(new Object() {
diff --git a/src/test/java/cuchaz/enigma/inputs/translation/E_Bridges.java b/src/test/java/cuchaz/enigma/inputs/translation/E_Bridges.java
index 769eb70..0b8cf2a 100644
--- a/src/test/java/cuchaz/enigma/inputs/translation/E_Bridges.java
+++ b/src/test/java/cuchaz/enigma/inputs/translation/E_Bridges.java
@@ -4,15 +4,15 @@
4 * are made available under the terms of the GNU Lesser General Public 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 5 * License v3.0 which accompanies this distribution, and is available at
6 * http://www.gnu.org/licenses/lgpl.html 6 * http://www.gnu.org/licenses/lgpl.html
7 * 7 *
8 * Contributors: 8 * Contributors:
9 * Jeff Martin - initial API and implementation 9 * Jeff Martin - initial API and implementation
10 ******************************************************************************/ 10 ******************************************************************************/
11
11package cuchaz.enigma.inputs.translation; 12package cuchaz.enigma.inputs.translation;
12 13
13import java.util.Iterator; 14import java.util.Iterator;
14 15
15
16public class E_Bridges implements Iterator<Object> { 16public class E_Bridges implements Iterator<Object> {
17 17
18 @Override 18 @Override
diff --git a/src/test/java/cuchaz/enigma/inputs/translation/F_ObjectMethods.java b/src/test/java/cuchaz/enigma/inputs/translation/F_ObjectMethods.java
index 845d62b..8a92792 100644
--- a/src/test/java/cuchaz/enigma/inputs/translation/F_ObjectMethods.java
+++ b/src/test/java/cuchaz/enigma/inputs/translation/F_ObjectMethods.java
@@ -4,17 +4,18 @@
4 * are made available under the terms of the GNU Lesser General Public 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 5 * License v3.0 which accompanies this distribution, and is available at
6 * http://www.gnu.org/licenses/lgpl.html 6 * http://www.gnu.org/licenses/lgpl.html
7 * 7 *
8 * Contributors: 8 * Contributors:
9 * Jeff Martin - initial API and implementation 9 * Jeff Martin - initial API and implementation
10 ******************************************************************************/ 10 ******************************************************************************/
11
11package cuchaz.enigma.inputs.translation; 12package cuchaz.enigma.inputs.translation;
12 13
13@SuppressWarnings("FinalizeCalledExplicitly") 14@SuppressWarnings("FinalizeCalledExplicitly")
14public class F_ObjectMethods { 15public class F_ObjectMethods {
15 16
16 public void callEmAll() 17 public void callEmAll()
17 throws Throwable { 18 throws Throwable {
18 clone(); 19 clone();
19 equals(this); 20 equals(this);
20 finalize(); 21 finalize();
diff --git a/src/test/java/cuchaz/enigma/inputs/translation/G_OuterClass.java b/src/test/java/cuchaz/enigma/inputs/translation/G_OuterClass.java
index a2e0daf..a1e6a85 100644
--- a/src/test/java/cuchaz/enigma/inputs/translation/G_OuterClass.java
+++ b/src/test/java/cuchaz/enigma/inputs/translation/G_OuterClass.java
@@ -4,30 +4,30 @@
4 * are made available under the terms of the GNU Lesser General Public 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 5 * License v3.0 which accompanies this distribution, and is available at
6 * http://www.gnu.org/licenses/lgpl.html 6 * http://www.gnu.org/licenses/lgpl.html
7 * 7 *
8 * Contributors: 8 * Contributors:
9 * Jeff Martin - initial API and implementation 9 * Jeff Martin - initial API and implementation
10 ******************************************************************************/ 10 ******************************************************************************/
11package cuchaz.enigma.inputs.translation;
12 11
12package cuchaz.enigma.inputs.translation;
13 13
14public class G_OuterClass { 14public class G_OuterClass {
15 15
16 public class A_InnerClass { 16 public class A_InnerClass {
17 17
18 public int f1; 18 public int f1;
19 public String f2; 19 public String f2;
20 20
21 public void m1() {} 21 public void m1() {}
22 22
23 public class A_InnerInnerClass { 23 public class A_InnerInnerClass {
24 24
25 public int f3; 25 public int f3;
26 26
27 public void m2() {} 27 public void m2() {}
28 } 28 }
29 } 29 }
30 30
31 public class B_NamelessClass { 31 public class B_NamelessClass {
32 public class A_NamedInnerClass { 32 public class A_NamedInnerClass {
33 public int f4; 33 public int f4;
diff --git a/src/test/java/cuchaz/enigma/inputs/translation/H_NamelessClass.java b/src/test/java/cuchaz/enigma/inputs/translation/H_NamelessClass.java
index 1b718a5..013c55a 100644
--- a/src/test/java/cuchaz/enigma/inputs/translation/H_NamelessClass.java
+++ b/src/test/java/cuchaz/enigma/inputs/translation/H_NamelessClass.java
@@ -4,34 +4,36 @@
4 * are made available under the terms of the GNU Lesser General Public 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 5 * License v3.0 which accompanies this distribution, and is available at
6 * http://www.gnu.org/licenses/lgpl.html 6 * http://www.gnu.org/licenses/lgpl.html
7 * 7 *
8 * Contributors: 8 * Contributors:
9 * Jeff Martin - initial API and implementation 9 * Jeff Martin - initial API and implementation
10 ******************************************************************************/ 10 ******************************************************************************/
11package cuchaz.enigma.inputs.translation;
12 11
12package cuchaz.enigma.inputs.translation;
13 13
14public class H_NamelessClass { 14public class H_NamelessClass {
15 15
16 public class A_InnerClass { 16 public class A_InnerClass {
17 17
18 public int f1; 18 public int f1;
19 public String f2; 19 public String f2;
20 20
21 public void m1() {} 21 public void m1() {}
22 22
23 public class A_InnerInnerClass { 23 public class A_InnerInnerClass {
24 24
25 public int f3; 25 public int f3;
26 26
27 public void m2() {} 27 public void m2() {}
28 } 28 }
29 } 29 }
30 30
31 public class B_NamelessClass { 31 public class B_NamelessClass {
32 public class A_NamedInnerClass { 32 public class A_NamedInnerClass {
33 public int f4; 33 public int f4;
34
34 public class A_AnotherInnerClass {} 35 public class A_AnotherInnerClass {}
36
35 public class B_YetAnotherInnerClass {} 37 public class B_YetAnotherInnerClass {}
36 } 38 }
37 } 39 }
diff --git a/src/test/java/cuchaz/enigma/inputs/translation/I_Generics.java b/src/test/java/cuchaz/enigma/inputs/translation/I_Generics.java
index 3490f9d..fd2ebdd 100644
--- a/src/test/java/cuchaz/enigma/inputs/translation/I_Generics.java
+++ b/src/test/java/cuchaz/enigma/inputs/translation/I_Generics.java
@@ -4,32 +4,32 @@
4 * are made available under the terms of the GNU Lesser General Public 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 5 * License v3.0 which accompanies this distribution, and is available at
6 * http://www.gnu.org/licenses/lgpl.html 6 * http://www.gnu.org/licenses/lgpl.html
7 * 7 *
8 * Contributors: 8 * Contributors:
9 * Jeff Martin - initial API and implementation 9 * Jeff Martin - initial API and implementation
10 ******************************************************************************/ 10 ******************************************************************************/
11
11package cuchaz.enigma.inputs.translation; 12package cuchaz.enigma.inputs.translation;
12 13
13import java.util.List; 14import java.util.List;
14import java.util.Map; 15import java.util.Map;
15 16
16
17public class I_Generics { 17public class I_Generics {
18 18
19 public class A_Type {
20 }
21
22 public List<Integer> f1; 19 public List<Integer> f1;
23 public List<A_Type> f2; 20 public List<A_Type> f2;
24 public Map<A_Type,A_Type> f3; 21 public Map<A_Type, A_Type> f3;
25 22 public B_Generic<Integer> f5;
23 public B_Generic<A_Type> f6;
24
25 public class A_Type {
26 }
27
26 public class B_Generic<T> { 28 public class B_Generic<T> {
27 public T f4; 29 public T f4;
30
28 public T m1() { 31 public T m1() {
29 return null; 32 return null;
30 } 33 }
31 } 34 }
32
33 public B_Generic<Integer> f5;
34 public B_Generic<A_Type> f6;
35} 35}