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; ...@@ -25,6 +25,8 @@ package de.tudarmstadt.maki.simonstrator.api.component.transition;
* state between two mechanisms. This is only required if the * state between two mechanisms. This is only required if the
* {@link TransferState} annotation is not sufficient in your use case. * {@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 * @author Bjoern Richerzhagen, Alexander Froemmgen
* *
* @param <S> * @param <S>
...@@ -34,6 +36,20 @@ package de.tudarmstadt.maki.simonstrator.api.component.transition; ...@@ -34,6 +36,20 @@ package de.tudarmstadt.maki.simonstrator.api.component.transition;
*/ */
public interface AtomicTransition<S extends TransitionEnabled, T extends TransitionEnabled> { 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, * Implement custom state transformations here. For simple variable passing,
* is is sufficient to use the {@link TransferState} annotation. * is is sufficient to use the {@link TransferState} annotation.
......
...@@ -54,7 +54,8 @@ public @interface TransferState { ...@@ -54,7 +54,8 @@ public @interface TransferState {
/** /**
* A string array listing the names of transfered variables in order of the * 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 * @return
*/ */
......
...@@ -79,12 +79,9 @@ public interface TransitionEngine extends HostComponent { ...@@ -79,12 +79,9 @@ public interface TransitionEngine extends HostComponent {
* is used (including basic state transfer). * is used (including basic state transfer).
* *
* @param proxyName * @param proxyName
* @param fromClass
* @param toClass
* @param transitionStrategy * @param transitionStrategy
*/ */
public <F extends TransitionEnabled, T extends TransitionEnabled> void registerTransition( public <F extends TransitionEnabled, T extends TransitionEnabled> void registerTransition(
String proxyName, Class<F> fromClass, Class<T> toClass, String proxyName, AtomicTransition<F, T> transitionStrategy);
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