|
© 2005 BEA Systems, Inc. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.beasys.commerce.util.GlobHelper
GlobHelper
A utility class for doing DOS-style pattern matching (GLOBing).
This supports only '?' and '*' pattern
characters. No bounded (e.g. "[abcd] file") patterns are
supported.
To do a simple pattern match, you can use the matches
class method. Additionally, GlobHelper is a FilenameFilter.
This requires the OROMatcher regular expression libraries, which are bundled with WebLogic Server.
| Field Summary | |
protected List |
patterns
Deprecated. Our list of file patterns to match. |
| Constructor Summary | |
GlobHelper()
Deprecated. Constructor. |
|
GlobHelper(Collection c)
Deprecated. Constructor with patterns. |
|
GlobHelper(Iterator i)
Deprecated. Constructor with patterns. |
|
GlobHelper(String pattern)
Deprecated. Constructor with pattern. |
|
GlobHelper(String[] patterns)
Deprecated. Constructor with patterns. |
|
| Method Summary | |
boolean |
accept(File dir,
String name)
Deprecated. Tell if the specified directory and filename matches our current list patterns. |
void |
addPattern(String pat)
Deprecated. Add a pattern. |
static com.oroinc.text.regex.Pattern |
getPattern(String patStr)
Deprecated. Get a pattern from the pattern cache, which is a soft reference map of pattern string to Pattern. |
List |
getPatterns()
Deprecated. Get the patterns. |
static boolean |
matches(String patStr,
String str)
Deprecated. Determine if the given input string matches the specified input pattern. |
boolean |
removePattern(String pat)
Deprecated. Remove a pattern. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected List patterns
| Constructor Detail |
public GlobHelper()
public GlobHelper(Collection c)
public GlobHelper(Iterator i)
public GlobHelper(String pattern)
public GlobHelper(String[] patterns)
| Method Detail |
public boolean accept(File dir,
String name)
accept in interface FilenameFilterpublic void addPattern(String pat)
public static com.oroinc.text.regex.Pattern getPattern(String patStr)
throws com.oroinc.text.regex.MalformedPatternException
By using a sort reference map, the garbage collector can clean it out as needed because we can always recreate the Pattern objects from the strings.
com.oroinc.text.regex.MalformedPatternException - thrown on a
bad pattern stringpublic List getPatterns()
public static boolean matches(String patStr,
String str)
throws IllegalArgumentException
str - the input string.
IllegalArgumentException - thrown on a bad pattern string.public boolean removePattern(String pat)
|
© 2005 BEA Systems, Inc. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||