object Local
- Alphabetic
- By Inheritance
- Local
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
- final class Bound extends Context
-
sealed abstract
class
Context extends AnyRef
Represents the current state of all locals for a given execution context.
Represents the current state of all locals for a given execution context.
This should be treated as an opaque value and direct modifications and access are considered verboten.
-
final
class
Key extends Serializable
Internal — key type used in Context.
- class Macros extends InlineMacros with HygieneUtilMacros
- final class Unbound extends Context
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
apply[A](default: A): Local[A]
Builds a new Local with the given
default
to be returned if a value hasn't been set, or after the local gets cleared.Builds a new Local with the given
default
to be returned if a value hasn't been set, or after the local gets cleared.val num = Local(0) num() //=> 0 num := 100 num() //=> 100 num.clear() num() //=> 0
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
macro
def
bind[R](ctx: Context)(f: ⇒ R): R
Execute a block of code using the specified state of
Local.Context
and restore the current state when complete. -
macro
def
bindClear[R](f: ⇒ R): R
Execute a block of code with a clear state of
Local.Context
and restore the current state when complete. -
def
clearContext(): Unit
Clear the Local state.
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
def
closed[R](fn: () ⇒ R): () ⇒ R
Convert a closure
() => R
into another closure of the same type whose Local.Context is saved when calling closed and restored upon invocation. - def defaultContext(): Unbound
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
getContext(): Context
Return the state of the current Local state.
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- macro def isolate[R](f: ⇒ R): R
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
def
setContext(ctx: Context): Unit
Restore the Local state to a given Context.
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )