public class Alias
extends java.lang.Object
implements java.lang.Comparable
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 and Description |
|---|
Alias(java.lang.String name,
java.lang.String description,
java.lang.Class clazz)
Creates a new Alias with the specified properties.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(java.lang.Object o)
Compares Alias names - no other fields are compared.
|
boolean |
equals(java.lang.Object o)
Checks whether two Aliases have the same name.
|
java.lang.Class |
getAliasedClass()
Returns the
Class object providing a static main() or nailMain() method
for this command. |
java.lang.String |
getDescription()
Returns a description for the aliased command
|
java.lang.String |
getName()
Returns the name of the aliased command
|
int |
hashCode() |
public Alias(java.lang.String name,
java.lang.String description,
java.lang.Class clazz)
name - the alias name (short command)description - a description of the commandclazz - the class implementing the commandpublic java.lang.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 java.lang.String getName()
public java.lang.String getDescription()
public int hashCode()
hashCode in class java.lang.ObjectObject.hashCode()public boolean equals(java.lang.Object o)
equals in class java.lang.Objecto - the other Alias to checkpublic int compareTo(java.lang.Object o)
compareTo in interface java.lang.ComparableComparable.compareTo(Object)