scala.reflect.makro

Context

trait Context extends Aliases with CapturedVariables with Enclosures with Infrastructure with Names with Reifiers with FrontEnds with Settings with Typers with Parsers with Exprs with TypeTags with Evals with ExprUtils

Source
Context.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Context
  2. ExprUtils
  3. Evals
  4. TypeTags
  5. Exprs
  6. Parsers
  7. Typers
  8. Settings
  9. FrontEnds
  10. FrontEnds
  11. Reifiers
  12. Names
  13. Infrastructure
  14. Enclosures
  15. CapturedVariables
  16. Aliases
  17. AnyRef
  18. Any
Implicitly
  1. by any2stringadd
  2. by any2stringfmt
  3. by any2ArrowAssoc
  4. by any2Ensuring
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. type AbsTypeTag[T] = AbsTypeTag[T]

    Definition Classes
    Aliases
  2. abstract type CompilationUnit

    As seen by macro API, compilation unit is an opaque type that can be deconstructed into: 1) File that corresponds to the unit (if not applicable, null) 2) Content of the file (if not applicable, empty array) 3) Body, i.

    As seen by macro API, compilation unit is an opaque type that can be deconstructed into: 1) File that corresponds to the unit (if not applicable, null) 2) Content of the file (if not applicable, empty array) 3) Body, i.e. the AST that represents the compilation unit

    Definition Classes
    Infrastructure
  3. abstract class CompilationUnitExtractor extends AnyRef

    Definition Classes
    Infrastructure
  4. type Expr[+T] = Expr[T]

    Definition Classes
    Aliases
  5. trait FrontEnd extends AnyRef

    Definition Classes
    FrontEnds
  6. type Modifiers = Modifiers

    Definition Classes
    Aliases
  7. type Name = Name

    Definition Classes
    Aliases
  8. abstract type ParseError <: Throwable

    Represents an error during parsing

    Represents an error during parsing

    Definition Classes
    Parsers
  9. abstract class ParseErrorExtractor extends AnyRef

    Definition Classes
    Parsers
  10. type Position = Position

    Definition Classes
    FrontEndsFrontEnds
  11. abstract type PrefixType

    The type of the prefix tree from which the macro is selected

  12. abstract type Run

    As seen by macro API, compilation run is an opaque type that can be deconstructed into: 1) Current compilation unit 2) List of all compilation units that comprise the run

    As seen by macro API, compilation run is an opaque type that can be deconstructed into: 1) Current compilation unit 2) List of all compilation units that comprise the run

    Definition Classes
    Infrastructure
  13. abstract class RunExtractor extends AnyRef

    Definition Classes
    Infrastructure
  14. type Scope = Scope

    Definition Classes
    Aliases
  15. class SilentFrontEnd extends FrontEnd

    Definition Classes
    FrontEnds
  16. type Symbol = Symbol

    Definition Classes
    Aliases
  17. type TermName = TermName

    Definition Classes
    Aliases
  18. type Tree = Tree

    Definition Classes
    Aliases
  19. type Type = Type

    Definition Classes
    Aliases
  20. abstract type TypeError <: Throwable

    Represents an error during typechecking

    Represents an error during typechecking

    Definition Classes
    Typers
  21. abstract class TypeErrorExtractor extends AnyRef

    Definition Classes
    Typers
  22. type TypeName = TypeName

    Definition Classes
    Aliases
  23. type TypeTag[T] = TypeTag[T]

    Definition Classes
    Aliases

Abstract Value Members

  1. abstract def AbsTypeTag[T](tpe: Type): AbsTypeTag[T]

    Definition Classes
    TypeTags
  2. abstract val CompilationUnit: CompilationUnitExtractor

    Definition Classes
    Infrastructure
  3. abstract def Expr[T](tree: Tree)(implicit arg0: AbsTypeTag[T]): Expr[T]

    Definition Classes
    Exprs
  4. abstract val ParseError: ParseErrorExtractor

    Definition Classes
    Parsers
  5. abstract val Run: RunExtractor

    Definition Classes
    Infrastructure
  6. abstract val TypeError: TypeErrorExtractor

    Definition Classes
    Typers
  7. abstract def TypeTag[T](tpe: Type): TypeTag[T]

    Definition Classes
    TypeTags
  8. abstract def abort(pos: Position, msg: String): Nothing

    Abruptly terminates current macro expansion leaving a note about what happened.

    Abruptly terminates current macro expansion leaving a note about what happened. Use enclosingPosition if you're in doubt what position to pass to pos.

    Definition Classes
    FrontEnds
  9. abstract val basisUniverse: Tree

    Reification prefix that refers to the base reflexive universe, scala.reflect.basis. Providing it for the prefix parameter of reifyTree or reifyType will create a tree that can be inspected at runtime.

    Reification prefix that refers to the base reflexive universe, scala.reflect.basis. Providing it for the prefix parameter of reifyTree or reifyType will create a tree that can be inspected at runtime.

    Definition Classes
    Reifiers
  10. abstract val cache: Map[Any, Any]

    A cache shared by all invocations of the same macro within a single compilation run.

    A cache shared by all invocations of the same macro within a single compilation run.

    This cache is cleared automatically after a compilation run is completed or abandoned. It is also specific to a particular macro definition.

    To share data between different macros and/or different compilation runs, use globalCache.

    Definition Classes
    Infrastructure
  11. abstract def captureVariable(vble: Symbol): Unit

    Mark a variable as captured; i.

    Mark a variable as captured; i.e. force boxing in a *Ref type.

    Definition Classes
    CapturedVariables
  12. abstract def capturedVariableType(vble: Symbol): Type

    Convert type of a captured variable to *Ref type.

    Convert type of a captured variable to *Ref type.

    Definition Classes
    CapturedVariables
  13. abstract def compilerSettings: List[String]

    Exposes current compiler settings as a list of options.

    Exposes current compiler settings as a list of options. Use scalac -help, scalac -X and scalac -Y to learn about currently supported options.

    Definition Classes
    Settings
  14. abstract val currentMacro: Symbol

    Returns a macro definition which triggered this macro expansion.

    Returns a macro definition which triggered this macro expansion.

    Definition Classes
    Infrastructure
  15. abstract val currentRun: Run

    Exposes current compilation run.

    Exposes current compilation run.

    Definition Classes
    Infrastructure
  16. abstract def echo(pos: Position, msg: String): Unit

    For sending a message which should not be labeled as a warning/error, but also shouldn't require -verbose to be visible.

    For sending a message which should not be labeled as a warning/error, but also shouldn't require -verbose to be visible. Use enclosingPosition if you're in doubt what position to pass to pos.

    Definition Classes
    FrontEnds
  17. abstract val enclosingApplication: Tree

    Tree that corresponds to the enclosing application, or EmptyTree if not applicable.

    Tree that corresponds to the enclosing application, or EmptyTree if not applicable.

    Definition Classes
    Enclosures
  18. abstract val enclosingClass: Tree

    Tree that corresponds to the enclosing class, or EmptyTree if not applicable.

    Tree that corresponds to the enclosing class, or EmptyTree if not applicable.

    Definition Classes
    Enclosures
  19. abstract val enclosingImplicits: List[(Type, Tree)]

    Types along with corresponding trees for which implicit arguments are currently searched.

    Types along with corresponding trees for which implicit arguments are currently searched. Can be useful to get information about an application with an implicit parameter that is materialized during current macro expansion.

    Unlike openImplicits, this is a val, which means that it gets initialized when the context is created and always stays the same regardless of whatever happens during macro expansion.

    Definition Classes
    Enclosures
  20. abstract val enclosingMacros: List[Context]

    Contexts that represent macros in-flight, including the current one.

    Contexts that represent macros in-flight, including the current one. Very much like a stack trace, but for macros only. Can be useful for interoperating with other macros and for imposing compiler-friendly limits on macro expansion.

    Is also priceless for emitting sane error messages for macros that are called by other macros on synthetic (i.e. position-less) trees. In that dire case navigate the enclosingMacros stack, and it will most likely contain at least one macro with a position-ful macro application. See enclosingPosition for a default implementation of this logic.

    Unlike openMacros, this is a val, which means that it gets initialized when the context is created and always stays the same regardless of whatever happens during macro expansion.

    Definition Classes
    Enclosures
  21. abstract val enclosingMethod: Tree

    Tree that corresponds to the enclosing method, or EmptyTree if not applicable.

    Tree that corresponds to the enclosing method, or EmptyTree if not applicable.

    Definition Classes
    Enclosures
  22. abstract val enclosingPosition: Position

    Tries to guess a position for the enclosing application.

    Tries to guess a position for the enclosing application. But that is simple, right? Just dereference pos of macroApplication? Not really. If we're in a synthetic macro expansion (no positions), we must do our best to infer the position of something that triggerd this expansion. Surprisingly, quite often we can do this by navigation the enclosingMacros stack.

    Definition Classes
    Enclosures
  23. abstract val enclosingUnit: CompilationUnit

    Compilation unit that contains this macro application.

    Compilation unit that contains this macro application.

    Definition Classes
    Enclosures
  24. abstract def error(pos: Position, msg: String): Unit

    Definition Classes
    FrontEnds
  25. abstract def eval[T](expr: Expr[T]): T

    .

    ..

    Definition Classes
    Evals
  26. abstract val forInteractive: Boolean

    Determines whether the compiler expanding a macro is a presentation compiler.

    Determines whether the compiler expanding a macro is a presentation compiler.

    Definition Classes
    Infrastructure
  27. abstract val forJVM: Boolean

    Determines whether the compiler expanding a macro targets JVM.

    Determines whether the compiler expanding a macro targets JVM.

    Definition Classes
    Infrastructure
  28. abstract val forMSIL: Boolean

    Determines whether the compiler expanding a macro targets CLR.

    Determines whether the compiler expanding a macro targets CLR.

    Definition Classes
    Infrastructure
  29. abstract val forScaladoc: Boolean

    Determines whether the compiler expanding a macro is a Scaladoc compiler.

    Determines whether the compiler expanding a macro is a Scaladoc compiler.

    Definition Classes
    Infrastructure
  30. abstract def fresh[NameType <: Name](name: NameType): NameType

    Creates a fresh name from the provided name

    Creates a fresh name from the provided name

    Definition Classes
    Names
  31. abstract def fresh(name: String): String

    Creates a fresh string from the provided string

    Creates a fresh string from the provided string

    Definition Classes
    Names
  32. abstract def fresh(): String

    Creates a fresh string

    Creates a fresh string

    Definition Classes
    Names
  33. abstract def frontEnd: FrontEnd

    Exposes means to control the compiler UI

    Exposes means to control the compiler UI

    Definition Classes
    FrontEnds
  34. abstract val globalCache: Map[Any, Any]

    A cache shared by all invocations of all macros across all compilation runs.

    A cache shared by all invocations of all macros across all compilation runs.

    Needs to be used with extreme care, since memory leaks here will swiftly crash the presentation compiler. For example, Scala IDE typically launches a compiler run on every edit action so there might be hundreds of runs per minute.

    Definition Classes
    Infrastructure
  35. abstract def hasErrors: Boolean

    Definition Classes
    FrontEnds
  36. abstract def hasWarnings: Boolean

    Warnings and errors.

    Warnings and errors. Use enclosingPosition if you're in doubt what position to pass to pos.

    Definition Classes
    FrontEnds
  37. abstract def inferImplicitValue(pt: Type, silent: Boolean = true, withMacrosDisabled: Boolean = false, pos: Position = enclosingPosition): Tree

    Infers an implicit value of the expected type pt in the macro callsite context. Optional pos parameter provides a position that will be associated with the implicit search.

    Infers an implicit value of the expected type pt in the macro callsite context. Optional pos parameter provides a position that will be associated with the implicit search.

    If silent is false, TypeError will be thrown in case of an inference error. If silent is true, the typecheck is silent and will return EmptyTree if an error occurs. Such errors don't vanish and can be inspected by turning on -Xlog-implicits. Unlike in typeCheck, silent is true by default.

    Definition Classes
    Typers
  38. abstract def inferImplicitView(tree: Tree, from: Type, to: Type, silent: Boolean = true, withMacrosDisabled: Boolean = false, reportAmbiguous: Boolean = true, pos: Position = enclosingPosition): Tree

    Infers an implicit view from the provided tree tree from the type from to the type to in the macro callsite context.

    Infers an implicit view from the provided tree tree from the type from to the type to in the macro callsite context.

    Optional pos parameter provides a position that will be associated with the implicit search. Another optional parameter, reportAmbiguous controls whether ambiguous implicit errors should be reported. If we search for a view simply to find out whether one type is coercible to another, it might be desirable to set this flag to false.

    If silent is false, TypeError will be thrown in case of an inference error. If silent is true, the typecheck is silent and will return EmptyTree if an error occurs. Such errors don't vanish and can be inspected by turning on -Xlog-implicits. Unlike in typeCheck, silent is true by default.

    Definition Classes
    Typers
  39. abstract def info(pos: Position, msg: String, force: Boolean): Unit

    Informational messages, suppressed unless -verbose or force=true.

    Informational messages, suppressed unless -verbose or force=true. Use enclosingPosition if you're in doubt what position to pass to pos.

    Definition Classes
    FrontEnds
  40. abstract def interactive(): Unit

    Drops into interactive mode if supported by the compiler UI

    Drops into interactive mode if supported by the compiler UI

    Definition Classes
    FrontEnds
  41. abstract def libraryClassLoader: ClassLoader

    Exposes a classloader that corresponds to the library classpath.

    Exposes a classloader that corresponds to the library classpath.

    With this classloader you can perform on-the-fly evaluation of macro arguments. For example, consider this code snippet:

    def staticEval[T](x: T) = macro staticEval[T]

    def staticEval[T: c.TypeTag](c: Context)(x: c.Expr[T]) = { import scala.reflect.runtime.{universe => ru} val mirror = ru.runtimeMirror(c.libraryClassLoader) import scala.tools.reflect.ToolBox val toolBox = mirror.mkToolBox() val importer = ru.mkImporter(c.universe).asInstanceOf[ru.Importer { val from: c.universe.type }] val tree = c.resetAllAttrs(x.tree.duplicate) val imported = importer.importTree(tree) val valueOfX = toolBox.runExpr(imported).asInstanceOf[T] ... }

    // [Eugene++] using this guy will tremendously slow down the compilation // https://twitter.com/xeno_by/status/201248317831774208 // todo. we need to address this somehow

    Definition Classes
    Infrastructure
  42. abstract val libraryClassPath: List[URL]

    Exposes library classpath.

    Exposes library classpath.

    Definition Classes
    Infrastructure
  43. abstract def literal(x: Char): Expr[Char]

    Definition Classes
    ExprUtils
  44. abstract def literal(x: String): Expr[String]

    Definition Classes
    ExprUtils
  45. abstract def literal(x: Double): Expr[Double]

    Definition Classes
    ExprUtils
  46. abstract def literal(x: Float): Expr[Float]

    Definition Classes
    ExprUtils
  47. abstract def literal(x: Long): Expr[Long]

    Definition Classes
    ExprUtils
  48. abstract def literal(x: Int): Expr[Int]

    Definition Classes
    ExprUtils
  49. abstract def literal(x: Short): Expr[Short]

    Definition Classes
    ExprUtils
  50. abstract def literal(x: Byte): Expr[Byte]

    Definition Classes
    ExprUtils
  51. abstract def literal(x: Boolean): Expr[Boolean]

    Definition Classes
    ExprUtils
  52. abstract def literalFalse: Expr[Boolean]

    Definition Classes
    ExprUtils
  53. abstract def literalNull: Expr[Null]

    Definition Classes
    ExprUtils
  54. abstract def literalTrue: Expr[Boolean]

    Definition Classes
    ExprUtils
  55. abstract def literalUnit: Expr[Unit]

    Definition Classes
    ExprUtils
  56. abstract val macroApplication: Tree

    The tree that undergoes macro expansion.

    The tree that undergoes macro expansion. Can be useful to get an offset or a range position of the entire tree being processed.

    Definition Classes
    Enclosures
  57. abstract val mirror: MirrorOf[Context.this.universe.type]

    The mirror of the compile-time universe

  58. abstract def mkConsoleFrontEnd(minSeverity: Int = 1): FrontEnd

    Creates a reporter that prints messages to the console according to the settings.

    Creates a reporter that prints messages to the console according to the settings.

    minSeverity determines minimum severity of the messages to be printed. 0 stands for INFO, 1 stands for WARNING and 2 stands for ERROR.

    Definition Classes
    FrontEnds
  59. abstract def openImplicits: List[(Type, Tree)]

    Types along with corresponding trees for which implicit arguments are currently searched.

    Types along with corresponding trees for which implicit arguments are currently searched. Can be useful to get information about an application with an implicit parameter that is materialized during current macro expansion.

    Unlike enclosingImplicits, this is a def, which means that it gets recalculated on every invocation, so it might change depending on what is going on during macro expansion.

    Definition Classes
    Typers
  60. abstract def openMacros: List[Context]

    Contexts that represent macros in-flight, including the current one.

    Contexts that represent macros in-flight, including the current one. Very much like a stack trace, but for macros only. Can be useful for interoperating with other macros and for imposing compiler-friendly limits on macro expansion.

    Is also priceless for emitting sane error messages for macros that are called by other macros on synthetic (i.e. position-less) trees. In that dire case navigate the openMacros stack, and it will most likely contain at least one macro with a position-ful macro application. See enclosingPosition for a default implementation of this logic.

    Unlike enclosingMacros, this is a def, which means that it gets recalculated on every invocation, so it might change depending on what is going on during macro expansion.

    Definition Classes
    Typers
  61. abstract def parse(code: String): Tree

    .

    ..

    Definition Classes
    Parsers
  62. abstract val prefix: Expr[PrefixType]

    The prefix tree from which the macro is selected

  63. abstract def referenceCapturedVariable(vble: Symbol): Tree

    Mark given identifier as a reference to a captured variable itself suppressing dereferencing with the elem field.

    Mark given identifier as a reference to a captured variable itself suppressing dereferencing with the elem field.

    Definition Classes
    CapturedVariables
  64. abstract def reifyEnclosingRuntimeClass: Tree

    Given a type, generate a tree that when compiled and executed produces the runtime class of the enclosing class or module.

    Given a type, generate a tree that when compiled and executed produces the runtime class of the enclosing class or module. Returns EmptyTree if there does not exist an enclosing class or module.

    Definition Classes
    Reifiers
  65. abstract def reifyRuntimeClass(tpe: Type, concrete: Boolean = true): Tree

    Given a type, generate a tree that when compiled and executed produces the runtime class of the original type.

    Given a type, generate a tree that when compiled and executed produces the runtime class of the original type. If concrete is true, then this function will bail on types, who refer to abstract types (like ClassTag does).

    Definition Classes
    Reifiers
  66. abstract def reifyTree(universe: Tree, mirror: Tree, tree: Tree): Tree

    Given a tree, generate a tree that when compiled and executed produces the original tree.

    Given a tree, generate a tree that when compiled and executed produces the original tree. For more information and examples see the documentation for Universe.reify.

    The produced tree will be bound to the specified universe and mirror. Possible values for universe include basisUniverse and runtimeUniverse. Possible values for mirror include EmptyTree (in that case the reifier will automatically pick an appropriate mirror).

    This function is deeply connected to Universe.reify, a macro that reifies arbitrary expressions into runtime trees. They do very similar things (Universe.reify calls Context.reifyTree to implement itself), but they operate on different metalevels (see below).

    Let's study the differences between Context.reifyTree and Universe.reify on an example of using them inside a fooMacro macro:

    * Since reify itself is a macro, it will be executed when fooMacro is being compiled (metalevel -1) and will produce a tree that when evaluated during macro expansion of fooMacro (metalevel 0) will recreate the input tree.

    This provides a facility analogous to quasi-quoting. Writing "reify{ expr }" will generate an AST that represents expr. Afterwards this AST (or its parts) can be used to construct the return value of fooMacro.

    * reifyTree is evaluated during macro expansion (metalevel 0) and will produce a tree that when evaluated during the runtime of the program (metalevel 1) will recreate the input tree.

    This provides a way to retain certain trees from macro expansion time to be inspected later, in the runtime. For example, DSL authors may find it useful to capture DSL snippets into ASTs that are then processed at runtime in a domain-specific way.

    Also note the difference between universes of the runtime trees produced by two reifies:

    * The result of compiling and running the result of reify will be bound to the Universe that called reify. This is possible because it's a macro, so it can generate whatever code it wishes.

    * The result of compiling and running the result of reifyTree will be the prefix that needs to be passed explicitly. This happens because the Universe of the evaluated result is from a different metalevel than the Context the called reify.

    Typical usage of this function is to retain some of the trees received/created by a macro into the form that can be inspected (via pattern matching) or compiled/run (by a reflective ToolBox) during the runtime.

    Definition Classes
    Reifiers
  67. abstract def reifyType(universe: Tree, mirror: Tree, tpe: Type, concrete: Boolean = false): Tree

    Given a type, generate a tree that when compiled and executed produces the original type.

    Given a type, generate a tree that when compiled and executed produces the original type. The produced tree will be bound to the specified universe and mirror. For more information and examples see the documentation for Context.reifyTree and Universe.reify.

    Definition Classes
    Reifiers
  68. abstract def resetAllAttrs(tree: Tree): Tree

    Recursively resets symbols and types in a given tree.

    Recursively resets symbols and types in a given tree.

    Note that this does not revert the tree to its pre-typer shape. For more info, read up https://issues.scala-lang.org/browse/SI-5464.

    Definition Classes
    Typers
  69. abstract def resetLocalAttrs(tree: Tree): Tree

    Recursively resets locally defined symbols and types in a given tree.

    Recursively resets locally defined symbols and types in a given tree.

    Note that this does not revert the tree to its pre-typer shape. For more info, read up https://issues.scala-lang.org/browse/SI-5464.

    Definition Classes
    Typers
  70. abstract val runtimeUniverse: Tree

    Reification prefix that refers to the runtime reflexive universe, scala.reflect.runtime.universe. Providing it for the prefix parameter of reifyTree or reifyType will create a full-fledged tree that can be inspected at runtime.

    Reification prefix that refers to the runtime reflexive universe, scala.reflect.runtime.universe. Providing it for the prefix parameter of reifyTree or reifyType will create a full-fledged tree that can be inspected at runtime.

    Definition Classes
    Reifiers
  71. abstract def setCompilerSettings(options: List[String]): Context.this.type

    Updates current compiler settings with a list of options.

    Updates current compiler settings with a list of options. Use scalac -help, scalac -X and scalac -Y to learn about currently supported options.

    Definition Classes
    Settings
  72. abstract def setCompilerSettings(options: String): Context.this.type

    Updates current compiler settings with an option string.

    Updates current compiler settings with an option string. Use scalac -help, scalac -X and scalac -Y to learn about currently supported options. todo. http://groups.google.com/group/scala-internals/browse_thread/thread/07c18cff41f59203

    Definition Classes
    Settings
  73. abstract def setFrontEnd(frontEnd: FrontEnd): Context.this.type

    Definition Classes
    FrontEnds
  74. abstract def settings: List[String]

    Exposes macro-specific settings as a list of strings.

    Exposes macro-specific settings as a list of strings. These settings are passed to the compiler via the "-Xmacro-settings:setting1,setting2...,settingN" command-line option.

    Definition Classes
    Settings
  75. abstract def typeCheck(tree: Tree, pt: Type = WildcardType, silent: Boolean = false, withImplicitViewsDisabled: Boolean = false, withMacrosDisabled: Boolean = false): Tree

    Typechecks the provided tree against the expected type pt in the macro callsite context.

    Typechecks the provided tree against the expected type pt in the macro callsite context.

    If silent is false, TypeError will be thrown in case of a typecheck error. If silent is true, the typecheck is silent and will return EmptyTree if an error occurs. Such errors don't vanish and can be inspected by turning on -Ymacro-debug-verbose. Unlike in inferImplicitValue and inferImplicitView, silent is false by default.

    Typechecking can be steered with the following optional parameters: withImplicitViewsDisabled recursively prohibits implicit views (though, implicit vals will still be looked up and filled in), default value is false withMacrosDisabled recursively prohibits macro expansions and macro-based implicits, default value is false

    Definition Classes
    Typers
  76. abstract val universe: Universe

    The compile-time universe

  77. abstract def unreifyTree(tree: Tree): Tree

    Undoes reification of a tree.

    Undoes reification of a tree.

    This reversion doesn't simply restore the original tree (that would lose the context of reification), but does something more involved that conforms to the following laws:

    1) unreifyTree(reifyTree(tree)) != tree // unreified tree is tree + saved context // in current implementation, the result of unreify is opaque // i.e. there's no possibility to inspect underlying tree/context

    2) reifyTree(unreifyTree(reifyTree(tree))) == reifyTree(tree) // the result of reifying a tree in its original context equals to // the result of reifying a tree along with its saved context

    3) compileAndEval(unreifyTree(reifyTree(tree))) ~ compileAndEval(tree) // at runtime original and unreified trees are behaviorally equivalent

    Definition Classes
    Reifiers
  78. abstract def warning(pos: Position, msg: String): Unit

    Definition Classes
    FrontEnds
  79. abstract def withCompilerSettings[T](options: List[String])(op: ⇒ T): T

    Temporary sets compiler settings to a given list of options and executes a given closure.

    Temporary sets compiler settings to a given list of options and executes a given closure. Use scalac -help, scalac -X and scalac -Y to learn about currently supported options.

    Definition Classes
    Settings
  80. abstract def withCompilerSettings[T](options: String)(op: ⇒ T): T

    Temporary sets compiler settings to a given option string and executes a given closure.

    Temporary sets compiler settings to a given option string and executes a given closure. Use scalac -help, scalac -X and scalac -Y to learn about currently supported options.

    Definition Classes
    Settings
  81. abstract def withFrontEnd[T](frontEnd: FrontEnd)(op: ⇒ T): T

    Definition Classes
    FrontEnds

Concrete Value Members

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

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Test two objects for inequality.

    Test two objects for inequality.

    returns

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

    Definition Classes
    Any
  3. 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
  4. def +(other: String): String

    Implicit information
    This member is added by an implicit conversion from Context to StringAdd performed by method any2stringadd in scala.Predef.
    Definition Classes
    StringAdd
  5. def ->[B](y: B): (Context, B)

    Implicit information
    This member is added by an implicit conversion from Context to ArrowAssoc[Context] performed by method any2ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  6. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  7. final def ==(arg0: Any): Boolean

    Test two objects for equality.

    Test two objects for equality. The expression x == that is equivalent to if (x eq null) that eq null else x.equals(that).

    returns

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

    Definition Classes
    Any
  8. val AbsTypeTag: Context.this.universe.AbsTypeTag.type

    Definition Classes
    Aliases
  9. val Expr: Context.this.universe.Expr.type

    Definition Classes
    Aliases
  10. val TypeTag: Context.this.universe.TypeTag.type

    Definition Classes
    Aliases
  11. 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.

  12. 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[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
    Note

    not specified by SLS as a member of AnyRef

  13. 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 any2Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  14. def ensuring(cond: (Context) ⇒ Boolean): Context

    Implicit information
    This member is added by an implicit conversion from Context to Ensuring[Context] performed by method any2Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  15. 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 any2Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  16. def ensuring(cond: Boolean): Context

    Implicit information
    This member is added by an implicit conversion from Context to Ensuring[Context] performed by method any2Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  17. 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
  18. 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 Any.

    returns

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

    Definition Classes
    AnyRef → Any
  19. 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[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
    Note

    not specified by SLS as a member of AnyRef

  20. def formatted(fmtstr: String): String

    Returns string formatted according to given format string.

    Returns string formatted according to given format string. Format strings are as for String.format (@see java.lang.String.format).

    Implicit information
    This member is added by an implicit conversion from Context to StringFormat performed by method any2stringfmt in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  21. 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

  22. def hashCode(): Int

    The hashCode method for reference types.

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

    returns

    the hash code value for this object.

    Definition Classes
    AnyRef → Any
  23. 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
  24. def mkSilentFrontEnd(): FrontEnd

    Creates a UI-less reporter that simply accumulates all the messages

    Creates a UI-less reporter that simply accumulates all the messages

    Definition Classes
    FrontEnds
  25. 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
  26. 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

  27. 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

  28. def reify[T](expr: T): Expr[T]

    Alias to the underlying mirror's reify

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

    Definition Classes
    AnyRef
  30. 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
  31. def typeOf[T](implicit ttag: TypeTag[T]): Type

    Definition Classes
    Aliases
  32. def typeTag[T](implicit ttag: TypeTag[T]): TypeTag[T]

    Definition Classes
    Aliases
  33. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws()
  36. def [B](y: B): (Context, B)

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

Shadowed Implict Value Members

  1. val self: Any

    Implicit information
    This member is added by an implicit conversion from Context to StringAdd performed by method any2stringadd in scala.Predef.
    Shadowing
    This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
    To access this member you can use a type ascription:
    (context: StringAdd).self
    Definition Classes
    StringAdd
  2. val self: Any

    Implicit information
    This member is added by an implicit conversion from Context to StringFormat performed by method any2stringfmt in scala.Predef.
    Shadowing
    This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
    To access this member you can use a type ascription:
    (context: StringFormat).self
    Definition Classes
    StringFormat

Deprecated Value Members

  1. def x: Context

    Implicit information
    This member is added by an implicit conversion from Context to ArrowAssoc[Context] performed by method any2ArrowAssoc in scala.Predef.
    Shadowing
    This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
    To access this member you can use a type ascription:
    (context: ArrowAssoc[Context]).x
    Definition Classes
    ArrowAssoc
    Annotations
    @deprecated
    Deprecated

    (Since version 2.10.0) Use leftOfArrow instead

  2. def x: Context

    Implicit information
    This member is added by an implicit conversion from Context to Ensuring[Context] performed by method any2Ensuring in scala.Predef.
    Shadowing
    This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
    To access this member you can use a type ascription:
    (context: Ensuring[Context]).x
    Definition Classes
    Ensuring
    Annotations
    @deprecated
    Deprecated

    (Since version 2.10.0) Use resultOfEnsuring instead

Inherited from ExprUtils

Inherited from Evals

Inherited from TypeTags

Inherited from Exprs

Inherited from Parsers

Inherited from Typers

Inherited from Settings

Inherited from FrontEnds

Inherited from FrontEnds

Inherited from Reifiers

Inherited from Names

Inherited from Infrastructure

Inherited from Enclosures

Inherited from CapturedVariables

Inherited from Aliases

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion any2stringadd from Context to StringAdd

Inherited by implicit conversion any2stringfmt from Context to StringFormat

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

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