Tabnine Logo
DoWhileStatementTree.statement
Code IndexAdd Tabnine to your IDE (free)

How to use
statement
method
in
org.sonar.plugins.java.api.tree.DoWhileStatementTree

Best Java code snippets using org.sonar.plugins.java.api.tree.DoWhileStatementTree.statement (Showing top 20 results out of 315)

origin: SonarSource/sonar-java

@Override
public void visitDoWhileStatement(DoWhileStatementTree tree) {
 checkBlock(tree.doKeyword(), tree.statement());
 super.visitDoWhileStatement(tree);
}
origin: SonarSource/sonar-java

@Override
public void visitDoWhileStatement(DoWhileStatementTree tree) {
 scan(tree.statement());
 scan(tree.condition());
}
origin: org.codehaus.sonar-plugins.java/java-squid

@Override
public void visitDoWhileStatement(DoWhileStatementTree tree) {
 scan(tree.statement());
 scan(tree.condition());
}
origin: org.codehaus.sonar-plugins.java/java-checks

@Override
public void visitDoWhileStatement(DoWhileStatementTree tree) {
 visitStatement(tree.statement());
 scan(tree.condition());
}
origin: org.sonarsource.java/java-squid

@Override
public void visitDoWhileStatement(DoWhileStatementTree tree) {
 scan(tree.statement());
 scan(tree.condition());
}
origin: org.sonarsource.java/java-frontend

@Override
public void visitDoWhileStatement(DoWhileStatementTree tree) {
 scan(tree.statement());
 scan(tree.condition());
}
origin: org.sonarsource.java/java-checks

@Override
public void visitDoWhileStatement(DoWhileStatementTree tree) {
 checkBlock(tree.doKeyword(), tree.statement());
 super.visitDoWhileStatement(tree);
}
origin: org.codehaus.sonar-plugins.java/java-checks

@Override
public void visitDoWhileStatement(DoWhileStatementTree tree) {
 currentState.invalidateVariables(new AssignmentVisitor().findAssignedVariables(tree.statement()));
 currentState = new State(currentState);
 scan(tree.statement());
 scan(tree.condition());
 restorePreviousState();
}
origin: SonarSource/sonar-java

private void buildDoWhileStatement(DoWhileStatementTree doWhileStatementTree) {
 Block falseBranch = currentBlock;
 Block loopback = createBlock();
 // process condition
 currentBlock = createBranch(doWhileStatementTree, loopback, falseBranch);
 buildCondition(doWhileStatementTree.condition(), loopback, falseBranch);
 // process body
 addContinueTarget(currentBlock);
 currentBlock = createBlock(currentBlock);
 breakTargets.addLast(falseBranch);
 build(doWhileStatementTree.statement());
 breakTargets.removeLast();
 continueTargets.removeLast();
 loopback.addSuccessor(currentBlock);
 currentBlock = createBlock(currentBlock);
}
origin: org.sonarsource.java/java-frontend

private void buildDoWhileStatement(DoWhileStatementTree doWhileStatementTree) {
 Block falseBranch = currentBlock;
 Block loopback = createBlock();
 // process condition
 currentBlock = createBranch(doWhileStatementTree, loopback, falseBranch);
 buildCondition(doWhileStatementTree.condition(), loopback, falseBranch);
 // process body
 addContinueTarget(currentBlock);
 currentBlock = createBlock(currentBlock);
 breakTargets.addLast(falseBranch);
 build(doWhileStatementTree.statement());
 breakTargets.removeLast();
 continueTargets.removeLast();
 loopback.addSuccessor(currentBlock);
 currentBlock = createBlock(currentBlock);
}
origin: org.sonarsource.java/java-squid

private void buildDoWhileStatement(DoWhileStatementTree doWhileStatementTree) {
 Block falseBranch = currentBlock;
 Block loopback = createBlock();
 // process condition
 currentBlock = createBranch(doWhileStatementTree, loopback, falseBranch);
 buildCondition(doWhileStatementTree.condition(), loopback, falseBranch);
 // process body
 currentBlock = createBlock(currentBlock);
 addContinueTarget(loopback);
 breakTargets.addLast(falseBranch);
 build(doWhileStatementTree.statement());
 breakTargets.removeLast();
 continueTargets.removeLast();
 loopback.addSuccessor(currentBlock);
 currentBlock = createBlock(currentBlock);
}
origin: org.codehaus.sonar-plugins.java/java-checks

private Tree loopStatement(Tree loopTree) {
 if(loopTree.is(Tree.Kind.FOR_STATEMENT)) {
  return ((ForStatementTree) loopTree).statement();
 } else if(loopTree.is(Tree.Kind.DO_STATEMENT)) {
  return ((DoWhileStatementTree) loopTree).statement();
 } else if(loopTree.is(Tree.Kind.WHILE_STATEMENT)) {
  return ((WhileStatementTree) loopTree).statement();
 } else if(loopTree.is(Tree.Kind.FOR_EACH_STATEMENT)) {
  return ((ForEachStatement) loopTree).statement();
 }
 return null;
}
origin: org.sonarsource.java/java-checks

private static Tree loopStatement(Tree loopTree) {
 if (loopTree.is(Tree.Kind.FOR_STATEMENT)) {
  return ((ForStatementTree) loopTree).statement();
 } else if (loopTree.is(Tree.Kind.DO_STATEMENT)) {
  return ((DoWhileStatementTree) loopTree).statement();
 } else if (loopTree.is(Tree.Kind.WHILE_STATEMENT)) {
  return ((WhileStatementTree) loopTree).statement();
 } else if (loopTree.is(Tree.Kind.FOR_EACH_STATEMENT)) {
  return ((ForEachStatement) loopTree).statement();
 }
 return null;
}
origin: SonarSource/sonar-java

private static Tree loopStatement(Tree loopTree) {
 if (loopTree.is(Tree.Kind.FOR_STATEMENT)) {
  return ((ForStatementTree) loopTree).statement();
 } else if (loopTree.is(Tree.Kind.DO_STATEMENT)) {
  return ((DoWhileStatementTree) loopTree).statement();
 } else if (loopTree.is(Tree.Kind.WHILE_STATEMENT)) {
  return ((WhileStatementTree) loopTree).statement();
 } else if (loopTree.is(Tree.Kind.FOR_EACH_STATEMENT)) {
  return ((ForEachStatement) loopTree).statement();
 }
 return null;
}
origin: Cognifide/AEM-Rules-for-SonarQube

@Override
public void visitDoWhileStatement(DoWhileStatementTree tree) {
  if (tree.condition() instanceof BinaryExpressionTree) {
    DoWhileBinaryExpressionVisitor visitor = new DoWhileBinaryExpressionVisitor();
    tree.condition().accept(visitor);
    if (visitor.containsResourceComparison()) {
      checkModelProviderCall(tree, tree.statement());
    }
  }
  super.visitDoWhileStatement(tree);
}
origin: SonarSource/sonar-java

@Override
public void visitDoWhileStatement(DoWhileStatementTree tree) {
 // do not scan the condition
 addLine(tree.doKeyword());
 if (tree.doKeyword().line() != tree.whileKeyword().line()) {
  addLines(tree.whileKeyword(), tree.semicolonToken());
 }
 scan(tree.statement());
}
origin: org.codehaus.sonar-plugins.java/java-checks

@Override
public void visitDoWhileStatement(DoWhileStatementTree tree) {
 Set<Symbol.VariableSymbol> assignedSymbols = extractor.findAssignedVariables(tree);
 invalidateAssignedVariables(assignedSymbols);
 currentStates = evaluateStatement(currentStates, tree.statement());
 PackedStatementStates nextStates = PackedStatementStates.instantiate();
 for (ExecutionState state : currentStates) {
  if (evaluateExpression(state, tree.condition()) != SymbolicBooleanConstraint.TRUE) {
   nextStates.addState(state);
  }
 }
 currentStates = nextStates;
 invalidateAssignedVariables(assignedSymbols);
}
origin: org.sonarsource.java/java-checks

@Override
public void visitDoWhileStatement(DoWhileStatementTree tree) {
 // do not scan the condition
 addLine(tree.doKeyword());
 if (tree.doKeyword().line() != tree.whileKeyword().line()) {
  addLines(tree.whileKeyword(), tree.semicolonToken());
 }
 scan(tree.statement());
}
origin: org.codehaus.sonar-plugins.java/java-checks

@Override
public void visitNode(Tree tree) {
 switch (((JavaTree) tree).getKind()) {
  case WHILE_STATEMENT:
   checkStatement(((WhileStatementTree) tree).statement(), tree);
   break;
  case DO_STATEMENT:
   checkStatement(((DoWhileStatementTree) tree).statement(), tree);
   break;
  case FOR_STATEMENT:
   checkStatement(((ForStatementTree) tree).statement(), tree);
   break;
  case FOR_EACH_STATEMENT:
   checkStatement(((ForEachStatement) tree).statement(), tree);
   break;
  case IF_STATEMENT:
   IfStatementTree ifStmt = (IfStatementTree) tree;
   checkIfStatement(ifStmt);
   break;
  default:
   break;
 }
}
origin: SonarSource/sonar-java

@Override
public void visitNode(Tree tree) {
 switch (tree.kind()) {
  case WHILE_STATEMENT:
   WhileStatementTree whileStatementTree = (WhileStatementTree) tree;
   checkStatement(whileStatementTree.whileKeyword(), whileStatementTree.statement());
   break;
  case DO_STATEMENT:
   DoWhileStatementTree doWhileStatementTree = (DoWhileStatementTree) tree;
   checkStatement(doWhileStatementTree.doKeyword(), doWhileStatementTree.statement());
   break;
  case FOR_STATEMENT:
   ForStatementTree forStatementTree = (ForStatementTree) tree;
   checkStatement(forStatementTree.forKeyword(), forStatementTree.statement());
   break;
  case FOR_EACH_STATEMENT:
   ForEachStatement forEachStatement = (ForEachStatement) tree;
   checkStatement(forEachStatement.forKeyword(), forEachStatement.statement());
   break;
  case IF_STATEMENT:
   checkIfStatement((IfStatementTree) tree);
   break;
  default:
   break;
 }
}
org.sonar.plugins.java.api.treeDoWhileStatementTreestatement

Popular methods of DoWhileStatementTree

  • condition
  • doKeyword
  • firstToken
  • kind
  • semicolonToken
  • whileKeyword

Popular in Java

  • Parsing JSON documents to java classes using gson
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • putExtra (Intent)
  • getExternalFilesDir (Context)
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • Executors (java.util.concurrent)
    Factory and utility methods for Executor, ExecutorService, ScheduledExecutorService, ThreadFactory,
  • ThreadPoolExecutor (java.util.concurrent)
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
  • IsNull (org.hamcrest.core)
    Is the value null?
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
  • Top 15 Vim Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now