Package org.exolab.castor.xml.location
Class FileLocation
java.lang.Object
org.exolab.castor.xml.location.FileLocation
- All Implemented Interfaces:
Serializable,Location
A simple FileLocation class used for finer grained detail of exceptions.
- Version:
- $Revision: 6936 $ $Date: 2005-12-13 14:58:48 -0700 (Tue, 13 Dec 2005) $
- Author:
- Keith Visco
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new FileLocationFileLocation(int line, int column) Creates a new FileLocation.FileLocation(String filename) Creates a new FileLocationFileLocation(String filename, int line, int column) Creates a new FileLocation. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the column number for this FileLocation.Returns the name of the file to which this FileLocation refers.intReturns the line number for this FileLocation.voidsetColumnNumber(int column) Sets the column number for this FileLocation.voidsetFilename(String filename) Sets the name of the file to which this FileLocation refers.voidsetLineNumber(int line) Sets the line number for this FileLocation.toString()Returns the String representation of this FileLocation.
-
Constructor Details
-
FileLocation
public FileLocation()Creates a new FileLocation -
FileLocation
Creates a new FileLocation- Parameters:
filename- the name of the file
-
FileLocation
public FileLocation(int line, int column) Creates a new FileLocation.- Parameters:
line- the line numbercolumn- the column number within the specified line
-
FileLocation
Creates a new FileLocation.- Parameters:
filename- the name of the fileline- the line numbercolumn- the column number within the specified line
-
-
Method Details
-
getColumnNumber
public int getColumnNumber()Returns the column number for this FileLocation.- Returns:
- the column number for this FileLocation.
-
getFilename
Returns the name of the file to which this FileLocation refers.- Returns:
- the name of the file to which this FileLocation refers.
-
getLineNumber
public int getLineNumber()Returns the line number for this FileLocation.- Returns:
- the line number for this FileLocation.
-
setColumnNumber
public void setColumnNumber(int column) Sets the column number for this FileLocation.- Parameters:
column- the column number for this FileLocation
-
setFilename
Sets the name of the file to which this FileLocation refers.- Parameters:
filename- the name of the file to which this FileLocation refers
-
setLineNumber
public void setLineNumber(int line) Sets the line number for this FileLocation.- Parameters:
line- the line number for this FileLocation
-
toString
Returns the String representation of this FileLocation.
-