@GroovyASTTransformation(phase = CompilePhase.CANONICALIZATION) public class VetoableASTTransformation extends BindableASTTransformation
Handles generation of code for the @Vetoable
annotation, and @Bindable
if also present.
Generally, it adds (if needed) a VetoableChangeSupport field and the needed add/removeVetoableChangeListener methods to support the listeners.
It also generates the setter and wires the setter through the VetoableChangeSupport.
If a Bindable annotation is detected it also adds support similar to what BindableASTTransformation would do.
Type Params | Return Type | Name and description |
---|---|---|
|
public static boolean |
hasVetoableAnnotation(AnnotatedNode node) Convenience method to see if an annotated node is @Vetoable . |
|
public void |
visit(ASTNode[] nodes, SourceUnit source) Handles the bulk of the processing, mostly delegating to other methods. |
Methods inherited from class | Name |
---|---|
class BindableASTTransformation |
hasBindableAnnotation, visit |
Convenience method to see if an annotated node is @Vetoable
.
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