Package org.eclipse.jdt.core.dom

Examples of org.eclipse.jdt.core.dom.MethodDeclaration


    }
    return addAsFakeFuture(decl,defaultFlowAnalysis).getResultsAfterCFG(node);
  }

  public LE getResultsBeforeCFG(ASTNode node) {
    MethodDeclaration decl = Utilities.getMethodDeclaration(node);
   
    if( decl!= null && this.analyzedMethods.containsKey(decl) ) {
      try {
        return this.analyzedMethods.get(decl).get().getResultsBeforeCFG(node);
      } catch (Exception e) {/* Do nothing, let fall through to default. */ }
View Full Code Here


    }
    return addAsFakeFuture(decl,defaultFlowAnalysis).getResultsBeforeCFG(node);
  }

  public LE getResultsBeforeAST(ASTNode node) {
    MethodDeclaration decl = Utilities.getMethodDeclaration(node);
   
    if( decl!= null && this.analyzedMethods.containsKey(decl) ) {
      try {
        return this.analyzedMethods.get(decl).get().getResultsBeforeAST(node);
      } catch (Exception e) {/* Do nothing, let fall through to default. */ }
View Full Code Here

    }
    return addAsFakeFuture(decl,defaultFlowAnalysis).getResultsBeforeAST(node);
  }

  public LE getResultsAfterAST(ASTNode node) {
    MethodDeclaration decl = Utilities.getMethodDeclaration(node);
   
    if( decl!= null && this.analyzedMethods.containsKey(decl) ) {
      try {
        return this.analyzedMethods.get(decl).get().getResultsAfterAST(node);
      } catch (Exception e) {/* Do nothing, let fall through to default. */ }
View Full Code Here

    /**
     * Runs worklist algorithm on method the given node is part of.
     * @param node A node that must be inside a method.
     */
    private void performAnalysisOnSurroundingMethodIfNeeded(ASTNode node) {
      MethodDeclaration decl = Utilities.getMethodDeclaration(node);
      if (decl != null)
        switchToMethod(decl);
    }
View Full Code Here

    methods = CFGTestUtils.createMethodNameMap(compUnit);
  }

  @Test
  public void localTypeTest() throws Exception {
    MethodDeclaration decl = methods.get("localType");
    Assert.assertTrue(CFGTestUtils.testAndCompareCFG(decl));
  }
View Full Code Here

    foo = new LocalClass().method();
  }

  @Test
  public void anonTypeTest() throws Exception {
    MethodDeclaration decl = methods.get("anonType");
    Assert.assertTrue(CFGTestUtils.testAndCompareCFG(decl));
  }
View Full Code Here

    methods = CFGTestUtils.createMethodNameMap(compUnit);
  }

  @Test
  public void simpleTest() throws Exception {
    MethodDeclaration decl = methods.get("simple");
    Assert.assertTrue(CFGTestUtils.testAndCompareCFG(decl));
  }
View Full Code Here

    return a + b;
  }

  @Test
  public void shortcircuitTest() throws Exception {
    MethodDeclaration decl = methods.get("shortcircuit");
    Assert.assertTrue(CFGTestUtils.testAndCompareCFG(decl));
  }
View Full Code Here

    return a && b && c && d;
  }

  @Test
  public void multipleTest() throws Exception {
    MethodDeclaration decl = methods.get("multiple");
    Assert.assertTrue(CFGTestUtils.testAndCompareCFG(decl));
  }
View Full Code Here

    return a + b + c + d;
  }

  @Test
  public void orderingTest() throws Exception {
    MethodDeclaration decl = methods.get("ordering");
    Assert.assertTrue(CFGTestUtils.testAndCompareCFG(decl));
  }
View Full Code Here

TOP

Related Classes of org.eclipse.jdt.core.dom.MethodDeclaration

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.