org.codehaus.plexus.classworlds.launcher

## Class ConfigurationParser

- java.lang.Object
- - org.codehaus.plexus.classworlds.launcher.ConfigurationParser

    public class ConfigurationParser
    extends Object

Event based launcher configuration parser, delegating effective configuration handling to ConfigurationHandler.

Author:
  bob mcwhirter, Jason van Zyl, Igor Fedorenko
See Also:
  `ConfigurationHandler`

### Field Summary

Fields
`static String` `IMPORT_PREFIX`
`static String` `LOAD_PREFIX`
`static String` `MAIN_PREFIX`
`static String` `OPTIONALLY_PREFIX` Optionally spec prefix.
`static String` `SET_PREFIX`

### Constructor Summary

Constructors
Constructor and Description
`ConfigurationParser(ConfigurationHandler handler, Properties systemProperties)`

### Method Summary

Methods
`protected String` `filter(String text)` Filter a string for system properties.
`protected void` `loadGlob(String line, boolean optionally)` Load a glob into the specified classloader.
`void` `parse(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`

### Field Detail

#### MAIN_PREFIX

    public static final String MAIN_PREFIX

See Also:
  Constant Field Values

#### SET_PREFIX

    public static final String SET_PREFIX

See Also:
  Constant Field Values

#### IMPORT_PREFIX

    public static final String IMPORT_PREFIX

See Also:
  Constant Field Values

#### LOAD_PREFIX

    public static final String LOAD_PREFIX

See Also:
  Constant Field Values

#### OPTIONALLY_PREFIX

    public static final String OPTIONALLY_PREFIX

Optionally spec prefix.

See Also:
  Constant Field Values

### Constructor Detail

#### ConfigurationParser

    public ConfigurationParser(ConfigurationHandler handler,
                       Properties systemProperties)

### Method Detail

#### parse

    public void parse(InputStream is)
               throws IOException,
                      ConfigurationException,
                      DuplicateRealmException,
                      NoSuchRealmException

Parse launcher configuration file and send events to the handler.

Throws:
  `IOException`
  `ConfigurationException`
  `DuplicateRealmException`
  `NoSuchRealmException`

#### loadGlob

    protected void loadGlob(String line,
                boolean optionally)
                     throws MalformedURLException,
                            FileNotFoundException,
                            ConfigurationException

Load a glob into the specified classloader.

Parameters:
  `line` - The path configuration line.
  `optionally` - Whether the path is optional or required
Throws:
  `MalformedURLException` - If the line does not represent a valid path element.
  `FileNotFoundException` - If the line does not represent a valid path element in the filesystem.
  `ConfigurationException`

#### filter

    protected String filter(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.