Package org.apache.struts2.util
Class ClassPathFinder
java.lang.Object
org.apache.struts2.util.ClassPathFinder
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 -
Method Summary
Modifier and TypeMethodDescriptionBuilds aVectorcontaining Strings which each name a file who's name matches the pattern set by setPattern(String).voidsetPattern(String pattern) voidsetPatternMatcher(PatternMatcher<int[]> patternMatcher)
-
Constructor Details
-
ClassPathFinder
public ClassPathFinder()
-
-
Method Details
-
getPattern
- Returns:
- the pattern in use
-
setPattern
- Parameters:
pattern- the String pattern for comparing filenames
-
findMatches
Builds aVectorcontaining 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
- Parameters:
patternMatcher- the PatternMatcher implementation to use when comparing filenames
-