Coverage Report - org.openpermis.editor.policy.beans.PropertyChange
 
Classes in this File Line Coverage Branch Coverage Complexity
PropertyChange
N/A
N/A
0
 
 1  
 /*
 2  
  * Copyright (c) 2009, Swiss Federal Department of Defence Civil Protection and Sport
 3  
  *                     (http://www.vbs.admin.ch)
 4  
  * Copyright (c) 2009, Ergon Informatik AG (http://www.ergon.ch)
 5  
  * All rights reserved.
 6  
  *
 7  
  * Licensed under the Open Permis License which accompanies this distribution,
 8  
  * and is available at http://www.openpermis.org/BSDlicenceKent.txt
 9  
  */
 10  
 package org.openpermis.editor.policy.beans;
 11  
 
 12  
 import static java.lang.annotation.ElementType.METHOD;
 13  
 import static java.lang.annotation.RetentionPolicy.RUNTIME;
 14  
 
 15  
 import java.lang.annotation.Retention;
 16  
 import java.lang.annotation.Target;
 17  
 
 18  
 /**
 19  
  * Annotation for the processing of property change events.
 20  
  * <p>Add this annotation to your presenter to receive updates on model changes if the
 21  
  * specified property name changes.</p>
 22  
  * @since 0.1.0
 23  
  */
 24  
 @Target(METHOD)
 25  
 @Retention(RUNTIME)
 26  
 public @interface PropertyChange {
 27  
 
 28  
         /**
 29  
          * The wildcard property that matches all properties.
 30  
          * @since 0.1.0
 31  
          */
 32  
         public static final String WILDCARD_PROPERTY = "";
 33  
         
 34  
         /**
 35  
          * The class of the bean we are handling a property change event for.
 36  
          * @since 0.1.0
 37  
          */
 38  
         Class<?> bean ();
 39  
         
 40  
         /**
 41  
          * The name of the property that the method of this annotation will process.
 42  
          * @note The property declaration is optional. If undefined or an empty string is
 43  
          * used the property will match all properties and the property parameter must not
 44  
          * be specified in your method signature.
 45  
          * @since 0.1.0
 46  
          */
 47  
         String property () default WILDCARD_PROPERTY;
 48  
         
 49  
         /**
 50  
          * The parameter class of the property.
 51  
          * @note The parameter declaration is optional if you do not include the old and new
 52  
          * value as parameters in your method signature. If you do, it is mandatory.
 53  
          * @since 0.1.0
 54  
          */
 55  
         Class<?> parameter () default Void.class;
 56  
         
 57  
 }