Class TraitComposer

    • Constructor Summary

      Constructors 
      Constructor Description
      TraitComposer()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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