Package io.micronaut.starter.cli.command
Class BuilderCommand
java.lang.Object
io.micronaut.starter.cli.command.BaseCommand
io.micronaut.starter.cli.command.BuilderCommand
- All Implemented Interfaces:
ConsoleOutput
,Callable<Integer>
- Direct Known Subclasses:
CreateBuilderCommand
,CreateChatBotBuilderCommand
,CreateLambdaBuilderCommand
Abstract class to be extended by interactive commands.
- Since:
- 3.8.0
- Author:
- Sergio del Amo
-
Field Summary
Fields inherited from class io.micronaut.starter.cli.command.BaseCommand
commonOptions, spec
Fields inherited from interface io.micronaut.starter.io.ConsoleOutput
NOOP
-
Constructor Summary
ModifierConstructorDescriptionprotected
BuilderCommand
(ProjectGenerator projectGenerator, List<Feature> features) -
Method Summary
Modifier and TypeMethodDescriptioncall()
protected abstract GenerateOptions
createGenerateOptions
(org.jline.reader.LineReader reader) protected BuildTool
getBuildTool
(org.jline.reader.LineReader reader, Language language) protected <T extends Enum<T>>
TgetEnumOption
(Class<T> enumClass, Function<T, String> titleFunc, T defaultOption, org.jline.reader.LineReader reader) protected <T extends Enum<T>>
TgetEnumOption
(T[] types, Function<T, String> titleFunc, T defaultOption, org.jline.reader.LineReader reader) protected Feature
getFeatureOption
(List<Feature> features, Function<Feature, String> titleFunc, Feature defaultOption, org.jline.reader.LineReader reader) getFeatures
(ApplicationType applicationType, org.jline.terminal.Terminal terminal, List<Feature> features) protected JdkVersion
getJdkVersion
(org.jline.reader.LineReader reader) protected Language
getLanguage
(org.jline.reader.LineReader reader) protected String
getListOption
(List<String> types, Function<String, String> titleFunc, String defaultOption, org.jline.reader.LineReader reader) protected int
getOption
(org.jline.reader.LineReader reader, int max) protected Options
getOptions
(org.jline.reader.LineReader reader) protected Project
getProject
(org.jline.reader.LineReader reader) protected TestFramework
getTestFramework
(org.jline.reader.LineReader reader, Language language) protected YesOrNo
getYesOrNo
(org.jline.reader.LineReader reader) Methods inherited from class io.micronaut.starter.cli.command.BaseCommand
err, errWriter, getOperatingSystem, getSpec, green, out, outWriter, red, showStacktrace, verbose, warning
-
Field Details
-
PROMPT
-
projectGenerator
-
features
-
-
Constructor Details
-
BuilderCommand
-
-
Method Details
-
createGenerateOptions
-
call
-
getFeatures
protected List<String> getFeatures(ApplicationType applicationType, org.jline.terminal.Terminal terminal, List<Feature> features) -
getBuildTool
-
getJdkVersion
-
getJdkVersionCandidates
-
getYesOrNo
-
getOption
protected int getOption(org.jline.reader.LineReader reader, int max) throws org.jline.reader.UserInterruptException, org.jline.reader.EndOfFileException - Throws:
org.jline.reader.UserInterruptException
org.jline.reader.EndOfFileException
-
getEnumOption
protected <T extends Enum<T>> T getEnumOption(T[] types, Function<T, String> titleFunc, T defaultOption, org.jline.reader.LineReader reader) throws org.jline.reader.UserInterruptException, org.jline.reader.EndOfFileException- Throws:
org.jline.reader.UserInterruptException
org.jline.reader.EndOfFileException
-
getListOption
protected String getListOption(List<String> types, Function<String, String> titleFunc, String defaultOption, org.jline.reader.LineReader reader) throws org.jline.reader.UserInterruptException, org.jline.reader.EndOfFileException- Throws:
org.jline.reader.UserInterruptException
org.jline.reader.EndOfFileException
-
getEnumOption
protected <T extends Enum<T>> T getEnumOption(Class<T> enumClass, Function<T, String> titleFunc, T defaultOption, org.jline.reader.LineReader reader) throws org.jline.reader.UserInterruptException, org.jline.reader.EndOfFileException- Throws:
org.jline.reader.UserInterruptException
org.jline.reader.EndOfFileException
-
getFeatureOption
protected Feature getFeatureOption(List<Feature> features, Function<Feature, String> titleFunc, Feature defaultOption, org.jline.reader.LineReader reader) throws org.jline.reader.UserInterruptException, org.jline.reader.EndOfFileException- Throws:
org.jline.reader.UserInterruptException
org.jline.reader.EndOfFileException
-
getProject
-
getOptions
-
getLanguage
-
getTestFramework
-