|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectatg.core.util.PagePattern
public class PagePattern
A compiled representation of a filesystem globbing expression, together with logic that tests whether an input string matches the pattern.
A filesystem globbing expression is a highly simplified regular
expression whose only special character is *. As with filesystem
globbing, * matches any sequence of characters except /. Therefore,
the pattern /site/*.jsp matches /site/home.jsp
and /site/home.page.jsp but does not match
/site/common/home.jsp.
Backslash serves as a quoting character: any character preceeded by a backslash, including *, will be matched literally. Quoting the backslash character itself matches a single backslash in the input string.
A typical invocation sequence looks like this:
PagePattern p = PagePattern.compile("/site/*.jsp"); boolean matched = p.matches("/site/index.jsp");
| Field Summary | |
|---|---|
static java.lang.String |
CLASS_VERSION
|
protected atg.core.util.PagePattern.Segment[] |
mSegments
|
| Method Summary | |
|---|---|
static PagePattern |
compile(java.lang.String pExpr)
Compile a filesystem globbing expression to an internal format designed for fast matching against an input string. |
static void |
main(java.lang.String[] args)
|
boolean |
matches(java.lang.String pInput)
Query whether an input string matches the filesystem globbing expression used to create this PagePattern. |
java.lang.String |
toString()
Render a human readable version of a PagePattern for debugging purposes. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static java.lang.String CLASS_VERSION
protected atg.core.util.PagePattern.Segment[] mSegments
| Method Detail |
|---|
public java.lang.String toString()
toString in class java.lang.Objectpublic static PagePattern compile(java.lang.String pExpr)
pExpr - A filesystem globbing expression, in which * may be used to match any
sequence of characters except /, and backslash may be used to quote
any character including * and itself.
public boolean matches(java.lang.String pInput)
pInput - The input string to match.
public static void main(java.lang.String[] args)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||