Skip to content

Method: create(Token)

1: package de.fhdw.wtf.common.exception.parser;
2:
3: import de.fhdw.wtf.common.constants.parser.ExceptionConstants;
4: import de.fhdw.wtf.common.token.Token;
5:
6: /**
7: * {@link OperationModifierAlreadyAddedException} will be thrown, if an {@link de.fhdw.wtf.common.ast.OperationModifier}
8: * add to the list of modifiers and the modifier already exists in the list.
9: *
10: */
11: public final class OperationModifierAlreadyAddedException extends AbstractParserException {
12:         
13:         /**
14:          * generated.
15:          */
16:         private static final long serialVersionUID = -5000924926820194276L;
17:         
18:         /**
19:          * Constructor of {@link OperationModifierAlreadyAddedException}.
20:          *
21:          * @param token
22:          * token
23:          * @param message
24:          * message
25:          */
26:         private OperationModifierAlreadyAddedException(final Token token, final String message) {
27:                 super(token, message);
28:         }
29:         
30:         /**
31:          * Creates a {@link OperationModifierAlreadyAddedException}-Object.
32:          *
33:          * @param token
34:          * token
35:          * @return The {@link OperationModifierAlreadyAddedException}-Object.
36:          */
37:         public static OperationModifierAlreadyAddedException create(final Token token) {
38:                 return new OperationModifierAlreadyAddedException(token,
39:                                 ExceptionConstants.OPERATION_MODIFIER_ALREADY_ADDED_EXCEPTION);
40:         }
41: }