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

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


* Sort the given ast nodes by their positions.
*/
private static void quickSort(ASTNode[] sortedCollection, int left, int right) {
  int original_left = left;
  int original_right = right;
  ASTNode mid = sortedCollection[left +  (right - left) / 2];
  do {
    while (sortedCollection[left].sourceStart < mid.sourceStart) {
      left++;
    }
    while (mid.sourceStart < sortedCollection[right].sourceStart) {
      right--;
    }
    if (left <= right) {
      ASTNode tmp = sortedCollection[left];
      sortedCollection[left] = sortedCollection[right];
      sortedCollection[right] = tmp;
      left++;
      right--;
    }
View Full Code Here


    }

    traversedContext.recordReturnFrom(flowInfo.unconditionalInits());

    if (traversedContext instanceof InsideSubRoutineFlowContext) {
      ASTNode node = traversedContext.associatedNode;
      if (node instanceof TryStatement) {
        TryStatement tryStatement = (TryStatement) node;
        flowInfo.addInitializationsFrom(tryStatement.subRoutineInits); // collect inits
      }
    }
View Full Code Here

      return;

    traversedContext.recordReturnFrom(flowInfo.unconditionalInits());

    if (traversedContext instanceof InsideSubRoutineFlowContext) {
      ASTNode node = traversedContext.associatedNode;
      if (node instanceof TryStatement) {
        TryStatement tryStatement = (TryStatement) node;
        flowInfo.addInitializationsFrom(tryStatement.subRoutineInits); // collect inits
      }
    }
View Full Code Here

    arguments,
    location.sourceStart,
    location.sourceEnd);
}
public void annotationCannotOverrideMethod(MethodBinding overrideMethod, MethodBinding inheritedMethod) {
  ASTNode location = overrideMethod.sourceMethod();
  this.handle(
    IProblem.AnnotationCannotOverrideMethod,
    new String[] {
        new String(overrideMethod.declaringClass.readableName()),
        new String(inheritedMethod.declaringClass.readableName()),
View Full Code Here

    new String[] {new String(type.shortReadableName())},
    location.sourceStart,
    location.sourceEnd);
}
public void genericTypeCannotExtendThrowable(TypeDeclaration typeDecl) {
  ASTNode location = typeDecl.binding.isAnonymousType() ? typeDecl.allocation.type : typeDecl.superclass;
  this.handle(
    IProblem.GenericTypeCannotExtendThrowable,
    new String[]{ new String(typeDecl.binding.readableName()) },
    new String[]{ new String(typeDecl.binding.shortReadableName()) },
    location.sourceStart,
View Full Code Here

    if (location instanceof InvocationSite) {
      InvocationSite site = (InvocationSite) location;
      start = site.sourceStart();
      end = site.sourceEnd();
    } else if (location instanceof ASTNode) {
      ASTNode node = (ASTNode) location;
      start = node.sourceStart();
      end = node.sourceEnd();
    }
  }
  this.handle(
    IProblem.IsClassPathCorrect,
    arguments,
View Full Code Here

  int severity = computeSeverity(IProblem.UnsafeReturnTypeOverride);
  if (severity == ProblemSeverities.Ignore) return;
  int start = type.sourceStart();
  int end = type.sourceEnd();
  if (currentMethod.declaringClass == type) {
    ASTNode location = ((MethodDeclaration) currentMethod.sourceMethod()).returnType;
    start = location.sourceStart();
    end = location.sourceEnd();
  }
  this.handle(
      IProblem.UnsafeReturnTypeOverride,
      new String[] {
        new String(currentMethod.returnType.readableName()),
View Full Code Here

        }

        // to compute bodyStart, and thus used to set next checkpoint.
        int count;
        for (count = 0; count < argLength; count++){
          ASTNode aNode = parser.astStack[argStart+count];
          if(aNode instanceof Argument) {
            Argument argument = (Argument)aNode;
            /* cannot be an argument if non final */
            char[][] argTypeName = argument.type.getTypeName();
            if ((argument.modifiers & ~ClassFileConstants.AccFinal) != 0
View Full Code Here

    arguments,
    location.sourceStart,
    location.sourceEnd);
}
public void annotationCannotOverrideMethod(MethodBinding overrideMethod, MethodBinding inheritedMethod) {
  ASTNode location = overrideMethod.sourceMethod();
  this.handle(
    IProblem.AnnotationCannotOverrideMethod,
    new String[] {
        new String(overrideMethod.declaringClass.readableName()),
        new String(inheritedMethod.declaringClass.readableName()),
View Full Code Here

    new String[] {new String(type.shortReadableName())},
    location.sourceStart,
    location.sourceEnd);
}
public void genericTypeCannotExtendThrowable(TypeDeclaration typeDecl) {
  ASTNode location = typeDecl.binding.isAnonymousType() ? typeDecl.allocation.type : typeDecl.superclass;
  this.handle(
    IProblem.GenericTypeCannotExtendThrowable,
    new String[]{ new String(typeDecl.binding.readableName()) },
    new String[]{ new String(typeDecl.binding.shortReadableName()) },
    location.sourceStart,
View Full Code Here

TOP

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

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.