public class ResourceCollection<Resource>
extends java.lang.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 | Description |
---|---|
ResourceCollection() |
Constructor.
|
Modifier and Type | Method | Description |
---|---|---|
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.
|
java.util.Iterator<Resource> |
resourceIterator() |
Get an Iterator over all resources in the method.
|
public ResourceCollection()
public void addPreexistingResource(Resource resource)
resource
- the preexisting resourcepublic void addCreatedResource(Location location, Resource resource)
location
- the locationresource
- the resource created at that locationpublic boolean isEmpty()
public java.util.Iterator<Resource> resourceIterator()
SpotBugs is licensed under the LGPL.