|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.martiansoftware.nailgun.Alias
public class Alias
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.
Constructor Summary | |
---|---|
Alias(String name,
String description,
Class clazz)
Creates a new Alias with the specified properties. |
Method Summary | |
---|---|
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()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Alias(String name, String description, Class clazz)
name
- the alias name (short command)description
- a description of the commandclazz
- the class implementing the commandMethod Detail |
---|
public Class getAliasedClass()
Class
object providing a static main()
or nailMain()
method
for this command.
Class
object providing a static main()
or nailMain()
method
for this command.public String getName()
public String getDescription()
public int hashCode()
hashCode
in class Object
Object.hashCode()
public boolean equals(Object o)
equals
in class Object
o
- the other Alias to check
public int compareTo(Object o)
compareTo
in interface Comparable
Comparable.compareTo(Object)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |