de.smartics.analysis.javadoc.log.message
Class IssueLocation

Package class diagram package IssueLocation
java.lang.Object
  extended by de.smartics.analysis.javadoc.log.message.IssueLocation
All Implemented Interfaces:
Serializable

public class IssueLocation
     
     
extends Object
implements Serializable

Marks the location of an issue.

Author:
Robert Reiner
See Also:
Serialized Form

Constructor Summary
IssueLocation(String fileName)
          Convenience constructor if neither a line or a column number can be given.
IssueLocation(String fileName, int line)
          Convenience constructor if no column number can be given.
IssueLocation(String fileName, int line, int column)
          Default constructor.
 
Method Summary
 int getColumn()
          Returns the column the issue occurs in.
 String getFileName()
          Returns the name of the file the issue is located in.
 int getLine()
          Returns the line number the issue occurs in.
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IssueLocation

public IssueLocation(String fileName)
              throws NullPointerException
Convenience constructor if neither a line or a column number can be given.

Implementation Notes:
Sets the line and column number to -1.
Parameters:
fileName - the name of the file the issue is located in.
Throws:
NullPointerException - if the fileName is null.

IssueLocation

public IssueLocation(String fileName,
                     int line)
              throws NullPointerException,
                     IllegalArgumentException
Convenience constructor if no column number can be given.

Implementation Notes:
Sets the column number to -1.
Parameters:
fileName - the name of the file the issue is located in.
line - the line number the issue occurs in.
Throws:
NullPointerException - if the fileName is null.
IllegalArgumentException - if the line number is smaller than -1.

IssueLocation

public IssueLocation(String fileName,
                     int line,
                     int column)
              throws NullPointerException,
                     IllegalArgumentException
Default constructor.

Parameters:
fileName - the name of the file the issue is located in.
line - the line number the issue occurs in.
column - the column the issue occurs in.
Throws:
NullPointerException - if the fileName is null.
IllegalArgumentException - if the line or column number is smaller than -1. Also thrown, if the column number is given (i.e. greater than -1, the line number not.
Method Detail

getFileName

public String getFileName()
Returns the name of the file the issue is located in.

Returns:
the name of the file the issue is located in.

getLine

public int getLine()
Returns the line number the issue occurs in.

If a column cannot be determined, this value is -1.

Returns:
the line number the issue occurs in.

getColumn

public int getColumn()
Returns the column the issue occurs in.

If a column cannot be determined, this value is -1.

Returns:
the column the issue occurs in.

toString

public String toString()

Overrides:
toString in class Object
See Also:
Object.toString()


Copyright © 2008-2011 Kronseder & Reiner GmbH - smartics. All Rights Reserved.