net.sourceforge.pmd.RuleSetReference Maven / Gradle / Ivy
/**
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd;
import java.util.Collections;
import java.util.LinkedHashSet;
import java.util.Set;
import net.sourceforge.pmd.annotation.InternalApi;
/**
* This class represents a reference to RuleSet.
*
* @deprecated This is part of the internals of the {@link RuleSetLoader}.
*/
@Deprecated
@InternalApi
public class RuleSetReference {
private final String ruleSetFileName;
private final boolean allRules;
private final Set excludes;
public RuleSetReference(final String theFilename, final boolean allRules, final Set excludes) {
ruleSetFileName = theFilename;
this.allRules = allRules;
this.excludes = Collections.unmodifiableSet(new LinkedHashSet<>(excludes));
}
public RuleSetReference(final String theFilename, final boolean allRules) {
ruleSetFileName = theFilename;
this.allRules = allRules;
this.excludes = Collections.emptySet();
}
public RuleSetReference(final String theFilename) {
this(theFilename, false);
}
public String getRuleSetFileName() {
return ruleSetFileName;
}
public boolean isAllRules() {
return allRules;
}
public Set getExcludes() {
return excludes;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy