01: /*
02: * Copyright 2005 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 com.opensymphony.xwork.util.location;
17:
18: /**
19: * A location in a resource. The location is composed of the URI of the resource, and
20: * the line and column numbers within that resource (when available), along with a description.
21: * <p>
22: * Locations are mostly provided by {@link Locatable}s objects.
23: */
24: public interface Location {
25:
26: /**
27: * Constant for unknown locations.
28: */
29: public static final Location UNKNOWN = LocationImpl.UNKNOWN;
30:
31: /**
32: * Get the description of this location
33: *
34: * @return the description (can be <code>null</code>)
35: */
36: public String getDescription();
37:
38: /**
39: * Get the URI of this location
40: *
41: * @return the URI (<code>null</code> if unknown).
42: */
43: public String getURI();
44:
45: /**
46: * Get the line number of this location
47: *
48: * @return the line number (<code>-1</code> if unknown)
49: */
50: public int getLineNumber();
51:
52: /**
53: * Get the column number of this location
54: *
55: * @return the column number (<code>-1</code> if unknown)
56: */
57: public int getColumnNumber();
58:
59: }
|