Methods Summary |
---|
public boolean | equals(java.lang.Object other){@inheritDoc}
if (!(other instanceof SourcePosition)) {
return false;
}
if (this == other) {
return true;
}
SourcePosition pos = (SourcePosition) other;
return (address == pos.address) && sameLineAndFile(pos);
|
public int | getAddress()Gets the original bytecode address.
return address;
|
public int | getLine()Gets the original line number.
return line;
|
public com.android.dx.rop.cst.CstString | getSourceFile()Gets the source file, if known.
return sourceFile;
|
public int | hashCode(){@inheritDoc}
return sourceFile.hashCode() + address + line;
|
public boolean | sameLine(com.android.dx.rop.code.SourcePosition other)Returns whether the lines match between this instance and
the one given.
return (line == other.line);
|
public boolean | sameLineAndFile(com.android.dx.rop.code.SourcePosition other)Returns whether the lines and files match between this instance and
the one given.
return (line == other.line) &&
((sourceFile == other.sourceFile) ||
((sourceFile != null) && sourceFile.equals(other.sourceFile)));
|
public java.lang.String | toString(){@inheritDoc}
StringBuffer sb = new StringBuffer(50);
if (sourceFile != null) {
sb.append(sourceFile.toHuman());
sb.append(":");
}
if (line >= 0) {
sb.append(line);
}
sb.append('@");
if (address < 0) {
sb.append("????");
} else {
sb.append(Hex.u2(address));
}
return sb.toString();
|