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 Modifier and Type Field Description 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 Description ConfigurationParser(ConfigurationHandler handler, Properties systemProperties)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.
-
-
-
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.- Parameters:
is
- the inputstream- Throws:
IOException
- when IOException occursConfigurationException
- when ConfigurationException occursDuplicateRealmException
- when realm already existsNoSuchRealmException
- when realm doesn't exist
-
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
- will never occur (thrown for backwards compatibility)
-
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.
-
-