Package: IrNodeInfo

IrNodeInfo

nameinstructionbranchcomplexitylinemethod
IrNodeInfo(INode)
M: 9 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 4 C: 0
0%
M: 1 C: 0
0%
IrNodeInfo(INode, String)
M: 0 C: 9
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 4
100%
M: 0 C: 1
100%
equals(Object)
M: 48 C: 0
0%
M: 20 C: 0
0%
M: 11 C: 0
0%
M: 12 C: 0
0%
M: 1 C: 0
0%
getNode()
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%
getReason()
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: 0 C: 22
100%
M: 2 C: 2
50%
M: 2 C: 1
33%
M: 0 C: 6
100%
M: 0 C: 1
100%
toString()
M: 15 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 org.overture.codegen.ir;
2:
3: public class IrNodeInfo
4: {
5:         private INode node;
6:         private String reason;
7:
8:         public IrNodeInfo(INode node)
9:         {
10:                 super();
11:                 this.node = node;
12:                 this.reason = null;
13:         }
14:
15:         public IrNodeInfo(INode node, String reason)
16:         {
17:                 super();
18:                 this.node = node;
19:                 this.reason = reason;
20:         }
21:
22:         public INode getNode()
23:         {
24:                 return node;
25:         }
26:
27:         public String getReason()
28:         {
29:                 return reason;
30:         }
31:
32:         @Override
33:         public int hashCode()
34:         {
35:                 int hash = 0;
36:
37:•                if (node != null)
38:                 {
39:                         hash += node.hashCode();
40:                 }
41:
42:•                if (reason != null)
43:                 {
44:                         hash += reason.hashCode();
45:                 }
46:
47:                 return hash;
48:         }
49:
50:         @Override
51:         public boolean equals(Object obj)
52:         {
53:•                if (obj == null)
54:                 {
55:                         return false;
56:                 }
57:
58:•                if (!(obj instanceof IrNodeInfo))
59:                 {
60:                         return false;
61:                 }
62:
63:                 IrNodeInfo other = (IrNodeInfo) obj;
64:
65:•                if (this.node == null && other.node != null
66:•                                || this.node != null && !this.node.equals(other.node))
67:                 {
68:                         return false;
69:                 }
70:
71:•                if (this.reason == null && other.reason != null
72:•                                || this.reason != null && !this.reason.equals(other.reason))
73:                 {
74:                         return false;
75:                 }
76:
77:                 return true;
78:         }
79:
80:         @Override
81:         public String toString()
82:         {
83:                 return node.getClass().getSimpleName() + ". Reason: " + reason;
84:         }
85: }