com.martiansoftware.nailgun
Class Alias
- Comparable
public class Alias
implements Comparable
Provides a means to map memorable, short names to classes in order
to make the issuing of commands more convenient. For example, an
Alias can map the "mycommand
" command to the com.yourdomain.yourpackage.YourClass
class. Obviously, it's a lot easier to type "ng mycommand
" than the fully
qualified class name.
Alias(String name, String description, Class clazz) - Creates a new Alias with the specified properties.
|
int | compareTo(Object o) - Compares Alias names - no other fields are compared.
|
boolean | equals(Object o) - Checks whether two Aliases have the same name.
|
Class | getAliasedClass() - Returns the
Class object providing a static main() or nailMain() method
for this command.
|
String | getDescription() - Returns a description for the aliased command
|
String | getName() - Returns the name of the aliased command
|
int | hashCode()
|
Alias
public Alias(String name,
String description,
Class clazz)
Creates a new Alias with the specified properties.
name
- the alias name (short command)description
- a description of the commandclazz
- the class implementing the command
compareTo
public int compareTo(Object o)
Compares Alias names - no other fields are compared.
Comparable.compareTo(Object)
equals
public boolean equals(Object o)
Checks whether two Aliases have the same name. Does not
compare any other fields.
o
- the other Alias to check
- true if the specified Alias has the same name as this Alias.
getAliasedClass
public Class getAliasedClass()
Returns the Class
object providing a static main()
or nailMain()
method
for this command.
- the
Class
object providing a static main()
or nailMain()
method
for this command.
getDescription
public String getDescription()
Returns a description for the aliased command
- a description for the aliased command
getName
public String getName()
Returns the name of the aliased command
- the name of the aliased command
hashCode
public int hashCode()
© 2004, Martian Software, Inc.