Class LineNumberGen

  • All Implemented Interfaces:
    java.lang.Cloneable, InstructionTargeter

    public class LineNumberGen
    extends java.lang.Object
    implements InstructionTargeter, java.lang.Cloneable
    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:
    LineNumber, MethodGen
    • Constructor Detail

      • LineNumberGen

        public LineNumberGen​(InstructionHandle ih,
                             int srcLine)
        Create a line number.
        Parameters:
        ih - instruction handle to reference
    • Method Detail

      • clone

        public java.lang.Object clone()
        Overrides:
        clone in class java.lang.Object
      • getLineNumber

        public LineNumber getLineNumber()
        Get 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

        public int getSourceLine()
      • setInstruction

        public void setInstruction​(InstructionHandle instructionHandle)
      • setSourceLine

        public void setSourceLine​(int srcLine)