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:
java.lang.Runnable
,java.util.concurrent.Callable<java.lang.Object>
,java.util.function.Supplier<java.lang.Object>
,CheckedRunnable<EolRuntimeException>
,CheckedSupplier<java.lang.Object,EolRuntimeException>
,CheckedEolRunnable
,CheckedEolSupplier<java.lang.Object>
- Direct Known Subclasses:
EvlAtom
,GenerationRuleAtom
public class ExecutableRuleAtom<T extends IExecutableModuleElementParameter> extends RuleAtom<T> implements CheckedEolRunnable, java.util.concurrent.Callable<java.lang.Object>, CheckedEolSupplier<java.lang.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
-
-
Field Summary
Fields Modifier and Type Field Description protected IErlContext
context
-
Constructor Summary
Constructors Modifier Constructor Description protected
ExecutableRuleAtom(T construct, java.lang.Object modelElement)
ExecutableRuleAtom(T construct, java.lang.Object modelElement, IErlContext context)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
call()
protected java.lang.Object
execute()
java.lang.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, java.lang.Object modelElement, IErlContext context)
-
ExecutableRuleAtom
protected ExecutableRuleAtom(T construct, java.lang.Object modelElement)
-
-
Method Detail
-
execute
protected java.lang.Object execute() throws EolRuntimeException
- Throws:
EolRuntimeException
-
call
public final java.lang.Object call() throws java.lang.Exception
- Specified by:
call
in interfacejava.util.concurrent.Callable<T extends IExecutableModuleElementParameter>
- Throws:
java.lang.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 java.lang.Object getThrows() throws EolRuntimeException
- Specified by:
getThrows
in interfaceCheckedEolSupplier<T extends IExecutableModuleElementParameter>
- Specified by:
getThrows
in interfaceCheckedSupplier<java.lang.Object,EolRuntimeException>
- Throws:
EolRuntimeException
-
-