public final class SourcePosition
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static SourcePosition |
NO_INFO
non-null; convenient "no information known" instance |
| Constructor and Description |
|---|
SourcePosition(CstString sourceFile,
int address,
int line)
Constructs an instance.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object other) |
int |
getAddress()
Gets the original bytecode address.
|
int |
getLine()
Gets the original line number.
|
CstString |
getSourceFile()
Gets the source file, if known.
|
int |
hashCode() |
boolean |
sameLine(SourcePosition other)
Returns whether the lines match between this instance and
the one given.
|
boolean |
sameLineAndFile(SourcePosition other)
Returns whether the lines and files match between this instance and
the one given.
|
java.lang.String |
toString() |
public static final SourcePosition NO_INFO
non-null; convenient "no information known" instancepublic SourcePosition(CstString sourceFile, int address, int line)
sourceFile - null-ok; name of the file of origin or
null if unknownaddress - >= -1; original bytecode address or -1
if unknownline - >= -1; original line number or -1 if
unknownpublic java.lang.String toString()
toString in class java.lang.Objectpublic boolean equals(java.lang.Object other)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean sameLine(SourcePosition other)
other - non-null; the instance to compare totrue iff the lines matchpublic boolean sameLineAndFile(SourcePosition other)
other - non-null; the instance to compare totrue iff the lines and files matchpublic CstString getSourceFile()
null-ok; the source file or null if unknownpublic int getAddress()
>= -1; the address or -1 if unknownpublic int getLine()
>= -1; the original line number or -1 if
unknownCopyright © 2020. All Rights Reserved.