Skip to contentPackage: PackageDescriptionFileSymbol
PackageDescriptionFileSymbol
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: 
9: /**
10:  * represents a PackageDescriptionFileSymbol.
11:  * 
12:  * @author Lisa Leitloff
13:  * 
14:  */
15: public interface PackageDescriptionFileSymbol {
16: 
17:         /**
18:          * calls the visitor with the Symbollist.
19:          * 
20:          * @param visitor
21:          *            is the called visitor.
22:          * @param parser
23:          *            This is the PackageDescriptionparser.
24:          * @throws InterruptedException
25:          *             from the Buffer.
26:          * @throws ParserException
27:          *             if the symbol is not expected.
28:          * @return the actual state of the parser.
29:          */
30:         AbstractPackageParserState accept(PackageDescriptionSymbolVisitor visitor,
31:                         PackageDescriptionFileParser parser) throws InterruptedException, ParserException;
32: 
33:         /**
34:          * calls the visitor with the Symbollist.
35:          * 
36:          * @param visitor
37:          *            is the called visitor.
38:          * @param parser
39:          *            This is the PackageDescriptionparser.
40:          * @param tempPackageRule
41:          *            is a temporary package rule.
42:          * @throws InterruptedException
43:          *             from the Buffer.
44:          * @throws ParserException
45:          *             if the symbol is not expected.
46:          * @return the actual state of the parser.
47:          */
48:         AbstractPackageParserState accept(PackageDescriptionSymbolVisitorWithTempRule visitor,
49:                         PackageDescriptionFileParser parser, TempPackageRule tempPackageRule)
50:                         throws InterruptedException, ParserException;
51: 
52:         /**
53:          * 
54:          * @return the position
55:          */
56:         Position getPosition();
57: 
58:         /**
59:          * 
60:          * @return true, if the Symbol is a value symbol.
61:          */
62:         Boolean isValueSymbol();
63: 
64:         /**
65:          * 
66:          * @return true, if the Symbol is a path symbol.
67:          */
68:         Boolean isPathSymbol();
69: 
70:         /**
71:          * 
72:          * @return true, if the Symbol is a row end symbol.
73:          */
74:         Boolean isRowEndSymbol();
75: 
76:         /**
77:          * 
78:          * @return true, if the Symbol is a package description file symbol.
79:          */
80:         Boolean isPackageDescriptionFileSymbol();
81: 
82:         /**
83:          * @return an error, if the symbol is not a variable symbol
84:          */
85:         VariableSymbol toVariableSymbol();
86: 
87:         /**
88:          * @return an error, if the symbol is not a value symbol
89:          */
90:         ValueSymbol toValueSymbol();
91: 
92:         /**
93:          * @return an error, if the symbol is not a path symbol
94:          */
95:         PathSymbol toPathSymbol();
96: 
97:         /**
98:          * @return an error, if the symbol is not an option symbol
99:          */
100:         OptionSymbol toOptionSymbol();
101: 
102:         /**
103:          * @return an error, if the symbol is not a comment symbol
104:          */
105:         CommentSymbol toCommentSymbol();
106: 
107:         /**
108:          * 
109:          * @return a PackageDescriptionFileSymbol or an error, if the symbol is not a package
110:          *         description file symbol.
111:          */
112:         PackageDescriptionFileSymbol toPackageDescriptionFileSymbol();
113: }