All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class espresso.classfile.javaclass.LineNumber

java.lang.Object
   |
   +----espresso.classfile.javaclass.LineNumber

public final class LineNumber
extends Object
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:
LineNumberTable

Variable Index

 o line_number
 o start_pc

Constructor Index

 o LineNumber()
Empty constructor, all attributes have to be defined via `setXXX' methods.
 o LineNumber(DataInputStream)
Construct object from file stream.
 o LineNumber(int, int)
 o LineNumber(LineNumber)
Initialize from another object.

Method Index

 o accept(Visitor)
Called by objects that are traversing the nodes of the tree implicitely defined by the contents of a Java class.
 o dump(DataOutputStream)
Dump line number/pc pair to file stream in binary format.
 o getLineNumber()
 o getStartPC()
 o setLineNumber(int)
 o setStartPC(int)
 o toString()

Variables

 o start_pc
 private int start_pc
 o line_number
 private int line_number

Constructors

 o LineNumber
 public LineNumber()
Empty constructor, all attributes have to be defined via `setXXX' methods. Use at your own risk.

 o LineNumber
 public LineNumber(LineNumber c)
Initialize from another object.

 o LineNumber
 LineNumber(DataInputStream file) throws IOException
Construct object from file stream.

Parameters:
file - Input stream
 o LineNumber
 public LineNumber(int start_pc,
                   int line_number)
Parameters:
start_pc - Program Counter (PC) corresponds to
line_number - line number in source file

Methods

 o 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.

Parameters:
v - Visitor object
 o dump
 public final void dump(DataOutputStream file) throws IOException
Dump line number/pc pair to file stream in binary format.

Parameters:
file - Output file stream
 o getLineNumber
 public final int getLineNumber()
Returns:
Corresponding source line
 o getStartPC
 public final int getStartPC()
Returns:
PC in code
 o setLineNumber
 public final void setLineNumber(int line_number)
 o setStartPC
 public final void setStartPC(int start_pc)
 o toString
 public final String toString()
Returns:
String representation
Overrides:
toString in class Object

All Packages  Class Hierarchy  This Package  Previous  Next  Index