Sets the set of exclude patterns. Patterns may be separated by a comma
or a space.

@param  string the string containing the exclude patterns
@return void
@throws BuildException
3878
public function setExcludes($excludes)
    {
        if ($this->isReference()) {
            throw $this->tooManyAttributes();
        }
        if ($excludes !== null && strlen($excludes) > 0) {
            $tok = strtok($excludes, ", ");
            while ($tok !== false) {
                $o = $this->createExclude();
                $o->setName($tok);
                $tok = strtok(", ");
            }
        }
    }
184404
public function addPattern(string $name, string $regexp)
    {
        $this->regexp_map = ['/\{(\w+):'.$name.'\}/' => '(?<$1>'.$regexp.')'] + $this->regexp_map;
    }
601488
public void applyPattern(String pat)
    {
        this.pattern = pat;
        parsePattern();

        setLocale(null, null);
        // reset parsed pattern items
        patternItems = null;
    }
598421
@Override
    public final void applyPattern(String pattern)
    {

        if (hasRegistry())
        {
            super.applyPattern(pattern);
            toPattern = super.toPattern();
            return;
        }

        ArrayList<Format> foundFormats = new ArrayList<Format>();
        ArrayList<String> foundDescriptions = new ArrayList<String>();
        StringBuilder stripCustom = new StringBuilder(pattern.length());

        ParsePosition pos = new ParsePosition(0);
        char[] c = pattern.toCharArray();
        int fmtCount = 0;

        while (pos.getIndex() < pattern.length())
        {

            char charType = c[pos.getIndex()];

            if (QUOTE == charType)
            {

                appendQuotedString(pattern, pos, stripCustom, true);
                continue;

            }

            if (START_FE == charType)
            {

                fmtCount++;
                seekNonWs(pattern, pos);
                int start = pos.getIndex();
                int index = readArgumentIndex(pattern, next(pos));
                stripCustom.append(START_FE).append(index);
                seekNonWs(pattern, pos);
                Format format = null;
                String formatDescription = null;
                if (c[pos.getIndex()] == START_FMT)
                {
                    formatDescription = parseFormatDescription(pattern, next(pos));
                    format = getFormat(formatDescription);
                    if (format == null)
                    {
                        stripCustom.append(START_FMT).append(formatDescription);
                    }
                }
                foundFormats.add(format);
                foundDescriptions.add(format == null ? null : formatDescription);

                Preconditions.checkState(foundFormats.size() == fmtCount);
                Preconditions.checkState(foundDescriptions.size() == fmtCount);

                if (c[pos.getIndex()] != END_FE)
                {
                    throw new IllegalArgumentException("Unreadable format element at position " + start);
                }

            }

            //$FALL-THROUGH$
            stripCustom.append(c[pos.getIndex()]);
            next(pos);

        }

        super.applyPattern(stripCustom.toString());

        toPattern = insertFormats(super.toPattern(), foundDescriptions);

        if (containsElements(foundFormats))
        {
            Format[] origFormats = getFormats();
            // only loop over what we know we have, as MessageFormat on Java 1.3
            // seems to provide an extra format element:
            Iterator<Format> it = foundFormats.iterator();
            for (int i = 0; it.hasNext(); i++)
            {
                Format f = it.next();
                if (f != null)
                {
                    origFormats[i] = f;
                }
            }
            super.setFormats(origFormats);
        }

    }
252612
public function setContent($content)
    {
        if (empty($content) || !is_string($content)) {
            throw new BuildException('Content must be a non-empty string');
        }

        $this->_content = $content;
    }
628447
public function addExclude(string $pattern): self
    {
        if (substr($pattern, 0, 2)=='./') {
            $pattern = substr($pattern, 2);
        }

        if (!in_array($pattern, $this->excludes)) {
            $this->excludes[] = $pattern;
        }

        return $this;
    }
979622
public void setBuildsDeleted(java.util.Collection<String> buildsDeleted) {
        if (buildsDeleted == null) {
            this.buildsDeleted = null;
            return;
        }

        this.buildsDeleted = new java.util.ArrayList<String>(buildsDeleted);
    }
319531
public void setPattern(final ConwayPattern pattern) {
        final boolean[][] gridData = pattern.getPattern();
        int gridWidth = gridData[0].length;
        int gridHeight = gridData.length;

        int columnOffset = 0;
        int rowOffset = 0;

        if ( gridWidth > getNumberOfColumns() ) {
            gridWidth = getNumberOfColumns();
        } else {
            columnOffset = (getNumberOfColumns() - gridWidth) / 2;
        }

        if ( gridHeight > getNumberOfRows() ) {
            gridHeight = getNumberOfRows();
        } else {
            rowOffset = (getNumberOfRows() - gridHeight) / 2;
        }

        this.delegate.killAll();

        for ( int column = 0; column < gridWidth; column++ ) {
            for ( int row = 0; row < gridHeight; row++ ) {
                if ( gridData[row][column] ) {
                    final Cell cell = getCellAt( row + rowOffset,
                                                 column + columnOffset );
                    updateCell( cell, CellState.LIVE );
                }
            }
        }

        //this.delegate.setPattern();
    }
802709
private void setBrowserPattern(List<Pattern> pattern) {

        if ((pattern == null) || (pattern.size() == 0)) {
            setValidConfiguration(false);
            LOG.error(Messages.get().getBundle().key(Messages.LOG_EDITOR_CONFIG_NO_PATTERN_0));
        }
        m_browserPattern = pattern;
    }
628202
public function setToolpath($path)
    {
        if (!file_exists($path)) {
            $fs = FileSystem::getFileSystem();
            $fullpath = $fs->which($path);
            if ($fullpath === false) {
                throw new BuildException(
                    'Tool does not exist. Path: ' . $path
                );
            }
            $path = $fullpath;
        }
        if (!is_executable($path)) {
            throw new BuildException(
                'Tool not executable. Path: ' . $path
            );
        }
        $this->toolPath = $path;
    }
324690
public function setDayExcluded($day, $exclude)
    {
        DateBuilder::validateDayOfMonth($day);

        $days = $this->getValue('excludeDays', []);

        if ($exclude) {
            if (false === array_search($day, $days, true)) {
                $days[] = $day;
                sort($days, SORT_NUMERIC);
            }
        } else {
            if (false !== $index = array_search($day, $days, true)) {
                unset($days[$index]);
                $days = array_values($days);
            }
        }

        $this->setValue('excludeDays', $days);
    }
110880
public void setDebugPatterns(String patterns)
    {
        _patterns=patterns;
        if (patterns!=null && patterns.length()>0)
        {
            _debugPatterns = new ArrayList();

            StringTokenizer tok = new StringTokenizer(patterns,", \t");
            while (tok.hasMoreTokens())
            {
                String pattern = tok.nextToken();
                _debugPatterns.add(pattern);
            }
        }
        else
            _debugPatterns = null;
    }
1021731
public function set_pattern($pattern=1) {
        if ($pattern > 0) {
            if (!isset($this->format['fill']['color']['rgb'])) {
                $this->set_bg_color('black');
            }
        } else {
            unset($this->format['fill']['color']['rgb']);
            unset($this->format['fill']['type']);
        }
    }
73993
public function setPatterns($patterns)
    {
        foreach ($patterns as $name => $pattern) {
            $this->setPattern($name, $pattern);
        }

        return $this;
    }
807275
public void setName(String pattern)
    throws ConfigException, PatternSyntaxException
  {
    CharBuffer cb = new CharBuffer();

    cb.append("^");

    int i = 0;
    int length = pattern.length();

    while (i < length && pattern.charAt(i) == '/')
      i++;

    for (; i < length; i++) {
      char ch = pattern.charAt(i);

      if (ch == '/') {
        cb.append('/');
      }
      else if (ch == '.') {
        cb.append("\\.");
      }
      else if (ch != '*') {
        cb.append(ch);
      }
      else if (length <= i + 1 || pattern.charAt(i + 1) != '*') {
        cb.append("[^/]*");
      }
      else if (i > 0 && pattern.charAt(i - 1) != '/') {
        throw new ConfigException(L.l("'{0}' is an invalid pattern at '**'",
                                      pattern));
      }
      else if (i + 2 < length && pattern.charAt(i + 2) == '/') {
        cb.append("([^/]*/)*");
        i += 2;
      }
      else if (i + 2 < length) {
        throw new ConfigException(L.l("'{0}' is an invalid pattern at '**'",
                                      pattern));
      }
      else {
        cb.append(".*");
        i++;
      }
    }

    cb.append("$");

    _pattern = Pattern.compile(cb.toString());
  }
1274564
public function setPattern(string $pattern)
    {
        $this->getTag()->setAttribute('pattern', $pattern);
        $this->removeValidators(PatternValidator::class);

        if ($pattern !== '') {
            $this->addValidator(new PatternValidator($pattern));
        }

        return $this;
    }
1301029
public function handleExcludePatternAnnotation($e)
    {
        $annotation = $e->getParam('annotation');
        if (!$annotation instanceof Annotation\ExcludePattern) {
            return;
        }
    
        $serviceSpec = $e->getParam('serviceSpec');
        $serviceSpec['exclude_patterns'] = (array) $annotation->getExcludePattern();
    }