org.apache.bcel.generic
Class LineNumberGen
java.lang.Object
org.apache.bcel.generic.LineNumberGen
- All Implemented Interfaces:
- Serializable, Cloneable, InstructionTargeter
public class LineNumberGen
- extends Object
- implements InstructionTargeter, Cloneable, 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 386056 2006-03-15 11:31:56Z tcurdt $
- See Also:
LineNumber
,
MethodGen
,
Serialized Form
LineNumberGen
public LineNumberGen(InstructionHandle ih,
int src_line)
- Create a line number.
- Parameters:
ih
- instruction handle to reference
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 targetnew_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 Object clone()
- Overrides:
clone
in class Object
getInstruction
public InstructionHandle getInstruction()
setSourceLine
public void setSourceLine(int src_line)
getSourceLine
public int getSourceLine()
Copyright © 2002-2006 Apache Software Foundation. All Rights Reserved.