Groovy Documentation

org.codehaus.groovy.transform
[Java] Annotation Type GroovyASTTransformation

java.lang.Object
  org.codehaus.groovy.transform.GroovyASTTransformation

@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
public @interface GroovyASTTransformation

This is an annotation on a class, currently just ASTTransformation. This provides information about how and when to apply the transformation, such as what phase it should be applied in. The allowed phase is a function of how the transformation is introduced into the compile process. If the transform is automatically added via a marker annotation only the SEMANTIC_ANALYSIS and latter phases are legal for the phase(). This is because the annotations are not inspected until after the classes are all resolved. Also, only annotation types present during the SEMANTIC_ANALYSIS phase will be handled. Transformations adding other annotations that are transformable will have those new annotations only considered in latter phases, and only if the type was present in the source unit during SEMANTIC_ANALYSIS.

Authors:
Danno Ferrin (shemnon)
See Also:
ASTTransformation


 
Optional Element Summary
CompilePhase phase

@default CompilePhase.CANONICALIZATION

 
Method Summary
 
Methods inherited from class java.lang.Object
java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()
 

Element Detail

phase

public CompilePhase phase
@default CompilePhase.CANONICALIZATION


 

Groovy Documentation