diff options
| author | 2017-03-08 08:17:04 +0100 | |
|---|---|---|
| committer | 2017-03-08 08:17:04 +0100 | |
| commit | 6e464ea251cab63c776ece0b2a356f1498ffa294 (patch) | |
| tree | 5ed30c03f5ac4cd2d6877874f5ede576049954f7 /src/test/java/cuchaz/enigma/inputs/inheritanceTree | |
| parent | Drop unix case style and implement hashCode when equals is overrided (diff) | |
| download | enigma-fork-6e464ea251cab63c776ece0b2a356f1498ffa294.tar.gz enigma-fork-6e464ea251cab63c776ece0b2a356f1498ffa294.tar.xz enigma-fork-6e464ea251cab63c776ece0b2a356f1498ffa294.zip | |
Follow Fabric guidelines
Diffstat (limited to 'src/test/java/cuchaz/enigma/inputs/inheritanceTree')
4 files changed, 21 insertions, 17 deletions
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 | |||
| 11 | package cuchaz.enigma.inputs.inheritanceTree; | 12 | package cuchaz.enigma.inputs.inheritanceTree; |
| 12 | 13 | ||
| 13 | // a | 14 | // a |
| 14 | public abstract class BaseClass { | 15 | public 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 | |||
| 11 | package cuchaz.enigma.inputs.inheritanceTree; | 12 | package cuchaz.enigma.inputs.inheritanceTree; |
| 12 | 13 | ||
| 13 | // b extends a | 14 | // b extends a |
| 14 | public abstract class SubclassA extends BaseClass { | 15 | public 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 | |||
| 11 | package cuchaz.enigma.inputs.inheritanceTree; | 12 | package cuchaz.enigma.inputs.inheritanceTree; |
| 12 | 13 | ||
| 13 | // c extends a | 14 | // c extends a |
| 14 | public class SubclassB extends BaseClass { | 15 | public 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 | |||
| 11 | package cuchaz.enigma.inputs.inheritanceTree; | 12 | package cuchaz.enigma.inputs.inheritanceTree; |
| 12 | 13 | ||
| 13 | // d extends b | 14 | // d extends b |
| 14 | public class SubsubclassAA extends SubclassA { | 15 | public 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() { |