Package com._1c.g5.v8.dt.common
Class ExpressionSafeRunnable<T>
java.lang.Object
com._1c.g5.v8.dt.common.ExpressionSafeRunnable<T>
- All Implemented Interfaces:
org.eclipse.core.runtime.ISafeRunnable
public class ExpressionSafeRunnable<T>
extends Object
implements org.eclipse.core.runtime.ISafeRunnable
The safe runnable based on lambda expressions.
-
Constructor Summary
ConstructorsConstructorDescriptionExpressionSafeRunnable
(Consumer<T> runExpression) Creates a new safe runnable.ExpressionSafeRunnable
(Consumer<T> runExpression, Consumer<Throwable> logExpression) Creates a new safe runnable wich exception processed. -
Method Summary
Modifier and TypeMethodDescriptionvoid
handleException
(Throwable exception) void
run()
void
Set object for run expressions.
-
Constructor Details
-
ExpressionSafeRunnable
Creates a new safe runnable wich exception processed.- Parameters:
runExpression
- the expressions for run menthod.logExpression
- the expressions for exception precessed.
-
ExpressionSafeRunnable
Creates a new safe runnable.- Parameters:
runExpression
- the expressions for run menthod.
-
-
Method Details
-
setObject
Set object for run expressions.- Parameters:
object
- the object for run expressions.
-
handleException
- Specified by:
handleException
in interfaceorg.eclipse.core.runtime.ISafeRunnable
-
run
- Specified by:
run
in interfaceorg.eclipse.core.runtime.ISafeRunnable
- Throws:
Exception
-