Skip to content

Package: RefUnResState

RefUnResState

nameinstructionbranchcomplexitylinemethod
RefUnResState(String)
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%
accept(RefStateVisitor)
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%
equals(Object)
M: 1 C: 13
93%
M: 2 C: 2
50%
M: 2 C: 1
33%
M: 0 C: 2
100%
M: 0 C: 1
100%
getType()
M: 0 C: 13
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 2
100%
M: 0 C: 1
100%
hashCode()
M: 0 C: 4
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%

Coverage

1: package model.type;
2:
3: /**
4: * A state that represents that a reference is unresolved.
5: *
6: * @author HFW410RA - Philipp Rammos
7: *
8: */
9: public class RefUnResState extends AbstractRefState {
10:         /**
11:          * Represents the stringrepresentation of the reference.
12:          */
13:
14:         /**
15:          * Constructor, just sets fields. No side effects.
16:          *
17:          * @param value
18:          * The value to set.
19:          */
20:
21:         public RefUnResState(final String value) {
22:                 super(value);
23:
24:         }
25:
26:         @Override
27:         public boolean equals(final Object obj) {
28:•                return obj instanceof RefUnResState
29:•                                && ((RefUnResState) obj).getValue().equals(this.getValue());
30:         }
31:
32:         @Override
33:         public int hashCode() {
34:                 return this.getValue().hashCode();
35:         }
36:
37:         @Override
38:         public NamedVariableType getType() throws ReferenceIsUnresolvedException {
39:
40:                 throw new ReferenceIsUnresolvedException(
41:                                 basic.ModelConstants.REFISUNRESEXCEP + this.getValue());
42:
43:         }
44:
45:         @Override
46:         public void accept(final RefStateVisitor vis)
47:                         throws TypeDoesNotExistException, TypeExceptions {
48:                 vis.visit(this);
49:         }
50:
51: }