org.arquillian.spacelift.task.NoArgConstructorTaskFactory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of arquillian-spacelift-api Show documentation
Show all versions of arquillian-spacelift-api Show documentation
Arquillian Process and Package Manager
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