public class RuleFilter
extends java.lang.Object
A design rule can be assigned one or more "application areas", for example, rules aimed at the analysis phase, the design phase, rules for real time systems, etc. The rule filter selects rules based on their application areas.
Constructor and Description |
---|
RuleFilter()
Constructs a new empty rule filter that accepts all application areas.
|
RuleFilter(java.lang.String filter)
Construct a new rule filter from a filter string.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
checkIdentifiers(MetricStore metricStore)
Checks the identifiers of the rule filter for plausibility.
|
boolean |
match(Rule rule)
Checks if the application area(s) of a design rule match this filter.
|
public RuleFilter()
public RuleFilter(java.lang.String filter) throws SDMetricsException
filter
- The rule filter string.SDMetricsException
- The filter string could not be parsed or
contains illegal operations.public boolean match(Rule rule)
rule
- The design rule to check.true
if the design rule matches and should be
checked according to this filter.public java.lang.String checkIdentifiers(MetricStore metricStore)
An identifier is valid if it is explicitly defined as the application area of at least one rule. Otherwise, the identifier is suspect because it is not listed by any of the rules.
metricStore
- Contains the definitions of the rules