edu.umd.cs.findbugs
public class ResourceCollection<Resource> extends Object
This distinction is important because some resources which exist in the method aren't created in the method: for example, resources passed in as parameters.
| Constructor Summary | |
|---|---|
| ResourceCollection()
Constructor.
| |
| Method Summary | |
|---|---|
| void | addCreatedResource(Location location, Resource resource)
Add a resource created within the analyzed method.
|
| void | addPreexistingResource(Resource resource)
Add a preexisting resource.
|
| Resource | getCreatedResource(Location location)
Get the resource that is created at given location.
|
| boolean | isEmpty()
Return whether or not there are any resources in the collection. |
| Iterator<Resource> | resourceIterator()
Get an Iterator over all resources in the method.
|
Parameters: location the location resource the resource created at that location
Parameters: resource the preexisting resource
Parameters: location the Location
Returns: the Resource created at that location, or null if no resource is created at the location