com.martiansoftware.nailgun
public class AliasManager extends Object
Constructor Summary | |
---|---|
AliasManager()
Creates a new AliasManager, populating it with
default Aliases. |
Method Summary | |
---|---|
void | addAlias(Alias alias)
Adds an Alias, replacing any previous entries with the
same name. |
Alias | getAlias(String aliasName)
Returns the Alias with the specified name |
Set | getAliases()
Returns a Set that is a snapshot of the Alias list.
|
void | loadFromProperties(Properties properties)
Loads Aliases from a java.util.Properties file located at the
specified URL. |
void | removeAlias(String aliasName)
Removes the Alias with the specified name from the AliasManager.
|
Parameters: alias the Alias to add
Parameters: aliasName the name of the Alias to retrieve
Returns: the requested Alias, or null if no such Alias is defined in this AliasManager.
Returns: a Set that is a snapshot of the Alias list.
[alias name]=[fully qualified classname]
each of which may have an optional
[alias name].desc=[alias description]
For example, to create an alias called "myprog
" for
class com.mydomain.myapp.MyProg
, the following properties
would be defined:
myprog=com.mydomain.myapp.MyProg
myprog.desc=Runs my program.
Parameters: properties the Properties to load.
Parameters: aliasName the name of the Alias to remove