summaryrefslogtreecommitdiff
path: root/src/test/java/cuchaz/enigma/inputs/inheritanceTree
diff options
context:
space:
mode:
authorGravatar lclc982016-06-30 00:49:21 +1000
committerGravatar GitHub2016-06-30 00:49:21 +1000
commit4be005617b3b8c3578cca07c5d085d12916f0d1d (patch)
treedb163431f38703e26da417ef05eaea2b27a498b9 /src/test/java/cuchaz/enigma/inputs/inheritanceTree
parentSome small changes to fix idea importing (diff)
downloadenigma-fork-4be005617b3b8c3578cca07c5d085d12916f0d1d.tar.gz
enigma-fork-4be005617b3b8c3578cca07c5d085d12916f0d1d.tar.xz
enigma-fork-4be005617b3b8c3578cca07c5d085d12916f0d1d.zip
Json format (#2)
* Added new format * Fixed bug * Updated Version
Diffstat (limited to 'src/test/java/cuchaz/enigma/inputs/inheritanceTree')
-rw-r--r--src/test/java/cuchaz/enigma/inputs/inheritanceTree/BaseClass.java31
-rw-r--r--src/test/java/cuchaz/enigma/inputs/inheritanceTree/SubclassA.java21
-rw-r--r--src/test/java/cuchaz/enigma/inputs/inheritanceTree/SubclassB.java40
-rw-r--r--src/test/java/cuchaz/enigma/inputs/inheritanceTree/SubsubclassAA.java34
4 files changed, 126 insertions, 0 deletions
diff --git a/src/test/java/cuchaz/enigma/inputs/inheritanceTree/BaseClass.java b/src/test/java/cuchaz/enigma/inputs/inheritanceTree/BaseClass.java
new file mode 100644
index 0000000..4f9c5b0
--- /dev/null
+++ b/src/test/java/cuchaz/enigma/inputs/inheritanceTree/BaseClass.java
@@ -0,0 +1,31 @@
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 ******************************************************************************/
11package cuchaz.enigma.inputs.inheritanceTree;
12
13// none/a
14public abstract class BaseClass {
15
16 // a
17 private String m_name;
18
19 // <init>(Ljava/lang/String;)V
20 protected BaseClass(String name) {
21 m_name = name;
22 }
23
24 // a()Ljava/lang/String;
25 public String getName() {
26 return m_name;
27 }
28
29 // a()V
30 public abstract void doBaseThings();
31}
diff --git a/src/test/java/cuchaz/enigma/inputs/inheritanceTree/SubclassA.java b/src/test/java/cuchaz/enigma/inputs/inheritanceTree/SubclassA.java
new file mode 100644
index 0000000..140d2a8
--- /dev/null
+++ b/src/test/java/cuchaz/enigma/inputs/inheritanceTree/SubclassA.java
@@ -0,0 +1,21 @@
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 ******************************************************************************/
11package cuchaz.enigma.inputs.inheritanceTree;
12
13// none/b extends none/a
14public abstract class SubclassA extends BaseClass {
15
16 // <init>(Ljava/lang/String;)V
17 protected SubclassA(String name) {
18 // call to none/a.<init>(Ljava/lang/String)V
19 super(name);
20 }
21}
diff --git a/src/test/java/cuchaz/enigma/inputs/inheritanceTree/SubclassB.java b/src/test/java/cuchaz/enigma/inputs/inheritanceTree/SubclassB.java
new file mode 100644
index 0000000..99d149b
--- /dev/null
+++ b/src/test/java/cuchaz/enigma/inputs/inheritanceTree/SubclassB.java
@@ -0,0 +1,40 @@
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 ******************************************************************************/
11package cuchaz.enigma.inputs.inheritanceTree;
12
13// none/c extends none/a
14public class SubclassB extends BaseClass {
15
16 // a
17 private int m_numThings;
18
19 // <init>()V
20 protected SubclassB() {
21 // none/a.<init>(Ljava/lang/String;)V
22 super("B");
23
24 // access to a
25 m_numThings = 4;
26 }
27
28 @Override
29 // a()V
30 public void doBaseThings() {
31 // call to none/a.a()Ljava/lang/String;
32 System.out.println("Base things by B! " + getName());
33 }
34
35 // b()V
36 public void doBThings() {
37 // access to a
38 System.out.println("" + m_numThings + " B things!");
39 }
40}
diff --git a/src/test/java/cuchaz/enigma/inputs/inheritanceTree/SubsubclassAA.java b/src/test/java/cuchaz/enigma/inputs/inheritanceTree/SubsubclassAA.java
new file mode 100644
index 0000000..2e414b7
--- /dev/null
+++ b/src/test/java/cuchaz/enigma/inputs/inheritanceTree/SubsubclassAA.java
@@ -0,0 +1,34 @@
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 ******************************************************************************/
11package cuchaz.enigma.inputs.inheritanceTree;
12
13// none/d extends none/b
14public class SubsubclassAA extends SubclassA {
15
16 protected SubsubclassAA() {
17 // call to none/b.<init>(Ljava/lang/String;)V
18 super("AA");
19 }
20
21 @Override
22 // a()Ljava/lang/String;
23 public String getName() {
24 // call to none/b.a()Ljava/lang/String;
25 return "subsub" + super.getName();
26 }
27
28 @Override
29 // a()V
30 public void doBaseThings() {
31 // call to none/d.a()Ljava/lang/String;
32 System.out.println("Base things by " + getName());
33 }
34}