01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: */
17:
18: package org.apache.commons.jci.compilers;
19:
20: import org.apache.commons.jci.problems.CompilationProblem;
21:
22: /**
23: *
24: * @author tcurdt
25: */
26: public final class RhinoCompilationProblem implements
27: CompilationProblem {
28:
29: private final String message;
30: private final String fileName;
31: private final int line;
32: private final int column;
33: private final boolean error;
34:
35: public RhinoCompilationProblem(final String pMessage,
36: final String pFileName, final int pLine,
37: final String pScript, final int pColumn,
38: final boolean pError) {
39: message = pMessage;
40: fileName = pFileName;
41: line = pLine;
42: column = pColumn;
43: error = pError;
44: }
45:
46: public int getEndColumn() {
47: return column;
48: }
49:
50: public int getEndLine() {
51: return line;
52: }
53:
54: public String getFileName() {
55: return fileName;
56: }
57:
58: public String getMessage() {
59: return message;
60: }
61:
62: public int getStartColumn() {
63: return column;
64: }
65:
66: public int getStartLine() {
67: return line;
68: }
69:
70: public boolean isError() {
71: return error;
72: }
73:
74: }
|