Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 55de56e

Browse files
committed
After rewriting Type Information Chapter, added missing @OverRide
1 parent dfdbcf6 commit 55de56e

File tree

1,034 files changed

+102355
-2768
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,034 files changed

+102355
-2768
lines changed

CI.txt

Lines changed: 0 additions & 5 deletions
This file was deleted.

Copyright.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// Copyright.txt
2-
This computer source code is Copyright �2020 MindView LLC.
2+
This computer source code is Copyright �2021 MindView LLC.
33
All Rights Reserved.
44

55
Permission to use, copy, modify, and distribute this

annotations/AUComposition.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// annotations/AUComposition.java
2-
// (c)2020 MindView LLC: see Copyright.txt
2+
// (c)2021 MindView LLC: see Copyright.txt
33
// We make no guarantees that this code is fit for any purpose.
44
// Visit http://OnJava8.com for more book information.
55
// Creating non-embedded tests
@@ -23,8 +23,8 @@ boolean tMethodTwo() {
2323
}
2424
/* Output:
2525
annotations.AUComposition
26+
. tMethodOne
2627
. tMethodTwo This is methodTwo
2728
28-
. tMethodOne
2929
OK (2 tests)
3030
*/

annotations/AUExternalTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// annotations/AUExternalTest.java
2-
// (c)2020 MindView LLC: see Copyright.txt
2+
// (c)2021 MindView LLC: see Copyright.txt
33
// We make no guarantees that this code is fit for any purpose.
44
// Visit http://OnJava8.com for more book information.
55
// Creating non-embedded tests

annotations/AtUnitExample1.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// annotations/AtUnitExample1.java
2-
// (c)2020 MindView LLC: see Copyright.txt
2+
// (c)2021 MindView LLC: see Copyright.txt
33
// We make no guarantees that this code is fit for any purpose.
44
// Visit http://OnJava8.com for more book information.
55
// {java onjava.atunit.AtUnit
@@ -34,15 +34,15 @@ boolean anotherDisappointment() {
3434
}
3535
/* Output:
3636
annotations.AtUnitExample1
37-
. m3
37+
. anotherDisappointment (failed)
3838
. methodOneTest
39+
. failureTest (failed)
3940
. m2 This is methodTwo
4041
41-
. failureTest (failed)
42-
. anotherDisappointment (failed)
42+
. m3
4343
(5 tests)
4444
4545
>>> 2 FAILURES <<<
46-
annotations.AtUnitExample1: failureTest
4746
annotations.AtUnitExample1: anotherDisappointment
47+
annotations.AtUnitExample1: failureTest
4848
*/

annotations/AtUnitExample2.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// annotations/AtUnitExample2.java
2-
// (c)2020 MindView LLC: see Copyright.txt
2+
// (c)2021 MindView LLC: see Copyright.txt
33
// We make no guarantees that this code is fit for any purpose.
44
// Visit http://OnJava8.com for more book information.
55
// Assertions and exceptions can be used in @Tests
@@ -40,18 +40,18 @@ boolean assertAndReturn() {
4040
}
4141
/* Output:
4242
annotations.AtUnitExample2
43+
. assertFailureExample java.lang.AssertionError: What
44+
a surprise!
45+
(failed)
46+
. assertExample
4347
. exceptionExample java.io.FileNotFoundException:
4448
nofile.txt (The system cannot find the file specified)
4549
(failed)
46-
. assertExample
4750
. assertAndReturn This is methodTwo
4851
49-
. assertFailureExample java.lang.AssertionError: What
50-
a surprise!
51-
(failed)
5252
(4 tests)
5353
5454
>>> 2 FAILURES <<<
55-
annotations.AtUnitExample2: exceptionExample
5655
annotations.AtUnitExample2: assertFailureExample
56+
annotations.AtUnitExample2: exceptionExample
5757
*/

annotations/AtUnitExample3.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// annotations/AtUnitExample3.java
2-
// (c)2020 MindView LLC: see Copyright.txt
2+
// (c)2021 MindView LLC: see Copyright.txt
33
// We make no guarantees that this code is fit for any purpose.
44
// Visit http://OnJava8.com for more book information.
55
// {java onjava.atunit.AtUnit
@@ -35,8 +35,8 @@ boolean methodOneTest() {
3535
/* Output:
3636
annotations.AtUnitExample3
3737
. initialization
38+
. methodOneTest
3839
. m2 This is methodTwo
3940
40-
. methodOneTest
4141
OK (3 tests)
4242
*/

annotations/AtUnitExample4.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// annotations/AtUnitExample4.java
2-
// (c)2020 MindView LLC: see Copyright.txt
2+
// (c)2021 MindView LLC: see Copyright.txt
33
// We make no guarantees that this code is fit for any purpose.
44
// Visit http://OnJava8.com for more book information.
55
// {java onjava.atunit.AtUnit

annotations/AtUnitExample5.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// annotations/AtUnitExample5.java
2-
// (c)2020 MindView LLC: see Copyright.txt
2+
// (c)2021 MindView LLC: see Copyright.txt
33
// We make no guarantees that this code is fit for any purpose.
44
// Visit http://OnJava8.com for more book information.
55
// {java onjava.atunit.AtUnit
@@ -14,8 +14,7 @@ public class AtUnitExample5 {
1414
public AtUnitExample5(String text) {
1515
this.text = text;
1616
}
17-
@Override
18-
public String toString() { return text; }
17+
@Override public String toString() { return text; }
1918
@TestProperty
2019
static PrintWriter output;
2120
@TestProperty

annotations/DemoProcessFiles.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// annotations/DemoProcessFiles.java
2-
// (c)2020 MindView LLC: see Copyright.txt
2+
// (c)2021 MindView LLC: see Copyright.txt
33
// We make no guarantees that this code is fit for any purpose.
44
// Visit http://OnJava8.com for more book information.
55
import onjava.ProcessFiles;

annotations/HashSetTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// annotations/HashSetTest.java
2-
// (c)2020 MindView LLC: see Copyright.txt
2+
// (c)2021 MindView LLC: see Copyright.txt
33
// We make no guarantees that this code is fit for any purpose.
44
// Visit http://OnJava8.com for more book information.
55
// {java onjava.atunit.AtUnit
@@ -29,8 +29,8 @@ void tRemove() {
2929
}
3030
/* Output:
3131
annotations.HashSetTest
32+
. tContains
3233
. initialization
3334
. tRemove
34-
. tContains
3535
OK (3 tests)
3636
*/

annotations/PasswordUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// annotations/PasswordUtils.java
2-
// (c)2020 MindView LLC: see Copyright.txt
2+
// (c)2021 MindView LLC: see Copyright.txt
33
// We make no guarantees that this code is fit for any purpose.
44
// Visit http://OnJava8.com for more book information.
55
import java.util.*;

annotations/SimulatingNull.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// annotations/SimulatingNull.java
2-
// (c)2020 MindView LLC: see Copyright.txt
2+
// (c)2021 MindView LLC: see Copyright.txt
33
// We make no guarantees that this code is fit for any purpose.
44
// Visit http://OnJava8.com for more book information.
55
import java.lang.annotation.*;

annotations/StackL.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// annotations/StackL.java
2-
// (c)2020 MindView LLC: see Copyright.txt
2+
// (c)2021 MindView LLC: see Copyright.txt
33
// We make no guarantees that this code is fit for any purpose.
44
// Visit http://OnJava8.com for more book information.
55
// A stack built on a LinkedList

annotations/StackLStringTst.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// annotations/StackLStringTst.java
2-
// (c)2020 MindView LLC: see Copyright.txt
2+
// (c)2021 MindView LLC: see Copyright.txt
33
// We make no guarantees that this code is fit for any purpose.
44
// Visit http://OnJava8.com for more book information.
55
// Applying @Unit to generics
@@ -35,8 +35,8 @@ void tTop() {
3535
}
3636
/* Output:
3737
annotations.StackLStringTst
38+
. tPop
3839
. tTop
3940
. tPush
40-
. tPop
4141
OK (3 tests)
4242
*/

annotations/Testable.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// annotations/Testable.java
2-
// (c)2020 MindView LLC: see Copyright.txt
2+
// (c)2021 MindView LLC: see Copyright.txt
33
// We make no guarantees that this code is fit for any purpose.
44
// Visit http://OnJava8.com for more book information.
55
package annotations;

annotations/UseCase.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// annotations/UseCase.java
2-
// (c)2020 MindView LLC: see Copyright.txt
2+
// (c)2021 MindView LLC: see Copyright.txt
33
// We make no guarantees that this code is fit for any purpose.
44
// Visit http://OnJava8.com for more book information.
55
import java.lang.annotation.*;

annotations/UseCaseTracker.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// annotations/UseCaseTracker.java
2-
// (c)2020 MindView LLC: see Copyright.txt
2+
// (c)2021 MindView LLC: see Copyright.txt
33
// We make no guarantees that this code is fit for any purpose.
44
// Visit http://OnJava8.com for more book information.
55
import java.util.*;
@@ -27,11 +27,11 @@ public static void main(String[] args) {
2727
}
2828
}
2929
/* Output:
30+
Found Use Case 49
31+
New passwords can't equal previously used ones
3032
Found Use Case 48
3133
no description
3234
Found Use Case 47
3335
Passwords must contain at least one numeric
34-
Found Use Case 49
35-
New passwords can't equal previously used ones
3636
Missing use case 50
3737
*/

annotations/database/Constraints.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// annotations/database/Constraints.java
2-
// (c)2020 MindView LLC: see Copyright.txt
2+
// (c)2021 MindView LLC: see Copyright.txt
33
// We make no guarantees that this code is fit for any purpose.
44
// Visit http://OnJava8.com for more book information.
55
package annotations.database;

annotations/database/DBTable.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// annotations/database/DBTable.java
2-
// (c)2020 MindView LLC: see Copyright.txt
2+
// (c)2021 MindView LLC: see Copyright.txt
33
// We make no guarantees that this code is fit for any purpose.
44
// Visit http://OnJava8.com for more book information.
55
package annotations.database;

annotations/database/Member.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// annotations/database/Member.java
2-
// (c)2020 MindView LLC: see Copyright.txt
2+
// (c)2021 MindView LLC: see Copyright.txt
33
// We make no guarantees that this code is fit for any purpose.
44
// Visit http://OnJava8.com for more book information.
55
package annotations.database;
@@ -16,7 +16,8 @@ public class Member {
1616
public String getReference() { return reference; }
1717
public String getFirstName() { return firstName; }
1818
public String getLastName() { return lastName; }
19-
@Override
20-
public String toString() { return reference; }
19+
@Override public String toString() {
20+
return reference;
21+
}
2122
public Integer getAge() { return age; }
2223
}

annotations/database/SQLInteger.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// annotations/database/SQLInteger.java
2-
// (c)2020 MindView LLC: see Copyright.txt
2+
// (c)2021 MindView LLC: see Copyright.txt
33
// We make no guarantees that this code is fit for any purpose.
44
// Visit http://OnJava8.com for more book information.
55
package annotations.database;

annotations/database/SQLString.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// annotations/database/SQLString.java
2-
// (c)2020 MindView LLC: see Copyright.txt
2+
// (c)2021 MindView LLC: see Copyright.txt
33
// We make no guarantees that this code is fit for any purpose.
44
// Visit http://OnJava8.com for more book information.
55
package annotations.database;

annotations/database/TableCreator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// annotations/database/TableCreator.java
2-
// (c)2020 MindView LLC: see Copyright.txt
2+
// (c)2021 MindView LLC: see Copyright.txt
33
// We make no guarantees that this code is fit for any purpose.
44
// Visit http://OnJava8.com for more book information.
55
// Reflection-based annotation processor

annotations/database/Uniqueness.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// annotations/database/Uniqueness.java
2-
// (c)2020 MindView LLC: see Copyright.txt
2+
// (c)2021 MindView LLC: see Copyright.txt
33
// We make no guarantees that this code is fit for any purpose.
44
// Visit http://OnJava8.com for more book information.
55
// Sample of nested annotations

annotations/ifx/ExtractInterface.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// annotations/ifx/ExtractInterface.java
2-
// (c)2020 MindView LLC: see Copyright.txt
2+
// (c)2021 MindView LLC: see Copyright.txt
33
// We make no guarantees that this code is fit for any purpose.
44
// Visit http://OnJava8.com for more book information.
55
// javac-based annotation processing

annotations/ifx/IfaceExtractorProcessor.java

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// annotations/ifx/IfaceExtractorProcessor.java
2-
// (c)2020 MindView LLC: see Copyright.txt
2+
// (c)2021 MindView LLC: see Copyright.txt
33
// We make no guarantees that this code is fit for any purpose.
44
// Visit http://OnJava8.com for more book information.
55
// javac-based annotation processing
@@ -21,14 +21,12 @@ public class IfaceExtractorProcessor
2121
interfaceMethods = new ArrayList<>();
2222
Elements elementUtils;
2323
private ProcessingEnvironment processingEnv;
24-
@Override
25-
public void init(
24+
@Override public void init(
2625
ProcessingEnvironment processingEnv) {
2726
this.processingEnv = processingEnv;
2827
elementUtils = processingEnv.getElementUtils();
2928
}
30-
@Override
31-
public boolean process(
29+
@Override public boolean process(
3230
Set<? extends TypeElement> annotations,
3331
RoundEnvironment env) {
3432
for(Element elem:env.getElementsAnnotatedWith(

annotations/ifx/Multiplier.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// annotations/ifx/Multiplier.java
2-
// (c)2020 MindView LLC: see Copyright.txt
2+
// (c)2021 MindView LLC: see Copyright.txt
33
// We make no guarantees that this code is fit for any purpose.
44
// Visit http://OnJava8.com for more book information.
55
// javac-based annotation processing

annotations/simplest/Simple.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// annotations/simplest/Simple.java
2-
// (c)2020 MindView LLC: see Copyright.txt
2+
// (c)2021 MindView LLC: see Copyright.txt
33
// We make no guarantees that this code is fit for any purpose.
44
// Visit http://OnJava8.com for more book information.
55
// A bare-bones annotation

annotations/simplest/SimpleProcessor.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// annotations/simplest/SimpleProcessor.java
2-
// (c)2020 MindView LLC: see Copyright.txt
2+
// (c)2021 MindView LLC: see Copyright.txt
33
// We make no guarantees that this code is fit for any purpose.
44
// Visit http://OnJava8.com for more book information.
55
// A bare-bones annotation processor
@@ -14,8 +14,7 @@
1414
@SupportedSourceVersion(SourceVersion.RELEASE_8)
1515
public class SimpleProcessor
1616
extends AbstractProcessor {
17-
@Override
18-
public boolean process(
17+
@Override public boolean process(
1918
Set<? extends TypeElement> annotations,
2019
RoundEnvironment env) {
2120
for(TypeElement t : annotations)

annotations/simplest/SimpleTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// annotations/simplest/SimpleTest.java
2-
// (c)2020 MindView LLC: see Copyright.txt
2+
// (c)2021 MindView LLC: see Copyright.txt
33
// We make no guarantees that this code is fit for any purpose.
44
// Visit http://OnJava8.com for more book information.
55
// Test the "Simple" annotation

arrays/AlphabeticSearch.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// arrays/AlphabeticSearch.java
2-
// (c)2020 MindView LLC: see Copyright.txt
2+
// (c)2021 MindView LLC: see Copyright.txt
33
// We make no guarantees that this code is fit for any purpose.
44
// Visit http://OnJava8.com for more book information.
55
// Searching with a Comparator import

0 commit comments

Comments
 (0)