| Modifier and Type | Field and Description |
|---|---|
FakedTrackingVariable |
AllocationExpression.closeTracker |
FakedTrackingVariable |
FakedTrackingVariable.innerTracker |
FakedTrackingVariable |
FakedTrackingVariable.outerTracker |
| Modifier and Type | Method and Description |
|---|---|
static FakedTrackingVariable |
FakedTrackingVariable.getCloseTrackingVariable(Expression expression,
FlowInfo flowInfo,
FlowContext flowContext)
If expression resolves to a value of type AutoCloseable answer the variable that tracks closing of that local.
|
static FakedTrackingVariable |
FakedTrackingVariable.pickVarForReporting(Set varsOfScope,
BlockScope scope,
boolean atExit)
Pick tracking variables from 'varsOfScope' to establish a proper order of processing:
As much as possible pick wrapper resources before their inner resources.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
FakedTrackingVariable.isResourceBeingReturned(FakedTrackingVariable returnedResource)
If current is the same as 'returnedResource' or a wrapper thereof,
mark as reported and return true, otherwise false.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
LoopingFlowContext.recordExitAgainstResource(BlockScope scope,
FlowInfo flowInfo,
FakedTrackingVariable trackingVar,
ASTNode reference)
Record the fact that we see an early exit (in 'reference') while 'trackingVar' is in scope and may be unclosed.
|
boolean |
FlowContext.recordExitAgainstResource(BlockScope scope,
FlowInfo flowInfo,
FakedTrackingVariable trackingVar,
ASTNode reference)
Record that we found an early exit from a method while a resource is in scope.
|
| Modifier and Type | Field and Description |
|---|---|
FakedTrackingVariable |
LocalVariableBinding.closeTracker |
| Modifier and Type | Method and Description |
|---|---|
void |
BlockScope.pruneWrapperTrackingVar(FakedTrackingVariable trackingVariable)
Unregister a wrapper resource without affecting its inner.
|
int |
BlockScope.registerTrackingVariable(FakedTrackingVariable fakedTrackingVariable)
Register a tracking variable and compute its id.
|
void |
BlockScope.removeTrackingVar(FakedTrackingVariable trackingVariable)
When are no longer interested in this tracking variable - remove it.
|
| Modifier and Type | Method and Description |
|---|---|
void |
ProblemReporter.explicitlyClosedAutoCloseable(FakedTrackingVariable trackVar) |
void |
ProblemReporter.potentiallyUnclosedCloseable(FakedTrackingVariable trackVar,
ASTNode location) |
void |
ProblemReporter.unclosedCloseable(FakedTrackingVariable trackVar,
ASTNode location) |
Copyright © 2013. All rights reserved.