|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.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 URI
public 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 copied
public 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
locationpublic String getDescription()
getDescription in interface Locationnull)public String getURI()
getURI in interface Locationnull 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 Objectpublic int hashCode()
hashCode in class Objectpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||