|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.cometway.states.ReflectionTransition
public class ReflectionTransition
This implementation of TransitionInterface uses the Java Reflection API to execute a specific method on the transition object. The transition object's method an Object parameter, and returns the name of the new State if the translation was successful; false otherwise.
| Constructor Summary | |
|---|---|
ReflectionTransition(java.lang.String name,
java.lang.Object objRef,
java.lang.String methodName)
Constructor for this transition. |
|
| Method Summary | |
|---|---|
java.lang.String |
execute()
Executes the transition for the specified object returning the name of the new State if the transition was successful; null otherwise. |
java.lang.String |
getName()
Returns the name of this transition. |
java.lang.String |
toString()
Returns a String representative of this transition. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ReflectionTransition(java.lang.String name,
java.lang.Object objRef,
java.lang.String methodName)
name - Name of this transition.methodName - Name of the method to call on the transition object to execute the transition.| Method Detail |
|---|
public java.lang.String execute()
throws TransitionException
execute in interface TransitionInterfaceTransitionException - if there is a problem executing the transition.public java.lang.String getName()
getName in interface TransitionInterfacepublic 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 | ||||||||