1 | package com.github.dakusui.actionunit.core; | |
2 | ||
3 | import com.github.dakusui.actionunit.actions.*; | |
4 | ||
5 | import java.util.Formattable; | |
6 | ||
7 | public interface Action extends Formattable { | |
8 | void accept(Visitor visitor); | |
9 | ||
10 | ||
11 | abstract class Builder<A extends Action> { | |
12 | public abstract A build(); | |
13 | ||
14 | /** | |
15 | * A synonym of {@code build()} method. This method is defined not to use a | |
16 | * method name 'build', which introduces extra word not relating to what is | |
17 | * being achieved. | |
18 | * <p> | |
19 | * If you prefer a word 'build' in your code, simply use {@code build} | |
20 | * method. | |
21 | * | |
22 | * @return An object built by {@code build} method. | |
23 | */ | |
24 | public final A $() { | |
25 |
1
1. $ : replaced return value with null for com/github/dakusui/actionunit/core/Action$Builder::$ → KILLED |
return build(); |
26 | } | |
27 | } | |
28 | ||
29 | interface Visitor { | |
30 | @SuppressWarnings("unused") | |
31 | default void visit(Action action) { | |
32 | throw new UnsupportedOperationException(); | |
33 | } | |
34 | ||
35 | default void visit(Leaf action) { | |
36 |
1
1. visit : removed call to com/github/dakusui/actionunit/core/Action$Visitor::visit → KILLED |
this.visit((Action) action); |
37 | } | |
38 | ||
39 | default void visit(Named action) { | |
40 |
1
1. visit : removed call to com/github/dakusui/actionunit/core/Action$Visitor::visit → KILLED |
this.visit((Action) action); |
41 | } | |
42 | ||
43 | default void visit(Composite action) { | |
44 |
1
1. visit : removed call to com/github/dakusui/actionunit/core/Action$Visitor::visit → KILLED |
this.visit((Action) action); |
45 | } | |
46 | ||
47 | default <E> void visit(ForEach<E> action) { | |
48 |
1
1. visit : removed call to com/github/dakusui/actionunit/core/Action$Visitor::visit → KILLED |
this.visit((Action) action); |
49 | } | |
50 | ||
51 | default void visit(While action) { | |
52 |
1
1. visit : removed call to com/github/dakusui/actionunit/core/Action$Visitor::visit → NO_COVERAGE |
this.visit((Action) action); |
53 | } | |
54 | ||
55 | default void visit(When action) { | |
56 |
1
1. visit : removed call to com/github/dakusui/actionunit/core/Action$Visitor::visit → KILLED |
this.visit((Action) action); |
57 | } | |
58 | ||
59 | default <V> void visit(With<V> action) { | |
60 |
1
1. visit : removed call to com/github/dakusui/actionunit/core/Action$Visitor::visit → NO_COVERAGE |
this.visit((Action) action); |
61 | } | |
62 | ||
63 | default void visit(Attempt action) { | |
64 |
1
1. visit : removed call to com/github/dakusui/actionunit/core/Action$Visitor::visit → KILLED |
this.visit((Action) action); |
65 | } | |
66 | ||
67 | default void visit(Retry action) { | |
68 |
1
1. visit : removed call to com/github/dakusui/actionunit/core/Action$Visitor::visit → KILLED |
this.visit((Action) action); |
69 | } | |
70 | ||
71 | default void visit(TimeOut action) { | |
72 |
1
1. visit : removed call to com/github/dakusui/actionunit/core/Action$Visitor::visit → KILLED |
this.visit((Action) action); |
73 | } | |
74 | ||
75 | default void visit(Ensured action) { | |
76 |
1
1. visit : removed call to com/github/dakusui/actionunit/core/Action$Visitor::visit → NO_COVERAGE |
this.visit((Action) action); |
77 | } | |
78 | } | |
79 | } | |
Mutations | ||
25 |
1.1 |
|
36 |
1.1 |
|
40 |
1.1 |
|
44 |
1.1 |
|
48 |
1.1 |
|
52 |
1.1 |
|
56 |
1.1 |
|
60 |
1.1 |
|
64 |
1.1 |
|
68 |
1.1 |
|
72 |
1.1 |
|
76 |
1.1 |