001 /*
002 * Copyright 2010-2017 JetBrains s.r.o.
003 *
004 * Licensed under the Apache License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 * http://www.apache.org/licenses/LICENSE-2.0
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016
017 package org.jetbrains.kotlin.js.common;
018
019 import org.jetbrains.kotlin.js.Source;
020
021 public class SourceInfoImpl implements SourceInfo {
022 protected Source source = null;
023 protected int line = -1;
024 protected int column = -1;
025 protected int start = -1;
026 protected int length = -1;
027
028 public SourceInfoImpl(Source source, int line, int column, int start, int length) {
029 this.source = source;
030 this.line = line;
031 this.column = column;
032 this.start = start;
033 this.length = length;
034 }
035
036 @Override
037 public Source getSource() {
038 return source;
039 }
040
041 @Override
042 public int getLine() {
043 return line;
044 }
045
046 @Override
047 public int getColumn() {
048 return column;
049 }
050
051 @Override
052 public int getStart() {
053 return start;
054 }
055
056 @Override
057 public int getLength() {
058 return length;
059 }
060 }