![JAR search and dependency download from the Maven repository](/logo.png)
com.google.code.sbt.compiler.api.SourcePositionMapper Maven / Gradle / Ivy
/*
* Copyright 2013-2016 Grzegorz Slowikowski (gslowikowski at gmail dot com)
*
* 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 com.google.code.sbt.compiler.api;
import java.io.IOException;
/**
* Mapper converting positions in generated source files to positions in original sources they were generated from.
*
* @author Grzegorz Slowikowski
*/
public interface SourcePositionMapper
{
/**
* Sets source files character set name (encoding).
*
* @param charsetName source files character set name
*/
void setCharsetName( String charsetName );
/**
* Performs mapping from the position in generated source file to the position in original source file it was
* generated from.
*
* Returns:
*
* - position in original source file
* -
* {@code null} value if file of the input position is not recognized as generated file supported by this
* mapper.
*
*
* @param p compilation error/warning position in generated file
* @return position in original source file or {@code null} value if file of the input position is not recognized as
* generated file supported by this mapper
* @throws IOException I/O exception during generated or original source file reading
*/
SourcePosition map( SourcePosition p ) throws IOException;
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy