Commit 95b1e58e authored by Björn Richerzhagen's avatar Björn Richerzhagen
Browse files

Continued with local TransitionEngine

parent 4246b586
......@@ -25,6 +25,8 @@ package de.tudarmstadt.maki.simonstrator.api.component.transition;
* state between two mechanisms. This is only required if the
* {@link TransferState} annotation is not sufficient in your use case.
*
* This object is not supposed to maintain state between method invocations.
*
* @author Bjoern Richerzhagen, Alexander Froemmgen
*
* @param <S>
......@@ -34,6 +36,20 @@ package de.tudarmstadt.maki.simonstrator.api.component.transition;
*/
public interface AtomicTransition<S extends TransitionEnabled, T extends TransitionEnabled> {
/**
* Returns the type of the source component of this transition
*
* @return
*/
public Class<S> getSourceType();
/**
* Returns the type of the target component of this transition
*
* @return
*/
public Class<T> getTargetType();
/**
* Implement custom state transformations here. For simple variable passing,
* is is sufficient to use the {@link TransferState} annotation.
......
......@@ -54,7 +54,8 @@ public @interface TransferState {
/**
* A string array listing the names of transfered variables in order of the
* arguments of the constructor.
* arguments of the constructor. The names are used to determine the getX()
* method name - should start with an upper case letter.
*
* @return
*/
......
......@@ -79,12 +79,9 @@ public interface TransitionEngine extends HostComponent {
* is used (including basic state transfer).
*
* @param proxyName
* @param fromClass
* @param toClass
* @param transitionStrategy
*/
public <F extends TransitionEnabled, T extends TransitionEnabled> void registerTransition(
String proxyName, Class<F> fromClass, Class<T> toClass,
AtomicTransition<F, T> transitionStrategy);
String proxyName, AtomicTransition<F, T> transitionStrategy);
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment