public ReferenceBinding[] find(TryStatement tryStatement, BlockScope scope) { this.thrownExceptions = new SimpleSet(); this.exceptionsStack = new Stack(); tryStatement.traverse(this, scope); removeCaughtExceptions(tryStatement); ReferenceBinding[] result = new ReferenceBinding[this.thrownExceptions.elementSize]; this.thrownExceptions.asArray(result); return result; }
/** * 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. * @param tryStatement * @param scope */ public void processThrownExceptions(TryStatement tryStatement, BlockScope scope) { this.thrownExceptions = new SimpleSet(); this.exceptionsStack = new Stack(); this.caughtExceptions = new SimpleSet(); this.discouragedExceptions = new SimpleSet(); tryStatement.traverse(this, scope); removeCaughtExceptions(tryStatement, true /*remove unchecked exceptions this time*/); }
/** * 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. * @param tryStatement * @param scope */ public void processThrownExceptions(TryStatement tryStatement, BlockScope scope) { this.thrownExceptions = new SimpleSet(); this.exceptionsStack = new Stack(); this.caughtExceptions = new SimpleSet(); this.discouragedExceptions = new SimpleSet(); tryStatement.traverse(this, scope); removeCaughtExceptions(tryStatement, true /*remove unchecked exceptions this time*/); }
/** * 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. * @param tryStatement * @param scope */ public void processThrownExceptions(TryStatement tryStatement, BlockScope scope) { this.thrownExceptions = new SimpleSet(); this.exceptionsStack = new Stack(); this.caughtExceptions = new SimpleSet(); this.discouragedExceptions = new SimpleSet(); tryStatement.traverse(this, scope); removeCaughtExceptions(tryStatement, true /*remove unchecked exceptions this time*/); }
/** * 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. * @param tryStatement * @param scope */ public void processThrownExceptions(TryStatement tryStatement, BlockScope scope) { this.thrownExceptions = new SimpleSet(); this.exceptionsStack = new Stack(); this.caughtExceptions = new SimpleSet(); this.discouragedExceptions = new SimpleSet(); tryStatement.traverse(this, scope); removeCaughtExceptions(tryStatement, true /*remove unchecked exceptions this time*/); }
/** * 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. * @param tryStatement * @param scope */ public void processThrownExceptions(TryStatement tryStatement, BlockScope scope) { this.thrownExceptions = new SimpleSet(); this.exceptionsStack = new Stack(); this.caughtExceptions = new SimpleSet(); this.discouragedExceptions = new SimpleSet(); tryStatement.traverse(this, scope); removeCaughtExceptions(tryStatement, true /*remove unchecked exceptions this time*/); }