gpt4 book ai didi

org.sonar.plugins.java.api.tree.WhileStatementTree.whileKeyword()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-21 14:59:05 27 4
gpt4 key购买 nike

本文整理了Java中org.sonar.plugins.java.api.tree.WhileStatementTree.whileKeyword()方法的一些代码示例,展示了WhileStatementTree.whileKeyword()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WhileStatementTree.whileKeyword()方法的具体详情如下:
包路径:org.sonar.plugins.java.api.tree.WhileStatementTree
类名称:WhileStatementTree
方法名:whileKeyword

WhileStatementTree.whileKeyword介绍

暂无

代码示例

代码示例来源:origin: SonarSource/sonar-java

@Override
public void visitWhileStatement(WhileStatementTree tree) {
 SyntaxToken whileKeyword = tree.whileKeyword();
 checkNesting(whileKeyword);
 nestingLevel.push(whileKeyword);
 super.visitWhileStatement(tree);
 nestingLevel.pop();
}

代码示例来源:origin: org.sonarsource.java/java-checks

@Override
public void visitWhileStatement(WhileStatementTree tree) {
 SyntaxToken whileKeyword = tree.whileKeyword();
 checkNesting(whileKeyword);
 nestingLevel.push(whileKeyword);
 super.visitWhileStatement(tree);
 nestingLevel.pop();
}

代码示例来源:origin: SonarSource/sonar-java

@Override
public void visitWhileStatement(WhileStatementTree tree) {
 increaseComplexityByNesting(tree.whileKeyword());
 nesting++;
 super.visitWhileStatement(tree);
 nesting--;
}

代码示例来源:origin: org.sonarsource.java/java-frontend

@Override
public void visitWhileStatement(WhileStatementTree tree) {
 increaseComplexityByNesting(tree.whileKeyword());
 nesting++;
 super.visitWhileStatement(tree);
 nesting--;
}

代码示例来源:origin: SonarSource/sonar-java

@Override
public void visitWhileStatement(WhileStatementTree tree) {
 super.visitWhileStatement(tree);
 checkForReport(tree.statement(), tree.whileKeyword(), tree.closeParenToken(), tree.whileKeyword().text());
}

代码示例来源:origin: org.sonarsource.java/java-checks

@Override
public void visitWhileStatement(WhileStatementTree tree) {
 super.visitWhileStatement(tree);
 checkForReport(tree.statement(), tree.whileKeyword(), tree.closeParenToken(), tree.whileKeyword().text());
}

代码示例来源:origin: SonarSource/sonar-java

@Override
public void visitWhileStatement(WhileStatementTree tree) {
 // do not scan the condition
 addLines(tree.whileKeyword(), tree.closeParenToken());
 addLineOfCloseBrace(tree.whileKeyword(), tree.statement());
 scan(tree.statement());
}

代码示例来源:origin: SonarSource/sonar-java

@Override
public void visitWhileStatement(WhileStatementTree tree) {
 enterLoop();
 super.visitWhileStatement(tree);
 leaveLoop(tree.whileKeyword());
}

代码示例来源:origin: org.sonarsource.java/java-checks

@Override
public void visitWhileStatement(WhileStatementTree tree) {
 // do not scan the condition
 addLines(tree.whileKeyword(), tree.closeParenToken());
 addLineOfCloseBrace(tree.whileKeyword(), tree.statement());
 scan(tree.statement());
}

代码示例来源:origin: org.sonarsource.java/java-checks

@Override
public void visitWhileStatement(WhileStatementTree tree) {
 enterLoop();
 super.visitWhileStatement(tree);
 leaveLoop(tree.whileKeyword());
}

代码示例来源: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;
 }
}

代码示例来源:origin: org.sonarsource.java/java-checks

@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;
 }
}

代码示例来源:origin: DarLiner/vjtools

@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;
  }
}

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com