Package org.jibx.util
Class ResourceMatcher
- java.lang.Object
-
- org.jibx.util.ResourceMatcher
-
public class ResourceMatcher extends java.lang.ObjectSupports finding resources relative to a file system base directory or base URL. When using a file system base directory, the resource paths may include '*' wildcard match characters for the actual file names.- Author:
- Dennis M. Sosnoski
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classResourceMatcher.PatternMatcherFile name pattern matcher.static interfaceResourceMatcher.ReportMatchReport matches found to name patterns.
-
Field Summary
Fields Modifier and Type Field Description private static Loggers_loggerLogger for class.
-
Constructor Summary
Constructors Constructor Description ResourceMatcher()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.util.ListmatchPaths(java.io.File basedir, java.net.URL baseurl, java.util.List paths, ResourceMatcher.ReportMatch report)Find matches to resource paths.
-
-
-
Method Detail
-
matchPaths
public static java.util.List matchPaths(java.io.File basedir, java.net.URL baseurl, java.util.List paths, ResourceMatcher.ReportMatch report) throws java.io.IOExceptionFind matches to resource paths. The paths may be either absolute, or relative to a file system directory or to a general URL, but the paths may contain '*' wildcard match characters only if relative to a file system directory. An error is reported for each invalid pattern, including wildcard patterns with no matching files and malformed URLs.- Parameters:
basedir- file system base directory (nullif not using file system)baseurl- base URL for names (nullif no base)paths- resource paths to be found, with wildcards allowed in name portion if using file systemreport- match reporting interface- Returns:
- error message list (empty list if no errors)
- Throws:
java.io.IOException
-
-