All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.arquillian.spacelift.task.NoArgConstructorTaskFactory Maven / Gradle / Ivy

There is a newer version: 1.0.2
Show newest version
package org.arquillian.spacelift.task;

import java.util.Arrays;
import java.util.Collection;
import java.util.List;

public class NoArgConstructorTaskFactory>
    implements TaskFactory {

    private final Class taskDef;
    private final List aliases;

    public NoArgConstructorTaskFactory(Class taskDef, String... aliases) {
        this.taskDef = taskDef;
        this.aliases = Arrays.asList(aliases);
    }

    @Override
    public TASK create() {
        TASK task = SecurityActions.newInstance(taskDef);
        return new TaskFactory.ExecutionServiceInjector().inject(task);
    }

    @Override
    public Collection aliases() {
        return aliases;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy