// Path: asteroid-core/src/main/java/asteroid/utils/InternalUtils.java
// public static <T> List<T> collect(final Object iterable, final Closure<T> process) {
//     if (iterable == null) {
//         return new ArrayList<>();
//     }
// 
//     return DefaultGroovyMethods.collect(iterable, process);
// }
// 
// Path: asteroid-core/src/main/java/asteroid/transformer/Transformer.java
// public interface Transformer {
// 
//     /**
//      * This function has to be implemented in order the transformation
//      * to traverse every {@link ClassNode} in the AST
//      *
//      * @param clazzNode The next {@link ClassNode} to traverse
//      * @since 0.2.0
//      */
//     void visitClass(ClassNode clazzNode);
// }


import static org.codehaus.groovy.runtime.DefaultGroovyMethods.newInstance;
import static asteroid.utils.InternalUtils.collect;
import java.util.List;
import org.codehaus.groovy.ast.ASTNode;
import org.codehaus.groovy.ast.ClassNode;
import org.codehaus.groovy.control.SourceUnit;
import org.codehaus.groovy.transform.AbstractASTTransformation;
import asteroid.transformer.Transformer;
package asteroid;




/**
 * This class applies all transformers provided by the method
 * getTransformers in order to all class nodes present in a given
 * source unit instance.
 *
 * This way you should think of an instance of {@link
 * AbstractGlobalTransformation} as a set of {@link Transformer}
 * instances.
 * <pre class="inner"><code>
 * class AddTransformation extends AbstractGlobalTransformation {
 *     {@literal @}Override
 *     List{@literal <}Class{@literal <}Transformer{@literal >}{@literal >} getTransformers() {
 *         return [AddPropertyToInnerClass, AddTraitTransformer]
 *     }
 * }
 * </code></pre>
 *
 * @since 0.2.0
 * @see Transformer
 */
public abstract class AbstractGlobalTransformation extends AbstractASTTransformation {

    /**
     * {@inheritDoc}
     *
     * @since 0.2.0
     */
    @SuppressWarnings({"PMD.UnusedMethodParameter", "PMD.AvoidInstantiatingObjectsInLoops"})
    public void visit(final ASTNode[] nodes, final SourceUnit sourceUnit) {
// Path: asteroid-core/src/main/java/asteroid/utils/InternalUtils.java
// public static <T> List<T> collect(final Object iterable, final Closure<T> process) {
//     if (iterable == null) {
//         return new ArrayList<>();
//     }
// 
//     return DefaultGroovyMethods.collect(iterable, process);
// }
// 
// Path: asteroid-core/src/main/java/asteroid/transformer/Transformer.java
// public interface Transformer {
// 
//     /**
//      * This function has to be implemented in order the transformation
//      * to traverse every {@link ClassNode} in the AST
//      *
//      * @param clazzNode The next {@link ClassNode} to traverse
//      * @since 0.2.0
//      */
//     void visitClass(ClassNode clazzNode);
// }


// Path: asteroid-core/src/main/java/asteroid/AbstractGlobalTransformation.java
import static org.codehaus.groovy.runtime.DefaultGroovyMethods.newInstance;
import static asteroid.utils.InternalUtils.collect;
import java.util.List;
import org.codehaus.groovy.ast.ASTNode;
import org.codehaus.groovy.ast.ClassNode;
import org.codehaus.groovy.control.SourceUnit;
import org.codehaus.groovy.transform.AbstractASTTransformation;
import asteroid.transformer.Transformer;

package asteroid;




/**
 * This class applies all transformers provided by the method
 * getTransformers in order to all class nodes present in a given
 * source unit instance.
 *
 * This way you should think of an instance of {@link
 * AbstractGlobalTransformation} as a set of {@link Transformer}
 * instances.
 * <pre class="inner"><code>
 * class AddTransformation extends AbstractGlobalTransformation {
 *     {@literal @}Override
 *     List{@literal <}Class{@literal <}Transformer{@literal >}{@literal >} getTransformers() {
 *         return [AddPropertyToInnerClass, AddTraitTransformer]
 *     }
 * }
 * </code></pre>
 *
 * @since 0.2.0
 * @see Transformer
 */
public abstract class AbstractGlobalTransformation extends AbstractASTTransformation {

    /**
     * {@inheritDoc}
     *
     * @since 0.2.0
     */
    @SuppressWarnings({"PMD.UnusedMethodParameter", "PMD.AvoidInstantiatingObjectsInLoops"})
    public void visit(final ASTNode[] nodes, final SourceUnit sourceUnit) {
        final List<ClassNode> classNodeList = (List<ClassNode>) collect(sourceUnit.getAST().getClasses());