Class TraitComposer

    • Field Detail


        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.
        cNode - a class node
        unit - the source unit