ParserSettings (IcedTea-Web: NetX )
Keywords: net.sourceforge.jnlp.ParserSettings class
Date: 2021-11-09

net.sourceforge.jnlp

## Class ParserSettings

- java.lang.Object
- - net.sourceforge.jnlp.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 Summary

    Constructors
    Constructor and Description
    `ParserSettings()` Create a new ParserSettings with the defautl parser settings
    `ParserSettings(boolean strict, boolean extensionAllowed, boolean malformedXmlAllowed)` Create a new ParserSettings object

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static ParserSettings` | `getGlobalParserSettings()`
    `boolean` | `isExtensionAllowed()`
    `boolean` | `isMalformedXmlAllowed()`
    `boolean` | `isStrict()`
    `static void` | `setGlobalParserSettings(ParserSettings parserSettings)` Set the global ParserSettings to match the given settings.
    `static ParserSettings` | `setGlobalParserSettingsFromOptionParser(net.sourceforge.jnlp.util.optionparser.OptionParser optionParser)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### 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.

Submit a bug or feature