Class CombinedMatcher
Defined in: Matcher.jsm.
| Constructor Attributes | Constructor Name and Description |
|---|---|
|
Combines a matcher for blocking and exception rules, automatically sorts
rules into two Matcher instances.
|
| Field Attributes | Field Name and Description |
|---|---|
|
Matcher for blocking rules.
|
|
|
Number of entries in resultCache
|
|
|
Exception rules that are limited by public keys, mapped by the corresponding keys.
|
|
| <static> |
CombinedMatcher.maxCacheEntries
Maximal number of matching cache entries to be kept
|
|
Lookup table of previous matchesAny results
|
|
|
Matcher for exception rules.
|
| Method Attributes | Method Name and Description |
|---|---|
|
add(filter)
|
|
|
clear()
|
|
|
findKeyword(filter)
|
|
|
getKeywordForFilter(filter)
|
|
|
hasFilter(filter)
|
|
|
isSlowFilter(filter)
Checks whether a particular filter is slow
|
|
|
matchesAny(location, contentType, docDomain, thirdParty)
|
|
|
matchesAnyInternal(location, contentType, docDomain, thirdParty)
Optimized filter matching testing both whitelist and blacklist matchers
simultaneously.
|
|
|
matchesByKey(location, key, docDomain)
Looks up whether any filters match the given website key.
|
|
|
remove(filter)
|
Class Detail
CombinedMatcher()
Combines a matcher for blocking and exception rules, automatically sorts
rules into two Matcher instances.
Field Detail
{Matcher}
blacklist
Matcher for blocking rules.
{Number}
cacheEntries
Number of entries in resultCache
{Object}
keys
Exception rules that are limited by public keys, mapped by the corresponding keys.
<static>
{Number}
CombinedMatcher.maxCacheEntries
Maximal number of matching cache entries to be kept
{Object}
resultCache
Lookup table of previous matchesAny results
{Matcher}
whitelist
Matcher for exception rules.
Method Detail
add(filter)
- Parameters:
- filter
- See:
- Matcher#add
clear()
- See:
- Matcher#clear
findKeyword(filter)
- Parameters:
- filter
- See:
- Matcher#findKeyword
getKeywordForFilter(filter)
- Parameters:
- filter
hasFilter(filter)
- Parameters:
- filter
- See:
- Matcher#hasFilter
{Boolean}
isSlowFilter(filter)
Checks whether a particular filter is slow
- Parameters:
- {RegExpFilter} filter
matchesAny(location, contentType, docDomain, thirdParty)
- Parameters:
- location
- contentType
- docDomain
- thirdParty
- See:
- Matcher#matchesAny
matchesAnyInternal(location, contentType, docDomain, thirdParty)
Optimized filter matching testing both whitelist and blacklist matchers
simultaneously. For parameters see Matcher.matchesAny().
- Parameters:
- location
- contentType
- docDomain
- thirdParty
- See:
- Matcher#matchesAny
matchesByKey(location, key, docDomain)
Looks up whether any filters match the given website key.
- Parameters:
- {String} location
- {String} key
- {String} docDomain
remove(filter)
- Parameters:
- filter
- See:
- Matcher#remove