package bluej.debugger;
import threadchecker.OnThread;
import threadchecker.Tag;
| This class holds a location in some source code
|
| @author Michael Kolling
|
@OnThread(Tag.Any)
public final class SourceLocation
{
private String classname;
private String filename;
private String methodname;
private int lineNumber;
| Construct a SourceLocation instance.
| @param classname Name of the class
| @param filename Name of the source file, relative to the source root (may be null)
| @param methodname Name of the method
| @param lineNumber Line number
|
public SourceLocation(String classname, String filename,
String methodname, int lineNumber)
{
this.classname = classname;
this.filename = filename;
this.methodname = methodname;
this.lineNumber = lineNumber;
}
public String getClassName()
{
return classname;
}
| Get the name of the source file corresponding to this SourceLocation, if known.
| @return The relative path to the source file, or null
|
public String getFileName()
{
return filename;
}
public String getMethodName()
{
return methodname;
}
public int getLineNumber()
{
return lineNumber;
}
| Return the location in the format "<class>.<method>"
|
*/
public String toString()
{
return classname + "." + methodname;
}
}
. - SourceLocation
. SourceLocation
. getClassName
. getFileName
. getMethodName
. getLineNumber
58 neLoCode
+ 10 LoComm