001    /*
002     * Licensed to the Apache Software Foundation (ASF) under one or more
003     * contributor license agreements.  See the NOTICE file distributed with
004     * this work for additional information regarding copyright ownership.
005     * The ASF licenses this file to You under the Apache License, Version 2.0
006     * (the "License"); you may not use this file except in compliance with
007     * the License.  You may obtain a copy of the License at
008     *
009     *      http://www.apache.org/licenses/LICENSE-2.0
010     *
011     * Unless required by applicable law or agreed to in writing, software
012     * distributed under the License is distributed on an "AS IS" BASIS,
013     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014     * See the License for the specific language governing permissions and
015     * limitations under the License.
016     */
017    
018    package org.apache.commons.jci.compilers;
019    
020    import org.apache.commons.jci.problems.CompilationProblem;
021    
022    /**
023     * 
024     * @author tcurdt
025     */
026    public final class RhinoCompilationProblem implements CompilationProblem {
027    
028        private final String message;
029        private final String fileName;
030        private final int line;
031        private final int column;
032        private final boolean error;
033    
034        public RhinoCompilationProblem( final String pMessage, final String pFileName, final int pLine, final String pScript, final int pColumn, final boolean pError ) {
035            message = pMessage;
036            fileName = pFileName;
037            line = pLine;
038            column = pColumn;
039            error = pError;
040        }
041    
042        public int getEndColumn() {
043            return column;
044        }
045    
046        public int getEndLine() {
047            return line;
048        }
049    
050        public String getFileName() {
051            return fileName;
052        }
053    
054        public String getMessage() {
055            return message;
056        }
057    
058        public int getStartColumn() {
059            return column;
060        }
061    
062        public int getStartLine() {
063            return line;
064        }
065    
066        public boolean isError() {
067            return error;
068        }
069    
070    }