org.apache.bcel.classfile
Class LineNumber
java.lang.Object
org.apache.bcel.classfile.LineNumber
- Cloneable, Node, Serializable
public final class LineNumber
extends java.lang.Object
implements Cloneable, Node, Serializable
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.
$Id: LineNumber.java,v 1.3 2002/07/11 19:39:04 mdahm Exp $
LineNumber
public LineNumber(int start_pc,
int line_number)
start_pc
- Program Counter (PC) corresponds toline_number
- line number in source file
LineNumber
public LineNumber(LineNumber c)
Initialize from another object.
accept
public void accept(Visitor v)
Called by objects that are traversing the nodes of the tree implicitely
defined by the contents of a Java class. I.e., the hierarchy of methods,
fields, attributes, etc. spawns a tree of objects.
- accept in interface Node
dump
public final void dump(DataOutputStream file)
throws IOException
Dump line number/pc pair to file stream in binary format.
file
- Output file stream
getLineNumber
public final int getLineNumber()
- Corresponding source line
getStartPC
public final int getStartPC()
setLineNumber
public final void setLineNumber(int line_number)
setStartPC
public final void setStartPC(int start_pc)
toString
public final String toString()