| java.lang.Object com.martiansoftware.nailgun.AliasManager
AliasManager | public class AliasManager (Code) | | An AliasManager is used to store and lookup command Aliases by name.
See Alias for more details.
author: Marty Lamb |
Constructor Summary | |
public | AliasManager() Creates a new AliasManager, populating it with
default Aliases. |
AliasManager | public AliasManager()(Code) | | Creates a new AliasManager, populating it with
default Aliases.
|
addAlias | public void addAlias(Alias alias)(Code) | | Adds an Alias, replacing any previous entries with the
same name.
Parameters: alias - the Alias to add |
getAlias | public Alias getAlias(String aliasName)(Code) | | Returns the Alias with the specified name
Parameters: aliasName - the name of the Alias to retrieve the requested Alias, or null if no such Aliasis defined in this AliasManager. |
getAliases | public Set getAliases()(Code) | | Returns a Set that is a snapshot of the Alias list.
Modifications to this Set will not impact the AliasManager
in any way.
a Set that is a snapshot of the Alias list. |
loadFromProperties | public void loadFromProperties(java.util.Properties properties)(Code) | | Loads Aliases from a java.util.Properties file located at the
specified URL. The properties must be of the form:
[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. |
removeAlias | public void removeAlias(String aliasName)(Code) | | Removes the Alias with the specified name from the AliasManager.
If no such Alias exists in this AliasManager, this method has no effect.
Parameters: aliasName - the name of the Alias to remove |
|
|