예제 #1
0
파일: CFG.java 프로젝트: christ66/findbugs
 /**
  * Get a Collection of basic blocks which contain the bytecode instruction with given offset.
  *
  * @param offset the bytecode offset of an instruction
  * @return Collection of BasicBlock objects which contain the instruction with that offset
  */
 public Collection<BasicBlock> getBlocksContainingInstructionWithOffset(int offset) {
   LinkedList<BasicBlock> result = new LinkedList<BasicBlock>();
   for (Iterator<BasicBlock> i = blockIterator(); i.hasNext(); ) {
     BasicBlock block = i.next();
     if (block.containsInstructionWithOffset(offset)) {
       result.add(block);
     }
   }
   return result;
 }