public static SourceLineAnnotation fromVisitedInstructionRange ( ClassContext classContext , MethodGen methodGen , String sourceFile , InstructionHandle start , InstructionHandle end ) { LineNumberTable lineNumberTable = methodGen . getLineNumberTable ( methodGen . getConstantPool ( ) ) ; String className = methodGen . getClassName ( ) ; if ( lineNumberTable == null ) { return createUnknown ( className , sourceFile , start . getPosition ( ) , end . getPosition ( ) ) ; } int startLine = lineNumberTable . getSourceLine ( start . getPosition ( ) ) ; int endLine = lineNumberTable . getSourceLine ( end . getPosition ( ) ) ; return new SourceLineAnnotation ( className , sourceFile , startLine , endLine , start . getPosition ( ) , end . getPosition ( ) ) ; }
Factory method for creating a source line annotation describing the source line numbers for a range of instruction in a method .