public interface PathMacros
Modifier and Type | Method and Description |
---|---|
java.lang.String[] |
extract(java.lang.String actionPath)
Extracts array of macro values for matched action path
for each
name . |
boolean |
init(java.lang.String actionPath,
java.lang.String[] separators)
Initializes
PathMacro and returns
true if macros are found in the action
path. |
int |
macrosCount()
Returns macros count.
|
int |
match(java.lang.String actionPath)
Match provided action path with the path macros,
Returns the number of matched non-macro characters.
|
java.lang.String[] |
names()
Returns names of all macros.
|
java.lang.String[] |
patterns()
Returns all patterns.
|
boolean init(java.lang.String actionPath, java.lang.String[] separators)
PathMacro
and returns
true
if macros are found in the action
path. Otherwise, returns false
and
the instance can be thrown away.
Separators is array of 3 strings that defines: start, dividing string, and end of a macro.
java.lang.String[] names()
java.lang.String[] patterns()
null
if some macro does not define a pattern.int macrosCount()
int match(java.lang.String actionPath)
java.lang.String[] extract(java.lang.String actionPath)
name
. It is assumed
that path macro was previously init(String, String[])
initialized}
on this action path, i.e. input is not validated.
Returned array string of macro values may contain
null
on all ignored macros.
Copyright © 2003-present Jodd Team