edu.umd.cs.findbugs.ba
public interface ResourceTracker<Resource>
See Also: ResourceValueAnalysis
Method Summary | |
---|---|
ResourceValueFrameModelingVisitor | createVisitor(Resource resource, ConstantPoolGen cpg)
Create a ResourceValueFrameModelingVisitor to model the effect
of instructions on the state of the resource.
|
boolean | ignoreExceptionEdge(Edge edge, Resource resource, ConstantPoolGen cpg)
Determine whether the analysis should ignore given exception edge.
|
boolean | ignoreImplicitExceptions(Resource resource)
Determine whether the analysis should ignore exception edges
on which only implicit exceptions are propagated.
|
boolean | isParamInstance(Resource resource, int slot)
Return if the given parameter slot contains the
resource instance upon entry to the method.
|
boolean | isResourceClose(BasicBlock basicBlock, InstructionHandle handle, ConstantPoolGen cpg, Resource resource, ResourceValueFrame frame)
Determine if the given instruction is the site where a resource
is closed.
|
Resource | isResourceCreation(BasicBlock basicBlock, InstructionHandle handle, ConstantPoolGen cpg)
Determine if the given instruction is the site where a resource
is created.
|
Parameters: resource the resource we are tracking cpg the ConstantPoolGen of the method
Returns: a ResourceValueFrameModelingVisitor
Parameters: edge the exception edge resource the resource cpg the ConstantPoolGen
Returns: true if exception edge should be ignored, false if it should be considered
Parameters: resource the resource being tracked
Returns: true if implicit exceptions are significant, false if they should be ignore
Parameters: resource the resource slot the local variable slot
Returns: true if the slot contains the resource instance, false otherwise
Parameters: basicBlock basic block containing the instruction handle the instruction cpg the ConstantPoolGen for the method resource the resource, as returned by isResourceCreation() frame the ResourceValueFrame representing the stack prior to executing the instruction
Returns: true if the resource is closed here, false otherwise
Parameters: basicBlock basic block containing the instruction handle the instruction cpg the ConstantPoolGen for the method
Returns: an opaque Resource object if it is a creation site, or null if it is not a creation site