congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
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

  • Reading from database using SQL prepared statement
  • addToBackStack (FragmentTransaction)
  • getContentResolver (Context)
  • findViewById (Activity)
  • BufferedInputStream (java.io)
    A BufferedInputStream adds functionality to another input stream-namely, the ability to buffer the i
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • 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?
  • Best plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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