Skip to content

Package: Aufteilungstyp

Aufteilungstyp

nameinstructionbranchcomplexitylinemethod
Aufteilungstyp()
M: 0 C: 3
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 2
100%
M: 0 C: 1
100%
getInport()
M: 11 C: 9
45%
M: 3 C: 1
25%
M: 2 C: 1
33%
M: 1 C: 2
67%
M: 0 C: 1
100%
setInport(Porttyp)
M: 4 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%
setOrAddInporttyp(Porttyp)
M: 0 C: 6
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 3
100%
M: 0 C: 1
100%
setOrAddOutporttyp(Porttyp)
M: 0 C: 4
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 2
100%
M: 0 C: 1
100%

Coverage

1: package ablaeufe.meta.konnektortypen;
2:
3: import ablaeufe.meta.Porttyp;
4: import ablaeufe.meta.visitor.AufteilungstypVisitor;
5:
6: /**
7: * Ein Aufteilungstyp wird benötigt um von einem Aktivitätstypen auf mehrere Aktivitätstypen aufzuteilen. Dabei können
8: * die Nachfolgenden Aktivitätstypen entweder synchron oder alternativ ausgeführt werden.
9: *
10: */
11: public abstract class Aufteilungstyp extends Konnektortyp {
12:
13: /**
14: * Erstellt einen Aufteilungstyp ohne Inporttypen und Outporttypen.
15: */
16: Aufteilungstyp() {
17: }
18:
19: @Override
20: public void setOrAddOutporttyp(final Porttyp porttyp) {
21: this.addOutporttyp(porttyp);
22: }
23:
24: @Override
25: public void setOrAddInporttyp(final Porttyp porttyp) {
26: this.clearInporttypen();
27: this.addInporttyp(porttyp);
28: }
29:
30: /**
31:          *
32:          * @return Inport des Aufteilungstypen.
33:          */
34: public Porttyp getInport() {
35:• if (this.getInporttypen().isEmpty() || this.getInporttypen().size() > 1) {
36: throw new RuntimeException("Inports leer oder es gibt mehr als Einen!");
37: }
38: return this.getInporttypen().get(0);
39: }
40:
41:         /**
42:          * Setzt den Inport des Aufteilungstypen neu.
43:          *
44:          * @param port
45:          * neuer Inport
46:          */
47:         public void setInport(final Porttyp port) {
48:                 this.addInporttyp(port);
49:         }
50:
51:         /**
52:          * Accept Operation für das Visitor Pattern.
53:          *
54:          * @param visitor
55:          * der Visitor
56:          */
57:         public abstract void accept(AufteilungstypVisitor visitor);
58:
59: }