Class AbstractMethodNodeTransformer

    • Constructor Detail

      • AbstractMethodNodeTransformer

        public AbstractMethodNodeTransformer​(SourceUnit sourceUnit,
                                             Closure<Boolean> criteria)
        Deprecated.
        Every instance needs the source unit and the name of the class it's going to transform. To find methods eligible to be transformed by this Transformer a Closure returning a boolean is used as a criteria. You can create your own criteria or use one of the static methods present in this class. These methods will create a pre-defined criteria. The Closure used as a criteria will receive a MethodNode and return a Boolean value. If the closure returns true then the transformation will be apply, if not the MethodNode will be discarded.
        Parameters:
        sourceUnit - Needed to apply scope
        criteria - used to locate target classes look for the qualified method)
        Since:
        0.2.0
        See Also:
        Criterias.byMethodNodeNameContains(String)