Package org.eclipse.jdt.core.dom

Examples of org.eclipse.jdt.core.dom.ASTNode$NodeList$Cursor


    }
    return false;
  }

  public boolean isEnhancedForLoopVariable() {
    ASTNode parent = this.getNode().getParent();
    if (parent instanceof EnhancedForStatement) {
      // This is not enough. We must make sure that this variable
      // is being declared inside the declaration part.
      EnhancedForStatement loop = (EnhancedForStatement) parent;
      if (loop.getParameter().equals(this.getNode()) ) {
View Full Code Here


    if(nodes == null)
      return null;
    List<ControlFlowNode> cfns = new ArrayList<ControlFlowNode>();
    ControlFlowNode current, previous = null;
    Iterator i = nodes.iterator();
    ASTNode node;
    for(;i.hasNext();) {
      node = (ASTNode) i.next();
      current = controlFlowNode.newControlFlowNode(node);
      cfns.add(current);
      if(previous != null)
View Full Code Here

    this.driver = new BranchSensitiveTACAnalysisDriver(transferFunction, eclipseTAC);
    transferFunction.setAnalysisContext(driver);
  }

  public LE getResultsAfter(final TACInstruction instr) {
    ASTNode node = instr.getNode();
    // get regular results before looking up root instruction
    // to switch to surrounding method, if necessary
    // (driver.tac could be null or outdated otherwise)
    final LE nodeResults = getResultsAfter(node);
    final TACInstruction rootInstr = this.driver.tac.instruction(node);
View Full Code Here

    else
      throw new UnsupportedOperationException("Can't determine results for instruction: " + instr);
  }

  public LE getResultsBefore(final TACInstruction instr) {
    ASTNode node = instr.getNode();
    // get regular results before looking up root instruction
    // to switch to surrounding method, if necessary
    // (driver.tac could be null or outdated otherwise)
    final LE nodeResults = getResultsBefore(node);
    final TACInstruction rootInstr = this.driver.tac.instruction(node);
View Full Code Here

    else
      throw new UnsupportedOperationException("Can't determine results for instruction: " + instr);
  }

  public IResult<LE> getLabeledResultsAfter(final TACInstruction instr) {
    ASTNode node = instr.getNode();
    // get regular results before looking up root instruction
    // to switch to surrounding method, if necessary
    // (driver.tac could be null or outdated otherwise)
    final IResult<LE> nodeResults = getLabeledResultsAfter(node);
    final TACInstruction rootInstr = this.driver.tac.instruction(node);
View Full Code Here

    else
      throw new UnsupportedOperationException("Can't determine results for instruction: " + instr);
  }

  public IResult<LE> getLabeledResultsBefore(final TACInstruction instr) {
    ASTNode node = instr.getNode();
    // get regular results before looking up root instruction
    // to switch to surrounding method, if necessary
    // (driver.tac could be null or outdated otherwise)
    final IResult<LE> nodeResults = getLabeledResultsBefore(node);
    final TACInstruction rootInstr = this.driver.tac.instruction(node);
View Full Code Here

    //base case: we've already copied this node (or are in the process of it)
    //so just return the clone.
    if (cloneMap.containsKey(current))
      return cloneMap.get(current);
   
    ASTNode node = current.getASTNode();
    EclipseCFGNode clone = new EclipseCFGNode(node);
    EclipseCFGNode start = current.getStart();
    EclipseCFGNode end = current.getEnd();

    clone.setName(current.getName());
View Full Code Here

   * @return
   */
  private EclipseCFGNode setUpConstructorBody(MethodDeclaration node) {
    EclipseCFGNode last = null, current = null;
    List<ASTNode> statements = new ArrayList<ASTNode>(node.getBody().statements());
    ASTNode firstStmt = null;
    EclipseCFGNode body = new EclipseCFGNode(node.getBody());

   
    if (node.resolveBinding().getDeclaringClass().isClass()) { //annotations and enums don't have fields
      // connect field declarations with initializers together
View Full Code Here

    createEdge(switchBegin, exp.getStart());

    last = switchEnd;
    for (int ndx = stmnts.size() - 1; ndx >= 0; ndx--) {
      ASTNode currentAST = stmnts.get(ndx);
      EclipseCFGNode current = nodeMap.get(currentAST);

      if (currentAST instanceof SwitchCase) {
        createEdge(exp.getEnd(), current.getStart(), ((SwitchCase) currentAST)
            .getExpression());
View Full Code Here

    this.driver = new BranchSensitiveTACAnalysisDriver(transferFunction, eclipseTAC);
    transferFunction.setAnalysisContext(driver);
  }

  public LE getResultsAfter(final TACInstruction instr) {
    ASTNode node = instr.getNode();
    // get regular results before looking up root instruction
    // to switch to surrounding method, if necessary
    // (driver.tac could be null or outdated otherwise)
    final LE nodeResults = getResultsAfter(node);
    final TACInstruction rootInstr = this.driver.tac.instruction(node);
View Full Code Here

TOP

Related Classes of org.eclipse.jdt.core.dom.ASTNode$NodeList$Cursor

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.