Examples of ParameterizedQualifiedTypeReference


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

      long[] positions = new long[identCount];
      long pos = ((long) start << 32) + end;
      for (int i = 0; i < identCount; i++) {
        positions[i] = pos;
      }
      return new ParameterizedQualifiedTypeReference(tokens, arguments, dim, positions);
    }
  }
View Full Code Here

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

        sourceEnd = retrieveClosingAngleBracketPosition(typeReference.sourceEnd);
      } else {
        sourceEnd = returnType.sourceEnd;
      }
    } else if (returnType instanceof ParameterizedQualifiedTypeReference) {
      ParameterizedQualifiedTypeReference typeReference = (ParameterizedQualifiedTypeReference) returnType;
      sourceEnd = retrieveClosingAngleBracketPosition(typeReference.sourceEnd);
    } else {
      sourceEnd = returnType.sourceEnd;
    }
  }
View Full Code Here

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

    if (isRecoveredName(ref.tokens)) return;
    if (ref.indexOfFirstFieldBinding >= 1)
      end = (int) ref.sourcePositions[ref.indexOfFirstFieldBinding - 1];
  } else if (location instanceof ParameterizedQualifiedTypeReference) {
    // must be before instanceof ArrayQualifiedTypeReference
    ParameterizedQualifiedTypeReference ref = (ParameterizedQualifiedTypeReference) location;
    if (isRecoveredName(ref.tokens)) return;
    if (type instanceof ReferenceBinding) {
      char[][] name = ((ReferenceBinding) type).compoundName;
      end = (int) ref.sourcePositions[name.length - 1];
    }
View Full Code Here

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

      sourceEnd = retrieveClosingAngleBracketPosition(typeReference.sourceEnd);
    } else {
      sourceEnd = type.sourceEnd;
    }
  } else if (type instanceof ParameterizedQualifiedTypeReference) {
    ParameterizedQualifiedTypeReference typeReference = (ParameterizedQualifiedTypeReference) type;
    sourceEnd = retrieveClosingAngleBracketPosition(typeReference.sourceEnd);
  } else {
    sourceEnd = type.sourceEnd;
  }
View Full Code Here

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

            return (int) (ref.sourcePositions[i + offset]);
        }
      }
    }
  } else if (node instanceof ParameterizedQualifiedTypeReference) {
    ParameterizedQualifiedTypeReference reference = (ParameterizedQualifiedTypeReference) node;
    if (index < reference.sourcePositions.length) {
      return (int) reference.sourcePositions[index];
    }
  } else if (node instanceof ArrayQualifiedTypeReference) {
    ArrayQualifiedTypeReference reference = (ArrayQualifiedTypeReference) node;
View Full Code Here

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

          }
        }
      }
    }
  } else if (node instanceof ParameterizedQualifiedTypeReference) {
    ParameterizedQualifiedTypeReference reference = (ParameterizedQualifiedTypeReference) node;
    return (int) (reference.sourcePositions[0]>>>32);
  }
  return node.sourceStart;
}
View Full Code Here

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

        type.bits |= ASTNode.IsDiamond;
      } // else don't even bother to recognize this as <>
    }
  }
  else if (allocType instanceof ParameterizedQualifiedTypeReference) {
    ParameterizedQualifiedTypeReference type = (ParameterizedQualifiedTypeReference) allocType;
    if (type.typeArguments[type.typeArguments.length - 1] == TypeReference.NO_TYPE_ARGUMENTS) { // Don't care for X<>.Y<> and X<>.Y<String>
      if (this.options.sourceLevel < ClassFileConstants.JDK1_7) {
        problemReporter().diamondNotBelow17(allocType, type.typeArguments.length - 1);
      }
      if (this.options.sourceLevel > ClassFileConstants.JDK1_4) { // https://bugs.eclipse.org/bugs/show_bug.cgi?id=351965
View Full Code Here

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

    if (singleTypeReference.annotations != null) {
      typeAnnotations = new Annotation[tokensSize][];
      typeAnnotations[nameSize] =  singleTypeReference.annotations[0];
    }
  } else if (rightSide instanceof ParameterizedQualifiedTypeReference) {
    ParameterizedQualifiedTypeReference parameterizedTypeReference = (ParameterizedQualifiedTypeReference) rightSide;
    TypeReference[][] rightSideTypeArguments = parameterizedTypeReference.typeArguments;
    System.arraycopy(rightSideTypeArguments, 0, typeArguments, nameSize, rightSideTypeArguments.length);
    char[][] rightSideTokens = parameterizedTypeReference.tokens;
    System.arraycopy(rightSideTokens, 0, tokens, nameSize, rightSideTokens.length);
    long[] rightSidePositions = parameterizedTypeReference.sourcePositions;
    System.arraycopy(rightSidePositions, 0, positions, nameSize, rightSidePositions.length);
    Annotation [][] rightSideAnnotations = parameterizedTypeReference.annotations;
    if (rightSideAnnotations != null) {
      typeAnnotations = new Annotation[tokensSize][];
      System.arraycopy(rightSideAnnotations, 0, typeAnnotations, nameSize, rightSideAnnotations.length);
    }
  } else if (rightSide instanceof QualifiedTypeReference) {
    QualifiedTypeReference qualifiedTypeReference = (QualifiedTypeReference) rightSide;
    char[][] rightSideTokens = qualifiedTypeReference.tokens;
    System.arraycopy(rightSideTokens, 0, tokens, nameSize, rightSideTokens.length);
    long[] rightSidePositions = qualifiedTypeReference.sourcePositions;
    System.arraycopy(rightSidePositions, 0, positions, nameSize, rightSidePositions.length);
    Annotation [][] rightSideAnnotations = qualifiedTypeReference.annotations;
    if (rightSideAnnotations != null) {
      typeAnnotations = new Annotation[tokensSize][];
      System.arraycopy(rightSideAnnotations, 0, typeAnnotations, nameSize, rightSideAnnotations.length);
    }
  }

  int currentTypeArgumentsLength = this.genericsLengthStack[this.genericsLengthPtr--];
  TypeReference[] currentTypeArguments = new TypeReference[currentTypeArgumentsLength];
  this.genericsPtr -= currentTypeArgumentsLength;
  System.arraycopy(this.genericsStack, this.genericsPtr + 1, currentTypeArguments, 0, currentTypeArgumentsLength);

  if (nameSize == 1) {
    tokens[0] = this.identifierStack[this.identifierPtr];
    positions[0] = this.identifierPositionStack[this.identifierPtr--];
    typeArguments[0] = currentTypeArguments;
  } else {
    this.identifierPtr -= nameSize;
    System.arraycopy(this.identifierStack, this.identifierPtr + 1, tokens, 0, nameSize);
    System.arraycopy(this.identifierPositionStack, this.identifierPtr + 1, positions, 0, nameSize);
    typeArguments[nameSize - 1] = currentTypeArguments;
  }
  this.identifierLengthPtr--;
  ParameterizedQualifiedTypeReference typeRef = new ParameterizedQualifiedTypeReference(tokens, typeArguments, dim, annotationsOnDimensions, positions);

  while (nameSize > 0) {
    int length;
    if ((length = this.typeAnnotationLengthStack[this.typeAnnotationLengthPtr--]) != 0) {
      if (typeAnnotations == null)
View Full Code Here

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

      index -= currentIdentifiersLength;
      if (index > 0) {
        currentIdentifiersLength = this.identifierLengthStack[this.identifierLengthPtr--];
      }
    }
    ParameterizedQualifiedTypeReference parameterizedQualifiedTypeReference = new ParameterizedQualifiedTypeReference(tokens, typeArguments, dim, annotationsOnDimensions, positions);
    if (dim != 0) {
      parameterizedQualifiedTypeReference.sourceEnd = this.endStatementPosition;
    }
    /* We used to eagerly mark the PQTR as constituting diamond usage if we encountered <>, but that is too eager and
       complicates error handling by making it hard to distinguish legitimate use cases from ill formed ones. We are
View Full Code Here

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

      do {
        // isStatic() is answering true for toplevel types
        if ((currentType.modifiers & ClassFileConstants.AccStatic) != 0) break checkParameterizedAllocation;
        if (currentType.isRawType()) break checkParameterizedAllocation;
      } while ((currentType = currentType.enclosingType())!= null);
      ParameterizedQualifiedTypeReference qRef = (ParameterizedQualifiedTypeReference) this.type;
      for (int i = qRef.typeArguments.length - 2; i >= 0; i--) {
        if (qRef.typeArguments[i] != null) {
          scope.problemReporter().illegalQualifiedParameterizedTypeAllocation(this.type, this.resolvedType);
          break;
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.