@GroovyASTTransformation(phase = CompilePhase.SEMANTIC_ANALYSIS) public class SpockTransform implements ASTTransformation { public SpockTransform() {
@GroovyASTTransformation(phase = CompilePhase.CANONICALIZATION) public class NotYetImplementedASTTransformation extends AbstractASTTransformation {
@org.codehaus.groovy.transform.GroovyASTTransformation(phase = CompilePhase.CLASS_GENERATION) public class ExternalizeVerifierASTTransformation extends org.codehaus.groovy.transform.AbstractASTTransformation { static final Class MY_CLASS = ExternalizeVerifier.class;
@GroovyASTTransformation(phase = CompilePhase.INSTRUCTION_SELECTION) public class StaticCompileTransformation extends StaticTypesTransformation {
@GroovyASTTransformation(phase = CompilePhase.CANONICALIZATION) public class InheritConstructorsASTTransformation extends AbstractASTTransformation {
@GroovyASTTransformation(phase = CompilePhase.CANONICALIZATION) public class SingletonASTTransformation extends AbstractASTTransformation {
@GroovyASTTransformation(phase = CompilePhase.CANONICALIZATION) public class SynchronizedASTTransformation extends AbstractASTTransformation {
@GroovyASTTransformation(phase = CompilePhase.CANONICALIZATION) public class ReadWriteLockASTTransformation extends AbstractASTTransformation {
@GroovyASTTransformation(phase = CompilePhase.CANONICALIZATION) public class ExternalizeMethodsASTTransformation extends AbstractASTTransformation { static final Class MY_CLASS = ExternalizeMethods.class;
@GroovyASTTransformation(phase = CompilePhase.INSTRUCTION_SELECTION) public class StaticTypesTransformation implements ASTTransformation, CompilationUnitAware {
@GroovyASTTransformation(phase = CompilePhase.CANONICALIZATION) public class IndexedPropertyASTTransformation extends AbstractASTTransformation {
@GroovyASTTransformation(phase = CompilePhase.CANONICALIZATION) public class G3839Transform2 implements ASTTransformation, Opcodes{ public void visit(ASTNode[] nodes, SourceUnit sourceUnit) { ClassNode classNode = (ClassNode) nodes[1]; classNode.addField(new FieldNode("f2", ACC_PUBLIC, ClassHelper.OBJECT_TYPE, classNode, null)); } }
@GroovyASTTransformation(phase = CompilePhase.SEMANTIC_ANALYSIS) public class SourceURIASTTransformation extends AbstractASTTransformation {
@GroovyASTTransformation(phase = CompilePhase.CANONICALIZATION) public class G3839Transform1 implements ASTTransformation, Opcodes{ public void visit(ASTNode[] nodes, SourceUnit sourceUnit) { ClassNode classNode = (ClassNode) nodes[1]; classNode.addField(new FieldNode("f1", ACC_PUBLIC, ClassHelper.OBJECT_TYPE, classNode, null)); } }
@GroovyASTTransformation(phase = CompilePhase.CANONICALIZATION) public class G3839Transform3 implements ASTTransformation, Opcodes{ public void visit(ASTNode[] nodes, SourceUnit sourceUnit) { ClassNode classNode = (ClassNode) nodes[1]; classNode.addField(new FieldNode("f3", ACC_PUBLIC, ClassHelper.OBJECT_TYPE, classNode, null)); } }
@GroovyASTTransformation(phase = CompilePhase.SEMANTIC_ANALYSIS) public class MemoizedASTTransformation extends AbstractASTTransformation {
@GroovyASTTransformation(phase = CompilePhase.SEMANTIC_ANALYSIS) public class AstBuilderTransformation extends MethodCallTransformation {
@GroovyASTTransformation(phase = CompilePhase.SEMANTIC_ANALYSIS) public class BaseScriptASTTransformation extends AbstractASTTransformation {
@GroovyASTTransformation(phase = CompilePhase.CANONICALIZATION) public class MixinASTTransformation extends AbstractASTTransformation { private static final ClassNode MY_TYPE = make(Mixin.class);
/** * Traces @MyIntegerAnno annotation * * @author Paul King */ @GroovyASTTransformation(phase = CompilePhase.CANONICALIZATION) public class MyIntegerAnnoTraceASTTransformation implements ASTTransformation { public static List<String> trace = new ArrayList<String>(); public void visit(ASTNode[] nodes, final SourceUnit source) { if (nodes.length != 2 || !(nodes[0] instanceof AnnotationNode) || !(nodes[1] instanceof AnnotatedNode)) { throw new RuntimeException("Internal error: expecting [AnnotationNode, AnnotatedNode] but got: " + Arrays.asList(nodes)); } AnnotatedNode parent = (AnnotatedNode) nodes[1]; File f = new File("temp/log.txt"); try { ResourceGroovyMethods.append(f, parent.getClass().getSimpleName() + " " + parent.getAnnotations().get(0).getMember("value").getText() + " "); } catch (IOException e) { e.printStackTrace(); } } }