Skip to content

Package: EndSymbol

EndSymbol

nameinstructionbranchcomplexitylinemethod
EndSymbol(Position)
M: 0 C: 4
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 2
100%
M: 0 C: 1
100%
accept(PackageDescriptionSymbolVisitor, PackageDescriptionFileParser)
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%
accept(PackageDescriptionSymbolVisitorWithTempRule, PackageDescriptionFileParser, TempPackageRule)
M: 6 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
equals(Object)
M: 0 C: 11
100%
M: 0 C: 4
100%
M: 0 C: 3
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
hashCode()
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%
isPackageDescriptionFileSymbol()
M: 0 C: 2
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
toPackageDescriptionFileSymbol()
M: 0 C: 2
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
toString()
M: 0 C: 10
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%

Coverage

1: package symbols;
2:
3: import model.Position;
4: import parser.PackageDescriptionFileParser;
5: import parser.ParserException;
6: import parser.TempPackageRule;
7: import parser.states.packagestates.AbstractPackageParserState;
8: import scanner.ScannerConstants;
9:
10: /**
11: * This class represents the end symbol. This is the end of the stream.
12: *
13: */
14: public final class EndSymbol extends AbstractSymbol implements PackageDescriptionFileSymbol {
15:
16:         /**
17:          * This is the constructor.
18:          *
19:          * @param position
20:          * is the position of the data in the stream.
21:          */
22:         public EndSymbol(final Position position) {
23:                 super(position);
24:         }
25:
26:         @Override
27:         public String toString() {
28:                 return ScannerConstants.END + this.getPosition();
29:         }
30:
31:         @Override
32:         public AbstractPackageParserState accept(final PackageDescriptionSymbolVisitor visitor,
33:                         final PackageDescriptionFileParser parser) throws InterruptedException,
34:                         ParserException {
35:                 return visitor.handle(this, parser);
36:
37:         }
38:
39:         @Override
40:         public AbstractPackageParserState accept(
41:                         final PackageDescriptionSymbolVisitorWithTempRule visitor,
42:                         final PackageDescriptionFileParser parser, final TempPackageRule tempPackageRule)
43:                         throws InterruptedException, ParserException {
44:                 return visitor.handle(this, parser, tempPackageRule);
45:         }
46:
47:         @Override
48:         public int hashCode() {
49:                 return super.hashCode();
50:         }
51:
52:         @Override
53:         public boolean equals(final Object obj) {
54:•                return super.equals(obj) && obj instanceof EndSymbol;
55:         }
56:
57:         @Override
58:         public Boolean isPackageDescriptionFileSymbol() {
59:                 return Boolean.TRUE;
60:         }
61:
62:         @Override
63:         public PackageDescriptionFileSymbol toPackageDescriptionFileSymbol() {
64:                 return this;
65:         }
66: }