private ResourceCollection<Resource> buildResourceCollection(ClassContext classContext, Method method, ResourceTrackerType resourceTracker) throws CFGBuilderException, DataflowAnalysisException { ResourceCollection<Resource> resourceCollection = new ResourceCollection<>(); CFG cfg = classContext.getCFG(method); ConstantPoolGen cpg = classContext.getConstantPoolGen(); for (Iterator<Location> i = cfg.locationIterator(); i.hasNext();) { Location location = i.next(); Resource resource = resourceTracker.isResourceCreation(location.getBasicBlock(), location.getHandle(), cpg); if (resource != null) { resourceCollection.addCreatedResource(location, resource); } } return resourceCollection; }
private ResourceCollection<Resource> buildResourceCollection(ClassContext classContext, Method method, ResourceTrackerType resourceTracker) throws CFGBuilderException, DataflowAnalysisException { ResourceCollection<Resource> resourceCollection = new ResourceCollection<Resource>(); CFG cfg = classContext.getCFG(method); ConstantPoolGen cpg = classContext.getConstantPoolGen(); for (Iterator<Location> i = cfg.locationIterator(); i.hasNext();) { Location location = i.next(); Resource resource = resourceTracker.isResourceCreation(location.getBasicBlock(), location.getHandle(), cpg); if (resource != null) { resourceCollection.addCreatedResource(location, resource); } } return resourceCollection; }