Class TraitComposer
java.lang.Object
org.codehaus.groovy.transform.trait.TraitComposer
This class contains a static utility method
doExtendTraits(org.codehaus.groovy.ast.ClassNode, org.codehaus.groovy.control.SourceUnit, org.codehaus.groovy.control.CompilationUnit)
aimed at generating code for a classnode implementing a trait.- Since:
- 2.3.0
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
doExtendTraits
(ClassNode cn, SourceUnit su, CompilationUnit cu) Given a class node, if this class node implements a trait, then generate all the appropriate code which delegates calls to the trait.
-
Field Details
-
COMPILESTATIC_CLASSNODE
-
-
Constructor Details
-
TraitComposer
public TraitComposer()
-
-
Method Details
-
doExtendTraits
Given a class node, if this class node implements a trait, then generate all the appropriate code which delegates calls to the trait. It is safe to call this method on a class node which does not implement a trait.
-