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

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


    if (index < length) {
      return (int) reference.sourcePositions[index];
    }
    return (int) reference.sourcePositions[length - 1];
  } else if (node instanceof QualifiedTypeReference) {
    QualifiedTypeReference reference = (QualifiedTypeReference) node;
    int length = reference.sourcePositions.length;
    if (index < length) {
      return (int) reference.sourcePositions[index];
    }
  }
View Full Code Here


public void redundantSpecificationOfTypeArguments(ASTNode location, TypeBinding[] argumentTypes) {
  int severity = computeSeverity(IProblem.RedundantSpecificationOfTypeArguments);
  if (severity != ProblemSeverities.Ignore) {
    int sourceStart = -1;
    if (location instanceof QualifiedTypeReference) {
      QualifiedTypeReference ref = (QualifiedTypeReference)location;
      sourceStart = (int) (ref.sourcePositions[ref.sourcePositions.length - 1] >> 32);
    } else {
      sourceStart = location.sourceStart;
    }
    this.handle(
View Full Code Here

        for (int i = 0; i < identCount; i++) {
          positions[i] = pos;
        }
        char[][] identifiers = extractIdentifiers(typeSignature, nameFragmentStart, nameFragmentEnd, identCount);
        if (dim == 0) {
          return new QualifiedTypeReference(identifiers, positions);
        } else {
          return new ArrayQualifiedTypeReference(identifiers, dim, positions);
        }
      }
    } else { // parameterized
View Full Code Here

        for (int i = 0; i < identCount; i++) {
          positions[i] = pos;
        }
        char[][] identifiers = CharOperation.splitOn('.', typeName, nameFragmentStart, nameFragmentEnd+1);
        if (dim == 0) {
          return new QualifiedTypeReference(identifiers, positions);
        } else {
          return new ArrayQualifiedTypeReference(identifiers, dim, positions);
        }
      }
    } else { // parameterized
View Full Code Here

  int severity = computeSeverity(IProblem.UsingDeprecatedType);
  if (severity == ProblemSeverities.Ignore) return;
  type = type.leafComponentType();
  int sourceStart = -1;
  if (location instanceof QualifiedTypeReference) { // https://bugs.eclipse.org/bugs/show_bug.cgi?id=300031
    QualifiedTypeReference ref = (QualifiedTypeReference) location;
    if (index < Integer.MAX_VALUE) {
      sourceStart = (int) (ref.sourcePositions[index] >> 32);
    }
  }
  this.handle(
View Full Code Here

    } else {
      long[] positions = arrayQualifiedTypeReference.sourcePositions;
      end = (int) positions[positions.length - 1];
    }
  } else if (location instanceof QualifiedTypeReference) {
    QualifiedTypeReference ref = (QualifiedTypeReference) location;
    if (isRecoveredName(ref.tokens)) return;
    if (type instanceof ReferenceBinding) {
      char[][] name = ((ReferenceBinding) type).compoundName;
      if (name.length <= ref.sourcePositions.length)
        end = (int) ref.sourcePositions[name.length - 1];
    }
  } else if (location instanceof ImportReference) {
    ImportReference ref = (ImportReference) location;
    if (isRecoveredName(ref.tokens)) return;
    if (type instanceof ReferenceBinding) {
      char[][] name = ((ReferenceBinding) type).compoundName;
      end = (int) ref.sourcePositions[name.length - 1];
    }
  } else if (location instanceof ArrayTypeReference) {
    ArrayTypeReference arrayTypeReference = (ArrayTypeReference) location;
    if (isRecoveredName(arrayTypeReference.token)) return;
    end = arrayTypeReference.originalSourceEnd;
  }

  int start = location.sourceStart;
  if (location instanceof org.eclipse.jdt.internal.compiler.ast.SingleTypeReference) {
    org.eclipse.jdt.internal.compiler.ast.SingleTypeReference ref =
        (org.eclipse.jdt.internal.compiler.ast.SingleTypeReference) location;
    if (ref.annotations != null)
      start = end - ref.token.length + 1;
  } else if (location instanceof QualifiedTypeReference) {
    QualifiedTypeReference ref = (QualifiedTypeReference) location;
    if (ref.annotations != null)
      start = (int) (ref.sourcePositions[0] & 0x00000000FFFFFFFFL ) - ref.tokens[0].length + 1;
  }

  this.handle(
View Full Code Here

    if (index < length) {
      return (int) reference.sourcePositions[index];
    }
    return (int) reference.sourcePositions[length - 1];
  } else if (node instanceof QualifiedTypeReference) {
    QualifiedTypeReference reference = (QualifiedTypeReference) node;
    int length = reference.sourcePositions.length;
    if (index < length) {
      return (int) reference.sourcePositions[index];
    }
  }
View Full Code Here

public void redundantSpecificationOfTypeArguments(ASTNode location, TypeBinding[] argumentTypes) {
  int severity = computeSeverity(IProblem.RedundantSpecificationOfTypeArguments);
  if (severity != ProblemSeverities.Ignore) {
    int sourceStart = -1;
    if (location instanceof QualifiedTypeReference) {
      QualifiedTypeReference ref = (QualifiedTypeReference)location;
      sourceStart = (int) (ref.sourcePositions[ref.sourcePositions.length - 1] >> 32);
    } else {
      sourceStart = location.sourceStart;
    }
    this.handle(
View Full Code Here

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

      this.identifierPositionStack,
      this.identifierPtr + 1,
      positions,
      0,
      length);
    return new QualifiedTypeReference(tokens, positions);
  }
}
View Full Code Here

TOP

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

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.