|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.owasp.webscarab.util.RegexExpansion
public class RegexExpansion
This class creates a sequence of Strings that match a reduced Regular Expression syntax. This syntax excludes anything that might allow for variable length strings, or wildcards that would make the character range too large. Some examples of acceptable regular expression constructs: ABCDEF = a sequence of 1 string "ABCDEF" [AB] = a sequence of 2 : { "A", "B" } [A-C] = a sequence of 3 : { "A", "B", "C" } [AB]{2} = a sequence of 4 : { "AA", "AB", "BA", "BB" } [AB]\{ = a sequence of 2: { "A{", "B{" } One specific limitation is that the size of the expansion sequence must fit into an int An expansion that will not fit into an int will throw a PatternSyntaxException during construction In practice, this should not really be a problem.
Constructor Summary | |
---|---|
protected |
RegexExpansion(RegexExpansion re)
Copy constructor |
|
RegexExpansion(java.lang.String regex)
Creates a new instance of RegexExpansion |
Method Summary | |
---|---|
java.lang.String |
get(int index)
|
int |
getIndex()
|
java.lang.String |
getRegex()
Returns the expression that is being expanded |
boolean |
hasNext()
|
static void |
main(java.lang.String[] args)
|
java.lang.String |
next()
|
void |
setIndex(int index)
sets the current position in the expansion sequence |
int |
size()
returns the number of items in the expansion |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RegexExpansion(java.lang.String regex) throws java.util.regex.PatternSyntaxException
java.util.regex.PatternSyntaxException
protected RegexExpansion(RegexExpansion re)
re
- the RegexExpansion to copyMethod Detail |
---|
public java.lang.String getRegex()
public int size()
public void setIndex(int index)
index
- public int getIndex()
public boolean hasNext()
public java.lang.String next()
public java.lang.String get(int index)
index
-
public static void main(java.lang.String[] args)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |