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

public abstract class BuilderCommand extends BaseCommand implements Callable<Integer>
Abstract class to be extended by interactive commands.
Since:
3.8.0
Author:
Sergio del Amo
  • Field Details

  • Constructor Details

  • Method Details

    • createGenerateOptions

      protected abstract GenerateOptions createGenerateOptions(org.jline.reader.LineReader reader)
    • call

      public Integer call() throws Exception
      Specified by:
      call in interface Callable<Integer>
      Throws:
      Exception
    • getFeatures

      protected List<String> getFeatures(ApplicationType applicationType, org.jline.terminal.Terminal terminal, List<Feature> features)
    • getBuildTool

      protected BuildTool getBuildTool(org.jline.reader.LineReader reader, Language language)
    • getJdkVersion

      protected JdkVersion getJdkVersion(org.jline.reader.LineReader reader)
    • getJdkVersionCandidates

      protected List<String> getJdkVersionCandidates()
    • getYesOrNo

      protected YesOrNo getYesOrNo(org.jline.reader.LineReader reader)
    • 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

      protected Project getProject(org.jline.reader.LineReader reader)
    • getOptions

      protected Options getOptions(org.jline.reader.LineReader reader)
    • getLanguage

      protected Language getLanguage(org.jline.reader.LineReader reader)
    • getTestFramework

      protected TestFramework getTestFramework(org.jline.reader.LineReader reader, Language language)