Class ExecutableRuleAtom<T extends IExecutableModuleElementParameter>
- java.lang.Object
-
- org.eclipse.epsilon.erl.execute.data.RuleAtom<T>
-
- org.eclipse.epsilon.erl.execute.data.ExecutableRuleAtom<T>
-
- Type Parameters:
T
-
- All Implemented Interfaces:
Runnable
,Callable<Object>
,Supplier<Object>
,CheckedRunnable<EolRuntimeException>
,CheckedSupplier<Object,EolRuntimeException>
,CheckedEolRunnable
,CheckedEolSupplier<Object>
- Direct Known Subclasses:
EvlAtom
,GenerationRuleAtom
public class ExecutableRuleAtom<T extends IExecutableModuleElementParameter> extends RuleAtom<T> implements CheckedEolRunnable, Callable<Object>, CheckedEolSupplier<Object>
StandaloneRuleAtom
which can be submitted to an ExecutorService. This has all necessary information for executing the RuleAtom, and avoids the need for creating a separate anonymous inner class or lambda.- Since:
- 1.6
- Author:
- Sina Madani
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
ExecutableRuleAtom(T construct, Object modelElement)
ExecutableRuleAtom(T construct, Object modelElement, IErlContext context)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
call()
protected Object
execute()
Object
getThrows()
void
runThrows()
-
Methods inherited from class org.eclipse.epsilon.erl.execute.data.RuleAtom
asEntry, equals, execute, hashCode, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.eclipse.epsilon.eol.function.CheckedEolRunnable
run
-
Methods inherited from interface org.eclipse.epsilon.eol.function.CheckedEolSupplier
get
-
-
-
-
Field Detail
-
context
protected IErlContext context
-
-
Constructor Detail
-
ExecutableRuleAtom
public ExecutableRuleAtom(T construct, Object modelElement, IErlContext context)
-
-
Method Detail
-
execute
protected Object execute() throws EolRuntimeException
- Throws:
EolRuntimeException
-
call
public final Object call() throws Exception
- Specified by:
call
in interfaceCallable<T extends IExecutableModuleElementParameter>
- Throws:
Exception
-
runThrows
public final void runThrows() throws EolRuntimeException
- Specified by:
runThrows
in interfaceCheckedEolRunnable
- Specified by:
runThrows
in interfaceCheckedRunnable<T extends IExecutableModuleElementParameter>
- Throws:
EolRuntimeException
-
getThrows
public final Object getThrows() throws EolRuntimeException
- Specified by:
getThrows
in interfaceCheckedEolSupplier<T extends IExecutableModuleElementParameter>
- Specified by:
getThrows
in interfaceCheckedSupplier<Object,EolRuntimeException>
- Throws:
EolRuntimeException
-
-