Class LineNumber
java.lang.Object
org.apache.bcel.classfile.LineNumber
- All Implemented Interfaces:
Serializable, Cloneable, Node
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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidCalled by objects that are traversing the nodes of the tree implicitely defined by the contents of a Java class.copy()final voiddump(DataOutputStream file) Dump line number/pc pair to file stream in binary format.final intfinal intfinal voidsetLineNumber(int line_number) final voidsetStartPC(int start_pc) final StringtoString()
-
Constructor Details
-
LineNumber
Initialize from another object. -
LineNumber
public LineNumber(int start_pc, int line_number) - Parameters:
start_pc- Program Counter (PC) corresponds toline_number- line number in source file
-
-
Method Details
-
accept
-
dump
Dump line number/pc pair to file stream in binary format.- Parameters:
file- Output file stream- Throws:
IOException
-
getLineNumber
public final int getLineNumber()- Returns:
- Corresponding source line
-
getStartPC
public final int getStartPC()- Returns:
- PC in code
-
setLineNumber
public final void setLineNumber(int line_number) - Parameters:
line_number- the source line number
-
setStartPC
public final void setStartPC(int start_pc) - Parameters:
start_pc- the pc for this line number
-
toString
-
copy
- Returns:
- deep copy of this object
-