@groovy.transform.CompileStatic @org.codehaus.groovy.transform.GroovyASTTransformation(phase: CompilePhase.INSTRUCTION_SELECTION) class CompiledTagCallTransformation extends java.lang.Object implements org.codehaus.groovy.transform.ASTTransformation, org.codehaus.groovy.transform.TransformWithPriority
Compiles a call to a known tag into a direct invocation, wherever tags can be called from.
A tag library rewrites its own calls as it is compiled, but a controller can call tags too, and
gains that ability from the TagLibraryInvoker trait rather than from being a tag library.
Any class carrying that trait is therefore a candidate, which covers controllers without naming
them and without a second copy of the rewriting rules. A compiled GSP calls tags as well, and
reaches them through GroovyPage rather than through the trait, so it is matched separately.
Runs in a later phase than trait injection, since whether a class can call tags is only settled once its traits have been applied. Ordering by priority within a phase was not enough: it holds for transforms that declare one, but a trait arriving from a local transform is applied after every global transform has run, so a class compiled from outside the conventional directory was read before it carried the trait, and the same source read as a convention class was read after. Waiting for the phase reads every class once it is whole, which is what the rewrite needs to decide.
| Constructor and description |
|---|
CompiledTagCallTransformation() |
| Methods inherited from class | Name |
|---|---|
class java.lang.Object |
java.lang.Object#equals(java.lang.Object), java.lang.Object#getClass(), java.lang.Object#hashCode(), java.lang.Object#notify(), java.lang.Object#notifyAll(), java.lang.Object#toString(), java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int) |