Package: RowEndState
RowEndState
| name | instruction | branch | complexity | line | method | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| RowEndState(Scanner, Integer, Integer) | 
  | 
  | 
  | 
  | 
  | 
||||||||||||||||||||
| action(Character, Buffer, String) | 
  | 
  | 
  | 
  | 
  | 
||||||||||||||||||||
| finish(Buffer, String) | 
  | 
  | 
  | 
  | 
  | 
||||||||||||||||||||
Coverage
1: package scanner;
2: 
3: import model.Position;
4: import symbols.AbstractSymbol;
5: import symbols.RowEndSymbol;
6: import basic.Buffer;
7: 
8: /**
9:  * state, which handle the new line sign.
10:  * 
11:  * @author Lisa Leitloff
12:  * 
13:  */
14: public class RowEndState extends AbstractState {
15:         /**
16:          * creates a RowEndState.
17:          * 
18:          * @param myScanner
19:          *            is the scanner, which owns the state.
20:          * @param beginningColumn
21:          *            is the first column of the symbol.
22:          * @param beginningRow
23:          *            is the first row of the symbol.
24:          */
25:         public RowEndState(final Scanner myScanner, final Integer beginningColumn,
26:                         final Integer beginningRow) {
27:                 super(myScanner, beginningColumn, beginningRow);
28:         }
29: 
30:         @Override
31:         public AbstractState action(final Character character,
32:                         final Buffer<AbstractSymbol> currentResult, final String dataPath)
33:                         throws InterruptedException {
34:•                if (this.getMyScanner().isPackageDescriptionFileScanner()) {
35:                         currentResult.put(new RowEndSymbol(new Position(this.getBeginningRow(), this
36:                                         .getBeginningColumn(), dataPath)));
37:                 }
38:                 this.getMyScanner().skip();
39:                 this.getMyScanner().handleRowEnd();
40:                 return this.getMyScanner().getSelectionState();
41:         }
42: 
43:         @Override
44:         protected void finish(final Buffer<AbstractSymbol> currentResult, final String dataPath) {
45: 
46:         }
47: 
48: }