public void validate()

in freemarker-generator-cli/src/main/java/org/apache/freemarker/generator/cli/picocli/OutputGeneratorDefinition.java [54:70]


    public void validate(CommandLine commandLine) {
        if (templateSourceDefinition == null) {
            throw new ParameterException(commandLine, "No template defined to be rendered");
        }

        if (templateOutputDefinition != null && templateOutputDefinition.outputs.size() > 1) {
            throw new ParameterException(commandLine, "More than one output defined for a template");
        }

        if (dataSourceDefinition != null && dataSourceDefinition.dataSources != null) {
            for (String source : dataSourceDefinition.dataSources) {
                if (isFileSource(source) && (source.contains("*") || source.contains("?"))) {
                    throw new ParameterException(commandLine, "No wildcards supported for data source: " + source);
                }
            }
        }
    }