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

com.artemis.cli.MatrixCommand Maven / Gradle / Ivy

There is a newer version: 2.3.0
Show newest version
package com.artemis.cli;

import java.io.File;

import com.artemis.cli.converter.FileOutputConverter;
import com.artemis.cli.converter.FolderConverter;
import com.artemis.model.ComponentDependencyMatrix;
import com.beust.jcommander.Parameter;
import com.beust.jcommander.Parameters;

@Parameters(
		commandDescription="Generate the Component Dependency Matrix from existing classes")
public class MatrixCommand {
	static final String COMMAND = "matrix";
	
	@Parameter(
		names = {"-l", "--label"},
		description = "Project name, used as page title",
		required = false)
	private String projectName = "Unknown artemis project";
	
	@Parameter(
		names = {"-c", "--class-folder"},
		description = "Root class folder",
		converter = FolderConverter.class,
		required = true)
	private File classRoot;
	
	@Parameter(
		names = {"-o", "--output"},
		description = "Save to file, destination may be given as a folder path",
		converter = FileOutputConverter.class,
		required = false)
	private File output = new File("matrix.html");
	
	void execute() {
		ComponentDependencyMatrix cdm = 
			new ComponentDependencyMatrix(projectName, classRoot, output);
		cdm.process();
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy