Class GenerateCommand

    • Constructor Detail

      • GenerateCommand

        public GenerateCommand()
        Constructor needed for Picocli
    • Method Detail

      • areArgumentsValid

        public Boolean areArgumentsValid()
        Validates the user arguments in the context of the generate command. Tries to check whether all the input files and the output root path are valid.
        Returns:
        true when these arguments are correct
      • generate

        public void generate​(File inputFile,
                             File inputProject,
                             List<? extends com.devonfw.cobigen.api.to.GenerableArtifact> finalTos,
                             com.devonfw.cobigen.api.CobiGen cg,
                             List<Class<?>> utilClasses,
                             Class<?> c)
        Generates new templates or increments using the inputFile from the inputProject.
        Parameters:
        inputFile - input file the user wants to generate code from
        inputProject - input project where the input file is located. We need this in order to build the classpath of the input file
        finalTos - the list of increments or templates that the user is going to use for generation
        cg - Initialized CobiGen instance
        c - class type, specifies whether Templates or Increments should be preprocessed
        utilClasses - util classes loaded from the templates jar
      • getUserInput

        public static String getUserInput()
        Asks the user for input and returns the value
        Returns:
        String containing the user input