eu.cqse.check.framework.scanner.JavaToken Maven / Gradle / Ivy
Show all versions of teamscale-check-api Show documentation
/*-------------------------------------------------------------------------+
| |
| Copyright 2005-2011 The ConQAT Project |
| |
| Licensed under the Apache License, Version 2.0 (the "License"); |
| you may not use this file except in compliance with the License. |
| You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
+-------------------------------------------------------------------------*/
package eu.cqse.check.framework.scanner;
import org.conqat.lib.commons.test.IndexValueClass;
/**
* Class for JAVA tokens generated by the JAVA scanner. This does only add the
* language identification to the base class.
*
* NOTE: This class was automatically generated. DO NOT MODIFY.
*
* The template for this class is in token.vm. The languages are defined in tokens.vm.
* The "velocity" gradle task generates the ..Token classes.
*
* @see eu.cqse.check.framework.scanner.Token
* @see eu.cqse.check.framework.scanner.JavaScanner
*/
@IndexValueClass(containedInBackup = true)
public class JavaToken extends Token {
/** Version for serialization. */
private static final long serialVersionUID = 1L;
/**
* Create new Java token.
*
* @param type
* token type
* @param offset
* number of characters before token in its origin
* @param lineNumber
* line number
* @param text
* original text
* @param originId
* origin id
*/
/* package */JavaToken(ETokenType type, long offset, int lineNumber,
String text, String originId) {
super(type, offset, lineNumber, text, originId);
}
/** {@inheritDoc} */
@Override
public ELanguage getLanguage() {
return ELanguage.JAVA;
}
/** {@inheritDoc} */
@Override
public JavaToken newToken(ETokenType type, int offset, int lineNumber,
String text, String originId) {
return new JavaToken(type, offset, lineNumber, text, originId);
}
}