Example usage for org.eclipse.jdt.internal.compiler.ast UnionTypeReference UnionTypeReference

List of usage examples for org.eclipse.jdt.internal.compiler.ast UnionTypeReference UnionTypeReference

Introduction

In this page you can find the example usage for org.eclipse.jdt.internal.compiler.ast UnionTypeReference UnionTypeReference.

Prototype

public UnionTypeReference(TypeReference[] typeReferences) 

Source Link

Usage

From source file:org.eclipse.jdt.internal.compiler.parser.Parser.java

License:Open Source License

protected void consumeCatchType() {
    // CatchType ::= UnionType
    int length = this.astLengthStack[this.astLengthPtr--];
    if (length != 1) {
        TypeReference[] typeReferences;//from   ww w .  j  a  va2  s.  c  om
        System.arraycopy(this.astStack, (this.astPtr -= length) + 1,
                (typeReferences = new TypeReference[length]), 0, length);
        UnionTypeReference typeReference = new UnionTypeReference(typeReferences);
        pushOnAstStack(typeReference);
        if (this.options.sourceLevel < ClassFileConstants.JDK1_7) {
            problemReporter().multiCatchNotBelow17(typeReference);
        }
    } else {
        // push back the type reference
        pushOnAstLengthStack(1);
    }
}