Object/Class

com.thoughtworks.dsl.keywords

Using

Related Docs: class Using | package keywords

Permalink

object Using extends Serializable

Source
Using.scala
Linear Supertypes
Serializable, Serializable, AnyRef, Any
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
    @HotSpotIntrinsicCandidate() @throws( ... )
  7. implicit def continuationUsingDsl[Domain, Value, R <: AutoCloseable](implicit tryFinally: TryFinally[Value, Domain, Domain, Domain], shiftDsl: Dsl[Shift[Domain, Value], Domain, Value]): Dsl[Using[R], !![Domain, Value], R]

    Permalink
  8. final def eq(arg0: AnyRef): Boolean

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

    Permalink
    Definition Classes
    AnyRef → Any
  10. final def getClass(): Class[_]

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

    Permalink
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate()
  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
    Annotations
    @HotSpotIntrinsicCandidate()
  16. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate()
  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.

      multiplicationAfterAddition.map { _ =>
        n should be(42)
      }
    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. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  21. final def wait(arg0: Long, arg1: Int): Unit

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  23. final def wait(): Unit

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

Deprecated Value Members

  1. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @Deprecated @deprecated @throws( classOf[java.lang.Throwable] )
    Deprecated

    (Since version ) see corresponding Javadoc for more information.

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped