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

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

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

Rule.getRuleSetName介绍

[英]Get the name of the RuleSet containing this Rule.
[中]获取包含此规则的规则集的名称。

代码示例

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

@Override
public String getRuleSetName() {
  return rule.getRuleSetName();
}

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

@Override
  public String get(int idx, RuleViolation rv, String cr) {
    return rv.getRule().getRuleSetName();
  }
}), new ColumnDescriptor<>("rule", "Rule", new Accessor<RuleViolation>() {

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

/**
 * Code to be executed if the rule is reinitialised.
 *
 * @param rule The rule to reinitialise
 *
 * @return The rule once it has been reinitialised
 */
protected Rule reinitializeRule(Rule rule) {
  return findRule(rule.getRuleSetName(), rule.getName());
}

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

StringUtil.appendXmlEscaped(buf, rv.getRule().getName(), useUTF8);
buf.append("\" ruleset=\"");
StringUtil.appendXmlEscaped(buf, rv.getRule().getRuleSetName(), useUTF8);
buf.append('"');
maybeAdd("package", rv.getPackageName(), buf);

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

@Override
public String getRuleSetName() {
  return rule.getRuleSetName();
}

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

@Override
  public String get(int idx, RuleViolation rv, String cr) {
    return rv.getRule().getRuleSetName();
  }
}), new ColumnDescriptor<>("rule", "Rule", new Accessor<RuleViolation>() {

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

/**
 * Code to be executed if the rule is reinitialised.
 *
 * @param rule The rule to reinitialise
 *
 * @return The rule once it has been reinitialised
 */
protected Rule reinitializeRule(Rule rule) {
  return findRule(rule.getRuleSetName(), rule.getName());
}

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

StringUtil.appendXmlEscaped(buf, rv.getRule().getName(), useUTF8);
buf.append("\" ruleset=\"");
StringUtil.appendXmlEscaped(buf, rv.getRule().getRuleSetName(), useUTF8);
buf.append('"');
maybeAdd("package", rv.getPackageName(), buf);

相关文章