KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > hibernate > validator > Size


1 //$Id: Size.java,v 1.1 2005/05/27 08:58:54 epbernard Exp $
2
package org.hibernate.validator;
3
4 import static java.lang.annotation.ElementType.METHOD JavaDoc;
5 import static java.lang.annotation.RetentionPolicy.RUNTIME JavaDoc;
6
7 import java.lang.annotation.Retention JavaDoc;
8 import java.lang.annotation.Target JavaDoc;
9
10 /**
11  * Size range for Arrays, Collections or Maps
12  *
13  * @author Gavin King
14  */

15 @ValidatorClass(SizeValidator.class)
16 @Target JavaDoc(METHOD) @Retention JavaDoc(RUNTIME)
17 public @interface Size {
18     int max() default Integer.MAX_VALUE;
19     int min() default 0;
20     String JavaDoc message() default "size must be between {min} and {max}";
21 }
22
Popular Tags