001
002 
003/*-------------------------------------------------------------------------+
004|                                                                          |
005| Copyright 2005-2011 The ConQAT Project                                   |
006|                                                                          |
007| Licensed under the Apache License, Version 2.0 (the "License");          |
008| you may not use this file except in compliance with the License.         |
009| You may obtain a copy of the License at                                  |
010|                                                                          |
011|    http://www.apache.org/licenses/LICENSE-2.0                            |
012|                                                                          |
013| Unless required by applicable law or agreed to in writing, software      |
014| distributed under the License is distributed on an "AS IS" BASIS,        |
015| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
016| See the License for the specific language governing permissions and      |
017| limitations under the License.                                           |
018+-------------------------------------------------------------------------*/
019package eu.cqse.check.framework.scanner;
020
021/**
022 * Class for JAVASCRIPT tokens generated by the JAVASCRIPT scanner. This does only add the
023 * language identification to the base class.
024 * <p>
025 * NOTE: This class was automatically generated. DO NOT MODIFY.
026 * 
027 * @see eu.cqse.check.framework.scanner.Token
028 * @see eu.cqse.check.framework.scanner.JavaScriptScanner
029 */
030public class JavaScriptToken extends Token {
031
032        /** Version for serialization. */
033        private static final long serialVersionUID = 1L;
034        
035        /**
036         * Create new JavaScript token.
037         * 
038         * @param type
039         *            token type
040         * @param offset
041         *            number of characters before token in its origin
042         * @param lineNumber
043         *            line number
044         * @param text
045         *            original text
046         * @param originId
047         *            origin id
048         */
049        /* package */JavaScriptToken(ETokenType type, int offset, int lineNumber,
050                        String text, String originId) {
051                super(type, offset, lineNumber, text, originId);
052        }
053
054        /** {@inheritDoc} */
055        @Override
056        public ELanguage getLanguage() {
057                return ELanguage.JAVASCRIPT;
058        }
059
060        /** {@inheritDoc} */
061        @Override
062        public JavaScriptToken newToken(ETokenType type, int offset, int lineNumber,
063                        String text, String originId) {
064                return new JavaScriptToken(type, offset, lineNumber, text, originId);
065        }
066}