public abstract class PatternType extends Type
| Modifier | Constructor and Description | 
|---|---|
protected  | 
PatternType(String name,
           String pattern)
Creates a new  
PatternType instance. | 
| Modifier and Type | Method and Description | 
|---|---|
protected Object | 
fromStringImpl(String value)
Converts from a  
String to an instance of the value class
 for this type (implementation method). | 
String | 
getDescription()
Retrieves the description of this type. 
 | 
String | 
getPattern()
Returns the pattern. 
 | 
protected boolean | 
isValidValueImpl(String value)
Determines if the specified  
String value is considered
 valid for this type (implementation method). | 
String | 
toString(Object value)
Generates a string representation of the specified value for this type. 
 | 
checkValue, fromString, getName, getValueClass, isValidValue, toStringprotected PatternType(String name, String pattern) throws IllegalArgumentException, PatternCompileException
PatternType instance. The name of the type
 needs to be specified. The value class (see
 Type.getValueClass()) is set to String.class.name - the name of the type, not null.pattern - the regular expression the values must match, not null.IllegalArgumentException - if name == null || pattern == null.PatternCompileException - if the specified pattern is considered invalid.protected final boolean isValidValueImpl(String value)
TypeString value is considered
 valid for this type (implementation method).
 This method is called from Type.isValidValue(String). When
 called from that method, it is guaranteed that the argument is not
 null.
 
Type returns
 true.isValidValueImpl in class Typevalue - the String value that should be checked for validity,
    never null.true if and only if the specified String
    value is valid, false otherwise.protected final Object fromStringImpl(String value)
TypeString to an instance of the value class
 for this type (implementation method).
 This method is not required to check the validity of the specified
 value (since Type.isValidValueImpl(String) should have been called
 before) but if it does, then it may throw a TypeValueException.
fromStringImpl in class Typevalue - the string to convert to an instance of the value class, guaranteed
    to be not null and guaranteed to have been passed to
    Type.isValidValueImpl(String) without getting an exception.null.public final String toString(Object value) throws IllegalArgumentException, ClassCastException, TypeValueException
TypeType.getValueClass()). Also, it may have to fall within a
 certain range of valid values, depending on the type.
 The default implementation of this method in class Type does
 the following:
 
value == null then it throws an
        IllegalArgumentException;
    getValueClass().isInstance(value) == false then
        it throws a ClassCastException;
    value.Object.toString().
 toString in class Typevalue - the value, cannot be null.null.IllegalArgumentException - if value == null.ClassCastException - if getValueClass().isInstance(value) == false.TypeValueException - if the specified value is not in the allowed range.public String getDescription()
TypegetDescription in class Typenull.public String getPattern()
null.See http://www.xins.org/.