Package net.sourceforge.jnlp
Class ParserSettings
- java.lang.Object
-
- net.sourceforge.jnlp.ParserSettings
-
public class ParserSettings extends java.lang.ObjectContains settings to be used by the Parser while parsing JNLP files. Immutable and therefore thread-safe.
-
-
Constructor Summary
Constructors Constructor Description ParserSettings()Create a new ParserSettings with the defautl parser settingsParserSettings(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 Description static ParserSettingsgetGlobalParserSettings()booleanisExtensionAllowed()booleanisMalformedXmlAllowed()booleanisStrict()static voidsetGlobalParserSettings(ParserSettings parserSettings)Set the global ParserSettings to match the given settings.static ParserSettingssetGlobalParserSettingsFromOptionParser(net.sourceforge.jnlp.util.optionparser.OptionParser optionParser)
-
-
-
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 stricextensionAllowed- true if extensions are allowedmalformedXmlAllowed- 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.
-
-