FXObservable.java
01 /*
02  * Copyright 2008-2014 the original author or authors.
03  *
04  * Licensed under the Apache License, Version 2.0 (the "License");
05  * you may not use this file except in compliance with the License.
06  * You may obtain a copy of the License at
07  *
08  *     http://www.apache.org/licenses/LICENSE-2.0
09  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 package griffon.transform;
17 
18 import java.lang.annotation.ElementType;
19 import java.lang.annotation.Retention;
20 import java.lang.annotation.RetentionPolicy;
21 import java.lang.annotation.Target;
22 
23 /**
24  * Annotates a groovy property or a class to support JavaFX properties.
25  <p/>
26  * When annotating a property it indicates that the property should be a
27  * bound property according to  JavaFX beans, announcing to listeners
28  * that the value has changed. <br/><br/>
29  <p/>
30  * When annotating a class it indicates that all groovy properties in that
31  * class should be bound as though each property had the annotation (even
32  * if it already has it explicitly).<br/><br/>
33  <p/>
34  * It is a compilation error to place this annotation on a field (that is
35  * not a property, i.e. has scope visibility modifiers).<br/><br/>
36  <p/>
37  * If a property with a user defined setter method is annotated the code
38  * block is wrapped with the needed code to fire off the event.<br/><br/>
39  *
40  @author Andres Almiray
41  */
42 @java.lang.annotation.Documented
43 @Retention(RetentionPolicy.SOURCE)
44 @Target({ElementType.FIELD, ElementType.TYPE})
45 public @interface FXObservable {
46 }