|
Groovy example source code file (CompiledAtIntegrationTest.groovy)
The Groovy CompiledAtIntegrationTest.groovy source codeimport transforms.global.CompiledAtASTTransformation import org.codehaus.groovy.ast.* import org.codehaus.groovy.transform.* import org.codehaus.groovy.control.* import org.codehaus.groovy.tools.ast.* /** * This shows how to use the TransformTestHelper to test * a global transformation. It is a little hard to invoke * because the CompiledAtASTTransformation must be on the * classpath but the JAR containing the transform must not * or the transform gets applied twice. * * @author Hamlet D'Arcy */ def transform = new CompiledAtASTTransformation() def phase = CompilePhase.CONVERSION def helper = new TransformTestHelper(transform, phase) def clazz = helper.parse(' class MyClass {} ' ) assert clazz.getCompiledTime() != null println 'compiled at' + clazz.getCompiledTime() Other Groovy examples (source code examples)Here is a short list of links related to this Groovy CompiledAtIntegrationTest.groovy source code file: |
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2024 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.