Package org.apache.bcel.generic
Class LineNumberGen
java.lang.Object
org.apache.bcel.generic.LineNumberGen
- All Implemented Interfaces:
Cloneable
,InstructionTargeter
This class represents a line number within a method, i.e., give an instruction a line number corresponding to the
source code line.
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionclone()
boolean
Tests whether this targeter targets the specified instruction handle.Gets LineNumber attribute.int
void
setInstruction
(InstructionHandle instructionHandle) void
setSourceLine
(int srcLine) void
updateTarget
(InstructionHandle oldIh, InstructionHandle newIh) Replaces the target of this targeter from this old handle to the new handle.
-
Constructor Details
-
LineNumberGen
Create a line number.- Parameters:
ih
- instruction handle to reference
-
-
Method Details
-
clone
-
containsTarget
Description copied from interface:InstructionTargeter
Tests whether this targeter targets the specified instruction handle.- Specified by:
containsTarget
in interfaceInstructionTargeter
- Parameters:
ih
- the instruction handle to test.- Returns:
- true, if ih is target of this line number
-
getInstruction
-
getLineNumber
Gets LineNumber attribute. This relies on that the instruction list has already been dumped to byte code or that the 'setPositions' methods has been called for the instruction list. -
getSourceLine
-
setInstruction
-
setSourceLine
-
updateTarget
Description copied from interface:InstructionTargeter
Replaces the target of this targeter from this old handle to the new handle.- Specified by:
updateTarget
in interfaceInstructionTargeter
- Parameters:
oldIh
- old targetnewIh
- new target
-