Object/Class

com.thoughtworks.dsl.keywords

Using

Related Docs: class Using | package keywords

Permalink

object Using extends Serializable

Source
Using.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Using
  2. Serializable
  3. Serializable
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. trait ScopeExitHandler extends AutoCloseable

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def apply[R <: AutoCloseable](r: ⇒ R)(implicit dummyImplicit: DummyImplicit = DummyImplicit.dummyImplicit): Using[R]

    Permalink
  5. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  6. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  8. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  9. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  10. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  11. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  12. implicit def implicitUsing[R <: AutoCloseable](r: ⇒ R): Using[R]

    Permalink
  13. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  14. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  15. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  16. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  17. implicit def scalaFutureUsingDsl[R <: AutoCloseable, A](implicit executionContext: ExecutionContext): Dsl[Using[R], Future[A], R]

    Permalink
  18. def scopeExit(r: ⇒ ScopeExitHandler): Using[ScopeExitHandler]

    Permalink

    Returns a Using keyword to execute a ScopeExitHandler when exiting the nearest enclosing scope that is annotated as @reset, (or the nearest enclosing function if compilerplugins.ResetEverywhere is enabled).

    Returns a Using keyword to execute a ScopeExitHandler when exiting the nearest enclosing scope that is annotated as @reset, (or the nearest enclosing function if compilerplugins.ResetEverywhere is enabled).

    Example:
    1. The following function will perform n *= 2 after n += 20:

      import scala.concurrent.Future
      import com.thoughtworks.dsl.keywords.Using.scopeExit
      var n = 1
      def multiplicationAfterAddition = Future {
        !scopeExit { () =>
          n *= 2
        }
        n += 20
      }

      Therefore, the final value of n should be (1 + 20) * 2 = 42.

      import com.thoughtworks.dsl.Dsl.reset
      Future {
        !Await(multiplicationAfterAddition)
        n should be(42)
      }: @reset
    Note

    This method is similar to apply, except the parameter type is changed from a generic R to the SAM type ScopeExitHandler, which allows for function literal expressions in Scala 2.12+ or Scala 2.11 with -Xexperimental compiler option.

  19. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  20. implicit def throwableContinuationUsingDsl[Domain, Value, R <: AutoCloseable](implicit catchDsl: DslCatch[Domain, Domain, Value], shiftDsl: Dsl[Shift[Domain, Value], Domain, Value]): Dsl[Using[R], !![Domain, Value], R]

    Permalink
  21. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  22. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  23. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  24. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped