Package jflex.core

Class OptionUtils


  • public class OptionUtils
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private OptionUtils()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void enableAllWarnings()
      Enable all warnings.
      static void enableWarning​(java.lang.String warning)
      Enable a warning type.
      static void set_unused_warning​(boolean unusedWarning)
      Warn on unused macros or not.
      static void setDefaultOptions()
      Sets all options back to default values.
      static void setDir​(java.io.File d)
      Set output directory
      static void setDir​(java.lang.String dirName)
      Set output directory
      static void setEncoding​(java.lang.String encodingName)
      Sets encoding for input files, and check availability of encoding on this JVM.
      static void setSkeleton​(java.io.File skel)  
      static void suppressAllWarnings()
      Suppress all warnings.
      static void suppressWarning​(java.lang.String warning)
      Suppress a warning type.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • OptionUtils

        private OptionUtils()
    • Method Detail

      • setEncoding

        public static void setEncoding​(java.lang.String encodingName)
        Sets encoding for input files, and check availability of encoding on this JVM.
      • setDefaultOptions

        public static void setDefaultOptions()
        Sets all options back to default values.
      • set_unused_warning

        public static void set_unused_warning​(boolean unusedWarning)
        Warn on unused macros or not.
        Parameters:
        unusedWarning - whether unused macros should be warned about.
      • setSkeleton

        public static void setSkeleton​(java.io.File skel)
      • setDir

        public static void setDir​(java.io.File d)
        Set output directory
        Parameters:
        d - the directory to write output files to
      • setDir

        public static void setDir​(java.lang.String dirName)
        Set output directory
        Parameters:
        dirName - the name of the directory to write output files to
      • enableWarning

        public static void enableWarning​(java.lang.String warning)
        Enable a warning type.
        Parameters:
        warning - the warning to enable, must match one of the ErrorMessages enum values.
        Throws:
        GeneratorException - if the warning is not known or not configurable.
        See Also:
        ErrorMessages
      • suppressWarning

        public static void suppressWarning​(java.lang.String warning)
        Suppress a warning type.
        Parameters:
        warning - the warning to suppress, must match one of the ErrorMessages enum values.
        Throws:
        GeneratorException - if the warning is not known or not configurable.
        See Also:
        ErrorMessages
      • enableAllWarnings

        public static void enableAllWarnings()
        Enable all warnings.
        See Also:
        ErrorMessages
      • suppressAllWarnings

        public static void suppressAllWarnings()
        Suppress all warnings.
        See Also:
        ErrorMessages