Examples of LocalDeclaration


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

}
public void fakeReachable(ASTNode location) {
  int sourceStart = location.sourceStart;
  int sourceEnd = location.sourceEnd;
  if (location instanceof LocalDeclaration) {
    LocalDeclaration declaration = (LocalDeclaration) location;
    sourceStart = declaration.declarationSourceStart;
    sourceEnd = declaration.declarationSourceEnd;
 
  this.handle(
    IProblem.DeadCode,
View Full Code Here

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

}
public void unreachableCode(Statement statement) {
  int sourceStart = statement.sourceStart;
  int sourceEnd = statement.sourceEnd;
  if (statement instanceof LocalDeclaration) {
    LocalDeclaration declaration = (LocalDeclaration) statement;
    sourceStart = declaration.declarationSourceStart;
    sourceEnd = declaration.declarationSourceEnd;
  } else if (statement instanceof Expression) {
    int statemendEnd = ((Expression) statement).statementEnd;
    if (statemendEnd != -1) sourceEnd = statemendEnd;
View Full Code Here

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

      }
      blockIndex = j+1; // shift the index to the new block
    }
   
    if (node instanceof LocalDeclaration){
      LocalDeclaration local = (LocalDeclaration) node;
      if (local.declarationSourceEnd == 0){
        element = element.add(local, 0);
        if (local.initialization == null){
          this.lastCheckPoint = local.sourceEnd + 1;
        } else {
View Full Code Here

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

}
protected void consumeEnhancedForStatementHeaderInit(boolean hasModifiers) {
  super.consumeEnhancedForStatementHeaderInit(hasModifiers);

  if (this.currentElement != null) {
    LocalDeclaration localDecl = ((ForeachStatement)this.astStack[this.astPtr]).elementVariable;
    this.lastCheckPoint = localDecl.sourceEnd + 1;
    this.currentElement = this.currentElement.add(localDecl, 0);
  }
}
View Full Code Here

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

}
public void fakeReachable(ASTNode location) {
  int sourceStart = location.sourceStart;
  int sourceEnd = location.sourceEnd;
  if (location instanceof LocalDeclaration) {
    LocalDeclaration declaration = (LocalDeclaration) location;
    sourceStart = declaration.declarationSourceStart;
    sourceEnd = declaration.declarationSourceEnd;
 
  this.handle(
    IProblem.DeadCode,
View Full Code Here

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

}
public void unreachableCode(Statement statement) {
  int sourceStart = statement.sourceStart;
  int sourceEnd = statement.sourceEnd;
  if (statement instanceof LocalDeclaration) {
    LocalDeclaration declaration = (LocalDeclaration) statement;
    sourceStart = declaration.declarationSourceStart;
    sourceEnd = declaration.declarationSourceEnd;
  } else if (statement instanceof Expression) {
    int statemendEnd = ((Expression) statement).statementEnd;
    if (statemendEnd != -1) sourceEnd = statemendEnd;
View Full Code Here

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

      if(node instanceof Block) {
        Block block = (Block) node;
        element = element.add(block, 0);
        this.lastCheckPoint = block.sourceEnd + 1;
      } else if(node instanceof LocalDeclaration) {
        LocalDeclaration statement = (LocalDeclaration) node;
        element = element.add(statement, 0);
        this.lastCheckPoint = statement.sourceEnd + 1;
      } else if(node instanceof Expression) {
        if(node instanceof Assignment ||
            node instanceof PrefixExpression ||
View Full Code Here

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

    }
  }

  Argument arg = (Argument)this.astStack[this.astPtr--];
  // convert argument to local variable
  LocalDeclaration localDeclaration = new LocalDeclaration(arg.name, arg.sourceStart, arg.sourceEnd);
  localDeclaration.type = arg.type;
  localDeclaration.declarationSourceStart = arg.declarationSourceStart;
  localDeclaration.declarationSourceEnd = arg.declarationSourceEnd;

  this.currentElement = this.currentElement.add(localDeclaration, 0);
View Full Code Here

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

  TypeReference type;

  char[] identifierName = this.identifierStack[this.identifierPtr];
  long namePosition = this.identifierPositionStack[this.identifierPtr];

  LocalDeclaration localDeclaration = createLocalDeclaration(identifierName, (int) (namePosition >>> 32), (int) namePosition);
  localDeclaration.declarationSourceEnd = localDeclaration.declarationEnd;
  localDeclaration.bits |= ASTNode.IsForeachElementVariable;

  int extraDims = this.intStack[this.intPtr--];
  Annotation [][] annotationsOnExtendedDimensions = extraDims == 0 ? null : getAnnotationsOnDimensions(extraDims);
View Full Code Here

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

      this.lastCheckPoint = (int) (namePosition >>> 32);
      this.restartRecovery = true;
      return;
    }
    if (isLocalDeclaration){
      LocalDeclaration localDecl = (LocalDeclaration) this.astStack[this.astPtr];
      this.lastCheckPoint = localDecl.sourceEnd + 1;
      this.currentElement = this.currentElement.add(localDecl, 0);
    } else {
      FieldDeclaration fieldDecl = (FieldDeclaration) this.astStack[this.astPtr];
      this.lastCheckPoint = fieldDecl.sourceEnd + 1;
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.