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 Details

    • ExpressionSafeRunnable

      public ExpressionSafeRunnable(Consumer<T> runExpression, Consumer<Throwable> logExpression)
      Creates a new safe runnable wich exception processed.
      Parameters:
      runExpression - the expressions for run menthod.
      logExpression - the expressions for exception precessed.
    • ExpressionSafeRunnable

      public ExpressionSafeRunnable(Consumer<T> runExpression)
      Creates a new safe runnable.
      Parameters:
      runExpression - the expressions for run menthod.
  • Method Details

    • setObject

      public void setObject(T object)
      Set object for run expressions.
      Parameters:
      object - the object for run expressions.
    • handleException

      public void handleException(Throwable exception)
      Specified by:
      handleException in interface org.eclipse.core.runtime.ISafeRunnable
    • run

      public void run() throws Exception
      Specified by:
      run in interface org.eclipse.core.runtime.ISafeRunnable
      Throws:
      Exception