Class ThrownExceptionFinder
java.lang.Object
org.aspectj.org.eclipse.jdt.internal.compiler.ASTVisitor
org.aspectj.org.eclipse.jdt.internal.codeassist.ThrownExceptionFinder
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
endVisit(AllocationExpression allocationExpression, BlockScope scope)
void
endVisit(MessageSend messageSend, BlockScope scope)
void
endVisit(ThrowStatement throwStatement, BlockScope scope)
Returns all the already caught exceptions in catch blocks, found by the call toprocessThrownExceptions(TryStatement, BlockScope)
Returns all exceptions that are discouraged to use because (a) they are already caught in some inner try-catch, or (b) their super exception has already been caught.Returns all the thrown exceptions minus the ones that are already caught in previous catch blocks (of the same try), found by the call toprocessThrownExceptions(TryStatement, BlockScope)
.void
processThrownExceptions(TryStatement tryStatement, BlockScope scope)
Finds the thrown exceptions minus the ones that are already caught in previous catch blocks.boolean
visit(TryStatement tryStatement, BlockScope scope)
boolean
visit(TypeDeclaration localTypeDeclaration, BlockScope scope)
boolean
visit(TypeDeclaration memberTypeDeclaration, ClassScope scope)
boolean
visit(TypeDeclaration typeDeclaration, CompilationUnitScope scope)
Methods inherited from class org.aspectj.org.eclipse.jdt.internal.compiler.ASTVisitor
acceptProblem, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit
-
Constructor Details
-
ThrownExceptionFinder
public ThrownExceptionFinder()
-
-
Method Details
-
processThrownExceptions
Finds the thrown exceptions minus the ones that are already caught in previous catch blocks. Exception is already caught even if its super type is being caught. Also computes, separately, a list comprising of (a)those exceptions that have been caught already and (b)those exceptions that are thrown by the method and whose super type has been caught already.- Parameters:
tryStatement
-scope
-
-
endVisit
- Overrides:
endVisit
in classASTVisitor
-
endVisit
- Overrides:
endVisit
in classASTVisitor
-
endVisit
- Overrides:
endVisit
in classASTVisitor
-
getAlreadyCaughtExceptions
Returns all the already caught exceptions in catch blocks, found by the call toprocessThrownExceptions(TryStatement, BlockScope)
- Returns:
- Returns an array of those exceptions that have been caught already in previous catch or
multi-catch blocks of the same try block. (Exceptions caught in inner try-catches are obtained via
getDiscouragedExceptions()
.
-
getThrownUncaughtExceptions
Returns all the thrown exceptions minus the ones that are already caught in previous catch blocks (of the same try), found by the call toprocessThrownExceptions(TryStatement, BlockScope)
.- Returns:
- Returns an array of thrown exceptions that are still not caught in any catch block.
-
getDiscouragedExceptions
Returns all exceptions that are discouraged to use because (a) they are already caught in some inner try-catch, or (b) their super exception has already been caught.- Returns:
- all discouraged exceptions
-
visit
- Overrides:
visit
in classASTVisitor
-
visit
- Overrides:
visit
in classASTVisitor
-
visit
- Overrides:
visit
in classASTVisitor
-
visit
- Overrides:
visit
in classASTVisitor
-