Package com.artemis.cli

Source Code of com.artemis.cli.MatrixCommand

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();
  }
}
TOP

Related Classes of com.artemis.cli.MatrixCommand

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.