本文整理了Java中net.sourceforge.pmd.Rule.getPropertiesByPropertyDescriptor
方法的一些代码示例,展示了Rule.getPropertiesByPropertyDescriptor
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Rule.getPropertiesByPropertyDescriptor
方法的具体详情如下:
包路径:net.sourceforge.pmd.Rule
类名称:Rule
方法名:getPropertiesByPropertyDescriptor
暂无
代码示例来源:origin: pmd/pmd
@Override
public Map<PropertyDescriptor<?>, Object> getPropertiesByPropertyDescriptor() {
return rule.getPropertiesByPropertyDescriptor();
}
代码示例来源:origin: pmd/pmd
/**
* Rules are equal if:
* <ol>
* <li>They have the same implementation class.</li>
* <li>They have the same name.</li>
* <li>They have the same priority.</li>
* <li>They share the same properties.</li>
* </ol>
*/
@Override
public boolean equals(Object o) {
if (o == null) {
return false; // trivial
}
if (this == o) {
return true; // trivial
}
boolean equality = getClass() == o.getClass();
if (equality) {
Rule that = (Rule) o;
equality = getName().equals(that.getName()) && getPriority().equals(that.getPriority())
&& getPropertiesByPropertyDescriptor().equals(that.getPropertiesByPropertyDescriptor());
}
return equality;
}
代码示例来源:origin: pmd/pmd
/**
* Creates a new RuleSet containing a single rule.
*
* @param rule
* The rule being created
* @return The newly created RuleSet
*/
public RuleSet createSingleRuleRuleSet(final Rule rule) { // TODO make static?
final long checksum;
if (rule instanceof XPathRule) {
checksum = rule.getProperty(XPathRule.XPATH_DESCRIPTOR).hashCode();
} else {
// TODO : Is this good enough? all properties' values + rule name
checksum = rule.getPropertiesByPropertyDescriptor().values().hashCode() * 31 + rule.getName().hashCode();
}
final RuleSetBuilder builder = new RuleSetBuilder(checksum)
.withName(rule.getName())
.withDescription("RuleSet for " + rule.getName());
builder.addRule(rule);
return builder.build();
}
代码示例来源:origin: pmd/pmd
Map<PropertyDescriptor<?>, Object> oldProperties = rule.getPropertiesByPropertyDescriptor();
try {
int res;
代码示例来源:origin: pmd/pmd
rule.getRuleClass(), rule.isDfa(), rule.isTypeResolution(), rule.isMultifile(),
rule.getDescription(),
rule.getPriority(), rule.getPropertyDescriptors(), rule.getPropertiesByPropertyDescriptor(),
rule.getExamples());
代码示例来源:origin: net.sourceforge.pmd/pmd-core
@Override
public Map<PropertyDescriptor<?>, Object> getPropertiesByPropertyDescriptor() {
return rule.getPropertiesByPropertyDescriptor();
}
代码示例来源:origin: net.sourceforge.pmd/pmd-core
/**
* Rules are equal if:
* <ol>
* <li>They have the same implementation class.</li>
* <li>They have the same name.</li>
* <li>They have the same priority.</li>
* <li>They share the same properties.</li>
* </ol>
*/
@Override
public boolean equals(Object o) {
if (o == null) {
return false; // trivial
}
if (this == o) {
return true; // trivial
}
boolean equality = getClass() == o.getClass();
if (equality) {
Rule that = (Rule) o;
equality = getName().equals(that.getName()) && getPriority().equals(that.getPriority())
&& getPropertiesByPropertyDescriptor().equals(that.getPropertiesByPropertyDescriptor());
}
return equality;
}
代码示例来源:origin: net.sourceforge.pmd/pmd-core
/**
* Creates a new RuleSet containing a single rule.
*
* @param rule
* The rule being created
* @return The newly created RuleSet
*/
public RuleSet createSingleRuleRuleSet(final Rule rule) { // TODO make static?
final long checksum;
if (rule instanceof XPathRule) {
checksum = rule.getProperty(XPathRule.XPATH_DESCRIPTOR).hashCode();
} else {
// TODO : Is this good enough? all properties' values + rule name
checksum = rule.getPropertiesByPropertyDescriptor().values().hashCode() * 31 + rule.getName().hashCode();
}
final RuleSetBuilder builder = new RuleSetBuilder(checksum)
.withName(rule.getName())
.withDescription("RuleSet for " + rule.getName());
builder.addRule(rule);
return builder.build();
}
代码示例来源:origin: net.sourceforge.pmd/pmd-test
Map<PropertyDescriptor<?>, Object> oldProperties = rule.getPropertiesByPropertyDescriptor();
try {
int res;
代码示例来源:origin: net.sourceforge.pmd/pmd-core
rule.getRuleClass(), rule.isDfa(), rule.isTypeResolution(), rule.isMultifile(),
rule.getDescription(),
rule.getPriority(), rule.getPropertyDescriptors(), rule.getPropertiesByPropertyDescriptor(),
rule.getExamples());
内容来源于网络,如有侵权,请联系作者删除!