Class SourcePosition
java.lang.Object
com.android.dx.rop.code.SourcePosition
Information about a source position for code, which includes both a
line number and original bytecode address.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final SourcePositionnon-null;convenient "no information known" instance -
Constructor Summary
ConstructorsConstructorDescriptionSourcePosition(CstString sourceFile, int address, int line) Constructs an instance. -
Method Summary
Modifier and TypeMethodDescriptionbooleanintGets the original bytecode address.intgetLine()Gets the original line number.Gets the source file, if known.inthashCode()booleansameLine(SourcePosition other) Returns whether the lines match between this instance and the one given.booleansameLineAndFile(SourcePosition other) Returns whether the lines and files match between this instance and the one given.toString()
-
Field Details
-
NO_INFO
non-null;convenient "no information known" instance
-
-
Constructor Details
-
SourcePosition
Constructs an instance.- Parameters:
sourceFile-null-ok;name of the file of origin ornullif unknownaddress->= -1;original bytecode address or-1if unknownline->= -1;original line number or-1if unknown
-
-
Method Details
-
toString
-
equals
-
hashCode
-
sameLine
Returns whether the lines match between this instance and the one given.- Parameters:
other-non-null;the instance to compare to- Returns:
trueiff the lines match
-
sameLineAndFile
Returns whether the lines and files match between this instance and the one given.- Parameters:
other-non-null;the instance to compare to- Returns:
trueiff the lines and files match
-
getSourceFile
Gets the source file, if known.- Returns:
null-ok;the source file ornullif unknown
-
getAddress
public int getAddress()Gets the original bytecode address.- Returns:
>= -1;the address or-1if unknown
-
getLine
public int getLine()Gets the original line number.- Returns:
>= -1;the original line number or-1if unknown
-