|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectclasspathhelper.RegExUtil
Utility class that helps create Java (Perl) regular expressions from standard path based regular expressions.
The following standard path based regular expressions are
interpreted as follows:
com/foo/bar/*.properties
- All properties files in com/foo/bar
**/*.properties
- All properties files on any path.
The following standard classname based regular expressions are
interpreted as follows:
javax.xml.*
- All the classes in the javax.xml package.
com.sun.**
- All class names under com.sun and com.sun subpackages.
// simply supply your path based regular expression
Pattern p = RegExUtil.createPathPattern("META-INF/**");
// simply supply your package based regular expression
Pattern p = RegExUtil.createClassPattern("javax.xml.*");
Constructor Summary | |
RegExUtil()
|
Method Summary | |
static java.util.regex.Pattern |
createClassPattern(java.lang.String path)
Creates a standard regular expression based on a class name style regular expression. |
static java.util.regex.Pattern |
createPathPattern(java.lang.String path)
Creates a standard regular expression based on a path style regular expression. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public RegExUtil()
Method Detail |
public static java.util.regex.Pattern createPathPattern(java.lang.String path)
path
- The path style regular expression.
public static java.util.regex.Pattern createClassPattern(java.lang.String path)
path
- A classname style regular expression.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |