Package: AstAssistantFactory

AstAssistantFactory

nameinstructionbranchcomplexitylinemethod
AstAssistantFactory()
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%
createAUnionTypeAssistant()
M: 0 C: 5
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
createPAccessSpecifierAssistant()
M: 0 C: 5
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
createPDefinitionAssistant()
M: 0 C: 5
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
createPPatternAssistant(String)
M: 0 C: 6
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
createPTypeAssistant()
M: 0 C: 5
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
createSNumericBasicTypeAssistant()
M: 0 C: 5
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
getAllVariableNameLocator(String)
M: 0 C: 6
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
getHashChecker()
M: 5 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
getNumericBasisChecker(String)
M: 0 C: 6
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
getNumericFinder(String)
M: 0 C: 6
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%

Coverage

1: /*
2: * #%~
3: * The Overture Abstract Syntax Tree
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.ast.assistant;
23:
24: import org.overture.ast.analysis.intf.IAnswer;
25: import org.overture.ast.assistant.definition.PAccessSpecifierAssistant;
26: import org.overture.ast.assistant.definition.PDefinitionAssistant;
27: import org.overture.ast.assistant.pattern.PPatternAssistant;
28: import org.overture.ast.assistant.type.AUnionTypeAssistant;
29: import org.overture.ast.assistant.type.PTypeAssistant;
30: import org.overture.ast.assistant.type.SNumericBasicTypeAssistant;
31: import org.overture.ast.lex.LexNameList;
32: import org.overture.ast.types.SNumericBasicType;
33: import org.overture.ast.util.pattern.AllVariableNameLocator;
34: import org.overture.ast.util.type.HashChecker;
35: import org.overture.ast.util.type.NumericBasisChecker;
36: import org.overture.ast.util.type.NumericFinder;
37:
38: //TODO Add assistant Javadoc
39: /**
40: * This is the main AST assistant factory. everyone ultimately inherits from here.
41: *
42: * @author ldc
43: */
44:
45: public class AstAssistantFactory implements IAstAssistantFactory
46: {
47:         @Override
48:         public PAccessSpecifierAssistant createPAccessSpecifierAssistant()
49:         {
50:                 return new PAccessSpecifierAssistant(this);
51:         }
52:
53:         @Override
54:         public PDefinitionAssistant createPDefinitionAssistant()
55:         {
56:                 return new PDefinitionAssistant(this);
57:         }
58:
59:         @Override
60:         public PPatternAssistant createPPatternAssistant(String fromModule)
61:         {
62:                 return new PPatternAssistant(this, fromModule);
63:         }
64:
65:         // @Override
66:         // public ABracketTypeAssistant createABracketTypeAssistant()
67:         // {
68:         // return new ABracketTypeAssistant(this);
69:         // }
70:
71:         // @Override
72:         // public ANamedInvariantTypeAssistant createANamedInvariantTypeAssistant()
73:         // {
74:         // return new ANamedInvariantTypeAssistant(this);
75:         // }
76:
77:         // @Override
78:         // public AOptionalTypeAssistant createAOptionalTypeAssistant()
79:         // {
80:         // return new AOptionalTypeAssistant(this);
81:         // }
82:
83:         // @Override
84:         // public AParameterTypeAssistant createAParameterTypeAssistant()
85:         // {
86:         // return new AParameterTypeAssistant(this);
87:         // }
88:
89:         @Override
90:         public AUnionTypeAssistant createAUnionTypeAssistant()
91:         {
92:                 return new AUnionTypeAssistant(this);
93:         }
94:
95:         // @Override
96:         // public AUnknownTypeAssistant createAUnknownTypeAssistant()
97:         // {
98:         // return new AUnknownTypeAssistant(this);
99:         // }
100:
101:         @Override
102:         public PTypeAssistant createPTypeAssistant()
103:         {
104:                 return new PTypeAssistant(this);
105:         }
106:
107:         @Override
108:         public SNumericBasicTypeAssistant createSNumericBasicTypeAssistant()
109:         {
110:                 return new SNumericBasicTypeAssistant(this);
111:         }
112:
113:         // visitors
114:
115:         @Override
116:         public IAnswer<LexNameList> getAllVariableNameLocator(String fromModule)
117:         {
118:                 return new AllVariableNameLocator(this, fromModule);
119:         }
120:
121:         @Override
122:         public IAnswer<Boolean> getNumericFinder(String fromModule)
123:         {
124:                 return new NumericFinder(this, fromModule);
125:         }
126:
127:         @Override
128:         public IAnswer<SNumericBasicType> getNumericBasisChecker(String fromModule)
129:         {
130:                 return new NumericBasisChecker(this, fromModule);
131:         }
132:
133:         @Override
134:         public IAnswer<Integer> getHashChecker()
135:         {
136:                 return new HashChecker(this);
137:         }
138:
139: }