LineNumberpublic final class LineNumber extends Object implements Serializable, Node, CloneableThis 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. |
Fields Summary |
---|
private int | start_pc | private int | line_number |
Constructors Summary |
---|
public LineNumber(LineNumber c)Initialize from another object.
this(c.getStartPC(), c.getLineNumber());
| LineNumber(DataInputStream file)Construct object from file stream.
this(file.readUnsignedShort(), file.readUnsignedShort());
| public LineNumber(int start_pc, int line_number)
this.start_pc = start_pc;
this.line_number = line_number;
|
Methods Summary |
---|
public void | accept(com.sun.org.apache.bcel.internal.classfile.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.
v.visitLineNumber(this);
| public com.sun.org.apache.bcel.internal.classfile.LineNumber | copy()
try {
return (LineNumber)clone();
} catch(CloneNotSupportedException e) {}
return null;
| public final void | dump(java.io.DataOutputStream file)Dump line number/pc pair to file stream in binary format.
file.writeShort(start_pc);
file.writeShort(line_number);
| public final int | getLineNumber() return line_number;
| public final int | getStartPC() return start_pc;
| public final void | setLineNumber(int line_number)
this.line_number = line_number;
| public final void | setStartPC(int start_pc)
this.start_pc = start_pc;
| public final java.lang.String | toString()
return "LineNumber(" + start_pc + ", " + line_number + ")";
|
|