Class ParserSettings


  • public class ParserSettings
    extends java.lang.Object
    Contains settings to be used by the Parser while parsing JNLP files. Immutable and therefore thread-safe.
    • Constructor Detail

      • ParserSettings

        public ParserSettings()
        Create a new ParserSettings with the defautl parser settings
      • ParserSettings

        public ParserSettings​(boolean strict,
                              boolean extensionAllowed,
                              boolean malformedXmlAllowed)
        Create a new ParserSettings object
        Parameters:
        strict - true if parser should be stric
        extensionAllowed - true if extensions are allowed
        malformedXmlAllowed - true if xml sanitizer should be used
    • Method Detail

      • isExtensionAllowed

        public boolean isExtensionAllowed()
        Returns:
        true if extensions to the spec are allowed
      • isMalformedXmlAllowed

        public boolean isMalformedXmlAllowed()
        Returns:
        true if parsing malformed xml is allowed
      • isStrict

        public boolean isStrict()
        Returns:
        true if strict parsing mode is to be used
      • getGlobalParserSettings

        public static ParserSettings getGlobalParserSettings()
        Returns:
        the global parser settings in use.
      • setGlobalParserSettings

        public static void setGlobalParserSettings​(ParserSettings parserSettings)
        Set the global ParserSettings to match the given settings.
        Parameters:
        parserSettings - to be used
      • setGlobalParserSettingsFromOptionParser

        public static ParserSettings setGlobalParserSettingsFromOptionParser​(net.sourceforge.jnlp.util.optionparser.OptionParser optionParser)
        Parameters:
        optionParser - to be read as source for globaPArserSettings
        Returns:
        the ParserSettings to be used according to arguments specified at boot on the command line. These settings are also stored so they can be retrieved at a later time.