Module de.learnlib.driver
Package de.learnlib.driver
Class ContextExecutableInputSUL<I extends ContextExecutableInput<? extends O,? super C>,O,C>
- java.lang.Object
-
- de.learnlib.driver.AbstractContextExecutableInputSUL<I,O,C>
-
- de.learnlib.driver.ContextExecutableInputSUL<I,O,C>
-
- Type Parameters:
I
- input symbol typeO
- output symbol typeC
- context type
- All Implemented Interfaces:
SUL<I,O>
- Direct Known Subclasses:
SimplePOJOTestDriver
public class ContextExecutableInputSUL<I extends ContextExecutableInput<? extends O,? super C>,O,C> extends AbstractContextExecutableInputSUL<I,O,C>
ASUL
that executesContextExecutableInput
symbols.The creation and disposal of contexts is delegated to an external
ContextHandler
.
-
-
Constructor Summary
Constructors Constructor Description ContextExecutableInputSUL(ContextHandler<C> contextHandler)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canFork()
Returns whether this SUL is capable offorking
.protected C
createContext()
protected void
disposeContext(C context)
SUL<I,O>
fork()
Forks this SUL, if possible.-
Methods inherited from class de.learnlib.driver.AbstractContextExecutableInputSUL
post, pre, step
-
-
-
-
Constructor Detail
-
ContextExecutableInputSUL
public ContextExecutableInputSUL(ContextHandler<C> contextHandler)
-
-
Method Detail
-
createContext
protected C createContext()
- Specified by:
createContext
in classAbstractContextExecutableInputSUL<I extends ContextExecutableInput<? extends O,? super C>,O,C>
-
disposeContext
protected void disposeContext(C context)
- Specified by:
disposeContext
in classAbstractContextExecutableInputSUL<I extends ContextExecutableInput<? extends O,? super C>,O,C>
-
canFork
public boolean canFork()
Description copied from interface:SUL
Returns whether this SUL is capable offorking
.- Returns:
true
if this SUL can be forked,false
otherwise- See Also:
SUL.fork()
-
fork
public SUL<I,O> fork()
Description copied from interface:SUL
Forks this SUL, if possible. The fork of a SUL is a copy which behaves exactly the same as this SUL. This method should always return a reseted SUL, regardless of whether this call is made between a call toSUL.pre()
andSUL.post()
.If
SUL.canFork()
returnstrue
, this method must return a non-null
object, which should behave exactly like this SUL (in particular, it must be forkable as well). Otherwise, aUnsupportedOperationException
must be thrown.Implementation note: if resetting a SUL changes the internal state of this object in a non-trivial way (e.g., incrementing a counter to ensure independent sessions), care must be taken that forks of this SUL manipulate the same internal state.
- Returns:
- a fork of this SUL.
-
-