com.opensymphony.xwork2.util

## Class ClassPathFinder

- java.lang.Object
- - com.opensymphony.xwork2.util.ClassPathFinder

-     public class ClassPathFinder
      extends Object

  This class is an utility class that will search through the classpath for files whose names match the given pattern. The filename is tested using the given implementation of `PatternMatcher` by default it uses `WildcardHelper`

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ClassPathFinder()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Vector<String>` | `findMatches()` Builds a `Vector` containing Strings which each name a file who's name matches the pattern set by setPattern(String).
    `String` | `getPattern()`
    `void` | `setPattern(String pattern)`
    `void` | `setPatternMatcher(PatternMatcher<int[]> patternMatcher)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ClassPathFinder

          public ClassPathFinder()

  - ### Method Detail

    - #### getPattern

          public String getPattern()

      Returns:
        the pattern in use

    - #### setPattern

          public void setPattern(String pattern)

      Parameters:
        `pattern` - the String pattern for comparing filenames

    - #### findMatches

          public Vector<String> findMatches()

      Builds a `Vector` containing Strings which each name a file who's name matches the pattern set by setPattern(String). The classpath is searched recursively, so use with caution.
      Returns:
        Vector<String> containing matching filenames

    - #### setPatternMatcher

          public void setPatternMatcher(PatternMatcher<int[]> patternMatcher)

      Parameters:
        `patternMatcher` - the PatternMatcher implementation to use when comparing filenames

Copyright © 2000–2021 Apache Software Foundation. All rights reserved.