Package: AdditionalErrorMsgState
AdditionalErrorMsgState
| name | instruction | branch | complexity | line | method | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| AdditionalErrorMsgState(TempTypeExtension) | 
  | 
  | 
  | 
  | 
  | 
||||||||||||||||||||
| parse(RouterSoftware, TempVariableType, Buffer, TypeFileParser) | 
  | 
  | 
  | 
  | 
  | 
||||||||||||||||||||
Coverage
1: /**
2:  * 
3:  */
4: package parser.states.typestates;
5: 
6: import model.RouterSoftware;
7: import parser.ParserException;
8: import parser.TypeFileParser;
9: import parser.tempparserobjects.TempTypeExtension;
10: import parser.tempparserobjects.TempVariableType;
11: import symbols.AbstractSymbol;
12: import symbols.StringSymbol;
13: import basic.Buffer;
14: 
15: /**
16:  * @author Hendrik
17:  * 
18:  */
19: public class AdditionalErrorMsgState extends AbstractTypeState {
20:         /**
21:          * TempTypExtension.
22:          */
23:         private final TempTypeExtension tempExt;
24: 
25:         /**
26:          * constructor no Side effects.
27:          * 
28:          * @param tempExt
29:          *            TempExt.
30:          */
31:         public AdditionalErrorMsgState(final TempTypeExtension tempExt) {
32:                 super();
33:                 this.tempExt = tempExt;
34:         }
35: 
36:         @Override
37:         public void parse(final RouterSoftware rs, final TempVariableType tVT,
38:                         final Buffer<AbstractSymbol> buffer, final TypeFileParser tFP)
39:                         throws InterruptedException, ParserException {
40:                 final AbstractSymbol nexSymbol = buffer.peek();
41:•                if (nexSymbol instanceof StringSymbol) {
42:                         tFP.setState(new AdditionalErrorMsgState2(this.tempExt));
43:                 } else {
44:                         throw new ParserException("no valid symbol: "
45:                                         + buffer.peek().getClass().getCanonicalName() + " expected StringSymbol");
46:                 }
47: 
48:         }
49: }