net.sourceforge.pmd.Rule.isDeprecated()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(2.7k)|赞(0)|评价(0)|浏览(135)

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

Rule.isDeprecated介绍

[英]Gets whether this Rule is deprecated. A deprecated Rule is one which:

  • is scheduled for removal in a future version of PMD
  • or, has been removed and replaced with a non-functioning place-holder and will be completely removed in a future version of PMD
  • or, has been renamed/moved and the old name will be completely removed in a future version of PMD
    [中]获取此规则是否已弃用。不推荐使用的规则是指:
    *计划在PMD的未来版本中删除
    *或者,已被移除并替换为不起作用的占位符,并将在未来版本的PMD中完全移除
    *或者,已重命名/移动,旧名称将在PMD的未来版本中完全删除

代码示例

代码示例来源:origin: pmd/pmd

@Override
public boolean isDeprecated() {
  return rule.isDeprecated();
}

代码示例来源:origin: pmd/pmd

/**
 * A ruleset is considered deprecated, if it only contains rule references
 * and all rule references are deprecated.
 *
 * @param ruleset
 * @return
 */
public static boolean isRuleSetDeprecated(RuleSet ruleset) {
  boolean result = true;
  for (Rule rule : ruleset.getRules()) {
    if (!(rule instanceof RuleReference) || !rule.isDeprecated()) {
      result = false;
      break;
    }
  }
  return result;
}

代码示例来源:origin: pmd/pmd

if (rule.isDeprecated()) {
    countDeprecated++;
if (rulesetDeprecated || !r.getRule().isDeprecated()) {

代码示例来源:origin: pmd/pmd

link += "#" + rule.getName().toLowerCase(Locale.ROOT);
lines.add("*   [" + rule.getName() + "](" + link + "): "
    + (rule.isDeprecated() ? DEPRECATION_LABEL_SMALL : "")
    + getShortRuleDescription(rule));

代码示例来源:origin: pmd/pmd

if (rule.isDeprecated()) {
  lines.add(DEPRECATION_LABEL);
  lines.add("");

代码示例来源:origin: pmd/pmd

if (warnDeprecated && referencedRule.isDeprecated()) {
  if (referencedRule instanceof RuleReference) {
    RuleReference ruleReference = (RuleReference) referencedRule;

代码示例来源:origin: pmd/pmd

rule.getMinimumLanguageVersion(), rule.getMaximumLanguageVersion(), rule.isDeprecated(),
rule.getName(), rule.getSince(), null, rule.getMessage(), rule.getExternalInfoUrl(),
rule.getRuleClass(), rule.isDfa(), rule.isTypeResolution(), rule.isMultifile(),

代码示例来源:origin: net.sourceforge.pmd/pmd-core

@Override
public boolean isDeprecated() {
  return rule.isDeprecated();
}

代码示例来源:origin: net.sourceforge.pmd/pmd-core

if (rule.isDeprecated()) {
    countDeprecated++;
if (rulesetDeprecated || !r.getRule().isDeprecated()) {

代码示例来源:origin: net.sourceforge.pmd/pmd-core

if (warnDeprecated && referencedRule.isDeprecated()) {
  if (referencedRule instanceof RuleReference) {
    RuleReference ruleReference = (RuleReference) referencedRule;

代码示例来源:origin: net.sourceforge.pmd/pmd-core

rule.getMinimumLanguageVersion(), rule.getMaximumLanguageVersion(), rule.isDeprecated(),
rule.getName(), rule.getSince(), null, rule.getMessage(), rule.getExternalInfoUrl(),
rule.getRuleClass(), rule.isDfa(), rule.isTypeResolution(), rule.isMultifile(),

相关文章