Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.bcel.generic
Class LineNumberGen

    java.lang.Object
      |
      +--org.apache.bcel.generic.LineNumberGen

All Implemented Interfaces:
  java.lang.Cloneable, InstructionTargeter, java.io.Serializable

public class LineNumberGen
extends java.lang.Object
implements InstructionTargeter, java.lang.Cloneable, java.io.Serializable

This class represents a line number within a method, i.e., give an instruction a line number corresponding to the source code line.

Version:
  $Id: LineNumberGen.java,v 1.3 2002/07/11 19:39:04 mdahm Exp $
Author:
  M. Dahm
See Also:
  `LineNumber`, `MethodGen`, Serialized Form

Constructor Summary
`LineNumberGen(InstructionHandle ih, int src_line)` Create a line number.

Method Summary
`java.lang.Object` | `clone()`
`boolean` | `containsTarget(InstructionHandle ih)`
`InstructionHandle` | `getInstruction()`
`LineNumber` | `getLineNumber()` Get LineNumber attribute .
`int` | `getSourceLine()`
`void` | `setInstruction(InstructionHandle ih)`
`void` | `setSourceLine(int src_line)`
`void` | `updateTarget(InstructionHandle old_ih, InstructionHandle new_ih)`

Methods inherited from class java.lang.Object
`equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### LineNumberGen

    public LineNumberGen(InstructionHandle ih,
                         int src_line)

  Create a line number.

Parameters:
  `ih` - instruction handle to reference

Method Detail

### containsTarget

    public boolean containsTarget(InstructionHandle ih)

  Specified by:
    `containsTarget` in interface `InstructionTargeter`
  Returns:
    true, if ih is target of this line number

### updateTarget

    public void updateTarget(InstructionHandle old_ih,
                             InstructionHandle new_ih)

  Specified by:
    `updateTarget` in interface `InstructionTargeter`
  Parameters:
    `old_ih` - old target
    `new_ih` - new target

### getLineNumber

    public LineNumber getLineNumber()

  Get LineNumber attribute . This relies on that the instruction list has already been dumped to byte code or or that the `setPositions' methods has been called for the instruction list.

### setInstruction

    public void setInstruction(InstructionHandle ih)

### clone

    public java.lang.Object clone()

  Overrides:
    `clone` in class `java.lang.Object`

### getInstruction

    public InstructionHandle getInstruction()

### setSourceLine

    public void setSourceLine(int src_line)

### getSourceLine

    public int getSourceLine()

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2002-2003 Apache Software Foundation. All Rights Reserved.