Class ConfigurationParser
java.lang.Object
org.codehaus.plexus.classworlds.launcher.ConfigurationParser
Event based launcher configuration parser, delegating effective configuration handling to ConfigurationHandler.
- Author:
- bob mcwhirter, Jason van Zyl, Igor Fedorenko
- See Also:
-
Field Summary
-
Constructor Summary
ConstructorDescriptionConfigurationParser
(ConfigurationHandler handler, Properties systemProperties) -
Method Summary
Modifier and TypeMethodDescriptionprotected String
Filter a string for system properties.protected void
Load a glob into the specified classloader.void
parse
(InputStream is) Parse launcher configuration file and send events to the handler.
-
Field Details
-
MAIN_PREFIX
- See Also:
-
SET_PREFIX
- See Also:
-
IMPORT_PREFIX
- See Also:
-
LOAD_PREFIX
- See Also:
-
OPTIONALLY_PREFIX
Optionally spec prefix.- See Also:
-
-
Constructor Details
-
ConfigurationParser
-
-
Method Details
-
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
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.
-