Lines Matching defs:pattern
27 // AttributePattern.java: Models a pattern for attribute matching.
41 * The AttributePattern class models an attribute pattern. It handles
44 * object is a pattern consisting of (maximally) a beginning wildcard and
45 * string pattern. A PatternPart may be lacking the
58 * The PatternPart class models a single component of a pattern.
60 * pattern in the middle. Any of the parts may be missing, but it will
70 String pattern = "";
74 pattern = str;
85 // If there's no wildcards, simply insert the string in as the pattern.
119 // Note that there may be a terminal pattern part that just
132 // Match the AttributeString object against this pattern,
147 // the pattern.
151 // Note that if the pattern string is empty (""), then this
153 // fall out of the loop because an empty pattern string
156 if ((offset = cstring.indexOf(p.pattern, offset)) == -1) {
158 // The pattern was not found. Break out of the loop.
164 offset += p.pattern.length();
170 // If we are not at the end of the pattern, then we may not
175 // If there is one more in the pattern, and it is
182 p.pattern.length() <= 0) {
199 // The pattern string must match the beginning part of the
203 p.pattern,
206 pattern.length())) {
212 // Bump up offset by the pattern length, and exit if
215 offset += p.pattern.length();