Package: Aufteilungstyp
Aufteilungstyp
name | instruction | branch | complexity | line | method | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Aufteilungstyp() |
|
|
|
|
|
||||||||||||||||||||
getInport() |
|
|
|
|
|
||||||||||||||||||||
setInport(Porttyp) |
|
|
|
|
|
||||||||||||||||||||
setOrAddInporttyp(Porttyp) |
|
|
|
|
|
||||||||||||||||||||
setOrAddOutporttyp(Porttyp) |
|
|
|
|
|
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: }