01: /*
02: * Copyright 2002-2006 The Apache Software Foundation.
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
10: * Unless required by applicable law or agreed to in writing, software
11: * distributed under the License is distributed on an "AS IS" BASIS,
12: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13: * See the License for the specific language governing permissions and
14: * limitations under the License.
15: */
16: package org.apache.commons.jexl.util.introspection;
17:
18: /**
19: * Little class to carry in info such as template name, line and column for
20: * information error reporting from the uberspector implementations
21: *
22: * Taken from velocity for self-sufficiency.
23: *
24: * @since 1.0
25: * @author <a href="mailto:geirm@optonline.net">Geir Magnusson Jr.</a>
26: * @version $Id: Info.java 398463 2006-04-30 23:48:42Z dion $
27: */
28: public class Info {
29: /** line number. */
30: private int line;
31: /** column number. */
32: private int column;
33: /** name. */
34: private String templateName;
35:
36: /**
37: * Create info.
38: * @param tn template name
39: * @param l line number
40: * @param c column
41: */
42: public Info(String tn, int l, int c) {
43: templateName = tn;
44: line = l;
45: column = c;
46: }
47:
48: /**
49: * Gets the template name.
50: * @return template name
51: */
52: public String getTemplateName() {
53: return templateName;
54: }
55:
56: /**
57: * Gets the line number.
58: * @return line number.
59: */
60: public int getLine() {
61: return line;
62: }
63:
64: /**
65: * Gets the column number.
66: * @return the column.
67: */
68: public int getColumn() {
69: return column;
70: }
71: }
|