Package: PatternInfo

PatternInfo

nameinstructionbranchcomplexitylinemethod
PatternInfo(STypeIR, SPatternIR, SExpIR)
M: 0 C: 12
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 5
100%
M: 0 C: 1
100%
getActualValue()
M: 0 C: 3
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
getPattern()
M: 0 C: 3
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
getType()
M: 0 C: 3
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
toString()
M: 20 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: /*
2: * #%~
3: * VDM Code Generator
4: * %%
5: * Copyright (C) 2008 - 2014 Overture
6: * %%
7: * This program is free software: you can redistribute it and/or modify
8: * it under the terms of the GNU General Public License as
9: * published by the Free Software Foundation, either version 3 of the
10: * License, or (at your option) any later version.
11: *
12: * This program is distributed in the hope that it will be useful,
13: * but WITHOUT ANY WARRANTY; without even the implied warranty of
14: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15: * GNU General Public License for more details.
16: *
17: * You should have received a copy of the GNU General Public
18: * License along with this program. If not, see
19: * <http://www.gnu.org/licenses/gpl-3.0.html>.
20: * #~%
21: */
22: package org.overture.codegen.trans.patterns;
23:
24: import org.overture.codegen.ir.SExpIR;
25: import org.overture.codegen.ir.SPatternIR;
26: import org.overture.codegen.ir.STypeIR;
27:
28: public class PatternInfo
29: {
30:         private STypeIR type;
31:         private SPatternIR pattern;
32:         private SExpIR actualValue;
33:
34:         public PatternInfo(STypeIR type, SPatternIR pattern, SExpIR actualValue)
35:         {
36:                 this.type = type;
37:                 this.pattern = pattern;
38:                 this.actualValue = actualValue;
39:         }
40:
41:         public STypeIR getType()
42:         {
43:                 return type;
44:         }
45:
46:         public SPatternIR getPattern()
47:         {
48:                 return pattern;
49:         }
50:
51:         public SExpIR getActualValue()
52:         {
53:                 return actualValue;
54:         }
55:
56:         @Override
57:         public String toString()
58:         {
59:                 return String.format("Type: %s\nPattern: %s\nValue: %s", type, pattern, actualValue);
60:         }
61: }