Interface OptionConfiguration

    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      boolean getBooleanOption​(java.lang.String name)
      Determines the boolean value of the option with the given name.
      boolean getBooleanOption​(java.lang.String name, boolean defaultValue)
      Determines the boolean value of the option with the given name.
      @Nullable java.lang.String getOption​(java.lang.String name)
      Determines the value of the option with the given name.
      java.lang.String getOption​(java.lang.String name, java.lang.String defaultValue)
      Determines the boolean value of the option with the given name.
      java.util.Map<java.lang.String,​java.lang.String> getOptions()
      Return all active options for this checker.
      default java.util.List<java.lang.String> getStringsOption​(java.lang.String name, char separator)
      Determines the string list value of the option with the given name.
      java.util.List<java.lang.String> getStringsOption​(java.lang.String name, char separator, java.util.List<java.lang.String> defaultValue)
      Determines the string list value of the option with the given name.
      default java.util.List<java.lang.String> getStringsOption​(java.lang.String name, java.lang.String separator)
      Determines the string list value of the option with the given name.
      java.util.List<java.lang.String> getStringsOption​(java.lang.String name, java.lang.String separator, java.util.List<java.lang.String> defaultValue)
      Determines the string list value of the option with the given name.
      java.util.Set<java.lang.String> getSupportedOptions()
      Map the Checker Framework version of SupportedOptions to the standard annotation provided version SupportedOptions.
      boolean hasOption​(java.lang.String name)
      Check whether the given option is provided.
    • Method Detail

      • getOptions

        java.util.Map<java.lang.String,​java.lang.String> getOptions()
        Return all active options for this checker.
        Returns:
        all active options for this checker
      • hasOption

        boolean hasOption​(java.lang.String name)
        Check whether the given option is provided.

        Note that getOption(java.lang.String) can still return null even if hasOption returns true: this happens e.g. for -Amyopt

        Parameters:
        name - the name of the option to check
        Returns:
        true if the option name was provided, false otherwise
      • getOption

        @Nullable java.lang.String getOption​(java.lang.String name)
        Determines the value of the option with the given name.

        Note that getOption can still return null even if hasOption(java.lang.String) returns true: this happens e.g. for -Amyopt

        Parameters:
        name - the name of the option to check
        Returns:
        the value of the option with the given name
        See Also:
        getOption(String,String)
      • getOption

        java.lang.String getOption​(java.lang.String name,
                                   java.lang.String defaultValue)
        Determines the boolean value of the option with the given name. Returns defaultValue if the option is not set.
        Parameters:
        name - the name of the option to check
        defaultValue - the default value to return if the option is not set
        Returns:
        the value of the option with the given name, or defaultValue
        See Also:
        getOption(String)
      • getBooleanOption

        boolean getBooleanOption​(java.lang.String name)
        Determines the boolean value of the option with the given name. Returns false if the option is not set.
        Parameters:
        name - the name of the option to check
        Returns:
        the boolean value of the option
      • getBooleanOption

        boolean getBooleanOption​(java.lang.String name,
                                 boolean defaultValue)
        Determines the boolean value of the option with the given name. Returns the given default value if the option is not set.
        Parameters:
        name - the name of the option to check
        defaultValue - the default value to use if the option is not set
        Returns:
        the boolean value of the option
      • getStringsOption

        default java.util.List<java.lang.String> getStringsOption​(java.lang.String name,
                                                                  char separator)
        Determines the string list value of the option with the given name. The option's value is split on the given separator. Returns an empty list if the option is not set.
        Parameters:
        name - the name of the option to check
        separator - the separator for list elements
        Returns:
        the list of options
      • getStringsOption

        java.util.List<java.lang.String> getStringsOption​(java.lang.String name,
                                                          char separator,
                                                          java.util.List<java.lang.String> defaultValue)
        Determines the string list value of the option with the given name. The option's value is split on the given separator. Returns the given default value if the option is not set.
        Parameters:
        name - the name of the option to check
        separator - the separator for list elements
        defaultValue - the default value to use if the option is not set
        Returns:
        the list of options
      • getStringsOption

        default java.util.List<java.lang.String> getStringsOption​(java.lang.String name,
                                                                  java.lang.String separator)
        Determines the string list value of the option with the given name. The option's value is split on the given separator. Returns an empty list if the option is not set.
        Parameters:
        name - the name of the option to check
        separator - the separator for list elements
        Returns:
        the list of options
      • getStringsOption

        java.util.List<java.lang.String> getStringsOption​(java.lang.String name,
                                                          java.lang.String separator,
                                                          java.util.List<java.lang.String> defaultValue)
        Determines the string list value of the option with the given name. The option's value is split on the given separator. Returns the given default value if the option is not set.
        Parameters:
        name - the name of the option to check
        separator - the separator for list elements
        defaultValue - the default value to use if the option is not set
        Returns:
        the list of options
      • getSupportedOptions

        java.util.Set<java.lang.String> getSupportedOptions()
        Map the Checker Framework version of SupportedOptions to the standard annotation provided version SupportedOptions.
        Returns:
        the supported options