|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.opensymphony.xwork2.util.ClassPathFinder
public class 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
Field Summary | |
---|---|
private Vector<String> |
compared
|
private int[] |
compiledPattern
|
private String |
pattern
The String pattern to test against. |
private PatternMatcher |
patternMatcher
The PatternMatcher implementation to use |
Constructor Summary | |
---|---|
ClassPathFinder()
|
Method Summary | |
---|---|
private Vector<String> |
checkEntries(String[] entries,
File parent,
String prefix)
|
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()
retrieves the pattern in use |
private URLClassLoader |
getURLClassLoader()
|
void |
setPattern(String pattern)
sets the String pattern for comparing filenames |
void |
setPatternMatcher(PatternMatcher patternMatcher)
sets the PatternMatcher implementation to use when comparing filenames |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private String pattern
private int[] compiledPattern
private PatternMatcher patternMatcher
private Vector<String> compared
Constructor Detail |
---|
public ClassPathFinder()
Method Detail |
---|
public String getPattern()
public void setPattern(String pattern)
pattern
- public Vector<String> findMatches()
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.
private Vector<String> checkEntries(String[] entries, File parent, String prefix)
public void setPatternMatcher(PatternMatcher patternMatcher)
patternMatcher
- private URLClassLoader getURLClassLoader()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |