Class TraitComposer

    • Field Detail

      • COMPILESTATIC_CLASSNODE

        public static final ClassNode COMPILESTATIC_CLASSNODE
    • Constructor Detail

      • TraitComposer

        public TraitComposer()
    • Method Detail

      • doExtendTraits

        public static void doExtendTraits​(ClassNode cNode,
                                          SourceUnit unit,
                                          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. It is safe to call this method on a class node which does not implement a trait.
        Parameters:
        cNode - a class node
        unit - the source unit