|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object junit.extensions.jfcunit.tools.Operator
Abstract class for defining call back classes to test whether a Component
that is being searched for has been found.
Nested Class Summary | |
static class |
Operator.Operation
Operations for comparing strings. |
Field Summary | |
private static java.lang.String |
s_cachePattern
Pattern which was cached. |
private static org.apache.regexp.RE |
s_cacheRE
Cached regular expression. |
private static java.lang.Object |
s_lock
This is the lock for synchronizing checks of the cache. |
Constructor Summary | |
private |
Operator()
Constructor should be private. |
Method Summary | |
static boolean |
evaluate(java.lang.String leftside,
java.lang.String rightside,
int operation,
boolean ignoreCase)
Evaluate the current operation. |
private static org.apache.regexp.RE |
getPattern(java.lang.String pattern)
Get the regular expression implementing the pattern. |
private static boolean |
matchPattern(java.lang.String componentAttribute,
java.lang.String patternString)
This method is used to filter components' attributes based on a pattern specified by the user. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static java.lang.Object s_lock
private static java.lang.String s_cachePattern
private static org.apache.regexp.RE s_cacheRE
Constructor Detail |
private Operator()
Method Detail |
public static boolean evaluate(java.lang.String leftside, java.lang.String rightside, int operation, boolean ignoreCase)
leftside
- String to be compared.rightside
- String or Regular expression.operation
- See the Operation subclass for values.ignoreCase
- Ignore the case of the values.
private static org.apache.regexp.RE getPattern(java.lang.String pattern)
pattern
- String representation of RE.
private static boolean matchPattern(java.lang.String componentAttribute, java.lang.String patternString)
PatternCompiler.compile()
throwing a NullPointerException and in this case, return true if the componentAttribute
is also null.
The pattern syntax can be found at the Jakarta RegExp API Documentation in RE
.
componentAttribute
- The attribute text of the component to match againstpatternString
- The pattern to match with
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |