Class LineNumber
java.lang.Object
org.apache.bcel.classfile.LineNumber
This class represents a (PC offset, line number) pair, that is, a line number in the source that corresponds to a
relative address in the byte code. This is used for debugging purposes.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionLineNumber(int startPc, int lineNumber) Constructs a LineNumber.Initialize from another object. -
Method Summary
Modifier and TypeMethodDescriptionvoidCalled by objects that are traversing the nodes of the tree implicitly defined by the contents of a Java class.copy()Creates a deep copy of this object.voiddump(DataOutputStream file) Dumps line number/pc pair to file stream in binary format.intGets the line number.intGets the program counter.voidsetLineNumber(int lineNumber) Sets the line number.voidsetStartPC(int startPc) Sets the program counter.toString()
-
Constructor Details
-
LineNumber
Constructs a LineNumber.- Parameters:
startPc- Program Counter (PC) corresponds to.lineNumber- line number in source file.
-
LineNumber
-
-
Method Details
-
accept
-
copy
-
dump
Dumps line number/pc pair to file stream in binary format.- Parameters:
file- Output file stream.- Throws:
IOException- Thrown if an I/O Exception occurs in writeShort.
-
getLineNumber
-
getStartPC
-
setLineNumber
Sets the line number.- Parameters:
lineNumber- The source line number.
-
setStartPC
Sets the program counter.- Parameters:
startPc- The pc for this line number.
-
toString
-