public abstract class Rule
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static interface |
Rule.Filter
It is useful to filter rules based on the properties of the accessibility node info.
|
static class |
Rule.RuleSet |
class |
Rule.Violation
A collection of information regarding a tested node and the checks run on
that node for a given rule.
|
Modifier | Constructor and Description |
---|---|
protected |
Rule(java.lang.String description,
java.lang.String helpUrl) |
Modifier and Type | Method and Description |
---|---|
protected Rule |
addCheckAll(Check check)
Add a check for which all must pass for the rule to pass.
|
protected void |
addFilterAll(Rule.Filter filter)
Add a filter that MUST pass for the rule to be run.
|
protected void |
addFilterAny(Rule.Filter filter)
Add a filter that if passed, the rule will be run, unless a filter from the all filters removes it from consideration.
|
protected Rule |
addIgnoredContainer(java.lang.Class<? extends android.view.ViewParent> clazz)
Some containers need to be ignored for certain rules.
|
java.lang.String |
getDescription()
Get a description of the rule.
|
java.lang.String |
getHelpText()
Get the helpt text for the rule.
|
java.lang.String |
getHelpUrl()
Get the reference url for the rul.
|
java.lang.String |
getId()
Get the id for the rule.
|
static java.util.List<java.lang.Class<? extends Rule>> |
getRuleClasses() |
static java.util.List<java.lang.Class<? extends Rule>> |
getRuleClassesDeque()
Get a list of classes for all of the Deque implemented rules in this build.
|
static java.util.List<java.lang.Class<? extends Rule>> |
getRuleClassesGoogle()
Get a list of rules for the Android implemented rule classes for this build.
|
protected boolean |
isContainerIgnored(A11yNodeInfo nodeInfo) |
public static java.util.List<java.lang.Class<? extends Rule>> getRuleClasses()
public static java.util.List<java.lang.Class<? extends Rule>> getRuleClassesDeque()
public static java.util.List<java.lang.Class<? extends Rule>> getRuleClassesGoogle()
public java.lang.String getDescription()
public java.lang.String getHelpText()
public java.lang.String getHelpUrl()
public java.lang.String getId()
protected void addFilterAll(Rule.Filter filter)
filter
- The filter.protected void addFilterAny(Rule.Filter filter)
filter
- The filter.protected Rule addIgnoredContainer(java.lang.Class<? extends android.view.ViewParent> clazz)
clazz
- The class of the container to ignore.protected Rule addCheckAll(Check check)
check
- The check.protected boolean isContainerIgnored(A11yNodeInfo nodeInfo)