Example usage for org.eclipse.jdt.core.search IJavaSearchConstants THROWS_CLAUSE_TYPE_REFERENCE

List of usage examples for org.eclipse.jdt.core.search IJavaSearchConstants THROWS_CLAUSE_TYPE_REFERENCE

Introduction

In this page you can find the example usage for org.eclipse.jdt.core.search IJavaSearchConstants THROWS_CLAUSE_TYPE_REFERENCE.

Prototype

int THROWS_CLAUSE_TYPE_REFERENCE

To view the source code for org.eclipse.jdt.core.search IJavaSearchConstants THROWS_CLAUSE_TYPE_REFERENCE.

Click Source Link

Document

Return only type references used in a throws clause.

Usage

From source file:com.codenvy.ide.ext.java.server.internal.core.search.matching.MatchLocatorParser.java

License:Open Source License

protected void consumeMethodHeaderThrowsClause() {
    super.consumeMethodHeaderThrowsClause();
    if ((this.patternFineGrain & IJavaSearchConstants.THROWS_CLAUSE_TYPE_REFERENCE) != 0) {
        // when no fine grain flag is set, type reference match is evaluated in getTypeReference(int) method
        AbstractMethodDeclaration methodDeclaration = (AbstractMethodDeclaration) this.astStack[this.astPtr];
        TypeReference[] thrownExceptions = methodDeclaration.thrownExceptions;
        if (thrownExceptions != null) {
            int thrownLength = thrownExceptions.length;
            for (int i = 0; i < thrownLength; i++) {
                this.patternLocator.match(thrownExceptions[i], this.nodeSet);
            }// w  w  w .  ja v a  2  s. c o m
        }
    }
}