Class ConfigurationParser


  • public class ConfigurationParser
    extends java.lang.Object
    Event based launcher configuration parser, delegating effective configuration handling to ConfigurationHandler.
    See Also:
    ConfigurationHandler
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private boolean canIgnore​(java.lang.String line)
      Determine if a line can be ignored because it is a comment or simply blank.
      protected java.lang.String filter​(java.lang.String text)
      Filter a string for system properties.
      protected void loadGlob​(java.lang.String line, boolean optionally)
      Load a glob into the specified classloader.
      void parse​(java.io.InputStream is)
      Parse launcher configuration file and send events to the handler.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ConfigurationParser

        public ConfigurationParser​(ConfigurationHandler handler,
                                   java.util.Properties systemProperties)
    • Method Detail

      • loadGlob

        protected void loadGlob​(java.lang.String line,
                                boolean optionally)
                         throws java.net.MalformedURLException,
                                java.io.FileNotFoundException,
                                ConfigurationException
        Load a glob into the specified classloader.
        Parameters:
        line - The path configuration line.
        optionally - Whether the path is optional or required
        Throws:
        java.net.MalformedURLException - If the line does not represent a valid path element.
        java.io.FileNotFoundException - If the line does not represent a valid path element in the filesystem.
        ConfigurationException - will never occur (thrown for backwards compatibility)
      • filter

        protected java.lang.String filter​(java.lang.String text)
                                   throws ConfigurationException
        Filter a string for system properties.
        Parameters:
        text - The text to filter.
        Returns:
        The filtered text.
        Throws:
        ConfigurationException - If the property does not exist or if there is a syntax error.
      • canIgnore

        private boolean canIgnore​(java.lang.String line)
        Determine if a line can be ignored because it is a comment or simply blank.
        Parameters:
        line - The line to test.
        Returns:
        true if the line is ignorable, otherwise false.