diff options
| author | 2015-05-21 23:30:00 +0100 | |
|---|---|---|
| committer | 2015-05-21 23:30:00 +0100 | |
| commit | e3f452250e51b7271f3989c7dfd12e4422934942 (patch) | |
| tree | 5aa482f9a6e21eb318a3e23e7d8274d77c73faf6 /test/cuchaz/enigma/inputs/constructors | |
| download | enigma-fork-e3f452250e51b7271f3989c7dfd12e4422934942.tar.gz enigma-fork-e3f452250e51b7271f3989c7dfd12e4422934942.tar.xz enigma-fork-e3f452250e51b7271f3989c7dfd12e4422934942.zip | |
Support Gradle alongside SSJB
This makes builds faster, simpler and better automated but still keeps
Cuchaz happy. :)
Diffstat (limited to 'test/cuchaz/enigma/inputs/constructors')
5 files changed, 156 insertions, 0 deletions
diff --git a/test/cuchaz/enigma/inputs/constructors/BaseClass.java b/test/cuchaz/enigma/inputs/constructors/BaseClass.java new file mode 100644 index 0000000..65e782a --- /dev/null +++ b/test/cuchaz/enigma/inputs/constructors/BaseClass.java | |||
| @@ -0,0 +1,25 @@ | |||
| 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.inputs.constructors; | ||
| 12 | |||
| 13 | // none/a | ||
| 14 | public class BaseClass { | ||
| 15 | |||
| 16 | // <init>()V | ||
| 17 | public BaseClass() { | ||
| 18 | System.out.println("Default constructor"); | ||
| 19 | } | ||
| 20 | |||
| 21 | // <init>(I)V | ||
| 22 | public BaseClass(int i) { | ||
| 23 | System.out.println("Int constructor " + i); | ||
| 24 | } | ||
| 25 | } | ||
diff --git a/test/cuchaz/enigma/inputs/constructors/Caller.java b/test/cuchaz/enigma/inputs/constructors/Caller.java new file mode 100644 index 0000000..75096ec --- /dev/null +++ b/test/cuchaz/enigma/inputs/constructors/Caller.java | |||
| @@ -0,0 +1,57 @@ | |||
| 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.inputs.constructors; | ||
| 12 | |||
| 13 | // none/b | ||
| 14 | public class Caller { | ||
| 15 | |||
| 16 | // a()V | ||
| 17 | public void callBaseDefault() { | ||
| 18 | // none/a.<init>()V | ||
| 19 | System.out.println(new BaseClass()); | ||
| 20 | } | ||
| 21 | |||
| 22 | // b()V | ||
| 23 | public void callBaseInt() { | ||
| 24 | // none/a.<init>(I)V | ||
| 25 | System.out.println(new BaseClass(5)); | ||
| 26 | } | ||
| 27 | |||
| 28 | // c()V | ||
| 29 | public void callSubDefault() { | ||
| 30 | // none/d.<init>()V | ||
| 31 | System.out.println(new SubClass()); | ||
| 32 | } | ||
| 33 | |||
| 34 | // d()V | ||
| 35 | public void callSubInt() { | ||
| 36 | // none/d.<init>(I)V | ||
| 37 | System.out.println(new SubClass(6)); | ||
| 38 | } | ||
| 39 | |||
| 40 | // e()V | ||
| 41 | public void callSubIntInt() { | ||
| 42 | // none/d.<init>(II)V | ||
| 43 | System.out.println(new SubClass(4, 2)); | ||
| 44 | } | ||
| 45 | |||
| 46 | // f()V | ||
| 47 | public void callSubSubInt() { | ||
| 48 | // none/e.<init>(I)V | ||
| 49 | System.out.println(new SubSubClass(3)); | ||
| 50 | } | ||
| 51 | |||
| 52 | // g()V | ||
| 53 | public void callDefaultConstructable() { | ||
| 54 | // none/c.<init>()V | ||
| 55 | System.out.println(new DefaultConstructable()); | ||
| 56 | } | ||
| 57 | } | ||
diff --git a/test/cuchaz/enigma/inputs/constructors/DefaultConstructable.java b/test/cuchaz/enigma/inputs/constructors/DefaultConstructable.java new file mode 100644 index 0000000..655f4da --- /dev/null +++ b/test/cuchaz/enigma/inputs/constructors/DefaultConstructable.java | |||
| @@ -0,0 +1,15 @@ | |||
| 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.inputs.constructors; | ||
| 12 | |||
| 13 | public class DefaultConstructable { | ||
| 14 | // only default constructor | ||
| 15 | } | ||
diff --git a/test/cuchaz/enigma/inputs/constructors/SubClass.java b/test/cuchaz/enigma/inputs/constructors/SubClass.java new file mode 100644 index 0000000..b0fb3e9 --- /dev/null +++ b/test/cuchaz/enigma/inputs/constructors/SubClass.java | |||
| @@ -0,0 +1,38 @@ | |||
| 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.inputs.constructors; | ||
| 12 | |||
| 13 | // none/d extends none/a | ||
| 14 | public class SubClass extends BaseClass { | ||
| 15 | |||
| 16 | // <init>()V | ||
| 17 | public SubClass() { | ||
| 18 | // none/a.<init>()V | ||
| 19 | } | ||
| 20 | |||
| 21 | // <init>(I)V | ||
| 22 | public SubClass(int num) { | ||
| 23 | // <init>()V | ||
| 24 | this(); | ||
| 25 | System.out.println("SubClass " + num); | ||
| 26 | } | ||
| 27 | |||
| 28 | // <init>(II)V | ||
| 29 | public SubClass(int a, int b) { | ||
| 30 | // <init>(I)V | ||
| 31 | this(a + b); | ||
| 32 | } | ||
| 33 | |||
| 34 | // <init>(III)V | ||
| 35 | public SubClass(int a, int b, int c) { | ||
| 36 | // none/a.<init>()V | ||
| 37 | } | ||
| 38 | } | ||
diff --git a/test/cuchaz/enigma/inputs/constructors/SubSubClass.java b/test/cuchaz/enigma/inputs/constructors/SubSubClass.java new file mode 100644 index 0000000..5031405 --- /dev/null +++ b/test/cuchaz/enigma/inputs/constructors/SubSubClass.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 | ******************************************************************************/ | ||
| 11 | package cuchaz.enigma.inputs.constructors; | ||
| 12 | |||
| 13 | // none/e extends none/d | ||
| 14 | public class SubSubClass extends SubClass { | ||
| 15 | |||
| 16 | // <init>(I)V | ||
| 17 | public SubSubClass(int i) { | ||
| 18 | // none/c.<init>(I)V | ||
| 19 | super(i); | ||
| 20 | } | ||
| 21 | } | ||