Class StencilArgsParser


  • public final class StencilArgsParser
    extends java.lang.Object
    • Field Detail

      • OUTPUT_DIR

        public static final ArgsParser.ParamMarker<java.io.File> OUTPUT_DIR
        Result files are placed in this directory.
      • OVERWRITE

        public static final ArgsParser.ParamMarker<java.lang.Boolean> OVERWRITE
        Result files will be overwritten when already exist in target directory.
      • SHOW_HELP

        public static final ArgsParser.ParamMarker<java.lang.Boolean> SHOW_HELP
        Should display help message.
      • SHOW_VERSION

        public static final ArgsParser.ParamMarker<java.lang.Boolean> SHOW_VERSION
        Should display version info.
      • ONLY_INLCUDES

        public static final ArgsParser.ParamMarker<java.lang.Boolean> ONLY_INLCUDES
        Only evaluate fragment include directives.
      • JOBS_FILE

        public static final ArgsParser.ParamMarker<java.io.File> JOBS_FILE
        A file that contains job data.
    • Method Detail

      • getOutputDirectory

        public static java.io.File getOutputDirectory​(ArgsParser.ParseResult result)
        Finds output directory in parsed parameters or returns current working directory.
        Returns:
        output directory where rendered files will be put
        Throws:
        java.lang.NullPointerException - if param is null
        java.lang.IllegalArgumentException - if output file path does not exist or is not a directory
      • getOutputOverwritten

        public static java.lang.Boolean getOutputOverwritten​(ArgsParser.ParseResult result)
        Finds output directory in parsed parameters or returns current working directory.
        Returns:
        should resulting files override existing files?
        Throws:
        java.lang.NullPointerException - if param is null
      • getOnlyIncludes

        public static java.lang.Boolean getOnlyIncludes​(ArgsParser.ParseResult result)
        If specified, only inlclude directives will be evaluated in template.
        Returns:
        default false
        Throws:
        java.lang.NullPointerException - if param is null