001 package org.nakedobjects.applib.annotation;
002
003 import java.lang.annotation.ElementType;
004 import java.lang.annotation.Inherited;
005 import java.lang.annotation.Retention;
006 import java.lang.annotation.RetentionPolicy;
007 import java.lang.annotation.Target;
008
009
010 /**
011 * Provides a regular expression that a value entry should conform to, and can be formatted as.
012 *
013 * <p>
014 * Can also be specified for types that are annotated as <tt>@Value</tt> types. To apply, the value must have string semantics.
015 */
016 @Inherited
017 @Target( { ElementType.TYPE, ElementType.METHOD, ElementType.PARAMETER })
018 @Retention(RetentionPolicy.RUNTIME)
019 public @interface RegEx {
020 String validation();
021
022 String format() default "";
023
024 boolean caseSensitive() default true;
025 }
026
027 // Copyright (c) Naked Objects Group Ltd.