|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.cocoon.util.location.LocationImpl
public class LocationImpl
A simple immutable and serializable implementation of Location
.
Constructor Summary | |
---|---|
LocationImpl(Location location)
Copy constructor. |
|
LocationImpl(String description,
Location location)
Create a location from an existing one, but with a different description |
|
LocationImpl(String description,
String uri)
Build a location for a given URI, with unknown line and column numbers. |
|
LocationImpl(String description,
String uri,
int line,
int column)
Build a location for a given URI and line and columb numbers. |
Method Summary | |
---|---|
boolean |
equals(Object obj)
|
static LocationImpl |
get(Location location)
Obtain a LocationImpl from a Location . |
int |
getColumnNumber()
Get the column number of this location |
String |
getDescription()
Get the description of this location |
int |
getLineNumber()
Get the line number of this location |
String |
getURI()
Get the URI of this location |
int |
hashCode()
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public LocationImpl(String description, String uri)
uri
- the resource URIpublic LocationImpl(String description, String uri, int line, int column)
uri
- the resource URIline
- the line number (starts at 1)column
- the column number (starts at 1)public LocationImpl(Location location)
location
- the location to be copiedpublic LocationImpl(String description, Location location)
Method Detail |
---|
public static LocationImpl get(Location location)
LocationImpl
from a Location
. If location
is
already a LocationImpl
, it is returned, otherwise it is copied.
This method is useful when an immutable and serializable location is needed, such as in locatable exceptions.
location
- the location
location
public String getDescription()
getDescription
in interface Location
null
)public String getURI()
getURI
in interface Location
null
if unknown).public int getLineNumber()
getLineNumber
in interface Location
-1
if unknown)public int getColumnNumber()
getColumnNumber
in interface Location
-1
if unknown)public boolean equals(Object obj)
equals
in class Object
public int hashCode()
hashCode
in class Object
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |