Class Prop


  • public final class Prop
    extends Object
    This class contains constants and system properties which are used all around the project.
    Author:
    BaseX Team 2005-23, BSD License, Christian Gruen
    • Field Detail

      • VERSION

        public static final String VERSION
        Code version (may contain major, minor and optional patch number).
      • PROJECT

        public static final String PROJECT
        Project name.
      • NL

        public static final String NL
        System-specific newline string.
      • ENCODING

        public static final String ENCODING
        Returns the system's default encoding.
      • MAC

        public static final boolean MAC
        Flag denoting if OS belongs to Mac family.
      • WIN

        public static final boolean WIN
        Flag denoting if OS belongs to Windows family.
      • CASE

        public static final boolean CASE
        Respect lower/upper case when doing file comparisons.
      • LOCATION

        public static final URL LOCATION
        Application URL.
      • TEMPDIR

        public static final String TEMPDIR
        System's temporary directory.
      • HOMEDIR

        public static final String HOMEDIR
        Project home directory.
      • language

        public static String language
        Language (applied after restart).
      • debug

        public static boolean debug
        Debug mode.
      • gui

        public static boolean gui
        GUI mode.
    • Method Detail

      • put

        public static void put​(Option<?> option,
                               String value)
        Sets a global option.
        Parameters:
        option - option
        value - value
      • put

        public static void put​(String name,
                               String value)
        Sets a global option.
        Parameters:
        name - name of the option
        value - value
      • clear

        public static void clear()
        Removes all global options.
      • get

        public static String get​(String name)
        Returns a system property or global option. System properties override global options.
        Parameters:
        name - name of the option
        Returns:
        global option
      • entries

        public static Set<Map.Entry<String,​String>> entries()
        Returns all global options and system properties. System properties override global options.
        Returns:
        entry set
      • setSystem

        public static void setSystem​(String name,
                                     String value)
        Sets a system property if it has not been set before.
        Parameters:
        name - name of the property
        value - value