java.lang.Objectcom.opensymphony.xwork2.config.impl.AbstractMatcher
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
NamespaceMatcher, ActionConfigMatcher
Matches patterns against pre-compiled wildcard expressions pulled from target objects. It uses the wildcard matcher from the Apache Cocoon project. Patterns will be matched in the order they were added. The first match wins, so more specific patterns should be defined before less specific patterns.
2.1 - | Field Summary | ||
|---|---|---|
| PatternMatcher<Object> | wildcard | Handles all wildcard pattern matching. |
| List<E> | compiledPatterns | The compiled patterns and their associated target objects |
| Constructor: |
|---|
|
| Method from com.opensymphony.xwork2.config.impl.AbstractMatcher Summary: |
|---|
| addPattern, convert, convertParam, freeze, match, replaceParameters |
| Methods from java.lang.Object: |
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method from com.opensymphony.xwork2.config.impl.AbstractMatcher Detail: |
|---|
Finds and precompiles the wildcard patterns. Patterns will be evaluated in the order they were added. Only patterns that actually contain a wildcard will be compiled. Patterns can optionally be matched "loosely". When the end of the pattern matches \*[^*]\*$ (wildcard, no wildcard, wildcard), if the pattern fails, it is also matched as if the last two characters didn't exist. The goal is to support the legacy "*!*" syntax, where the "!*" is optional. |
Clones the target object and its children, replacing various properties with the values of the wildcard-matched strings. |
Inserts into a value wildcard-matched strings where specified with the {x} syntax. If a wildcard-matched value isn't found, the replacement token is turned into an empty string. |
|
Matches the path against the compiled wildcard patterns. |
Replaces parameter values |