Skip to content

Package: ConstructorInvalidState

ConstructorInvalidState

nameinstructionbranchcomplexitylinemethod
ConstructorInvalidState()
M: 7 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 3 C: 0
0%
M: 1 C: 0
0%
accept(ConstructorReferenceStateVisitor)
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%
accept(ConstructorReferenceStateVisitorException)
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%
accept(ConstructorReferenceStateVisitorReturn)
M: 4 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
accept(ConstructorReferenceStateVisitorReturnException)
M: 4 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
create()
M: 4 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
equals(Object)
M: 3 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
hashCode()
M: 4 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
toString()
M: 3 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%

Coverage

1: package de.fhdw.wtf.common.ast;
2:
3: import de.fhdw.wtf.common.ast.type.InvalidState;
4: import de.fhdw.wtf.common.ast.visitor.ConstructorReferenceStateVisitor;
5: import de.fhdw.wtf.common.ast.visitor.ConstructorReferenceStateVisitorException;
6: import de.fhdw.wtf.common.ast.visitor.ConstructorReferenceStateVisitorReturn;
7: import de.fhdw.wtf.common.ast.visitor.ConstructorReferenceStateVisitorReturnException;
8:
9: /**
10: * This class represents an invalid state of a {@link ConstructorReference}. That means, that the referencer did not
11: * find a matching definition constructor for the applied constructor definition.
12: */
13: public final class ConstructorInvalidState implements ConstructorReferenceState {
14:         
15:         /**
16:          * the hashCode for this class, which is constant because only one InvalidState exist
17:          */
18:         private final Integer HASHCODE_CONSTANT = 389856;
19:         
20:         /**
21:          * Constructor of {@link InvalidState}.
22:          */
23:         private ConstructorInvalidState() {
24:         }
25:         
26:         /**
27:          * Creates a {@link ConstructorInvalidState}-Object.
28:          *
29:          * @return The ConstructorInvalidState-Object
30:          */
31:         public static ConstructorInvalidState create() {
32:                 return new ConstructorInvalidState();
33:         }
34:         
35:         @Override
36:         public boolean equals(final Object o) {
37:                 return o instanceof ConstructorInvalidState;
38:         }
39:         
40:         @Override
41:         public int hashCode() {
42:                 return this.HASHCODE_CONSTANT;
43:         }
44:         
45:         @Override
46:         public String toString() {
47:                 return ConstructorInvalidState.class.getSimpleName();
48:         }
49:         
50:         @Override
51:         public void accept(final ConstructorReferenceStateVisitor v) {
52:                 v.handle(this);
53:         }
54:         
55:         @Override
56:         public <X> X accept(final ConstructorReferenceStateVisitorReturn<X> v) {
57:                 return v.handle(this);
58:         }
59:         
60:         @Override
61:         public <Y extends Exception> void accept(final ConstructorReferenceStateVisitorException<Y> v) throws Y {
62:                 v.handle(this);
63:         }
64:         
65:         @Override
66:         public <X, Y extends Exception> X accept(final ConstructorReferenceStateVisitorReturnException<X, Y> v) throws Y {
67:                 return v.handle(this);
68:         }
69: }