scala.reflect.macros.contexts

# Context

###
Related Doc: package contexts

#### abstract class Context extends blackbox.Context with whitebox.Context with Aliases with Enclosures with Names with Reifiers with FrontEnds with Infrastructure with Typers with Parsers with Evals with ExprUtils with Traces with Internals

Source
  Context.scala

Linear Supertypes
Internals, TypingTransformers, Traces, util.Traces, ExprUtils, Evals, Parsers, Typers, Infrastructure, FrontEnds, Reifiers, Names, Enclosures, Aliases, whitebox.Context, blackbox.Context, macros.Internals, macros.ExprUtils, macros.Evals, macros.Parsers, macros.Typers, macros.Infrastructure, macros.FrontEnds, macros.Reifiers, macros.Names, macros.Enclosures, macros.Aliases, AnyRef, Any
Type Hierarchy Learn more about scaladoc diagrams
Ordering

1. Alphabetic
2. By inheritance

Inherited

1. Context
2. Internals
3. TypingTransformers
4. Traces
5. Traces
6. ExprUtils
7. Evals
8. Parsers
9. Typers
10. Infrastructure
11. FrontEnds
12. Reifiers
13. Names
14. Enclosures
15. Aliases
16. Context
17. Context
18. Internals
19. ExprUtils
20. Evals
21. Parsers
22. Typers
23. Infrastructure
24. FrontEnds
25. Reifiers
26. Names
27. Enclosures
28. Aliases
29. AnyRef
30. Any

Implicitly

1. by any2stringadd
2. by StringFormat
3. by Ensuring
4. by ArrowAssoc

1. Hide All
2. Show all

Visibility

1. Public
2. All

### Instance Constructors

1. #### new Context()

### Type Members

1. #### trait ContextInternalApi extends MacroInternalApi

   Definition Classes
     Internals

2. #### type Expr[+T] = tools.nsc.Global.Expr[T]

   Definition Classes
     Aliases

3. #### case class ImplicitCandidate extends Product with Serializable

   Definition Classes
     Context

4. #### type Modifiers = tools.nsc.Global.Modifiers

   Definition Classes
     Aliases

5. #### type Name = tools.nsc.Global.Name

   Definition Classes
     Aliases

6. #### type Position = internal.util.Position

   Definition Classes
     Aliases

7. #### abstract type PrefixType

   Definition Classes
     Context

8. #### implicit class RichOpenImplicit extends AnyRef

   Definition Classes
     Aliases

9. #### type Scope = tools.nsc.Global.Scope

   Definition Classes
     Aliases

10. #### type Symbol = tools.nsc.Global.Symbol

    Definition Classes
      Aliases

11. #### type TermName = tools.nsc.Global.TermName

    Definition Classes
      Aliases

12. #### type Tree = tools.nsc.Global.Tree

    Definition Classes
      Aliases

13. #### type Type = tools.nsc.Global.Type

    Definition Classes
      Aliases

14. #### type TypeName = tools.nsc.Global.TypeName

    Definition Classes
      Aliases

15. #### type TypeTag[T] = tools.nsc.Global.TypeTag[T]

    Definition Classes
      Aliases

16. #### type TypecheckException = macros.TypecheckException

    Definition Classes
      Typers

17. #### type TypecheckMode = Mode

    Definition Classes
      Typers

18. #### abstract class TypingTransformer extends Global.Transformer

    Definition Classes
      TypingTransformers

19. #### type WeakTypeTag[T] = tools.nsc.Global.WeakTypeTag[T]

    Definition Classes
      Aliases

20. #### type CompilationUnit = tools.nsc.Global.CompilationUnit

    Definition Classes
      Aliases
    Annotations
      @deprecated
    Deprecated

      (Since version 2.11.0) c.enclosingTree-style APIs are now deprecated; consult the scaladoc for more information

21. #### case class EnclosureException extends Exception with Product with Serializable

    Definition Classes
      Enclosures
    Annotations
      @deprecated
    Deprecated

      (Since version 2.11.0) c.enclosingTree-style APIs are now deprecated; consult the scaladoc for more information

22. #### type Run = tools.nsc.Global.Run

    Definition Classes
      Aliases
    Annotations
      @deprecated
    Deprecated

      (Since version 2.11.0) c.enclosingTree-style APIs are now deprecated; consult the scaladoc for more information

### Abstract Value Members

1. #### abstract val callsiteTyper: (analyzer)#Typer

2. #### abstract val expandee: Tree

3. #### abstract val prefix: Expr[PrefixType]

   Definition Classes
     Context → Context

4. #### abstract val universe: Global

   Definition Classes
     Context → Context

### Concrete Value Members

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

   Test two objects for inequality.

   Test two objects for inequality.

   returns

     `true` if !(this == that), false otherwise.

   Definition Classes
     AnyRef → Any

2. #### final def ##(): Int

   Equivalent to `x.hashCode` except for boxed numeric types and `null`.

   Equivalent to `x.hashCode` except for boxed numeric types and `null`. For numerics, it returns a hash value which is consistent with value equality: if two value type instances compare as true, then ## will produce the same hash value for each of them. For `null` returns a hashcode where `null.hashCode` throws a `NullPointerException`.

   returns

     a hash value consistent with ==

   Definition Classes
     AnyRef → Any

3. #### def +(other: String): String

   Implicit information
     This member is added by an implicit conversion from Context to any2stringadd[Context] performed by method any2stringadd in scala.Predef.
   Definition Classes
     any2stringadd

4. #### def ->[B](y: B): (Context, B)

   Implicit information
     This member is added by an implicit conversion from Context to ArrowAssoc[Context] performed by method ArrowAssoc in scala.Predef.
   Definition Classes
     ArrowAssoc
   Annotations
     @inline()

5. #### final def ==(arg0: Any): Boolean

   The expression `x == that` is equivalent to `if (x eq null) that eq null else x.equals(that)`.

   The expression `x == that` is equivalent to `if (x eq null) that eq null else x.equals(that)`.

   arg0

     the object to compare against this object for equality.

   returns

     `true` if the receiver object is equivalent to the argument; `false` otherwise.

   Definition Classes
     AnyRef → Any

6. #### def Expr[T](tree: Tree)(implicit arg0: WeakTypeTag[T]): Expr[T]

   Definition Classes
     Aliases

7. #### val Expr: tools.nsc.Global.Expr.type

   Definition Classes
     Aliases

8. #### val PATTERNmode: Mode

   Definition Classes
     Typers

9. #### val TERMmode: Mode

   Definition Classes
     Typers

10. #### val TYPEmode: Mode

    Definition Classes
      Typers

11. #### def TypeTag[T](tpe: Type): TypeTag[T]

    Definition Classes
      Aliases

12. #### val TypeTag: tools.nsc.Global.TypeTag.type

    Definition Classes
      Aliases

13. #### val TypecheckException: macros.TypecheckException.type

    Definition Classes
      Typers

14. #### val TypecheckMode: Mode.type

    Definition Classes
      Typers

15. #### def WeakTypeTag[T](tpe: Type): WeakTypeTag[T]

    Definition Classes
      Aliases

16. #### val WeakTypeTag: tools.nsc.Global.WeakTypeTag.type

    Definition Classes
      Aliases

17. #### def abort(pos: Position, msg: String): Nothing

    Definition Classes
      FrontEnds

18. #### final def asInstanceOf[T0]: T0

    Cast the receiver object to be of type `T0`.

    Cast the receiver object to be of type `T0`.

    Note that the success of a cast at runtime is modulo Scala's erasure semantics. Therefore the expression `1.asInstanceOf[String]` will throw a `ClassCastException` at runtime, while the expression `List(1).asInstanceOf[List[String]]` will not. In the latter example, because the type argument is erased as part of compilation it is not possible to check whether the contents of the list are of the requested type.

    returns

      the receiver object.

    Definition Classes
      Any
    Exceptions thrown

      `ClassCastException` if the receiver object is not an instance of the erasure of type `T0`.

19. #### def classPath: List[URL]

    Definition Classes
      Infrastructure

20. #### def clone(): AnyRef

    Create a copy of the receiver object.

    Create a copy of the receiver object.

    The default implementation of the `clone` method is platform dependent.

    returns

      a copy of the receiver object.

    Attributes
      protected[java.lang]
    Definition Classes
      AnyRef
    Annotations
      @throws( ... )
    Note

      not specified by SLS as a member of AnyRef

21. #### def compilerSettings: List[String]

    Definition Classes
      Infrastructure

22. #### def echo(pos: Position, msg: String): Unit

    Definition Classes
      FrontEnds

23. #### val enclosingClass: Tree

    Definition Classes
      Enclosures

24. #### def enclosingDef: tools.nsc.Global.DefDef

    Definition Classes
      Enclosures

25. #### def enclosingImpl: tools.nsc.Global.ImplDef

    Definition Classes
      Enclosures

26. #### val enclosingImplicits: List[ImplicitCandidate]

    Definition Classes
      Enclosures

27. #### val enclosingMacros: List[Context]

    Definition Classes
      Enclosures

28. #### val enclosingMethod: Tree

    Definition Classes
      Enclosures

29. #### def enclosingPackage: tools.nsc.Global.PackageDef

    Definition Classes
      Enclosures

30. #### val enclosingPosition: Position

    Definition Classes
      Enclosures

31. #### val enclosingRun: Run

    Definition Classes
      Enclosures

32. #### def enclosingTemplate: tools.nsc.Global.Template

    Definition Classes
      Enclosures

33. #### val enclosingUnit: CompilationUnit

    Definition Classes
      Enclosures

34. #### def ensuring(cond: (Context) ⇒ Boolean, msg: ⇒ Any): Context

    Implicit information
      This member is added by an implicit conversion from Context to Ensuring[Context] performed by method Ensuring in scala.Predef.
    Definition Classes
      Ensuring

35. #### def ensuring(cond: (Context) ⇒ Boolean): Context

    Implicit information
      This member is added by an implicit conversion from Context to Ensuring[Context] performed by method Ensuring in scala.Predef.
    Definition Classes
      Ensuring

36. #### def ensuring(cond: Boolean, msg: ⇒ Any): Context

    Implicit information
      This member is added by an implicit conversion from Context to Ensuring[Context] performed by method Ensuring in scala.Predef.
    Definition Classes
      Ensuring

37. #### def ensuring(cond: Boolean): Context

    Implicit information
      This member is added by an implicit conversion from Context to Ensuring[Context] performed by method Ensuring in scala.Predef.
    Definition Classes
      Ensuring

38. #### final def eq(arg0: AnyRef): Boolean

    Tests whether the argument (`arg0`) is a reference to the receiver object (`this`).

    Tests whether the argument (`arg0`) is a reference to the receiver object (`this`).

    The `eq` method implements an equivalence relation on non-null instances of `AnyRef`, and has three additional properties:

    - It is consistent: for any non-null instances `x` and `y` of type `AnyRef`, multiple invocations of `x.eq(y)` consistently returns `true` or consistently returns `false`.
    - For any non-null instance `x` of type `AnyRef`, `x.eq(null)` and `null.eq(x)` returns `false`.
    - `null.eq(null)` returns `true`.

    When overriding the `equals` or `hashCode` methods, it is important to ensure that their behavior is consistent with reference equality. Therefore, if two objects are references to each other (`o1 eq o2`), they should be equal to each other (`o1 == o2`) and they should hash to the same value (`o1.hashCode == o2.hashCode`).

    returns

      `true` if the argument is a reference to the receiver object; `false` otherwise.

    Definition Classes
      AnyRef

39. #### def equals(arg0: Any): Boolean

    The equality method for reference types.

    The equality method for reference types. Default implementation delegates to `eq`.

    See also `equals` in scala.Any.

    returns

      `true` if the receiver object is equivalent to the argument; `false` otherwise.

    Definition Classes
      AnyRef → Any

40. #### def error(pos: Position, msg: String): Unit

    Definition Classes
      FrontEnds

41. #### def eval[T](expr: Expr[T]): T

    Definition Classes
      Evals

42. #### def finalize(): Unit

    Called by the garbage collector on the receiver object when there are no more references to the object.

    Called by the garbage collector on the receiver object when there are no more references to the object.

    The details of when and if the `finalize` method is invoked, as well as the interaction between `finalize` and non-local returns and exceptions, are all platform dependent.

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

      not specified by SLS as a member of AnyRef

43. #### def formatted(fmtstr: String): String

    Implicit information
      This member is added by an implicit conversion from Context to StringFormat[Context] performed by method StringFormat in scala.Predef.
    Definition Classes
      StringFormat
    Annotations
      @inline()

44. #### def fresh[NameType <: Name](name: NameType): NameType

    Definition Classes
      Names

45. #### def fresh(name: String): String

    Definition Classes
      Names

46. #### def fresh(): String

    Definition Classes
      Names

47. #### def freshName[NameType <: Name](name: NameType): NameType

    Definition Classes
      Names

48. #### def freshName(name: String): String

    Definition Classes
      Names

49. #### def freshName(): String

    Definition Classes
      Names

50. #### def freshNameCreator: FreshNameCreator

    Definition Classes
      Names

51. #### final def getClass(): Class[_]

    A representation that corresponds to the dynamic class of the receiver object.

    A representation that corresponds to the dynamic class of the receiver object.

    The nature of the representation is platform dependent.

    returns

      a representation that corresponds to the dynamic class of the receiver object.

    Definition Classes
      AnyRef → Any
    Note

      not specified by SLS as a member of AnyRef

52. #### val global: universe.type

    Definition Classes
      Reifiers

53. #### def globalSettings: Settings

    Definition Classes
      Traces → Traces

54. #### def hasErrors: Boolean

    Definition Classes
      FrontEnds

55. #### def hasWarnings: Boolean

    Definition Classes
      FrontEnds

56. #### def hashCode(): Int

    The hashCode method for reference types.

    The hashCode method for reference types. See hashCode in scala.Any.

    returns

      the hash code value for this object.

    Definition Classes
      AnyRef → Any

57. #### def inferImplicitValue(pt: Type, silent: Boolean = true, withMacrosDisabled: Boolean = false, pos: Position = enclosingPosition): Tree

    Definition Classes
      Typers

58. #### def inferImplicitView(tree: Tree, from: Type, to: Type, silent: Boolean = true, withMacrosDisabled: Boolean = false, pos: Position = enclosingPosition): Tree

    Definition Classes
      Typers

59. #### def info(pos: Position, msg: String, force: Boolean): Unit

    Definition Classes
      FrontEnds

60. #### lazy val internal: ContextInternalApi

    Definition Classes
      Internals

61. #### final def isInstanceOf[T0]: Boolean

    Test whether the dynamic type of the receiver object is `T0`.

    Test whether the dynamic type of the receiver object is `T0`.

    Note that the result of the test is modulo Scala's erasure semantics. Therefore the expression `1.isInstanceOf[String]` will return `false`, while the expression `List(1).isInstanceOf[List[String]]` will return `true`. In the latter example, because the type argument is erased as part of compilation it is not possible to check whether the contents of the list are of the specified type.

    returns

      `true` if the receiver object is an instance of erasure of type `T0`; `false` otherwise.

    Definition Classes
      Any

62. #### def literal(x: Char): Expr[Char]

    Definition Classes
      ExprUtils

63. #### def literal(x: String): Expr[String]

    Definition Classes
      ExprUtils

64. #### def literal(x: Double): Expr[Double]

    Definition Classes
      ExprUtils

65. #### def literal(x: Float): Expr[Float]

    Definition Classes
      ExprUtils

66. #### def literal(x: Long): Expr[Long]

    Definition Classes
      ExprUtils

67. #### def literal(x: Int): Expr[Int]

    Definition Classes
      ExprUtils

68. #### def literal(x: Short): Expr[Short]

    Definition Classes
      ExprUtils

69. #### def literal(x: Byte): Expr[Byte]

    Definition Classes
      ExprUtils

70. #### def literal(x: Boolean): Expr[Boolean]

    Definition Classes
      ExprUtils

71. #### def literalFalse: Expr[Boolean]

    Definition Classes
      ExprUtils

72. #### def literalNull: Expr[Null]

    Definition Classes
      ExprUtils

73. #### def literalTrue: Expr[Boolean]

    Definition Classes
      ExprUtils

74. #### def literalUnit: Expr[Unit]

    Definition Classes
      ExprUtils

75. #### val macroApplication: Tree

    Definition Classes
      Enclosures

76. #### val macroDebugLite: Boolean

    Definition Classes
      Traces

77. #### val macroDebugVerbose: Boolean

    Definition Classes
      Traces

78. #### final def macroLogLite(msg: ⇒ Any): Unit

    Definition Classes
      Traces
    Annotations
      @inline()

79. #### final def macroLogVerbose(msg: ⇒ Any): Unit

    Definition Classes
      Traces
    Annotations
      @inline()

80. #### val mirror: tools.nsc.Global.Mirror

    Definition Classes
      Context → Context

81. #### final def ne(arg0: AnyRef): Boolean

    Equivalent to `!(this eq that)`.

    Equivalent to `!(this eq that)`.

    returns

      `true` if the argument is not a reference to the receiver object; `false` otherwise.

    Definition Classes
      AnyRef

82. #### final def notify(): Unit

    Wakes up a single thread that is waiting on the receiver object's monitor.

    Wakes up a single thread that is waiting on the receiver object's monitor.

    Definition Classes
      AnyRef
    Note

      not specified by SLS as a member of AnyRef

83. #### final def notifyAll(): Unit

    Wakes up all threads that are waiting on the receiver object's monitor.

    Wakes up all threads that are waiting on the receiver object's monitor.

    Definition Classes
      AnyRef
    Note

      not specified by SLS as a member of AnyRef

84. #### def openImplicits: List[ImplicitCandidate]

    Definition Classes
      Typers

85. #### def openMacros: List[Context]

    Definition Classes
      Typers

86. #### def parse(code: String): tools.nsc.Global.Tree

    Definition Classes
      Parsers

87. #### def reifyEnclosingRuntimeClass: Tree

    Definition Classes
      Reifiers

88. #### def reifyRuntimeClass(tpe: Type, concrete: Boolean = true): Tree

    Definition Classes
      Reifiers

89. #### def reifyTree(universe: Tree, mirror: Tree, tree: Tree): Tree

    Definition Classes
      Reifiers

90. #### def reifyType(universe: Tree, mirror: Tree, tpe: Type, concrete: Boolean = false): Tree

    Definition Classes
      Reifiers

91. #### def resetLocalAttrs(tree: Tree): Tree

    Definition Classes
      Typers

92. #### def settings: List[String]

    Definition Classes
      Infrastructure

93. #### def symbolOf[T](implicit arg0: Context.WeakTypeTag[T]): tools.nsc.Global.TypeSymbol

    Definition Classes
      Aliases

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

    Definition Classes
      AnyRef

95. #### def toString(): String

    Creates a String representation of this object.

    Creates a String representation of this object. The default representation is platform dependent. On the java platform it is the concatenation of the class name, "@", and the object's hashcode in hexadecimal.

    returns

      a String representation of the object.

    Definition Classes
      AnyRef → Any

96. #### def typeOf[T](implicit ttag: TypeTag[T]): Type

    Definition Classes
      Aliases

97. #### def typeTag[T](implicit ttag: TypeTag[T]): TypeTag[T]

    Definition Classes
      Aliases

98. #### def typecheck(tree: Tree, mode: TypecheckMode = TERMmode, pt: Type = universe.WildcardType, silent: Boolean = false, withImplicitViewsDisabled: Boolean = false, withMacrosDisabled: Boolean = false): Tree

    Definition Classes
      Typers
    See also

      scala.tools.reflect.ToolBox.typeCheck

99. #### def unreifyTree(tree: Tree): Tree

    Definition Classes
      Reifiers

100. #### def untypecheck(tree: Tree): Tree

     Definition Classes
       Typers

101. #### final def wait(): Unit

     Definition Classes
       AnyRef
     Annotations
       @throws( ... )

102. #### final def wait(arg0: Long, arg1: Int): Unit

     Definition Classes
       AnyRef
     Annotations
       @throws( ... )

103. #### final def wait(arg0: Long): Unit

     Definition Classes
       AnyRef
     Annotations
       @throws( ... )

104. #### def warning(pos: Position, msg: String): Unit

     Definition Classes
       FrontEnds

105. #### def weakTypeOf[T](implicit attag: WeakTypeTag[T]): Type

     Definition Classes
       Aliases

106. #### def weakTypeTag[T](implicit attag: WeakTypeTag[T]): WeakTypeTag[T]

     Definition Classes
       Aliases

107. #### def →[B](y: B): (Context, B)

     Implicit information
       This member is added by an implicit conversion from Context to ArrowAssoc[Context] performed by method ArrowAssoc in scala.Predef.
     Definition Classes
       ArrowAssoc

### Deprecated Value Members

1. #### def typeCheck(tree: Context.Tree, pt: Context.Type, silent: Boolean, withImplicitViewsDisabled: Boolean, withMacrosDisabled: Boolean): Context.Tree

   Definition Classes
     Typers
   Annotations
     @deprecated
   Deprecated

     (Since version 2.11.0) Use `c.typecheck` instead

### Inherited from Internals

### Inherited from TypingTransformers

### Inherited from Traces

### Inherited from util.Traces

### Inherited from ExprUtils

### Inherited from Evals

### Inherited from Parsers

### Inherited from Typers

### Inherited from Infrastructure

### Inherited from FrontEnds

### Inherited from Reifiers

### Inherited from Names

### Inherited from Enclosures

### Inherited from Aliases

### Inherited from whitebox.Context

### Inherited from blackbox.Context

### Inherited from macros.Internals

### Inherited from macros.ExprUtils

### Inherited from macros.Evals

### Inherited from macros.Parsers

### Inherited from macros.Typers

### Inherited from macros.Infrastructure

### Inherited from macros.FrontEnds

### Inherited from macros.Reifiers

### Inherited from macros.Names

### Inherited from macros.Enclosures

### Inherited from macros.Aliases

### Inherited from AnyRef

### Inherited from Any

### Inherited by implicit conversion any2stringadd from Context to any2stringadd[Context]

### Inherited by implicit conversion StringFormat from Context to StringFormat[Context]

### Inherited by implicit conversion Ensuring from Context to Ensuring[Context]

### Inherited by implicit conversion ArrowAssoc from Context to ArrowAssoc[Context]

### Ungrouped