org.codehaus.plexus.classworlds.launcher
public class Configurator extends Object
Launcher configurator.
Version: $Id$
| Field Summary | |
|---|---|
| Map | configuredRealms
Processed Realms. |
| static String | IMPORT_PREFIX |
| Launcher | launcher
The launcher to configure. |
| static String | LOAD_PREFIX |
| static String | MAIN_PREFIX |
| static String | OPTIONALLY_PREFIX
Optionally spec prefix. |
| static String | SET_PREFIX |
| ClassWorld | world |
| Constructor Summary | |
|---|---|
| Configurator(Launcher launcher)
Construct.
| |
| Configurator(ClassWorld world)
Construct.
| |
| Method Summary | |
|---|---|
| void | associateRealms()
Associate parent realms with their children. |
| boolean | canIgnore(String line)
Determine if a line can be ignored because it is
a comment or simply blank.
|
| void | configure(InputStream is)
Configure from a file.
|
| protected String | filter(String text)
Filter a string for system properties.
|
| protected void | loadGlob(String line, ClassRealm realm)
Load a glob into the specified classloader.
|
| protected void | loadGlob(String line, ClassRealm realm, boolean optionally)
Load a glob into the specified classloader.
|
| void | setClassWorld(ClassWorld world)
set world.
this setter is provided so you can use the same configurator to configure several "worlds"
|
Parameters: launcher The launcher to configure.
Parameters: world The classWorld to configure.
Parameters: line The line to test.
Returns: true if the line is ignorable,
otherwise false.
Parameters: is The config input stream
Throws: IOException If an error occurs reading the config file. MalformedURLException If the config file contains invalid URLs. ConfigurationException If the config file is corrupt. org.codehaus.plexus.classworlds.realm.DuplicateRealmException If the config file defines two realms with the same id. org.codehaus.plexus.classworlds.realm.NoSuchRealmException If the config file defines a main entry point in a non-existent realm.
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.
Parameters: line The path configuration line. realm The realm to populate
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.
Parameters: line The path configuration line. realm The realm to populate 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.
Parameters: world The classWorld to configure.