mirror of
https://github.com/Example-uPagge/debugger.git
synced 2024-06-14 11:22:32 +03:00
Добавил примеры для дебага
This commit is contained in:
parent
aec1f4f0b4
commit
e9604fb62c
@ -3,16 +3,11 @@ package dev.struchkov.example.debugger.four;
|
||||
public class ExampleFour {
|
||||
|
||||
public static void main(String[] args) {
|
||||
final ThirdService thirdService = new ThirdService();
|
||||
final SecondService secondService = new SecondService(thirdService);
|
||||
final FirstService firstService = new FirstService(secondService);
|
||||
final ThreadExample one = new ThreadExample("Первый");
|
||||
final ThreadExample two = new ThreadExample("Второй");
|
||||
|
||||
final Entity entity = new Entity("Dasha");
|
||||
firstService.processing(entity);
|
||||
|
||||
System.out.println();
|
||||
System.out.println(entity);
|
||||
System.out.println();
|
||||
new Thread(one).start();
|
||||
new Thread(two).start();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
package dev.struchkov.example.debugger.three;
|
||||
package dev.struchkov.example.debugger.four;
|
||||
|
||||
public class ThreadExample implements Runnable {
|
||||
|
@ -5,8 +5,8 @@ public class ExampleOne {
|
||||
public static void main(String[] args) {
|
||||
final PersonService personService = new PersonService();
|
||||
|
||||
demoOne(personService);
|
||||
// demoTwo(personService);
|
||||
// demoOne(personService);
|
||||
demoTwo(personService);
|
||||
}
|
||||
|
||||
private static void demoOne(PersonService personService) {
|
||||
@ -15,6 +15,10 @@ public class ExampleOne {
|
||||
personService.showAllPerson();
|
||||
}
|
||||
|
||||
private static String getIvanovName() {
|
||||
return "Иванов";
|
||||
}
|
||||
|
||||
private static void demoTwo(PersonService personService) {
|
||||
personService.showAllPerson();
|
||||
personService.correctDeleteAllByLastName("Скворцова");
|
||||
|
@ -1,4 +1,4 @@
|
||||
package dev.struchkov.example.debugger.four;
|
||||
package dev.struchkov.example.debugger.three;
|
||||
|
||||
public class Entity {
|
||||
|
@ -0,0 +1,18 @@
|
||||
package dev.struchkov.example.debugger.three;
|
||||
|
||||
public class ExampleThree {
|
||||
|
||||
public static void main(String[] args) {
|
||||
final ThirdService thirdService = new ThirdService();
|
||||
final SecondService secondService = new SecondService(thirdService);
|
||||
final FirstService firstService = new FirstService(secondService);
|
||||
|
||||
final Entity entity = new Entity("Dasha");
|
||||
firstService.processing(entity);
|
||||
|
||||
System.out.println();
|
||||
System.out.println(entity);
|
||||
System.out.println();
|
||||
}
|
||||
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
package dev.struchkov.example.debugger.four;
|
||||
package dev.struchkov.example.debugger.three;
|
||||
|
||||
import dev.struchkov.example.debugger.box.SurpriseException;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package dev.struchkov.example.debugger.four;
|
||||
package dev.struchkov.example.debugger.three;
|
||||
|
||||
public class SecondService {
|
||||
|
@ -1,4 +1,4 @@
|
||||
package dev.struchkov.example.debugger.four;
|
||||
package dev.struchkov.example.debugger.three;
|
||||
|
||||
public class ThirdService {
|
||||
|
@ -1,13 +0,0 @@
|
||||
package dev.struchkov.example.debugger.three;
|
||||
|
||||
public class TreadMain {
|
||||
|
||||
public static void main(String[] args) {
|
||||
final ThreadExample one = new ThreadExample("Первый");
|
||||
final ThreadExample two = new ThreadExample("Второй");
|
||||
|
||||
new Thread(one).start();
|
||||
new Thread(two).start();
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,10 @@
|
||||
package dev.struchkov.example.debugger.two;
|
||||
|
||||
public class ExampleTwo {
|
||||
|
||||
public static void main(String[] args) {
|
||||
final FooService fooService = new FooService();
|
||||
fooService.example();
|
||||
}
|
||||
|
||||
}
|
@ -2,7 +2,7 @@ package dev.struchkov.example.debugger.two;
|
||||
|
||||
import dev.struchkov.example.debugger.box.SurpriseBox;
|
||||
|
||||
public class ForExample {
|
||||
public class FooService {
|
||||
|
||||
public void example() {
|
||||
for (int i = 0; i < 1000; i++) {
|
@ -1,10 +0,0 @@
|
||||
package dev.struchkov.example.debugger.two;
|
||||
|
||||
public class Main {
|
||||
|
||||
public static void main(String[] args) {
|
||||
final ForExample forExample = new ForExample();
|
||||
forExample.example();
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user