Package: TypeExtension
TypeExtension
name | instruction | branch | complexity | line | method | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
TypeExtension(NamedVariableType) |
|
|
|
|
|
||||||||||||||||||||
getExtensionIdentifier() |
|
|
|
|
|
||||||||||||||||||||
getMeldung() |
|
|
|
|
|
||||||||||||||||||||
isVariableConditionFlag() |
|
|
|
|
|
||||||||||||||||||||
setMeldung(String) |
|
|
|
|
|
||||||||||||||||||||
setVariableConditionFlag(boolean) |
|
|
|
|
|
||||||||||||||||||||
toStringResolved() |
|
|
|
|
|
Coverage
1: /**
2: *
3: */
4: package model.type;
5:
6: /**
7: * @author Hendrik
8: *
9: */
10: public abstract class TypeExtension extends AbstractType {
11:
12:         /**
13:          * The appendant variable.
14:          */
15:         private final NamedVariableType extensionIdentifier;
16:         /**
17:          * Meldung to add.
18:          */
19:         private String meldung;
20:
21:         /**
22:          * Flag to decide if variable-condition is tagged as true or false.
23:          */
24:         private boolean variableConditionFlag;
25:
26:         /**
27:          * @param variableIdentifier
28:          * The appendant variable.
29:          */
30:         public TypeExtension(final NamedVariableType variableIdentifier) {
31:                 super();
32:                 this.extensionIdentifier = variableIdentifier;
33:                 variableIdentifier.addTypeExtension(this);
34:                 this.meldung = null;
35:                 this.variableConditionFlag = false;
36:         }
37:
38:         /**
39:          * @return the meldung
40:          */
41:         public String getMeldung() {
42:                 return this.meldung;
43:         }
44:
45:         /**
46:          * @param meldung
47:          * the meldung to set
48:          */
49:         public void setMeldung(final String meldung) {
50:                 this.meldung = meldung;
51:         }
52:
53:         /**
54:          * @return the variableIdentifier
55:          */
56:         public NamedVariableType getExtensionIdentifier() {
57:                 return this.extensionIdentifier;
58:         }
59:
60:         @Override
61:         public String toStringResolved() throws ReferenceIsUnresolvedException {
62:                 return this.getExpression().toStringResolved();
63:         }
64:
65:         /**
66:          * accept method for visitor pattern.
67:          *
68:          * @param vis
69:          * the visitor.
70:          * @throws ReferenceIsUnresolvedException
71:          * ReferenceIsUnresolvedException
72:          * @throws TypeExceptions
73:          * TypeExceptions
74:          * @throws TypeDoesNotExistException
75:          * TypeDoesNotExistException
76:          */
77:         public abstract void accept(TypeExtensionVisitor vis)
78:                         throws ReferenceIsUnresolvedException, TypeDoesNotExistException, TypeExceptions;
79:
80:         /**
81:          * get the flag of the variable-condition (can be tagged as true or false).
82:          *
83:          * @return the variableConditionFlag
84:          */
85:         public boolean isVariableConditionFlag() {
86:                 return variableConditionFlag;
87:         }
88:
89:         /**
90:          * set the flag of the variable-condition (can be set to true or false).
91:          *
92:          * @param variableConditionFlag
93:          * the variableConditionFlag.
94:          */
95:         public void setVariableConditionFlag(final boolean variableConditionFlag) {
96:                 this.variableConditionFlag = variableConditionFlag;
97:         }
98: }