com.ibm.ulc.ui.dataTypes
Class DummyRegularExpression

java.lang.Object
  |
  +--com.ibm.ulc.ui.dataTypes.DummyRegularExpression

public class DummyRegularExpression
extends java.lang.Object
implements IRegularExpression

Implement a IRegularExpression validator that accepts all input


Field Summary
protected  java.lang.Object regExInstance
           
 
Constructor Summary
DummyRegularExpression(java.lang.String expression)
          Create an instance of this widget with the specified expression
 
Method Summary
protected  boolean invokeMatchAt(java.lang.String matchString, int start)
          Call the matchAt method using reflection.
protected  java.lang.String invokeStringMatched()
          Call the stringMatched method using reflection, return the resulting string or null
 boolean matchAt(java.lang.String matchString, int start)
          Return true if the matchString conforms to the configured regular expression
static java.lang.Object newInstance(java.lang.String type, java.lang.String expression)
           
 java.lang.String stringMatched()
          Return the matching string or null Note: In this implementation we return an empty string if the regular expression instance could not be created.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

regExInstance

protected java.lang.Object regExInstance
Constructor Detail

DummyRegularExpression

public DummyRegularExpression(java.lang.String expression)
Create an instance of this widget with the specified expression
Parameters:
expression - The String regular expression
Method Detail

invokeMatchAt

protected boolean invokeMatchAt(java.lang.String matchString,
                                int start)
Call the matchAt method using reflection. Return true if the matchString conforms to the configured regular expression
Parameters:
matchString - The input String that is matched agains the regular expression
start - The index at which the comparison should start

invokeStringMatched

protected java.lang.String invokeStringMatched()
Call the stringMatched method using reflection, return the resulting string or null

matchAt

public boolean matchAt(java.lang.String matchString,
                       int start)
Return true if the matchString conforms to the configured regular expression
Specified by:
matchAt in interface IRegularExpression
Parameters:
matchString - The input String that is matched agains the regular expression
start - The index at which the comparison should start

newInstance

public static java.lang.Object newInstance(java.lang.String type,
                                           java.lang.String expression)

stringMatched

public java.lang.String stringMatched()
Return the matching string or null Note: In this implementation we return an empty string if the regular expression instance could not be created. This will allow all input to be accepted if the regular expression implementation classes were not found.
Specified by:
stringMatched in interface IRegularExpression