|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.cometway.states.ReflectionCommand
public class ReflectionCommand
This implementation of CommandInterface using the reflection API to invoke a public method of any Object.
| Constructor Summary | |
|---|---|
ReflectionCommand(java.lang.String name,
java.lang.Object objRef,
java.lang.String methodName)
Constructor for this class. |
|
| Method Summary | |
|---|---|
void |
execute()
Executes this command. |
java.lang.String |
getName()
Returns the name of this command. |
java.lang.String |
toString()
Returns the String representation of this command. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ReflectionCommand(java.lang.String name,
java.lang.Object objRef,
java.lang.String methodName)
name - the name of this command.objRef - a reference to the Object whose method will be invokedmethodName - name of the method that will be invoked (method must not have any parameters)| Method Detail |
|---|
public void execute()
throws CommandException
execute in interface CommandInterfaceCommandException - There was a problem executing the command.public java.lang.String getName()
getName in interface CommandInterfacepublic java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||