Coverage Report - sk.baka.webvm.config.Bind
 
Classes in this File Line Coverage Branch Coverage Complexity
Bind
N/A
N/A
0
 
 1  
 /**
 2  
  * Copyright 2009 Martin Vysny.
 3  
  *
 4  
  * This file is part of WebVM.
 5  
  *
 6  
  * WebVM is free software: you can redistribute it and/or modify
 7  
  * it under the terms of the GNU General Public License as published by
 8  
  * the Free Software Foundation, either version 3 of the License, or
 9  
  * (at your option) any later version.
 10  
  *
 11  
  * WebVM is distributed in the hope that it will be useful,
 12  
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
 13  
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 14  
  * GNU General Public License for more details.
 15  
  *
 16  
  * You should have received a copy of the GNU General Public License
 17  
  * along with WebVM.  If not, see <http://www.gnu.org/licenses/>.
 18  
  */
 19  
 package sk.baka.webvm.config;
 20  
 
 21  
 import java.lang.annotation.ElementType;
 22  
 import java.lang.annotation.Retention;
 23  
 import java.lang.annotation.RetentionPolicy;
 24  
 import java.lang.annotation.Target;
 25  
 
 26  
 /**
 27  
  * Binds values from a {@link Properties} map.
 28  
  * @author Martin Vysny
 29  
  */
 30  
 @Target(ElementType.FIELD)
 31  
 @Retention(RetentionPolicy.RUNTIME)
 32  
 public @interface Bind {
 33  
 
 34  
     /**
 35  
      * A key to the {@link Properties} map.
 36  
      */
 37  
     String key();
 38  
 
 39  
     /**
 40  
      * (Optional) minimum value if number is specified.
 41  
      */
 42  
     int min() default Integer.MIN_VALUE;
 43  
 
 44  
     /**
 45  
      * (Optional) maximum value if number is specified.
 46  
      */
 47  
     int max() default Integer.MAX_VALUE;
 48  
 
 49  
     /**
 50  
      * Makes the value a part of a group.
 51  
      */
 52  
     int group() default 0;
 53  
 
 54  
     /**
 55  
      * true if this field denotes a password field.
 56  
      */
 57  
     boolean password() default false;
 58  
 
 59  
     /**
 60  
      * Set to false if this field is not required.
 61  
      */
 62  
     boolean required() default true;
 63  
 }