Example usage for org.springframework.boot.cli.command.init ProjectType isDefaultType

List of usage examples for org.springframework.boot.cli.command.init ProjectType isDefaultType

Introduction

In this page you can find the example usage for org.springframework.boot.cli.command.init ProjectType isDefaultType.

Prototype

boolean isDefaultType() 

Source Link

Usage

From source file:org.springframework.boot.cli.command.init.ServiceCapabilitiesReportGenerator.java

private void reportAvilableProjectTypes(InitializrServiceMetadata metadata, StringBuilder report) {
    report.append("Available project types:" + NEW_LINE);
    report.append("------------------------" + NEW_LINE);
    List<String> typeIds = new ArrayList<String>(metadata.getProjectTypes().keySet());
    Collections.sort(typeIds);/* w w w . j a  v  a  2  s. c o  m*/
    for (String typeId : typeIds) {
        ProjectType type = metadata.getProjectTypes().get(typeId);
        report.append(typeId + " -  " + type.getName());
        if (!type.getTags().isEmpty()) {
            reportTags(report, type);
        }
        if (type.isDefaultType()) {
            report.append(" (default)");
        }
        report.append(NEW_LINE);
    }
}