Package org.eclipse.jdt.internal.compiler.ast

Examples of org.eclipse.jdt.internal.compiler.ast.UnionTypeReference


  private void formatMultiCatchArguments(Argument argument,
      boolean spaceBeforePipe,
      boolean spaceAfterPipe,
      int multiCatchAlignment,
      BlockScope scope) {
    UnionTypeReference unionType = (UnionTypeReference) argument.type;
    int length = unionType.typeReferences != null ? unionType.typeReferences.length : 0;
    if (length > 0) {
      Alignment argumentsAlignment = this.scribe.createAlignment(
          Alignment.MULTI_CATCH,
          multiCatchAlignment,
View Full Code Here


   */
  public static String typeSignature(TypeReference type) {
    String signature = null;
    if ((type.bits & org.eclipse.jdt.internal.compiler.ast.ASTNode.IsUnionType) != 0) {
      // special treatment for union type reference
      UnionTypeReference unionTypeReference = (UnionTypeReference) type;
      TypeReference[] typeReferences = unionTypeReference.typeReferences;
      int length = typeReferences.length;
      String[] typeSignatures = new String[length];
      for(int i = 0; i < length; i++) {
        char[][] compoundName = typeReferences[i].getParameterizedTypeName();
View Full Code Here

  private void formatMultiCatchArguments(Argument argument,
      boolean spaceBeforePipe,
      boolean spaceAfterPipe,
      int multiCatchAlignment,
      BlockScope scope) {
    UnionTypeReference unionType = (UnionTypeReference) argument.type;
    int length = unionType.typeReferences != null ? unionType.typeReferences.length : 0;
    if (length > 0) {
      Alignment argumentsAlignment = this.scribe.createAlignment(
          Alignment.MULTI_CATCH,
          multiCatchAlignment,
View Full Code Here

   */
  public static String typeSignature(TypeReference type) {
    String signature = null;
    if ((type.bits & org.eclipse.jdt.internal.compiler.ast.ASTNode.IsUnionType) != 0) {
      // special treatment for union type reference
      UnionTypeReference unionTypeReference = (UnionTypeReference) type;
      TypeReference[] typeReferences = unionTypeReference.typeReferences;
      int length = typeReferences.length;
      String[] typeSignatures = new String[length];
      for(int i = 0; i < length; i++) {
        char[][] compoundName = typeReferences[i].getParameterizedTypeName();
View Full Code Here

  private void removeCaughtExceptions(TryStatement tryStatement, boolean recordUncheckedCaughtExceptions) {
    Argument[] catchArguments = tryStatement.catchArguments;
    int length = catchArguments == null ? 0 : catchArguments.length;
    for (int i = 0; i < length; i++) {
      if (catchArguments[i].type instanceof UnionTypeReference) {
        UnionTypeReference unionTypeReference = (UnionTypeReference) catchArguments[i].type;
        TypeBinding caughtException;
        for (int j = 0; j < unionTypeReference.typeReferences.length; j++) {
          caughtException = unionTypeReference.typeReferences[j].resolvedType;
          if ((caughtException instanceof ReferenceBinding) && caughtException.isValidBinding()) {  // might be null when its the completion node
            if (recordUncheckedCaughtExceptions) {
View Full Code Here

  private void formatMultiCatchArguments(Argument argument,
      boolean spaceBeforePipe,
      boolean spaceAfterPipe,
      int multiCatchAlignment,
      BlockScope scope) {
    UnionTypeReference unionType = (UnionTypeReference) argument.type;
    int length = unionType.typeReferences != null ? unionType.typeReferences.length : 0;
    if (length > 0) {
      Alignment argumentsAlignment = this.scribe.createAlignment(
          Alignment.MULTI_CATCH,
          multiCatchAlignment,
View Full Code Here

        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 {
View Full Code Here

   */
  public static String typeSignature(TypeReference type) {
    String signature = null;
    if ((type.bits & org.eclipse.jdt.internal.compiler.ast.ASTNode.IsUnionType) != 0) {
      // special treatment for union type reference
      UnionTypeReference unionTypeReference = (UnionTypeReference) type;
      TypeReference[] typeReferences = unionTypeReference.typeReferences;
      int length = typeReferences.length;
      String[] typeSignatures = new String[length];
      for(int i = 0; i < length; i++) {
        char[][] compoundName = typeReferences[i].getParameterizedTypeName();
View Full Code Here

  private void removeCaughtExceptions(TryStatement tryStatement, boolean recordUncheckedCaughtExceptions) {
    Argument[] catchArguments = tryStatement.catchArguments;
    int length = catchArguments == null ? 0 : catchArguments.length;
    for (int i = 0; i < length; i++) {
      if (catchArguments[i].type instanceof UnionTypeReference) {
        UnionTypeReference unionTypeReference = (UnionTypeReference) catchArguments[i].type;
        TypeBinding caughtException;
        for (int j = 0; j < unionTypeReference.typeReferences.length; j++) {
          caughtException = unionTypeReference.typeReferences[j].resolvedType;
          if ((caughtException instanceof ReferenceBinding) && caughtException.isValidBinding()) {  // might be null when its the completion node
            if (recordUncheckedCaughtExceptions) {
View Full Code Here

TOP

Related Classes of org.eclipse.jdt.internal.compiler.ast.UnionTypeReference

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.