Package org.apache.bcel.classfile
Class LineNumber
java.lang.Object
org.apache.bcel.classfile.LineNumber
This class represents a (PC offset, line number) pair, i.e., 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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Called by objects that are traversing the nodes of the tree implicitly defined by the contents of a Java class.copy()
void
dump
(DataOutputStream file) Dump line number/pc pair to file stream in binary format.int
int
void
setLineNumber
(int lineNumber) void
setStartPC
(int startPc) toString()
-
Constructor Details
-
LineNumber
- Parameters:
startPc
- Program Counter (PC) corresponds tolineNumber
- line number in source file
-
LineNumber
Initialize from another object.- Parameters:
c
- the object to copy
-
-
Method Details
-
accept
Called by objects that are traversing the nodes of the tree implicitly defined by the contents of a Java class. I.e., the hierarchy of methods, fields, attributes, etc. spawns a tree of objects. -
copy
- Returns:
- deep copy of this object
-
dump
Dump line number/pc pair to file stream in binary format.- Parameters:
file
- Output file stream- Throws:
IOException
- if an I/O Exception occurs in writeShort
-
getLineNumber
- Returns:
- Corresponding source line
-
getStartPC
- Returns:
- PC in code
-
setLineNumber
- Parameters:
lineNumber
- the source line number
-
setStartPC
- Parameters:
startPc
- the pc for this line number
-
toString
-