Class ConfigurationParser
java.lang.Object
org.codehaus.plexus.classworlds.launcher.ConfigurationParser
Event based launcher configuration parser, delegating effective configuration handling to ConfigurationHandler.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ConfigurationHandler
static final String
static final String
static final String
static final String
Optionally spec prefix.static final String
private Properties
-
Constructor Summary
ConstructorsConstructorDescriptionConfigurationParser
(ConfigurationHandler handler, Properties systemProperties) -
Method Summary
Modifier and TypeMethodDescriptionprivate boolean
Determine if a line can be ignored because it is a comment or simply blank.protected 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:
-
handler
-
systemProperties
-
-
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.
-
canIgnore
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, otherwisefalse
.
-