jef.dna.attributes
Interface LineNumberTableEntry

All Superinterfaces:
BytesCountable, java.lang.Cloneable
All Known Implementing Classes:
LineNumberTableEntry

public interface LineNumberTableEntry
extends java.lang.Cloneable, BytesCountable

Class representing a Line Number Table instance's entry. Each entry in the line_number_table array indicates that the line number in the original source file changes at a given point in the code array

Author:
Francesco Russo frusso@cs.unibo.it

Method Summary
 java.lang.Object clone()
           
 void fromStream(java.io.DataInputStream dis)
          Reads the line number table entry from the given input stream.
 LineNumberTableAttribute getAttributeContainer()
          Get the LineNumberTableAttribute containing the current LineNumberTableEntry
 int getLineNumber()
          The value of the line_number item must give the corresponding line number in the original source file
 int getStartPc()
          The value of the start_pc item must indicate the index into the code array at which the code for a new line in the original source file begins.
 void setAttributeContainer(LineNumberTableAttribute attr)
          Set the LineNumberTableAttribute containing the current LineNumberTableEntry
 void setLineNumber(int lineNumber)
          The value of the line_number item must give the corresponding line number in the original source file
 void setStartPc(int startPc)
          The value of the start_pc item must indicate the index into the code array at which the code for a new line in the original source file begins.
 void toStream(java.io.DataOutputStream dos)
          Writes the line number table entry to the given output stream.
 void validate()
          Performs the validation of the current LineNumberTableEntry.
 
Methods inherited from interface jef.dna.util.BytesCountable
getBytesCount
 

Method Detail

setStartPc

void setStartPc(int startPc)
The value of the start_pc item must indicate the index into the code array at which the code for a new line in the original source file begins. The value of start_pc must be less than the value of the code_length item of the Code attribute of which this LineNumberTable is an attribute

Parameters:
startPc - A valid value as defined above

getStartPc

int getStartPc()
The value of the start_pc item must indicate the index into the code array at which the code for a new line in the original source file begins. The value of start_pc must be less than the value of the code_length item of the Code attribute of which this LineNumberTable is an attribute

Returns:
int A valid value as defined above

setLineNumber

void setLineNumber(int lineNumber)
The value of the line_number item must give the corresponding line number in the original source file

Parameters:
lineNumber - The line number value

getLineNumber

int getLineNumber()
The value of the line_number item must give the corresponding line number in the original source file

Returns:
int The line number value

setAttributeContainer

void setAttributeContainer(LineNumberTableAttribute attr)
Set the LineNumberTableAttribute containing the current LineNumberTableEntry

Parameters:
attr - The container

getAttributeContainer

LineNumberTableAttribute getAttributeContainer()
Get the LineNumberTableAttribute containing the current LineNumberTableEntry

Returns:
LineNumberTableAttribute The container

fromStream

void fromStream(java.io.DataInputStream dis)
                throws java.io.IOException
Reads the line number table entry from the given input stream.

Parameters:
dis - The input stream the line number table entry has to be read from
Throws:
java.io.IOException - Something went wrong with the given stream

toStream

void toStream(java.io.DataOutputStream dos)
              throws java.io.IOException
Writes the line number table entry to the given output stream.

Parameters:
dos - The output stream the line number table entry has to be written to
Throws:
java.io.IOException - Something went wrong with the given stream

validate

void validate()
              throws MissingAttributeContainerException,
                     LineNumberTableEntryValidationException
Performs the validation of the current LineNumberTableEntry.

Throws:
MissingAttributeContainerException
LineNumberTableEntryValidationException

clone

java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Throws:
java.lang.CloneNotSupportedException