Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Simonstrator
API
Commits
95b1e58e
Commit
95b1e58e
authored
Nov 01, 2015
by
Björn Richerzhagen
Browse files
Continued with local TransitionEngine
parent
4246b586
Changes
3
Show whitespace changes
Inline
Side-by-side
src/de/tudarmstadt/maki/simonstrator/api/component/transition/AtomicTransition.java
View file @
95b1e58e
...
...
@@ -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.
...
...
src/de/tudarmstadt/maki/simonstrator/api/component/transition/TransferState.java
View file @
95b1e58e
...
...
@@ -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
*/
...
...
src/de/tudarmstadt/maki/simonstrator/api/component/transition/TransitionEngine.java
View file @
95b1e58e
...
...
@@ -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
);
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment