Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Class LineNumber  view LineNumber download

  extended byorg.apache.bcel.classfile.LineNumber
All Implemented Interfaces:
java.lang.Cloneable, Node,

public final class LineNumber
extends java.lang.Object
implements java.lang.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.

$Id: 386056 2006-03-15 11:31:56Z tcurdt $

Field Summary
private  int line_number
private  int start_pc
Constructor Summary
(package private) LineNumber( file)
          Construct object from file stream.
  LineNumber(int start_pc, int line_number)
  LineNumber(LineNumber c)
          Initialize from another object.
Method Summary
 void accept(Visitor v)
          Called by objects that are traversing the nodes of the tree implicitely defined by the contents of a Java class.
 LineNumber copy()
 void dump( file)
          Dump line number/pc pair to file stream in binary format.
 int getLineNumber()
 int getStartPC()
 void setLineNumber(int line_number)
 void setStartPC(int start_pc)
 java.lang.String toString()
          Convert this Object to a human-readable String.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail


private int start_pc


private int line_number
Constructor Detail


public LineNumber(LineNumber c)
Initialize from another object.


LineNumber( file)
Construct object from file stream.


public LineNumber(int start_pc,
                  int line_number)
Method Detail


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.

Specified by:
accept in interface Node


public final void dump( file)
Dump line number/pc pair to file stream in binary format.


public final int getLineNumber()


public final int getStartPC()


public final void setLineNumber(int line_number)


public final void setStartPC(int start_pc)


public final java.lang.String toString()
Description copied from class: java.lang.Object
Convert this Object to a human-readable String. There are no limits placed on how long this String should be or what it should contain. We suggest you make it as intuitive as possible to be able to place it into System.out.println() 55 and such.

It is typical, but not required, to ensure that this method never completes abruptly with a java.lang.RuntimeException.

This method will be called when performing string concatenation with this object. If the result is null, string concatenation will instead use "null".

The default implementation returns getClass().getName() + "@" + Integer.toHexString(hashCode()).


public LineNumber copy()