|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.tools.ant.util.regexp.RegexpUtil
public class RegexpUtil
Regular expression utilities class which handles flag operations.
| Constructor Summary | |
|---|---|
RegexpUtil()
|
|
| Method Summary | |
|---|---|
static int |
asOptions(boolean caseSensitive)
Convert flag to regex options. |
static int |
asOptions(boolean caseSensitive,
boolean multiLine,
boolean singleLine)
Convert flags to regex options. |
static int |
asOptions(java.lang.String flags)
convert regex option flag characters to regex options g - Regexp.REPLACE_ALL i - RegexpMatcher.MATCH_CASE_INSENSITIVE m - RegexpMatcher.MATCH_MULTILINE s - RegexpMatcher.MATCH_SINGLELINE |
static boolean |
hasFlag(int options,
int flag)
Check the options has a particular flag set. |
static int |
removeFlag(int options,
int flag)
Remove a particular flag from an int value contains the option flags. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RegexpUtil()
| Method Detail |
|---|
public static boolean hasFlag(int options,
int flag)
options - an int valueflag - an int value
public static int removeFlag(int options,
int flag)
options - an int valueflag - an int value
public static int asOptions(java.lang.String flags)
flags - the string containing the flags
public static int asOptions(boolean caseSensitive)
caseSensitive - opposite of RegexpMatcher.MATCH_CASE_INSENSITIVE
public static int asOptions(boolean caseSensitive,
boolean multiLine,
boolean singleLine)
caseSensitive - opposite of RegexpMatcher.MATCH_CASE_INSENSITIVEmultiLine - RegexpMatcher.MATCH_MULTILINEsingleLine - RegexpMatcher.MATCH_SINGLELINE
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||