@GroovyASTTransformation(phase = CompilePhase.CANONICALIZATION) public class BindableASTTransformation extends Object implements ASTTransformation, org.objectweb.asm.Opcodes
Handles generation of code for the @Bindable
annotation when @Vetoable
is not present.
Generally, it adds (if needed) a PropertyChangeSupport field and the needed add/removePropertyChangeListener methods to support the listeners.
It also generates the setter and wires the setter through the PropertyChangeSupport.
If a Vetoable annotation is detected it does nothing and lets the VetoableASTTransformation handle all the changes.
Type Params | Return Type | Name and description |
---|---|---|
|
public static boolean |
hasBindableAnnotation(AnnotatedNode node) Convenience method to see if an annotated node is @Bindable . |
|
public void |
visit(ASTNode[] nodes, SourceUnit source) Handles the bulk of the processing, mostly delegating to other methods. |
Convenience method to see if an annotated node is @Bindable
.
node
- the node to checkHandles the bulk of the processing, mostly delegating to other methods.
nodes
- the ast nodessource
- the source unit for the nodes