|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.opensymphony.xwork.util.location.LocationImpl
public class LocationImpl
A simple immutable and serializable implementation of Location.
| Constructor Summary | |
|---|---|
LocationImpl(Location location)
Copy constructor. |
|
LocationImpl(java.lang.String description,
Location location)
Create a location from an existing one, but with a different description |
|
LocationImpl(java.lang.String description,
java.lang.String uri)
Build a location for a given URI, with unknown line and column numbers. |
|
LocationImpl(java.lang.String description,
java.lang.String uri,
int line,
int column)
Build a location for a given URI and line and column numbers. |
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object obj)
|
static LocationImpl |
get(Location location)
Obtain a LocationImpl from a Location. |
int |
getColumnNumber()
Get the column number of this location |
java.lang.String |
getDescription()
Get the description of this location |
int |
getLineNumber()
Get the line number of this location |
java.lang.String |
getURI()
Get the URI of this location |
int |
hashCode()
|
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public LocationImpl(java.lang.String description,
java.lang.String uri)
uri - the resource URI
public LocationImpl(java.lang.String description,
java.lang.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(java.lang.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 java.lang.String getDescription()
getDescription in interface Locationnull)public java.lang.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(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object
|
XWork Project Page | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||