|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgov.llnl.babel.symbols.RegexMatch
public class RegexMatch
Provide regular expression matching for SymbolID
against regular expressions.
This class used to use reflection to avoid a compile type dependence
on java.util.regex. Now, we assume java.util.regex is available.
Constructor Summary | |
---|---|
RegexMatch(java.lang.String regex)
Create a regular expression matching object. |
Method Summary | |
---|---|
static boolean |
hasRegex()
Return true iff the current runtime system has regular
expression support. |
boolean |
match(SymbolID id)
Return true if the SymbolID matches the
compiled regular expression. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RegexMatch(java.lang.String regex) throws RegexUnsupportedException, java.util.regex.PatternSyntaxException
regex
- a regular expression to be compiled.
RegexUnsupportedException
- this exception
indicates that the runtime environment lacks the necessary.
BadRegexException
- this exception
indicates that the regular expression had a syntax error. The message
tries to indicate where the error occured.
java.util.regex.PatternSyntaxException
Method Detail |
---|
public static boolean hasRegex()
true
iff the current runtime system has regular
expression support.
public boolean match(SymbolID id)
true
if the SymbolID
matches the
compiled regular expression.
id
- the symbol that will be compared with the regular
expression.
true
indicates that the SymbolID
matches
the regular expression.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |