Package wwutil.model

Examples of wwutil.model.MaskMatcher


                char    letterMask = ReflectUtil.getAnnoValue(fieldAnnotation, "letterMask", '@');
                char    anyMask = ReflectUtil.getAnnoValue(fieldAnnotation, "anyMask", '*');
                String  pattern = ReflectUtil.getAnnoValue(fieldAnnotation, "pattern", "");
                String  value = (String)field.get(object);
                if (value != null) {
                    MaskMatcher matcher = new MaskMatcher(pattern, digitMask, letterMask, anyMask);
                    if (!matcher.matches(value))
                        throw new ValidationException("Field value " + value + " does not match the mask pattern " + pattern + ".  Field: " + field.getName());
                }
            }
        });

View Full Code Here

TOP

Related Classes of wwutil.model.MaskMatcher

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.