Package: InvalidNamesResult

InvalidNamesResult

nameinstructionbranchcomplexitylinemethod
InvalidNamesResult()
M: 0 C: 23
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 6
100%
M: 0 C: 1
100%
InvalidNamesResult(Set, Set, Set, Set, String)
M: 0 C: 18
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 7
100%
M: 0 C: 1
100%
getCorrectionPrefix()
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%
getObjectMethodViolations()
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%
getReservedWordViolations()
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%
getTempVarViolations()
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%
getTypenameViolations()
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%
isEmpty()
M: 0 C: 20
100%
M: 2 C: 6
75%
M: 2 C: 3
60%
M: 0 C: 3
100%
M: 0 C: 1
100%

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.analysis.violations;
23:
24: import java.util.HashSet;
25: import java.util.Set;
26:
27: public class InvalidNamesResult
28: {
29:         private Set<Violation> reservedWordViolations;
30:         private Set<Violation> typenameViolations;
31:         private Set<Violation> tempVarViolations;
32:         private Set<Violation> objectMethodViolations;
33:
34:         private String correctionPrefix;
35:
36:         public InvalidNamesResult(Set<Violation> reservedWordViolations,
37:                         Set<Violation> typenameViolations, Set<Violation> tempVarViolations,
38:                         Set<Violation> objectMethodViolations, String correctionPrefix)
39:         {
40:                 this.reservedWordViolations = reservedWordViolations;
41:                 this.typenameViolations = typenameViolations;
42:                 this.tempVarViolations = tempVarViolations;
43:                 this.objectMethodViolations = objectMethodViolations;
44:
45:                 this.correctionPrefix = correctionPrefix;
46:         }
47:
48:         public InvalidNamesResult()
49:         {
50:                 this.reservedWordViolations = new HashSet<>();
51:                 this.typenameViolations = new HashSet<>();
52:                 this.tempVarViolations = new HashSet<>();
53:                 this.objectMethodViolations = new HashSet<>();
54:         }
55:
56:         public Set<Violation> getReservedWordViolations()
57:         {
58:                 return reservedWordViolations;
59:         }
60:
61:         public Set<Violation> getTypenameViolations()
62:         {
63:                 return typenameViolations;
64:         }
65:
66:         public Set<Violation> getTempVarViolations()
67:         {
68:                 return tempVarViolations;
69:         }
70:
71:         public Set<Violation> getObjectMethodViolations()
72:         {
73:                 return objectMethodViolations;
74:         }
75:
76:         public boolean isEmpty()
77:         {
78:•                return reservedWordViolations.isEmpty() && typenameViolations.isEmpty()
79:•                                && tempVarViolations.isEmpty()
80:•                                && objectMethodViolations.isEmpty();
81:         }
82:
83:         public String getCorrectionPrefix()
84:         {
85:                 return correctionPrefix;
86:         }
87: }