Package: IdentifierTypeVariableState1
IdentifierTypeVariableState1
| name | instruction | branch | complexity | line | method | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| IdentifierTypeVariableState1(Scanner, Integer, Integer) | 
  | 
  | 
  | 
  | 
  | 
||||||||||||||||||||
| action(Character, Buffer, String) | 
  | 
  | 
  | 
  | 
  | 
||||||||||||||||||||
| finish(Buffer, String) | 
  | 
  | 
  | 
  | 
  | 
||||||||||||||||||||
Coverage
1: /**
2:  * 
3:  */
4: package scanner;
5: 
6: import model.Position;
7: import symbols.AbstractSymbol;
8: import symbols.UnknownSymbol;
9: import basic.Buffer;
10: 
11: /**
12:  * @author Hendrik
13:  * 
14:  */
15: public class IdentifierTypeVariableState1 extends AbstractState {
16:         /**
17:          * This constructor initialize the new IdentifierTypevariableState1.
18:          * 
19:          * @param myScanner
20:          *            is the used scanner.
21:          * @param beginningColumn
22:          *            is the Begin Column of the Symbol
23:          * @param beginningRow
24:          *            is the beginning row of the symbol
25:          */
26:         public IdentifierTypeVariableState1(final Scanner myScanner, final Integer beginningColumn,
27:                         final Integer beginningRow) {
28:                 super(myScanner, beginningColumn, beginningRow);
29:         }
30: 
31:         /*
32:          * (non-Javadoc)
33:          * 
34:          * @see scanner.AbstractState#action(java.lang.Character, basic.Buffer, java.lang.String)
35:          */
36:         @Override
37:         public AbstractState action(final Character character,
38:                         final Buffer<AbstractSymbol> currentResult, final String dataPath)
39:                         throws InterruptedException {
40:•                if (Character.isLetter(character.charValue())
41:•                                && Character.isUpperCase(character.charValue())) {
42:                         return new IdentifierTypeVariableState2(this.getMyScanner(), this.getMyScanner()
43:                                         .getColumnCounter(), this.getBeginningRow());
44:                 } else {
45:                         currentResult.put(new UnknownSymbol(character.toString(), new Position(
46:                                         getBeginningRow(), getBeginningColumn(), dataPath)));
47:                         return this.getMyScanner().getSelectionState();
48:                 }
49: 
50:         }
51: 
52:         /*
53:          * (non-Javadoc)
54:          * 
55:          * @see scanner.AbstractState#finish(basic.Buffer, java.lang.String)
56:          */
57:         @Override
58:         protected void finish(final Buffer<AbstractSymbol> currentResult, final String dataPath)
59:                         throws InterruptedException {
60: 
61:         }
62: 
63: }