Example usage for org.eclipse.jdt.internal.compiler.lookup ReferenceBinding isUncheckedException

List of usage examples for org.eclipse.jdt.internal.compiler.lookup ReferenceBinding isUncheckedException

Introduction

In this page you can find the example usage for org.eclipse.jdt.internal.compiler.lookup ReferenceBinding isUncheckedException.

Prototype

@Override
public boolean isUncheckedException(boolean includeSupertype) 

Source Link

Document

JLS 11.5 ensures that Throwable, Exception, RuntimeException and Error are directly connected.

Usage

From source file:org.eclipse.objectteams.otdt.internal.core.compiler.ast.AbstractMethodMappingDeclaration.java

License:Open Source License

protected void checkThrownExceptions(MethodBinding provided, MethodBinding expected) {
    if (provided != null && provided.thrownExceptions != null) {
        if (expected.thrownExceptions != null) {
            outer: for (int i = 0; i < provided.thrownExceptions.length; i++) {
                ReferenceBinding thrown = provided.thrownExceptions[i];
                if (thrown.isUncheckedException(false))
                    continue;
                for (int j = 0; j < expected.thrownExceptions.length; j++) {
                    ReferenceBinding declared = expected.thrownExceptions[j];
                    if (thrown.isCompatibleWith(declared)) {
                        continue outer;
                    }//from   w w  w. j a  va 2s .  c om
                }
                this.scope.problemReporter().callinCalloutUndeclaredException(thrown, this);
            }
        }
    }
}